Tuesday, June 7, 2016

Fiori useful links

Fiori useful links :

This explains how to start with Fiori, and many other details for Beginers -  https://scn.sap.com/thread/3297804

Video explaining Odata service creation from RFC:

https://www.youtube.com/watch?v=kICE27JZ6Sc

Thursday, June 2, 2016

Monday, May 23, 2016

Serial number table

Get Serial number from Table for a Delivery

Give delivery number in SER01 (in LIEF_NR) and get OBKNR


Then put OBKNR in OBJK to get Serial number in SERNR

Wednesday, April 27, 2016

SPAU - Upgrade explained



Explanation of phase for SPAU

SPAU explained

The following week the DB will be converted to Unicode, now all SAP standard aspects should be OK, but any Z objects need review and processing with UCCHECK.

Unicode common issues


Monday, April 25, 2016

SLG1 Logging program


First go to SLG0 tcode, and setup Object 'ZCMS'

then put below code in your program 

   DATA: ls_log            TYPE BAL_S_LOG.  " CMS Logging
    DATA: ls_msg            TYPE BAL_S_MSG.
    DATA: ls_LOG_HANDLE     TYPE  BALLOGHNDL.
    DATA: lt_LOG_HANDLE     TYPE BAL_T_LOGH.


    CLEAR : ls_log.
    ls_log-object = 'ZCMS'.
    ls_log-aluser = sy-uname.
    ls_log-alprog = sy-repid.

    CALL FUNCTION 'BAL_LOG_CREATE'
      EXPORTING
        I_S_LOG                 = ls_log
      IMPORTING
        E_LOG_HANDLE            = ls_log_handle
      EXCEPTIONS
        LOG_HEADER_INCONSISTENT = 1
        OTHERS                  = 2.



        CLEAR: ls_msg.
        ls_msg-msgty = 'S'.
        ls_msg-msgid = 'ZCRM'.
        ls_msg-msgno = '000'.
        ls_msg-msgv1 = 'Process Type'.
        ls_msg-msgv2 = ''.
        ls_msg-msgv3 = lv_process_type.
        ls_msg-probclass = 2.


        CALL FUNCTION 'BAL_LOG_MSG_ADD'
          EXPORTING
            I_LOG_HANDLE     = ls_log_handle
            I_S_MSG          = ls_msg
          EXCEPTIONS
            LOG_NOT_FOUND    = 1
            MSG_INCONSISTENT = 2
            LOG_IS_FULL      = 3
            OTHERS           = 4.



    INSERT ls_log_handle INTO TABLE lt_log_handle.
    CALL FUNCTION 'BAL_DB_SAVE'
      EXPORTING
        I_CLIENT         = SY-MANDT
        I_IN_UPDATE_TASK = 'X'
        I_SAVE_ALL       = 'X'
        I_T_LOG_HANDLE   = lt_log_handle
      EXCEPTIONS
        LOG_NOT_FOUND    = 1
        SAVE_NOT_ALLOWED = 2
        NUMBERING_ERROR  = 3
        OTHERS           = 4.
    IF SY-SUBRC EQ 0.
      REFRESH: lt_log_handle.
    ENDIF.

Thursday, April 21, 2016

Product history in CRM - Function Module

FM -  CRM_PRODUCT_HISTORY_GET  - Product history in CRM – good one – need to give product guid


COMM_PRODUCTH - Table for Product History

COMM_PRODUCT - Table for Product master - we can get Guid here 

Wednesday, April 13, 2016

Short Dumps - understanding values



Your 3 rows are, top to bottom: Human readable*, Hexidecimal high value, Hexidecimal low value. 

So for character values you can already read them. 

* Now for the tricky part. Numeric values are often 'packed' so they use less memory. Each number that is printed has hex values 30 - 39 (ASCII, for EBCDIC F0 - F9). A packed number of length 13 will have a length in your dump of 7, ( (13 + 1) / 2 ). The number 1234567890123 will have hex format: 
1357913 
246802x 

The part hex value 'x' is an sign indicator, (no sign, posative, negative). Sorry I do not know the ASCII vaues, EBCDIC values were F, C, D.

------------------------------------------

To read numeric values from ABAP Short dumps:

The value is saved in ASCII and Hexadecimal

Check Hexadecimal – In below screen shot – highlighted part
This value is split into 2 lines. You need to read highlighted below as 00025052517D – This value is actually equal to 250525.17- (negative – may be last ‘D’ represent –ve)