Tuesday, March 8, 2016

CDHDR Object class


DEBI -  Customer master changes
VERKBELEG - Sales order changes

Idoc user exits - fetch item number from parent segment

 
Demo code for Idoc (EDI) user exits, where you don’t get item number in all segments.  This shows how to fetch item number from Parent segment (E1EDP01 in this case).
 
E1EDPA1 (Partner function segment in ORDERS idoc) does NOT have item number in it, So fetch from parent E1EDP01 (Item details) segment. To do that, write LOOP with  segnam = E1EDP01 or E1EDPA1 – demo code is shown below.
 
    LOOP AT int_edidd ASSIGNING <fs_edidd> WHERE segnam = 'E1EDP01'
                                             
OR  segnam = 'E1EDPA1'.

      
IF <fs_edidd>-segnam = 'E1EDP01'.
        
CLEAR : ls_e1edp01,
                lv_ebelp
.
        ls_e1edp01 
= <fs_edidd>-sdata.
        lv_ebelp   
=  ls_e1edp01-posex.
        
CONTINUE.
      
ENDIF.

      
CLEAR: ls_e1edpa1.
      
CHECK  <fs_edidd>-sdata+0(2) = 'WE'.
      ls_e1edpa1 
= <fs_edidd>-sdata.

      
REFRESH: lt_po_del_addr[].
*     Get  PO del address
      
CALL FUNCTION 'BAPI_PO_GETDETAIL1'
        
EXPORTING
          PURCHASEORDER    
= xekko-ebeln
          DELIVERY_ADDRESS 
= 'X'
        
TABLES
          POADDRDELIVERY   
= lt_po_del_addr.

*     Get Item PO delivery address
      
CLEAR: ls_po_del_addr.
      
READ TABLE lt_po_del_addr INTO ls_po_del_addr WITH KEY po_item = lv_ebelp.
      
IF sy-subrc EQ 0.
        ls_e1edpa1
-strs2 = ls_po_del_addr-str_suppl3.
        ls_e1edpa1
-pfach = ls_po_del_addr-location.
        <fs_edidd>
-sdata = ls_e1edpa1.
      
ENDIF.
    
ENDLOOP.
 

Friday, March 4, 2016

CRM Web UI Message type Id etc..



In most cases, the method responsible to bring the messages into the screen is ADD_MESSAGE of class CL_BSP_WD_MESSAGE_SERVICE.

https://scn.sap.com/thread/3163753

Manual completion of delivery - VL_COMPLETE

VL_COMPLETE – Transaction to manually complete Deliveries.  Can be used instead of deleting deliveries. 
 
 

Reset user buffer - Authorization SU56 or PFUD

Some times, though you changed user authorizations, they will not be immediately effective (You get error in SU53 saying ‘Available in the master data, but not in the user buffer’).
To fix this, you need to reset user buffer. This can be done in 2 ways.
 1)  SU56 : transaction SU56, and changing to the user that was having the issue and from the menu Authorization Values >  "Reset User Buffer".
 
2) PFUD :  Run for all roles, to regenerate all profiles

 

Thursday, March 3, 2016

CRM ECC Contact mapping tables


CRM table for Contact mapping - CRMM_BUT_CONTNO
ECC table for Contact mapping is CRMPARNR

For Customer to Business Partner mapping

CRM table for mapping:  CRMV_BUPA_CUSTNO
and  CRMM_BUT_CUSTNO contains mapping between Customer and BP Guid