CMOD-Datasource Enhancement

Dear Experts,
i am doing the enhancement for the master data datasource 0CUSTOMER_ATTR.
i am using For All Entries when i am selecting the required data from the application table KNA1 and here the key field was KUNNR.
in the where condition which table we need to provide for " For All Entries" first i used the table I_T_DATA generally this will give us the data from the datasource.
i declared one internal table with type extract structure of datasource 0CUSTOMER_ATTR and used the same in For All Entries.
i am looping the table I_T_DATA  and getting the required data from internal table which i fetch from KNA1.
I am getting data for enhanced field when i checked teh same from RSA3,but when i debugged the code i am getting all the entries from KNA1 because the internal table whcih i used in For All Entries is blank.Since i am reading the Internal table from KNA1 only for each entry in I_T_DATA ,i am getting data only for selected records.
Please correct me if i am wrong and which table needs to be provided exactly in the where condition and the reason iam using the "For All Entries" to restrict the database for each record in I_T_DATA.
Regards,
Sunil Kumar.B

Hi Neeraj,
Please find the code.
TABLES : marc, mvke, knb1,kna1.
types : begin of ty_kna1,
            KUNNR                           type KUNNR,
           ZPASD_CRMACCOUNT  type ZPASD_CRMACC,
           end of ty_kna1.
data : ih_kna1 type  hashed table of ty_kna1 with unique key kunnr,
          wa_crmaccnt type ty_kna1,
select    KUNNR
              ZPASD_CRMACCOUNT
              from kna1
              into table ih_kna1
              for all entries in i_t_data
              where kunnr = i_t_data-kunnr.
the error is pointing to the select statement with error "The specified type has no structure and therefore no component called "KUNNR".i am using the Hashed table here.
Regards,
Sunil Kumar.B

Similar Messages

  • Different ways to Datasource Enhancement

    I know DS enhancement can be done through ABAP Statement CASE,ENDCASE,WHEN. I came to know that this is old technique to enhance the datasource as it makes the code quite messy if several developers work on the same code.
    I came across one document on SDN where we create a new program for each datasource which is independent from other enhancement.
    I just want to know how this program works and the difference between this technique and old technique as i have limited ABAP knowledge.
    What are the exact challenges that we come across when we use CASE,ENDCASE,WHEN statements.
    Edited by: Murali K on Jun 1, 2010 6:31 AM

    Hi Murli,
    1) Datasource enhancement previously was done using CMOD Still many organizatins continue with this approach.
    Here you can get option to write code for your appended field in ur Standard datsource where you can write select statements etc.
    2) Now SAP is recommending to Write Codes using BADI .this approach helps to maintain individual implementations for each data source enhancement
    This methods advantage over previous CMOD method is that ,in CMOD a single include will contain all the ABAP coding (this will create problem in marinating the versions for developers).specially while you are transporting the CMOD code to test and prod systems.
    With the new BADI method you can avoid this problem as individual implementations can be transported independently without creating conflicts.
    Thanks and Regards
    Arun

  • Transactional datasource enhancement

    Need documentation for transactional datasource enhancement
    Please search SDN
    Edited by: Pravender on May 25, 2010 12:28 PM

    hi,
    chk the links
    Master data enhancement
    CMOD Enhancements
    Enhancing master data extractor
    Lo Enhancement- Transactional data
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b0af763b-066e-2910-a784-dc6731660f46
    Ramesh

  • Creating BADI for datasource enhancement in CRM system

    Hi,
    I am working on SAP BI/BW. This is the first time I am working in CRM system with CRM datasources. Facing some problem for datasource enhancement as never done it before in the CRM system. Is there anyone who can help in in creating BADI for datasource enhancement in CRM.
    Thanks in advance
    Moumita

    Hi Kushal,
    You can find the BADI name by,
    Go to Transaction SE24
    Enter the Object Type CL_EXITHANDLER and click on Display.
    Double Click on method "GET_INSTANCE".
    Put a Break-point on Call method cl_exithandler=>get_class_name_by_interface
    Run RSA3 transaction and execute the DataSource.
    The execution will stop at the break point.
    Check the values of variable 'exit_name', it will give you the BADI name called at that time.
    Thanks,
    Kokila

  • Creating BADI for datasource enhancement in CRM.

    Hi,
    I am working on SAP BI/BW. This is the first time I am working in CRM system with CRM datasources. Facing some problem for datasource enhancement as never done it before in the CRM system. Is there anyone who can help in in creating BADI for datasource enhancement in CRM.
    Thanks in advance
    Moumita

    Hi Prasad Reddy,
    This are the available badis and exits for this t.code:
    Enhancement/ Business Add-in            Description
    Enhancement
    MGA00001                                Material Master (Industry): Checks and Enhancements
    MGA00002                                Material Master (Industry): Number Assignment
    MGA00003                                Material Master (Industry and Retail): Number Display
    Business Add-in
    MG_MASS_NEWSEG                          User-Specific Fields & Segments in Mass Maintenance
    MATGRP_SKU_UPD
    CDT_CHECK_MATERIAL                      Checks for Existence of a Material in a CDT
    BADI_MM_MATNR
    BADI_MAT_F_SPEC_SEL                     BAdI for Material Special Field Selection
    BADI_MATNR_CHECK_PVS
    BADI_MATERIAL_REF                       Addition of customer-defined default data for material
    BADI_MATERIAL_OD
    BADI_MATERIAL_CHECK                     Enhanced checks for material master table
    BADI_GTIN_VARIANT
    BADI_EAN_SYSTEMATIC
    o.of Exits:          3
    o.of BADis:         11
    Find the Exact  exits and badis for ur requirement.
    How to fine the exact badi:
    1) Goto se24 (Display class cl_exithandler)
    2) Double click on the method GET_INSTANCE.
    3) Put a break point at Line no.25 (CASE sy-subrc).
    Now
    4) Execute SAP standard transaction
    5) Press the required button for which you need to write an exit logic, the execution will stop at the break point.
    6) Check the values of variable 'exit_name', it will give you the BADI name called at that time.
    7) This way you will find all the BADIs called on click of any button in any
    transaction
    Rgds,
    P.Naganjana Reddy
    if you follow this 7 steps, you will find a suitable BADI.

  • In which table can I find a project (CMOD)and enhancement (SMOD)??

    In which table can I find a project (CMOD)and enhancement (SMOD)??
    or else please suggest to me how I can find the project assigned to a enhancement?
    Regards,
    Shashank.

    Shashank,
    It looks like table MODACT makes the link between the project and the contained enhancements.
    Regards,
    Gary

  • Problem in datasource enhancement

    Hi All,
    Facing a problem in datasource enhancement.
    In R/3 SAP ABAP release = 640 and
    BW release = 350.
    Datasource: 0WBS_ELEMT_ATTR
    I enhanced the datasource by adding an append structure with 'ZZ' fields.The data elements for these fields are SAP standard (like KUNNR,VKORG etc...)
    Everything's active and there are no inconsistencies.
    However these added fields are not visible either in the RSA6 maintenance or in RSA3 checker.
    Hence I am unable to replicate these fields and pull them over to BW.
    Please advise.

    Guys,
    The problem is not with hiding/unhiding these fields.
    The appended fields themselves are not coming up through the RSA6 maintenance. They are not available for unhiding.
    Please advise.

  • How to do Datasource Enhancement ?

    hi experts,
    i have requirement in datasource enhancement,
    data source is 2lis_12_vcitm, my requirement is, i wnat to add one more field that is LIFEX ( External Identification of Delivery Note) from the LIKP ( SD document Delivery Header data) table.
    anybody please tell me the step by step procedure.
    please help me to do this.
    good answer will be appriciated with highest points,
    thanks in advance,
    venkat

    Hi,
    Pls chk this links;
    http://help.sap.com/saphelp_nw70/helpdata/en/6e/fe6e420f00d242e10000000a1550b0/content.htm
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b0af763b-066e-2910-a784-dc6731660f46
    /people/pradip.patil/blog/2006/06/07/how-to-retain-deltas-when-you-change-lo-extractor-in-production-system
    /people/sap.user72/blog/2005/02/14/logistic-cockpit--when-you-need-more--first-option-enhance-it
    http://www.bridgeport.edu/sed/projects/cs597/Fall_2003/vijaykse/step_by_step.htm
    COPA datasource enhancement
    Re: copa
    Profitability Analysis Without COPA
    Hope this helps.
    Regards
    CSM Reddy

  • User exit(cmod) defined for a Datasource enhancement behaviour

    Hi,
      How does a user exit(cmod) defined in ECC to populate ZZ fields in a extractor that is enhanced.
      Will it execute for every row of a datapackage
    Thanks

    Hi,
      The data is extracted first and then stored in data packets. After that the data packet hits the exit code and you should loop the data package so that all the records are affected by the exit code you have written.
    Regards,
    Raghavendra.

  • Datasource enhancement

    I am getting the error in cmod abap code that
    REIS_MEASUREMENT_TRAN is not a flat structure but that is the extract structure in datasource 0refx_2  so what should i change on this
    Tables:  VIBDPR.          "Property master data table
    data:    l_tabix like sy-tabix.
    data:    i_CHABASNM.
    case i_CHABASNM.
    *Enhancement of Property Master Record
      WHEN '0REFX_2'.
        case i_datasource.
          WHEN '0REFX_2'.
            data:  l_s_REIS_MEASUREMENT_TRAN like REIS_MEASUREMENT_TRAN.
            loop at i_t_data into l_s_REIS_MEASUREMENT_TRAN.
              l_tabix = sy-tabix.
    select single * from VIBDPR where BUKRS = l_s_ REIS_MEASUREMENT_TRAN - BUKRS.
              if sy-subrc = 0.
                l_s_BIW_VIBDPR_s-ZZRESPONSIBLE = VIBDPR-RESPONSIBLE.
                modify i_t_data from l_s_ REIS_MEASUREMENT_TRAN index l_tabix.
              endif.
            endloop.
        endcase.
    endcase
    thanks
    soniya

    hi Soniya,
    please post the same question just in one forum, check reply in the other thread,
    also take a look following sample code
    BIW_Mara_S enhancement
    hope this helps.

  • CRM datasource enhancement - best practice

    Hi everyone,
    For our reporting reqs, I checked CRM extractors and found that 0CRM_SRV_REQ_INCI_H would deliver us max. fields.
    CRM Service Request Incident Header Data - Analytics - SAP Library
    I need to enhance this with Z Date Types, Partner Functions fields.
    Date Types (see screenshot) are configured in CRM customizing.
    SAP delivered Date field SRV_RREADY-To doby is sending data to extractor's DUE_DATE field.
    But Source table-field for DUE_DATE are not mentioned in above help.sap datasource link??
    How to best enhance this extractor i.e. through BWA1 or typical way of RSA6-function enhancement??
    If I use BWA1 then how to fill up Segment-Segment field under mapping tab?
    Do I need to use CRM_BWA_FLOW BadI and write code or Is there SAP delivered FM which can fetch data for these Z Date types.
    Thanks
    Ahmad

    Hi,
    In general, we add enhanced field to extract structure by appending method.
    later we  can implement logic at COMD or by using BADI to fill the data for added field.
    do test run at RSA3 and replicate into bw side.
    About CMOD Logic, WIth help abap epxert you need to find relation between data source base tables and added field base table. then only we can fill data to into it.
    Can we know what is your data source?
    Which field you want add from which table?
    Thanks

  • Need ABAP code for Datasource Enhancement

    Hi All,
    I need no Enhance the WBS Element(PS_PSP_PNR) to2 LIS_02_ITM Datasource
    the table EKKN Having WBS element
    From EKKN Table We have to take the filed Append to the2LIS_02_ITM datasource
    Please any one give me ABAP code which is write in CMOD
    Thanks........
    Regards!
    Malli

    Hi,
    See SAP Help
    http://help.sap.com/saphelp_nw04s/helpdata/en/6e/fe6e420f00d242e10000000a1550b0/content.htm
    See the simple example code, so follow the same.Take ABAPer help, don't use select and end select.
    CASE i_datasource.
      Data: l_s_data1 LIKE mc13vd0itm,
            l_tabix   LIKE sy-tabix,
      WHEN '2LIS_13_VDITM'.
        LOOP AT c_t_data INTO l_s_data1.
          l_tabix = sy-tabix.
          SELECT SINGLE auart INTO l_s_data1-zzprdtyp FROM vbak
                 WHERE  vbeln  = l_s_data1-aubel.
          IF sy-subrc = 0.
            MODIFY c_t_data FROM l_s_data1 INDEX l_tabix.
          ENDIF.
        ENDLOOP.
    ENDCASE.
    Data: l_s_data18 LIKE mc12vc0itm ,
          l_tabix   LIKE sy-tabix.
      WHEN '2LIS_12_VCITM' .
        LOOP AT c_t_data INTO l_s_data18.
          l_tabix = sy-tabix.
          SELECT SINGLE ernam FROM ekko
           INTO (l_s_data18-ernam)
           WHERE ebeln = l_s_data18-vgbel .
          IF sy-subrc = 0.
            MODIFY c_t_data FROM l_s_data18 INDEX l_tabix.
          ENDIF.
        ENDLOOP.
    See article on Step by Step Guide to Enhance a Data Source:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/00c1f726-1dc2-2c10-f891-ddfbffdb1a46?quicklink=index&overridelayout=true
    Thanks
    Reddy

  • Text datasource enhancement

    hello guys
    I am trying to enhance text datasourcein R3 and got this problem.
    I am trying to load texts for infoobject 'material number' fromR3 table MAKT.....I created view on fields MANDT,MATNR,MAKTX (client,material number,material description) and then created generic datasource onthis.now I replicated and loaded texts to Infoobject 'Material Number'  in BW.
    Now I want to enhance text datasource in R3 so that I will add field MAKTG (material description in capital letters) from MAKT table...I added append structure in extract structure...then I want to write code in CMOD....Here I choose RSAP0001 enhancement...then EXIT_SAPLRSAP003 for enhancing text datasource...here there is no code provided by SAP...so wrote my own code..and activated and then unchecked 'hide field' ....saved the datasource....nowcame to Extractor Checker RSA3 to check if code is working....I am able to see the new field MAKTG but its not populated..it means my code or my way of doing enhancement is wrong...Can anyone please suggest any solution....
    here is my code:
    data: l_s_ZOXID30088 like ZOXID30088 ,
           L_TABIX LIKE SY-TABIX.
    case I_CHABASNM.
    when 'MATNR'.
    LOOP AT  C_T_TEXTS INTO L_S_ZOXID30088.
    L_TABIX = SY-TABIX.
    SELECT SINGLE MAKTG FROM MAKT INTO L_S_ZOXID30088-ZZMAKTG WHERE MATNR =
    L_S_ZOXID30088-MATNR..
    MODIFY C_T_TEXTS FROM  L_S_ZOXID30088 INDEX L_TABIX .
    ENDLOOP.
    ENDCASE.
    Thanx,
    S
    Edited by: SChandx200 on Sep 11, 2009 6:37 AM

    Hi,
    Just check once if the function module EXIT_SAPLRSAP_003 is active...
    Becuse after writing code int he include ZXRSAU03 you will have to activate the funciton module...
    This has to be done the first time when you implement the include...
    If still it doesnt work.. You can put a break point in your code and then debug from RSA3 to chk whey it isnt working...

  • CRM DataSource Enhancements

    Hello,
    I've inherited an SAP BI system in my new company with no documentation.
    The BI is on CRM in which the standard CRM extractors like '0CRM_SRV_CONTRACT_H' are enhanced to fetch additional fields. However, I'm unable where the code to extract these new fields are written. I've checked in:
    1. CMOD -> EXIT_SAPLRSAP_001
    2. SPRO -> SAP Implementation Guide -> Integration with Other mySAP Components -> 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
    but couldn't find the code. Is there anywhere else that the code to fetch appended fields can be written?
    Many thanks.
    Best Regards,
    Sri.

    Hi Sri,
    Try this ,
    TCODE : SE18 --> BAdi name --> provide CRM_BWA_MFLOW and try the where used list
    OR
    SE18 --> BAdi name --> provide RSU5_SAPI_BADI and try the where used list
    Any one of the above should show the Z - Classes/Interfaces implemented --> double click to navigatye and you can find the relevant coding there
    Regards,
    Sathya

  • Business content datasource enhancement

    Hi Experts,
    I am new to HR.
    We are implementing HR modules Personnel development and Personnel administration, while I was looking into business content extractors 0HR_PA_0 and OHR_PA_1, I found that there were only few fields in the extract structure but there were many fields in the cube.Do we need to enhance the datasources? how it works?. If anybody did the enhancement to these datasources, please give me the information with examples.
    Anita

    No, it is no necesary to enhance standard data sources. Those datasources extract, basically employee and date. Most infoobjects in cube are calculated from 0PERSON and 0EMPLOYEE attributes, having in count the date and employed extracted, because most in HR is time dependent.
    Assign point is usefull

Maybe you are looking for

  • How to handle Back button in IA06 BDC

    Hi all, I am calling IA06 inspection screen for an task list operation using BDC from my custom program. on this screen user can change the SAP data. if I save the task list then it's working fine. But I have one issue how to control back button, whe

  • How do I copy a dbsequence key from one entity to another

    using the SRDEMO database as an exemple. I created a new table called BOOK. Book is a kind of product. THe primary key of book is the primary key of product. In jdev I created a new updatable entity based on book and a view combining product and book

  • Oracle Java Mail API exception in Jdev 11.1.15

    we are using java mail api to send out emails. and wrap it in java embedding with in our webservice. we are using jdeveloper 11.1.1.5 for this and the Java API is failing with the below error, we have included all the java libraries. As code is worki

  • The detail log (mapping, payload) in BPM

    This is my scenario: SAP <-> XI <-> JDBC, because I need to use for-each component, so I used BPM and I used multiline component too. Current status is, I can see the detail message mapping and payload through SXMB_MONI, but I can only see the messag

  • My daughter downloaded $100 worth of apps . . . can i get a refund?

    Help . . .  my 5 year old just downloaded $100 worth of add-on's to a free game . . .  extra coins??  is there anyway to get these charges refunded?? Mahalo!