Skip to Content
author's profile photo Former Member
Former Member

Coding for Zfield in CRM datasouuce

hi experts i have posted a crm-bw extraction quetion previously... but i dint get any reply...

my actual requirement is to know how to and where to write the code to populate the data for enhanced fields of the data source in crm...

shud we write in data source enhancement exits or

in segment of the bdoc...

exampl:

i have added a zfield in data source 0crm_lead_h.

to populate the data for this field shud i write code in

RSAP00001 enhancement or shud i write it in related BADI.

pl clarify my doubt...

and for a particular zfield how can we recognise a related bdoc segment field....

thanking you

regards,

nithin

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 17, 2005 at 06:18 AM
    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Bhanu Gupta

      hi... banu im really looking for this...

      i'm really confusing with CRM data source enhancement...

      pl guide me to enhance....

      can yu pl give me tips to how to do this...

      i need to enhance '0crm_lead_h' data souce...

      exmple... zcounter_lead added to this data source...

      so now tell me how can i populate the data to this field...

      shud i write code in two areas... or just in badi...

      if so pl let me know some sample code...

      coz i donno about badi... just give me idea about how to go into particular badi and how can we find a particular segment related to custom field 'zcounter_lead', and how to get into write the code and a bit sample code...

      thank you mr.banu...

      i'm eagerly waiting for your reply...

      since 2 days im trying this... but im not able to...

      regards,

      nithin

  • author's profile photo Former Member
    Former Member
    Posted on Oct 17, 2005 at 06:03 AM

    Hi,

    Go through this link

    http://help.sap.com/saphelp_nw04/helpdata/en/6e/86833ceb3d062de10000000a114027/content.htm

    1st and 4th points..

    Regards-

    Siddhu

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 17, 2005 at 08:18 AM

    Hi

    For adding fields to standard extractor you should use the standard user exit and double click on include ZRSAU01

    after this you should write code to populate custom fields

    E.g

    case i_datasource.

    when '2LIS_02_ITM'.

    CLEAR i_mc02m_0itm.

    LOOP AT c_t_data INTO i_mc02m_0itm.

    SELECT SINGLE b~posid INTO i_mc02m_0itm-zzposid FROM aufk AS a

    INNER JOIN prps AS b ON apspel = bpspnr

    WHERE a~aufnr = i_mc02m_0itm-zznplnr.

    SELECT SINGLE vornr FROM afvc INTO i_mc02m_0itm-zzvornr

    WHERE aufpl = ekkn-aufpl

    AND aplzl = ekkn-aplzl.

    ENDIF.

    ENDLOOP.

    Hope it helps

    Andrea

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 18, 2005 at 05:03 AM

    hi nithin,

    to implement badi in crm, try transaction sbiw >>

    Data Transfer to the SAP Business Information Warehouse >>

    Settings for Application-Specific DataSources (CRM) >>

    Settings for BW Adapter >>

    BAdI: BW Adapter: Enhancement of DataSources in the Messaging Flow

    there is sample code or the 'template' can be like following :

    LT_DATA TYPE TABLE OF CRMT_BW_COMPLAINTS_I,

    WA_DATA LIKE LINE OF LT_DATA .

    • define structure for data import.

    DATA: LT_DOCUMENTS_XIF TYPE CRMXIF_BT_ACTIVITY_T,

    LS_DOCUMENTS_XIF LIKE LINE OF LT_DOCUMENTS_XIF .

    CASE I_DATASOURCE.

    WHEN '0CRM_COMPLAINTS_I'.

    • copy data from extract structure to internal table.

    LT_DATA[] = CT_DATA[].

    REFRESH CT_DATA.

    LOOP at LT_DATA INTO WA_DATA.

    ENDLOOP.

    CT_DATA = LT_DATA[].

    WHEN OTHERS.

    ENDCASE.

    it's quite similiar with 'old' user exit zxrsau01

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      hi... AHP thank you man...

      you have given me the code...

      i have the basic doubt that,

      how can i get the zfield in bdoc segments which i have added in data source append structure...

      if i add in data source structure, will it come automatically to the linked badi...

      or shud i add the field in badi segments too...

      im confusing about this...

      exmple....

      say zfield 'A' i have added to data source '0crm_lead-h'.

      coming to BWA i need to assign some bdoc segment field to this particular zfield(A) in mapings..right...?

      so which bdoc segment field can i map to this zfield(A).

      meaning that shud i add a field in bdoc seg too...

      or can i use some existing seg field to this zfield(A)...

      i'm confusing man... try to undertand this and tell me.

      thank u very much...

      nithin

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.