Delta in  custom fields

Can some one provide me the links for blogs and threads on
  "maintaing delta" for custom fields, which are populated by custom abab code in user exit.
I couldn't find any blogs on this issue.
Thanks

hi go to the SAP market place you will find examples and a presentation
https://websmp202.sap-ag.de/~form/sapnet?_SHORTKEY=01100035870000682177&
go to Exits and find docts
· User Exits Examples (doc)
· User Exits in SAP BW (ppt)
here is the content of the first doc for the presentation go the link I provide and downoad it.
User Exit Examples (doc)
1.     Extending Business Content - EXIT_SAPLRSAP_001
data: l_s_icctrcst like icctrcst,                                          
         l_s_icctract like icctract,                                          
         l_s_icctrsta like icctrsta,                                          
         l_tabix      like sy-tabix.                                                                               
case i_isource.                                                                               
when '0CO_OM_CCA_1'.                                                     
       loop at c_t_data into l_s_icctrcst.                                    
         l_tabix = sy-tabix.                                                  
         select single * from z0001 where kokrs = l_s_icctrcst-kokrs          
                                    and   kostl = l_s_icctrcst-kostl.         
         if sy-subrc = 0.                                                     
           l_s_icctrcst-zfield1 = z0001-zfield1.                              
           l_s_icctrcst-zfield2 = z0001-zfield2.                              
           modify c_t_data from l_s_icctrcst index l_tabix.                   
         endif.                                                               
       endloop.                                                                               
when '0CO_OM_CCA_2'.                                                     
     when '0CO_OM_CCA_3'.                                                     
     when others.                                                             
       exit.                                                                               
endcase.                                                                 
2.     User Exit after Data loading
(a)     Delete old request
REPORT Z_RSSM_START_SECOND_PROCESS_1 .
TABLES: RSREQDONE,   " Request-Data
        RSSELDONE,   " Selection for current Request
        RSICCONT.    " Request posted to which InfoCube
DATA: L_T_SELDONE LIKE RSSELDONE OCCURS 0 WITH HEADER LINE.
DATA: L_T_ICUBE LIKE RSICCONT OCCURS 0 WITH HEADER LINE.
DATA: L_LOGSYS LIKE RSSELDONE-LOGSYS.
DATA: L_SOURCE LIKE RSSELDONE-SOURCE.
DATA: L_SELDATE LIKE RSSELDONE-SELDATE.
DATA: L_SELTIME LIKE RSSELDONE-SELTIME.
DATA: BEGIN OF L_T_RNR_DEL OCCURS 0,
        ICUBE LIKE RSICCONT-ICUBE,
        RNR   LIKE RSSELDONE-RNR,
      END OF L_T_RNR_DEL.
PARAMETER I_RNR LIKE RSREQDONE-RNR.
SELECT SINGLE * FROM RSSELDONE WHERE
       RNR = I_RNR.
IF SY-SUBRC <> 0. "new rquest does not exist, wrong rnr !!!
  EXIT.
ENDIF.
SELECT * FROM RSICCONT INTO TABLE L_T_ICUBE WHERE
       RNR = I_RNR.
IF SY-SUBRC <> 0.     "New request is not posted to any IC
  EXIT.               "nothing will be deleted
ENDIF.
L_SOURCE  = RSSELDONE-SOURCE.
L_LOGSYS  = RSSELDONE-LOGSYS.
L_SELDATE = RSSELDONE-SELDATE.
L_SELTIME = RSSELDONE-SELTIME.
SELECT * FROM RSSELDONE INTO TABLE L_T_SELDONE WHERE
       SOURCE  = L_SOURCE AND
       LOGSYS  = L_LOGSYS.
DELETE L_T_SELDONE WHERE
       RNR = I_RNR.            "new request will be deleted
DELETE L_T_SELDONE WHERE     "delete younger requests
         SELDATE > L_SELDATE OR
       ( SELTIME > L_SELTIME AND
         SELDATE = L_SELDATE ).
*Sort
SORT L_T_SELDONE BY SELDATE DESCENDING SELTIME DESCENDING.
REFRESH L_T_RNR_DEL.
LOOP AT L_T_SELDONE.   " Requests to be deleted
  LOOP AT L_T_ICUBE.   " Request existing in InfoCubes
    SELECT SINGLE * FROM RSICCONT WHERE
           ICUBE = L_T_ICUBE-ICUBE AND
           RNR   = L_T_SELDONE-RNR.            "check if posted to IC's
    IF SY-SUBRC = 0.
      L_T_RNR_DEL-ICUBE = L_T_ICUBE-ICUBE.
      L_T_RNR_DEL-RNR   = L_T_SELDONE-RNR.
      APPEND L_T_RNR_DEL.
    ENDIF.
  ENDLOOP.
  IF NOT L_T_RNR_DEL[] IS INITIAL. " something found for rnr
    EXIT.
  ENDIF.
ENDLOOP.
LOOP AT L_T_RNR_DEL.
  CALL FUNCTION 'RSSM_DELETE_REQUEST'
       EXPORTING
            REQUEST                    = L_T_RNR_DEL-RNR
            INFOCUBE                   = L_T_RNR_DEL-ICUBE
       EXCEPTIONS
            REQUEST_NOT_IN_CUBE        = 1
            INFOCUBE_NOT_FOUND         = 2
            REQUEST_ALREADY_AGGREGATED = 3
            REQUEST_ALREADY_COMDENSED  = 4
            OTHERS                     = 5.
  IF SY-SUBRC <> 0.
open for error-handling
  ENDIF.
ENDLOOP.
(b)     Send Mail after data load
data: document_data like  sodocchgi1,                                                                               
object_content like solisti1 occurs 0 with header line,          
      receivers like somlreci1 occurs 0 with header line.                                                                               
concatenate tstatus 'Request' rnr 'uploaded'                           
                    into document_data-obj_descr                       
                    separated by space.                                                                               
concatenate 'Request' rnr 'for Infosource' source 'uploaded'           
              into object_content-line  separated by space.            
              append object_content.                                                                               
concatenate   'from sourcesystem' logsys into object_content-line      
             separated by space.                                       
              append object_content.                                                                               
move 'METTEJ' to receivers-receiver. append receivers.                 
move 'D020095' to receivers-receiver. append receivers.
all function 'SO_NEW_DOCUMENT_SEND_API1'                
    exporting                                           
         document_data              = document_data     
         document_type              = 'RAW'             
         put_in_outbox              = ' '               
     IMPORTING                                          
         SENT_TO_ALL                =                   
         NEW_OBJECT_ID              =                   
    tables                                              
         OBJECT_HEADER              =                   
        object_content             = object_content     
         OBJECT_PARA                =                   
         OBJECT_PARB                =                   
         receivers                  = receivers         
    EXCEPTIONS                                          
         TOO_MANY_RECEIVERS         = 1                 
         DOCUMENT_NOT_SENT          = 2                 
         DOCUMENT_TYPE_NOT_EXIST    = 3                 
         OPERATION_NO_AUTHORIZATION = 4                 
         PARAMETER_ERROR            = 5                 
         X_ERROR                    = 6                 
         ENQUEUE_ERROR              = 7                 
         OTHERS                     = 8.
if sy-subrc <> 0.                                    
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO  
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.  
endif.
3. User Exit for Variables
DATA: L_S_RANGE TYPE RSR_S_RANGESID.
DATA: LOC_VAR_RANGE LIKE RRRANGEEXIT.
DATA: LOC_YEAR   LIKE  T009B-BDATJ,
      LOC_POPER  LIKE  T009B-POPER,
      LOC_DATE   LIKE  SY-DATUM.
CASE I_VNAM.
*-- SINGVAR - Variables: Variable SalesOrg, User-Exit, SingleValue
WHEN 'SINGVAR'.
    CLEAR L_S_RANGE.
    L_S_RANGE-LOW    = '4000'.
    L_S_RANGE-SIGN   = 'I'.
    L_S_RANGE-OPT    = 'EQ'.
    APPEND L_S_RANGE TO E_T_RANGE.
*-- INTVAR - Variables: Variable SalesOrg, User-Exit, Interval
  WHEN 'INTVAR'.
    L_S_RANGE-LOW    = '1000'.
    L_S_RANGE-HIGH   = '4000'.
    L_S_RANGE-SIGN   = 'I'.
    L_S_RANGE-OPT    = 'BT'.
    APPEND L_S_RANGE TO E_T_RANGE.
*-- HIERVAR - Variables: Variable SalesOrg, User-Exit, Hierarchy
  WHEN 'HIERVAR'.
    L_S_RANGE-LOW    = 'SD_DEMO5_SAL_HIER'.
    L_S_RANGE-SIGN   = 'I'.
    L_S_RANGE-OPT    = 'EQ'.
    APPEND L_S_RANGE TO E_T_RANGE.
*-- HNODEVAR - Variables: Variable SalesOrg, User-Exit, Hierarchy
  WHEN 'HNODEVAR'.
    L_S_RANGE-LOW    = 'EUROPE'.
    L_S_RANGE-HIGH   = '0HIER_NODE'.
    L_S_RANGE-SIGN   = 'I'.
    L_S_RANGE-OPT    = 'EQ'.
    APPEND L_S_RANGE TO E_T_RANGE.
*-- DMDATEFR - Variables: User-ExitExample, I_T_VAR_RANGE,
*-- determine the end of the period for a day
WHEN 'DMDATETO'.
    LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
         WHERE VNAM = 'DMDATEIN'.
      CLEAR L_S_RANGE.
      LOC_YEAR  = LOC_VAR_RANGE-LOW(4).
      CONCATENATE '0' LOC_VAR_RANGE-LOW+4(2) INTO LOC_POPER.
      CALL FUNCTION 'LAST_DAY_IN_PERIOD_GET'
           EXPORTING
                I_GJAHR        = LOC_YEAR
                I_PERIV        = '01'
                I_POPER        = LOC_POPER
           IMPORTING
                E_DATE         = LOC_DATE
           EXCEPTIONS
                INPUT_FALSE    = 1
                T009_NOTFOUND  = 2
                T009B_NOTFOUND = 3
                OTHERS         = 4.
      L_S_RANGE-LOW      = LOC_DATE.
      L_S_RANGE-SIGN     = 'I'.
      L_S_RANGE-OPT      = 'EQ'.
      APPEND L_S_RANGE TO E_T_RANGE.
      EXIT.
    ENDLOOP.
(4) User Exit Virtual Characteristics and Key figures
Example: InfoCube DEMOCUBE has the characteristic PRODUCT PRICE_TP and the key figure ACT_PRICE and QUANTITY. In the enhancement, the product from the current price for PRODUCT and the key figure QUANTITY should be determined. If successful, the characteristic PRICE_TP should contain the characteristic value '1'.                                                                               
The include ZXRSRU02: Definition                                                                               
***INCLUDE ZXRSRU02                                                                               
DATA: L_S_CHANM TYPE RRKE_S_CHANM.                                           
   CASE I_S_RKB1D-INFOCUBE.                            
     WHEN 'DEMOCUBE'.                                  
       L_S_CHANM-CHANM = 'PRODUCT'.                    
       L_S_CHANM-MODE  = RRKE_C_MODE-READ.             
       APPEND L_S_CHANM TO E_T_CHANM.                  
       L_S_CHANM-CHANM = 'PRICE_TP'.                   
       L_S_CHANM-MODE  = RRKE_C_MODE-NO_SELETION.                                                
       APPEND L_S_CHANM TO E_T_CHANM.                  
       APPEND 'ACT_PRICE' TO E_T_KYFNM.                
       APPEND 'QUANTITY'  TO E_T_KYFNM.                
   ENDCASE.                                                                               
The include ZXRSRTOP: global data                                                                               
***INCLUDE ZXRSRTOP .                                                                               
DATA: G_POS_DEMOCUBE_PRODUCT   TYPE I.              
  DATA: G_POS_DEMOCUBE_PRICE_TP  TYPE I.
  DATA: G_POS_DEMOCUBE_ACT_PRICE TYPE I.                    
  DATA: G_POS_DEMOCUBE_QUANTITY  TYPE I.                                                                               
The Include ZXRSRZZZ:  Changing the data                                                                               
***INCLUDE ZXRSRZZZ .                                                                               
FORM USER_DEMOCUBE USING    I_S_RKB1D TYPE RSR_S_RKB1D    
                      CHANGING C_S_DATA  TYPE ANY.                                                                               
FIELD-SYMBOLS .            
Routine to get the price                                                                               
PERFORM GET_PRICE USING    <L_PRODUCT>                
                  CHANGING <L_ACT_PRICE>.             
  IF   = '1'.                                                                               
ENDIF.                                                                               
ENDFORM.
or go for http://www.ko-india.com/content/weblogs from Ajay Das
(thanks Ajay)
Hope this could help you
regards
Boujema

Similar Messages

  • Delta load not picking the changes to Custom Fields in 0CRM_QUOTA_ORDER_I

    We have enhanced the structure of CRM datasource 0CRM_QUOTA_ORDER_I for some additional fields that are held on the quotation. These are being successfully extracted when the quotation is being created. We have been running with this exctract for some time but we have been made aware that the additional fields on the append structure are not being updated when the quotation is being changed. Therefore delta changes are not being picked up making the reports incorrect.
    The user exit we are using to extract the information is EXIT_SAPLRSAP_001
    Does anyone know how we can enable this change so that delta changes are picked up by the extractor.
    Many thanks
    Gareth
    Edited by: Gareth Aspinall on Jan 14, 2010 2:04 PM

    Hi Gareth,
    Can you please check that the custom fields were added as described in question 4 in the SAP note
    692195? If yes and there is still a problem please check that the SAP note  1319891 has been applied
    in your system, it is a pilot note so you will need to raise a message with SAP to get added to the pilot
    note.
    Best Regards,
    Des Gallagher.

  • How to make added custom field Delta mechanism work for LO Cookpit?

    We appended a new custome field into extraction structure of the LO Cookpit datasource 2LIS_02_ITM through RSA6. And then run CMOD to write the exit code to populate the value and it works fine. But after we read Roberto's Weblog:
    /people/sap.user72/blog/2005/02/14/logistic-cockpit--when-you-need-more--first-option-enhance-it , find the enhancement we did can't make the Delta mechanism works if only this new field gets changed in a record, and the change cannot be reflected on BW.
    In order to make the Delta mechansim works, one option is to append the custom field into one of the LIS Communication Structure MCEKKO of  2LIS_02_ITM extraction structure and then write the enhancement code to this LIS Communication Structure.  In this way, the custom field can be treated like standard field that whenever it gets changed, the Delta mechanism or the user exit will be triggered.  The enhancement for this LIS Communication Struture is LEINS001. 
    Now we've got two problems when doing the above enhancements of the LIS Communication structure:
    1.  Maintain extraction structure problem in LBWE:
    We added a custom field, e.g., called ZZZ in LIS Communication structure MCEKKO (Purchasing Document Header) by creating a new custom append structure and add the field ZZZ into it, then activate the new append structure, but get warning msg like "Field name DUMMY is reserved (Do not use structure as include in DB table)".
    We do find a field called DUMMY in the structure MCEKKO. How to get rid of the warning msg and successfully activate the new custom append structure with the new field ZZZ?
    You could say that we can ignore the warning msg, but why the new custom field appended can not be seen from the right side pool of the Maintain Extract Structure in LBWE?  We need to make the new custom field shows up in the right side pool and then drag it over to the left side frame and to activate the extraction structure to change it.  But now it doesn't show up in the right frame pool!
    2. Refer to Sanyam's weblog
    /people/sanyam.kapur/blog/2005/04/30/custom-fields-and-bw-extractors-making-a-mixed-marriage-work-part-ii, there is a sample code inside this article which tells us how the sample code looks like to write this LIS Communicaton structure enhancement to make the Delta mechanism works, below is the code we modified to suit our needs, but don't know if it would work?
    DATA: i_t_ekko LIKE ekko   OCCURS 1 WITH HEADER LINE.
    DATA: ebeln LIKE ekpo-ebeln,
          it_ekko TYPE TABLE OF ekko WITH HEADER LINE,
          old_val(50) TYPE c.  "For storing the value from the Field Symbol
    FIELD-SYMBOLS <fs> TYPE ANY TABLE.
    CASE zeitp.
      WHEN 'MA'.                            "When creating a purchase order
        MOVE '(SAPLEINS)T_EKKO[]' TO old_val.
        ASSIGN (old_val) TO <fs>.
        i_t_ekko[] = <fs>.
        LOOP AT xmcekko.
          ebeln = xmcekko-ebeln.
          IF xmcekko-supkz = '1'.            "Old Value ?
            SELECT SINGLE * FROM ekko INTO it_ekko WHERE ebeln = ebeln.
            xmcekko-ZZZ = it_ekko-ZZZ.
          ELSE.                              "New Value ?
            READ TABLE i_t_ekko WITH KEY ebeln = ebeln.
            xmcekko-ZZZ = i_t_ekko-ZZZ.
          ENDIF.
          MODIFY xmcekko.
        ENDLOOP.
    EndCase.
    Share your ideas and we will give you reward points!

    Hello Kevin
    We have exactly the same problem. Did you solve it? If you did, could you please tell us how you did it? We neither see our field in LBWE. Our field is a Z field from a Z table.
    I hope you could help us. We just have this issue to finish our project.
    Thanks a lot in advanced

  • Problem in delta management for custom fields added in standard Table

    Hi developers,
    we have a problem, when a sales order is modified in a field custom, added in tables (VBAP-VBAK), the delta BW doesn't recognize the modifications. The data type of these fields haven't the flag (Change document) setted in
    view Definition.
    If this flag is setted, Can the delta BW recognize the modifications of the custom fields?
    Best regards
    Domenico

    You cannot get delta by just appending fields to extract structure & writing the user exit coding as this user exit code is run by the extractor after the X- and Y- tables are compared to create the before & after images.
    You have to do this procedure by enhancing  LIS comm structures like MCVBAP (for example).
    Please refer to OSS note 576886 for complete details.
    Kumar Gudiseva.

  • Delta enabling for Custom fields after Master Data Enhancement

    Dear Friends,
    Two new custom fields were added to MARA table in ECC. I enhanced the extractor 0MATERIAL_ATTR by adding an append structure and added these new fields. For enabling DELTA, I did the following:
    1. In table ROOSGEN  lookup the 'Message Type' for extractor 0MATERIAL_ATTR. Found 'RS0152' as message type.
    2. Used transaction BD52 to create and entry in table 'TBD62' for Message Type - 'RS0152', Change object- 'MATERIAL' and fields - ZFIELD1 and ZFIELD2.
    3. Did a SCC1 in the test system for the transport carrying the above changes and did a re-init in BW. Then did a DELTA.
    I am seeing 0 records for DELTA eventhough I made some changes to the ZFIELDS in ECC.
    Please share your thoughts and suggestions if I am missing anything.
    Thanks,
    Raj

    Hi Raj,
    Check the following
    1) If you transport the changes, the message type name changes across the system
    2) The Data Element of the Z fields, check whether you have set the 'Change Documents' option in the 'DEFINITION' tab(Below th Parameter ID).
    Regards,
    BINetweaver2004s

  • Delta issue for Customized field in LO Datasource.

    Hello,
    I have one customized field 'ZCOORNAME' in the DS 2LIS_05_Q0NOTIF. I have changed this field in Tcode- QM02 and checked the changes in TCODE - LBWQ (Extraction Queue) and I got the Changed entry but now when i am trigerring the V3 Job, these changes are not getting populated in RSA7 (Delta Queue).
    For standard field changes, it is capturing delta properly, the problem is with only customized fileds..Can anyone put some light on this issue ....
    Can you pls le me know when will be the Customer Exit(CMOD) is going to hit ? Before the Delta Queue or After the Delta Queue or is it before the Extraction Queue / After the Extraction Queue ???
    BR /  PT..

    I have one customized field 'ZCOORNAME' in the DS 2LIS_05_Q0NOTIF. I have changed this field in Tcode- QM02 and checked the changes in TCODE - LBWQ (Extraction Queue) and I got the Changed entry but now when i am trigerring the V3 Job, these changes are not getting populated in RSA7 (Delta Queue).
    For standard field changes, it is capturing delta properly, the problem is with only customized fileds..Can anyone put some light on this issue ....
    Please try activating the datasopurce again and try it.
    Can you pls le me know when will be the Customer Exit(CMOD) is going to hit ? Before the Delta Queue or After the Delta Queue or is it before the Extraction Queue / After the Extraction Queue ???
    he customer exit is hit before the entries are populated in extraction queue. Actually, when the transaction is done, the changes are written to database table and at the same time into the extraction queue. Just before going to extraction queue, the custom fields get populated in customer exit.

  • 0CO_OM_OPA_6: Custom fields added, Data - available in RSA3, but not in PSA

    Hi Friends,
    I have added some custom fields to the 0CO_OM_OPA_6 data source. Following are the details.
    1) Custom fields: ZZEBELN (Purchasing Doc), ZZUSNAM (Username)
    2) Code populated in SE19 (BADI for this Datasource)
    3) RSA3: Test extraction pulls the records for both the custom fields correctly.
    4) RSA5, and RSA6 - Fields are unchecked for hidden and field only. They are made available.
    5) Extract Structure replicated into BW and its pulled over from extract structure into Transfer structure.
    6) Mapped to corresponding fields in BW update rule and transfer rules. (No routines or formulas exist)/
    7) When load extracted into BW, data is blank for both the fields in PSA itself.
    Our BW is 7.3 but we still use this datasource as 3.x transfer rules and datasource. In BW, it is connected to the Cube 0OPA_C11 via update rules and 3.x transfer rules only.
    Is there any reason for the data being populated into the RSA3, where as not into PSA. Please consider the above points, and let me know if I have done or missing anything here in my steps. I have gone thru several forums and havent got any specific replies for such issues. Have you come across such issues, please share your thoughts and views.
    Any of your replies will definitely help. Really appreciate your inputs.
    Thanks!!
    Prasith

    Hi Prasith ,
    After reading all the answers , what i feel we are  missing a major step ie  Re-initialization of the cube .
    As you changed the extract structure and added new fields and for this Data source i assume that deltas were  running already  , the BW  system cannot pull these new fields directly from ECC unless you have not done a  re-INit again .
    The Re-init is pretty simple and not as complex as LO.
    I would advise you to re-init for 01.2014 till 016.9999  , run full load and then delatas  will flow in later on . Check during the full load if you are able to see these fields in BW in (PSA/ Cube) .
    But be careful you need to do Re-init only on week ends when there are no transactions happening else you might end up in duplicate data .
    Hope this helps !
    Let me know how it goes .
    Regards
    Zeenath

  • Custom fields mapping issue of sales order replication from R/3 to CRM

    Hello Experts,
    I have to replicate sales orders from R/3 to CRM system (Initial and Delta)
    The issue is I have custome fields in R/3 which are maintained in custom table(Z table) in R/3.
    We added those custom fields in CRM customer_i table to synchronise with R/3 data.
    To MAP R/3 custom fields to CRM custom fields, i have the following customization.
    1. Added the custom function module in the event CRMO_200 and moved all the custom fields into interal table  IT_OTHER_INFO.
    2. The intrnal table IT_OTHER_INFO with data is passed into CRM standard function modules.
    3. But in CRM the BADI 'CRM_DATAEXCHG_BADI' implementation does not have the input parameter of internal table TI_OTHER_INFO.
    All my custom data is in internal table TI_OTHER_INFO.
    Please suggest where can i map this data to CRM enhanced fields.
    Regards,
    Umashankar.

    Hello Vanessa,
    Thank you so much for your reply.
    I went through the Note (1053817). It is good. I understand that the custom fields should enhance in the BAPE_VBAP in R/3.
    My Scenario:
    Goal: Orders replication from R/3 to CRM along with Custom fields.
    In R/3, all the custom fields are maintained in Z table (Not VBAK or VBAP).
    All these custom fields are belongs to Item level.
    In CRM, The custom fields are maintained in CRMD_CUSTOMER_I table though AET.
    I need to MAP these custom fields to CRM while order replication from R/3 to CRM.
    Regards,
    Umashankar.

  • Custom Fields in BP to be replicated to KNA1

    Hi.
    I am working on the SAP CRM 4.0 and SAP r/3 4.6C.
    I have extended the BP by custom fields by EEWB and also the KNA1 table in R/3.
    ZBSTC000000000C is the structure in the BUT000 with the field ZZSHIPTOSTOR0001.
    ZBSTC000000000C is also added in KNA1 table with the field ZZSHIPTOSTOR0001.
    We would be creating the BP's in the CRM and have them delta downloaded to R/3.
    The data in the field ZZSHIPTOSTOR0001 should also be replicated to the R/3.
    <b>IN CRM.</b>
    I have created the FM : Z_BANK_MASTER_SMOUTIL2 in the CRM and made entry in the table TPS34 for the Procss SMOUTIL2.
    The Code is as below.
    FUNCTION Z_BANK_MASTER_SMOUTIL2.
    ""Local interface:
    *"  IMPORTING
    *"     VALUE(I_HEADER) TYPE  SMW3_FHD
    *"     VALUE(I_TRANSACTION_HEADER) TYPE  SMO8_TMSG
    *"     VALUE(I_TRANSACTION_MESSAGE) TYPE  ANY
    *"     VALUE(I_MESSAGE_EXT) TYPE  ANY
    *"     VALUE(I_SITE_ID) TYPE  SMOG_SITE
    *"     REFERENCE(I_RECIPIENTS) TYPE  SMW_RECTA2
    *"     REFERENCE(I_QNAME) TYPE  TRFCQNAM
    *"  TABLES
    *"      T_BAPIMTCS STRUCTURE  BAPIMTCS
    *"      T_BAPICRMSFK STRUCTURE  BAPICRMSFK
    *"      T_BAPIPAREX STRUCTURE  BAPIPAREX
    *"      TI_QRFCRCV STRUCTURE  QRFCRCV
    *"  CHANGING
    *"     REFERENCE(E_STATUS) TYPE  SMW3_RECST
    *"     REFERENCE(E_SUCCESS_BEHAVIOUR) TYPE  SMOFSUCBEF
    *"     REFERENCE(E_NO_STANDARD_UPLOAD) TYPE  XFELD
    *"     REFERENCE(ERROR_SEGMENTS) TYPE  SMW_ERRTAB
    *"     REFERENCE(E_BAPICRMUH1) TYPE  BAPICRMUH1
      data : ls_ZZSHIPTOSTOR0001 type ZILGCUSTOMFIELDS.
      data : ls_bapimtcs TYPE bapimtcs,
             lv_partner_guid TYPE bu_partner_guid_32,
             next_free_currdno TYPE currdno VALUE 1.
      CASE i_header-bdoc_type.
    Extension for Business Transaction
        WHEN 'SALESDOCUMENT'.
    Extension for Business Partner
        WHEN 'BUPA_MAIN'.
          CALL FUNCTION 'Z_MAP_BUPA_TO_MW'
            EXPORTING
              i_header              = i_header
              i_transaction_header  = i_transaction_header
              i_transaction_message = i_transaction_message
              i_message_ext         = i_message_ext
              i_site_id             = i_site_id
              i_recipients          = i_recipients
            TABLES
              t_bapimtcs            = t_bapimtcs
              t_bapicrmsfk          = t_bapicrmsfk
              t_bapiparex           = t_bapiparex
            CHANGING
              e_status              = e_status
              e_success_behaviour   = e_success_behaviour
              e_no_standard_upload  = e_no_standard_upload
              error_segments        = error_segments
              e_bapicrmuh1          = e_bapicrmuh1.
      ENDCASE.
    *Use the following macro definition to get full Unicode support:
    Macro MOVE_CASTING *************************************
      FIELD-SYMBOLS: <unicode_x1> TYPE x,
      <unicode_x2> TYPE x.
      DEFINE move_casting.
        assign &1 to <unicode_x1> casting.
        assign &2 to <unicode_x2> casting.
        move <unicode_x1> to <unicode_x2>.
      END-OF-DEFINITION.
    ENDFUNCTION.
    FUNCTION Z_MAP_BUPA_TO_MW.
    ""Local interface:
    *"  IMPORTING
    *"     REFERENCE(I_HEADER) TYPE  SMW3_FHD
    *"     REFERENCE(I_TRANSACTION_HEADER) TYPE  SMO8_TMSG
    *"     REFERENCE(I_TRANSACTION_MESSAGE) TYPE  ANY
    *"     REFERENCE(I_MESSAGE_EXT) TYPE  ANY
    *"     REFERENCE(I_SITE_ID) TYPE  SMOG_SITE
    *"     REFERENCE(I_RECIPIENTS) TYPE  SMW_RECTA2
    *"  TABLES
    *"      T_BAPIMTCS STRUCTURE  BAPIMTCS
    *"      T_BAPICRMSFK STRUCTURE  BAPICRMSFK
    *"      T_BAPIPAREX STRUCTURE  BAPIPAREX
    *"  CHANGING
    *"     REFERENCE(E_STATUS) TYPE  SMW3_RECST
    *"     REFERENCE(E_SUCCESS_BEHAVIOUR) TYPE  SMOFSUCBEF
    *"     REFERENCE(E_NO_STANDARD_UPLOAD) TYPE  XFELD
    *"     REFERENCE(ERROR_SEGMENTS) TYPE  SMW_ERRTAB
    *"     REFERENCE(E_BAPICRMUH1) TYPE  BAPICRMUH1
      tables : bnka,but000.
      data : int type i.
      data : ls_ZZSHIPTOSTOR0001 type ZILGCUSTOMFIELDS.
      data : ls_ZBSTC000000000C type ZBSTC000000000C.
      data : ls_ZILGCUSTOMFIELDS type ZILGCUSTOMFIELDS.
      data : ls_bapimtcs TYPE bapimtcs,
             lv_partner_guid TYPE bu_partner_guid_32,
             next_free_currdno TYPE currdno VALUE 1.
      data : ls_but000 type but000.
      FIELD-SYMBOLS: <fs_msg_bupa> TYPE bus_ei_main,
      <fs_msg_bpext> TYPE bus_ei_extern.
      DATA lr_cast_illegal TYPE REF TO cx_sy_assign_cast_illegal_cast.
      DATA lr_cast_unknown TYPE REF TO cx_sy_assign_cast_unknown_type.
      DATA : LS_BNKA     TYPE BNKA,
             LS_BNKA_MEM TYPE BNKA,
             LT_BNKA     TYPE TABLE OF BNKA,
             LT_BNITAB   TYPE TABLE OF BNKT,
             UNAME       LIKE SY-UNAME.
      DATA: BEGIN OF PARAMETER_TAB OCCURS 0.
              INCLUDE STRUCTURE ZPARAMETER.
      DATA: END OF PARAMETER_TAB.
      loop at T_BAPIMTCS.
        if T_BAPIMTCS-currdno > next_free_currdno.
          next_free_currdno = T_BAPIMTCS-currdno + 1.
        endif.
      endloop.
      assign i_message_ext to <fs_msg_bupa>.
      if sy-subrc <> 0.
        exit.
      endif.
      LOOP AT <fs_msg_bupa>-partners
      ASSIGNING <fs_msg_bpext> WHERE header-object_instance-bpartnerguid EQ T_BAPIMTCS-OBJKEY.
        select single * from But000 where PARTNER_GUID eq T_BAPIMTCS-OBJKEY.
    pack data into transfer structure
        CLEAR: ls_bapimtcs.
        ls_bapimtcs-tabname =  'ZBSTC000000000C'.
        ls_bapimtcs-segtype = 'DA'.
        ls_bapimtcs-currdno = next_free_currdno.
        ls_bapimtcs-objkey = lv_partner_guid.
        ls_bapimtcs-relkey = lv_partner_guid.
        move-corresponding But000 to ls_ZBSTC000000000C.
        move_casting ls_ZBSTC000000000C ls_bapimtcs-data.
        APPEND ls_bapimtcs TO t_bapimtcs.
      ENDLOOP.
    ENDFUNCTION.
    The table t_bapimtcs is populated with the structure ZBSTC000000000C.The data is also populated.
    <b>IN R/3 system.</b>
    I have created the FM "ZSAMPLE_PROCESS_CRM0_300".
    The table TPS34 is added with CRM0_300 as procs and the FM "ZSAMPLE_PROCESS_CRM0_300" is assigned.
    FUNCTION ZSAMPLE_PROCESS_CRM0_300.
    ""Local interface:
    *"  IMPORTING
    *"     REFERENCE(I_BAPICRMUH1) LIKE  BAPICRMUH1 STRUCTURE  BAPICRMUH1
    *"  EXPORTING
    *"     REFERENCE(E_NO_STANDARD_UPLOAD) LIKE  CRM_PARA-XFELD
    *"  TABLES
    *"      T_BAPIMTCS STRUCTURE  BAPIMTCS
    *"      T_BAPIPAREX STRUCTURE  BAPIPAREX
    *"      T_BAPICRMSFK STRUCTURE  BAPICRMSFK
    *"      T_BAPICRMMSG STRUCTURE  BAPICRMMSG
    *"  EXCEPTIONS
    *"      EVENT_NOT_CALLED
      data : int type i.
      data : c_kunnar like kna1-kunnr.
      data : o_kna1 like standard table of kna1,
             n_kna1 like standard table of kna1,
             I_KNA1 like standard table of kna1,
             i_knb1 like standard table of knb1.
      data :   o_but000 like standard table of but000,
               n_but000 like standard table of but000.
    tables : kna1.
      data : ls_ZBSTC000000000C type ZBSTC000000000C.
      data : ls_ZZSHIPTOSTOR0001 like kna1-ZZSHIPTOSTOR0001.
      case I_BAPICRMUH1-OBJNAME.
        when 'CUSTOMER_MAIN' OR 'BUPA_MAIN'.
      endcase.
      field-symbols : <fs_msg_kna1> type kna1,
                      <fs_msg_cuext> type ZBSTC000000000C.
      data : g_kunnr like kna1-kunnr.
      loop at T_BAPIMTCS where tabname eq 'BSC_MAINI'.
        move t_bapimtcs-data+0(10) to g_kunnr.
      endloop.
      loop at T_BAPIMTCS where tabname = 'ZBSTC000000000C'.
          move_casting t_bapimtcs-data ls_ZZSHIPTOSTOR0001.
      endloop.
      field-symbols : <unicode_x1>  type x,
                      <unicode_x2>  type x.
      define move_casting.
        assign &1 to <unicode_x1>casting.
        assign &2 to <unicode_x2>casting.
        move  <unicode_x1> to <unicode_x2>.
      end-of-definition.
    ENDFUNCTION.
    The table t_bapimtcs is populated with the data.
    But i am not able to have the data in the table KNA1 table of the R/3 system.
    How can i unpack the data in t_bapimtcs  and modify the table KNA1.
    Could any one pls advise.
    Thanks.
    Muraghendra D

    Hello Muraghendra, I had a very similar requirement in my project and ran in to similar problems. The idea of packing data on the CRM side and unpacking on the R/3 side was relatively straight forward, but how to update KNA1 or KNVV in my particular case, was a bit tricky. It turned out that one needs to manipulate an IDOC. In our correspondence with SAP on the matter they said the following:
    +"In R/3 the processing(in both cases replication and updation) is done in the following manner.
    1.The BAPIMTCS structures are converted to complex structures.
    2.The complex structures are converted to Idocs.
    3.The checks for required fields is made.
    4.The data is saved to the data base via a batch input transaction.
    Note: Unlike in CRM, R/3 does not use BAPIs for saving to data base.
    The function module PI_BP_DE_BALE_VTBER in the R/3 system(this is present in the UD1 system) can be used as a template for converting the BAPIMTCS to complex structure and to Idocs. Once the data is present in
    the Idocs, the batch input would take care of saving the data. The flow would be the same in both the cases (replication and updation).
    You may register your function module with the event DE_BALE. This function module would be called just before the system executes Step 3.
    Note: The Idocs that are used are mapped directly to the underlying tables table(for example KNA1, KNVV etc.) and will have the necessary field(in this case KNVV-PERFK)."+
    In my particular example I had to enhance the business partner on the CRM side with the field PERFK. This field already exist on the R/3 side and the task was then to allow CRM to be the master of all customer updates and consequently transfer any changes of the field PERFK in CRM to KNVV-PERFK in R/3. I think you will find that this requirement is similar to your own requirement.
    In the end my code looked like this in R/3:
      DATA: LV_FOUND   TYPE C,
            LS_E1KNVVM LIKE E1KNVVM,
            LS_E1KNA1M LIKE E1KNA1M,
            LS_IDOC_DATA LIKE EDIDD,
            LS_PERFK type BSS_CENTI.
      constants: c_vkorg_6002 type VKORG value '6002',
                 c_vtweg_60 type VTWEG value '60',
                 c_spart_60 type SPART value '60',
                 c_msgfn_004 type msgfn value '004'.
      FIELD-SYMBOLS <unicode_x1> type c.
      FIELD-SYMBOLS <unicode_x2> type c.
      DEFINE move_casting.
        assign &1 to <unicode_x1> casting.
        assign &2 to <unicode_x2> casting.
        move <unicode_x1> to <unicode_x2>.
      END-OF-DEFINITION.
      CHECK NOT is_complex_structure IS INITIAL.
      LOOP AT it_bapimtcs WHERE tabname = 'BSS_CENTI'
          AND relkey(32) =
          is_complex_structure-header-object_instance-bpartnerguid.
        CLEAR LV_FOUND.
        CLEAR LS_E1KNVVM.
        move_casting IT_BAPIMTCS-DATA LS_perfk.
        LOOP AT CT_IDOC_DATA WHERE SEGNAM = 'E1KNVVM'. "Hvis E1KNVVM
          LS_E1KNVVM = CT_IDOC_DATA-SDATA.             "segmentet allerede
          LV_FOUND = 'X'.                              "eksisterer
          MOVe LS_perfk-zzperfk TO LS_E1KNVVM-perfk.
          CT_IDOC_DATA-SDATA = LS_E1KNVVM.
          MODIFY CT_IDOC_DATA.
          EXIT.
        ENDLOOP.
        IF NOT LV_FOUND = 'X'.
          CALL FUNCTION 'PI_BP_INIT_IDOC_STRUCTURES'
               IMPORTING
                    ES_E1KNVVM = LS_E1KNVVM
               EXCEPTIONS
                    OTHERS     = 0.
          MOVe LS_perfk-zzperfk TO LS_E1KNVVM-perfk.
          LS_E1KNVVM-MSGFN = c_msgfn_004. "Beskeden indeholder ændringer
          LS_E1KNVVM-VKORG = c_vkorg_6002.
          LS_E1KNVVM-VTWEG = c_vtweg_60.
          LS_E1KNVVM-SPART = c_spart_60.
          CT_IDOC_DATA-SEGNAM = 'E1KNVVM'.
          CT_IDOC_DATA-SDATA  = LS_E1KNVVM.
          APPEND CT_IDOC_DATA.
        ENDIF.
      ENDLOOP.
    I hope this helps. Otherwise, please ask again.
    Rgds.
    Anders

  • Adding Custom Fields to Communication Structure of 2LIS_02_ITM (MCEKPO)

    Hi
    I have a question about addiing additional fields (KO_PPRCTR) into MCEKPO and enabling it as part of 'true' DELTA.
    The question is then:
    Does the fact that we have this Custom field from EKPO added to MCEKPO would cause DELTA to be triggered automatically each time this field would change? (irrespective of whether a Standard field in MCEKPO has also changed or not).
    Thanks
    BC

    Hi Blues,
    According to the sap online document about data source 2LIS_02_ITM http://help.sap.com/saphelp_sm32/helpdata/en/58/f6383fdb800804e10000000a114084/frameset.htm
    "if you change a purchasing document, the system only takes into consideration the data that is relevant for extraction. The system therefore only executes a delta update for this DataSource if changes are made to purchasing document header data or item data that has a corresponding field in the DataSource."
    which means only changes to standard fields of the datasource will trigger a delta update.
    But who knows, Stefan's answer may be right. Practice is the sole criterion for testing truth, so why not have a test?
    Additionally, you could also check the famous blog article about this topic by Roberto Negro:
    /people/sap.user72/blog/2005/02/14/logistic-cockpit--when-you-need-more--first-option-enhance-it
    Hope it helps.
    Regards,
    Qing

  • Add IT0006 custom fields for segment definition E1P0006 basic type HRMD_A06

    Hello!  I am am trying to determine how to bring in our custom fields from IT0006 into our IDOC's for message type HRMD_A basic type HRMD_A06 without performing a custom SAP modification.  I was able to create a new segement definition called Z1P0006 and replace the SAP standard E1P0006 IDOC segment defintion in table T777D for infotyp 0006 to Z1P0006.  However, I receive a message that I must not maintain this IDOC segment manually and instead you must maintain infotypes and their individual elements by using the transactions for processing infotypes: PPCI or PM01 (Infotype copy transaction for personnel administration). 
    Does anyone know of a way to bring in the new custom infotype fields from i.e. reimport the table structure for IT0006 into the segment definition without a custom SAP modificaiton?  I would really appreciate any help on this topic!
    Thanks!
    Holly

    unfortunately, the standard do not provide the infotypes for the HR-TM (Time Management), that
    are between the structures i must send in the other system sap.
    Ok, I have never delt with Time data in HRMD_A. Probably this is the case then
    Ok,now i've checked the filter in BD64 and the tables BDCP2, CDHDR and CDPOS but it seems
    all correct!!
    By checking Filters I mean that confirm if you have added Time Infotypes there (just
    making sure). If data is appearing in BDCP2 that means there is no problem in Change
    pointer creation, Just ruling out possibility.
    Try with an user exit it's a good idea, but why in the PFAL the idoc (with the custom segments)
    is created without problems and in the BD21 no??? This is very strange
    1) Well BD21 uses the Function module (TBDME for HRMD_A) which read change pointers and
    create IDOCs. So now if you have extended Segment you have to add your population code
    here somewhere.
    2) PFAL is Push program, my assimption here is you have wriiten some piece of code to
    populate Additinal segments data here? Otherwise IDOC will not be populated
    automatically.
    Let me know what you think.

  • Sample code for a custom field added to LIS Communication structure for Del

    We appended a new custome field into extraction structure of the LO Cookpit datasource 2LIS_02_ITM through RSA6.  And then run CMOD to write the exit code to populate the value and it works fine.  But after we read Roberto's Weblog:
    /people/sap.user72/blog/2005/02/14/logistic-cockpit--when-you-need-more--first-option-enhance-it
    Find the enhancement we did can't make the Delta mechanism works if only this new field gets changed in a record, and the change cannot be reflected on BW.  I know we can run SMOD on the enhancement LEINS001 to write the code for LIS Communication structure customer exit.  But we have never writen such a code for LIS Communication Structure enhancement and also don't know on how to make the Delta mechanism works in the code.  We would be very appreciated if some expert here can provide the sample code!
    Thanks

    hi AHP,
    Have you tried Sanyam's code listed in this article you recommended?
    Now our R3 team has added a custom field called ZZZ to EKKO table and I modify the code to suit our need and the code would be as following:
    *& Include ZXM06U16 *
    DATA: i_t_ekko LIKE ekko OCCURS 1 WITH HEADER LINE.
    DATA: ebeln LIKE ekpo-ebeln,
    it_ekko TYPE TABLE OF ekko WITH HEADER LINE,
    old_val(50) TYPE c. "For storing the value from the Field Symbol
    FIELD-SYMBOLS <fs> TYPE ANY TABLE.
    CASE zeitp.
    WHEN 'MA'. "When creating a purchase order
    MOVE '(SAPLEINS)T_EKKO[]' TO old_val.
    ASSIGN (old_val) TO <fs>.
    i_t_ekko[] = <fs>.
    LOOP AT xmcekko.
    ebeln = xmcekko-ebeln.
    IF xmcekko-supkz = '1'. "Old Value ?
    SELECT SINGLE * FROM ekko INTO it_ekko WHERE ebeln = ebeln.
    xmcekko-ZZZ = it_ekko-ZZZ.
    ELSE. "New Value ?
    READ TABLE i_t_ekko WITH KEY ebeln = ebeln.
    xmcekko-ZZZ = i_t_ekko-ZZZ.
    ENDIF.
    MODIFY xmcekko.
    ENDLOOP.
    EndCase.
    The compile of the above code works fine and we activated everywhere including project level. Then we set debug points in this code, and run RSA3 on 2LIS_02_ITM, but find the extraction program never reaches this code or call this user exit function EXIT_SAPLEINS_001 of this enhancement LEINS001. Any reason?
    Thanks
    Kevin
    Message was edited by: Kevin Smith

  • CRM extractor 0CRM_SERV_PROCESS_H delta for ZZ-fields not working

    Dear all,
    We are experiencing trouble with a extractor 0CRM_SERV_PROCESS.
    We have extended the extract structure of this extractor with an append structure containing some custom date and text fields.
    When doing a full load or a delta init, all fields arrive properly in SAP BW.  In RSA3 in CRM, everything appears to be correct.
    When performing a delta update however, the custom fields appear as null in SAP BW while the standard fields are updated normally (null as in empty or 00000).
    After browsing thru this forum and some sap notes (661340, 692195, 871930, 887724, 892022) I still haven't found a solution.
    Does anyone have an idea of how to solve this?
    Thanks in advance
    Jan W

    HI,
    What is the logic you ahve used to populate the values for new appended fields ?
    Is it BADi, User Exits or mapping module enhancement ? Value population to custom field code should be checked throughly.

  • Error while adding a custom field with Input help via AET

    Hi All,
    I need to add two custom field under Service orders at Item level in component BT140I_SRVP.
    One field is required to have the input search help f4 and autopopulates the second field
    I am able to add one field(not requiring help) successfully through AET .
    I have created one Zsearch_help in se11 and its successfully running  and Autopopulating seocnd field while I am testing it
    While adding second field through AET,I need to enter following details as -
    field label,search relevant ,serach help etc.
    When I type the name of my 'Zsearch_help' against field search help it gives me following error
    'Search help is not compatible'.
    Secondly,not getting getter and setter methods for the attrributes in BTAdminI.
    Last,please tell me if i create zhelp and activate it,would it automatically appear in the list on AETwhile assiging it to input field?
    Please help me out.Kindly be detailed as I am new to SAP CRM.
    Thanks,
    Shivani

    The question is answered in CRM 7.0 forum:
    Getting error while adding a custom field (with input help) through AET

  • Error while adding custom fields in ERP quotation

    I am trying to add custom fields to ERP quotation. So picked up ERP_H and added view BTCUSTOMER_H/CustomerH to its views. I have added the relevant custom fields to BTCUSTOMER_H/CustomerH. Now when I try displaying this, I get the following error..
    Context generation failed in view BTCUSTOMER_H/CustomerH of UI Component ERP_H
    An exception has occurred Exception Class  CX_BSP_WD_INCORRECT_IMPLEMENT - There is no node text 'BTAdminH' in controller ''. 
    Method:  CL_BSP_WD_CONTROLLER=>DO_CONTEXT_NODE_BINDING 
    Source Text Row:  39
    Initialization of view BTCUSTOMER_H/CustomerH of UI Component ERP_H failed
    An exception has occurred Exception Class  CX_BSP_WD_INCORRECT_IMPLEMENT - There is no node text 'BTAdminH' in controller ''. 
    Method:  CL_BSP_WD_CONTROLLER=>DO_CONTEXT_NODE_BINDING 
    Source Text Row:  39
    Cannot display view ERP_H/HeaderOverviewpage of UI Component ERP_H
    An exception has occurred Exception Class  CX_BSP_WD_INCORRECT_IMPLEMENT - There is no node text 'BTAdminH' in controller ''. 
    Method:  CL_BSP_WD_CONTROLLER=>DO_CONTEXT_NODE_BINDING 
    Source Text Row:  39
    Window ERP_H/MainWindow of UI Component ERP_H cannot be displayed
    An exception has occurred Exception Class  CX_BSP_WD_RUNTIME_ERROR - View BTCUSTOMER_H/CustomerH in component ERP_H could not be bound 
    Method:  CL_BSP_WD_VIEW_CONTROLLER=>BIND_VIEW 
    Source Text Row:  165
    I have no prior experiance in UI development. Could someone explain me this error and how to fix this?
    Regards,
    Amar.

    closing this unresolved

Maybe you are looking for

  • When creating new group, no group folder is being created!

    Hi, I passed from standard server to advanced one. I have 2 shared points called "group" and "user" configured on a separate hard drive. When I create a user (create home folder), the home folder is created. When I create a group, no folder is create

  • What is the best way to install Leopard?

    I am hoping for some advice as to the best method to install Leopard - should I erase and install or simply do an upgrade?? Also, is it worth cloning the hard drive or installing Leopard onto a clean hard drive first?? If so, how does one clone a har

  • TEXT to be retrieved from a DOMAIN and to be displayed in an ALV report.

    Hi, I am required to develop a report where, the retrieved data needs to be displayed in an ALV. In the Report Specification, the requirement is that a text needs to be retrieved from a DOMAIN. e.g. Text to be retrieved from Domain EICST where Fix Va

  • Ranked Listing in BeX

    Hello All , I have a specific requirement where I have to give a ranked listing based on the percentages . This is pretty straight forward . To add to the complexity the ranked list should only display top n contributors contributing X percentage of

  • Where does downloaded 2.0 update file get stored?

    I purchased and downloaded the 2.0 update. It created a folder in my