0fi_gl_4 enhancement

Hi Experts,
I tried to enhance GL extractor. But once done, the FI doc number (BKPF -BELNR) is replaced by RBKP- BELNR. Not really able to figure out whats wrong in the code..
I am attaching the code...Can anyone please help..very urgent..
(Coding done based on suggestions by Olivier Cora in one other threads...Many thanks to him).
WHEN '0FI_GL_4'. " General Ledger
    LOOP AT c_t_data INTO ls_figl_4.
      lv_idx = sy-tabix.
      SELECT SINGLE awkey INTO l_awkey
      FROM bkpf
      WHERE belnr = ls_figl_4-belnr
        AND gjahr = ls_figl_4-gjahr
        AND bukrs = ls_figl_4-bukrs.
      IF sy-subrc = 0.
        l_awkey = l_awkey(10).
        SELECT SINGLE rmwwr wmwst1 belnr gjahr
        INTO (ls_figl_4-zzgrossamt, ls_figl_4-zztaxamt, ls_figl_4-belnr, ls_figl_4-gjahr)
        FROM rbkp
        WHERE belnr = l_awkey.
        IF sy-subrc EQ 0.
          MODIFY c_t_data FROM ls_figl_4 INDEX lv_idx.
       ENDIF.
       IF sy-subrc = 0.
          SELECT SINGLE mwskz wrbtr ebeln
          INTO (ls_figl_4-zztaxcode, ls_figl_4-zznetamt, ls_figl_4-zzebeln)
          FROM rseg
            WHERE gjahr = ls_figl_4-gjahr
            AND belnr = ls_figl_4-belnr
            AND bukrs = ls_figl_4-bukrs.
          IF sy-subrc EQ 0.
            MODIFY c_t_data FROM ls_figl_4 INDEX lv_idx.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDLOOP.

Hi,
The reason seems to be this section in your programming:
SELECT SINGLE rmwwr wmwst1 belnr gjahr
INTO (ls_figl_4-zzgrossamt, ls_figl_4-zztaxamt, ls_figl_4-belnr, ls_figl_4-gjahr)
FROM rbkp
WHERE belnr = l_awkey.
IF sy-subrc EQ 0.
MODIFY c_t_data FROM ls_figl_4 INDEX lv_idx.
As far as I can see you are overwriting with rbkp-belnr, since you use ls_figl_4-belnr. Your modify with "modify" c_t_data-belnr (bkpf) with ls-figl_4-belnr. you need to call your new belnr something else, like zbelnr.
Another thing: you dont need to write any coding for selecting field values from BKPF, since the extractor is already selecting from this table (standard). You just need to make an append structure on the extract structure with the fields from BKPF table you need. I don't know about the other tables you are using, but if you make an append stucture you just include the other fields too. Then you run the extractor from tcode RSA3 and check if the new fields are filled with the right values. If so - you don't need to do programming at all.
Performancewise it is furthermore much better to do look-ups on the BW-side instead of using a functional exit on the extractor. So if you already have the other data in BW in e.g. and ODS, then its much faster to make the look up against this -due to the fact that a R/3 system is setup to handle many small transactions (small amount on data in each transaction) where as a BW system is set-up to handle a few big transactions (large amount of data in each transaction). 
I hope this answers your question.
Best regards,
Keld

Similar Messages

  • Purchase order and FI Document Number - R/3 extractor

    Hello Experts -  I have a question on the BW extractors on the R/3 side. Are there any standard extractors out there where I can get Purchase Order information and related FI document number information. In case if I have to create one what tables do I need to reference to create generic extractor. Thanks for your help.
    Regards,
    Venu.

    Hi Venu,
    This could be better done on a standard FI extractor by enhancing it with purchase order information.
    Atleast, this is the way we did in our scenario.
    Have 0FI_GL_4 enhanced with data from EKKO, EKPO tables, with required feilds. This enhancement may not be quite detailed.
    Also if you are interested in a complete gen extr. then the above two tables along with BSEG should do.
    Naveen.A

  • Substitution for Purcahse order and FI document

    Dear Friends,
    I want to update the value from Purchase order (Recipient field) to assignment field while doing goods receipt (MIGO) in FI document.
    Sort key option doesnt work for it, let me know is there any Exit for this and is it possiable to write substituion and how?
    any body works on such ype of issue let me know
    Thanks in advance
    Vijay

    Hi Venu,
    This could be better done on a standard FI extractor by enhancing it with purchase order information.
    Atleast, this is the way we did in our scenario.
    Have 0FI_GL_4 enhanced with data from EKKO, EKPO tables, with required feilds. This enhancement may not be quite detailed.
    Also if you are interested in a complete gen extr. then the above two tables along with BSEG should do.
    Naveen.A

  • Enhancing the extract structure for 0FI_GL_4,  0FI_AP_4,  0FI_AR_4

    Hi all,
          Does anyone know how to enhance the extraction structures with additional fields for datasources 0FI_GL_4 (General ledger: line item), 0FI_AP_4 (vendors: line item) and 0FI_AR_4 (customers: line item). 
    Thanks,
    Sabrina.

    Hi
        Here are the two scenario's described in the note:
    1. All the fields of the customer enhancement in the customer include are contained in the read structure (see the table above).  Then no additional action is required. The fields of the customer enhancement are filled automatically by the datasource from the assigned read structure via "move-corresponding".
    Example:   The extraction structure DTFIGL_4 for datasource 0FI_GL_4 (General ledger: line item) should be enhanced by the VALUT (value date) field.
               To do this, create structure CI_BSIS in the data dictionary of the R/3 source system and include the VALUT field in it. The data dictionary in the R/3 source system shows that the VALUT field is contained in the read structure of the datasource (table BSIS). For that reason the VALUT field is automatically filled by datasource 0FI_GL_4.
    2. Fields of the customer enhancement in the customer include are not contained in the read structure (see the table above).  In this case you have to program a function module to fill the field of the customer enhancement. To do this, there is a Business Transaction Event available (open FI interface for process 00005021). Create any function module you like and use function module SAMPLE_PROCESS_00005021 as a template for the interface (input parameter, changing parameter).
               Interface of function module SAMPLE_PROCESS_00005021:
                Input-parameter I_OLTPSOURCE: datasource that is currently extracting data from the R/3 source system.
                Changing-Parameter C_STRUCTURE: Extraction structure of the data source currently extracting including fields from the assigned customer include. When you call this customer defined function module, all the fields of the extract structure are transferred filled.
               Check whether the type pool SBIWA is declared in the TOP include of the function group.
    If not, add it with the statement TYPE-POOLS: SBIWA.
               Then maintain table TPS31 with Transaction SM30. Create the following entry:
               PROCS LAND APPLK FUNCT
               00005021 <fname>
               <fname> stands for the customer defined function module.
                By doing so, the function module you defined is called for each extracted record. Note that in this case the performance of the extraction may be reduced significantly regardless of the table read and the complexity of the programmed logic.
               Example:
               You want to enhance the extraction structure DTFIAR_3 for datasource 0FI_AR_4 (customers: line item) by the ORT01 (city) field from the customer master record.
                To do this, create structure CI_BSID in data dictionary of the R/3 source system and include the ORT01 field in that. The data dictionary in the R/3 source system displays that the ORT01 field is NOT contained in the read structure of datasource 0FI_AR_4 (Table BSID).
                Therefore you have to program a function module that reads the customer master in the R/3 system (table KANN1) and fills the ORT01 field of the customer enhancement. In the changing parameter C_STRUCTURE the filled fields of the extraction structure DTFIAR_3 are available to you. With the KUNNR field of extraction structure DTFIAR_3, you can select the respective master data record from table KNA1 and determine field ORT01 of the customer enhancement.
    1. All the fields of the customer enhancement in the customer include are contained in the read structure (see the table above).
               Then no additional action is required. The fields of the customer enhancement are filled automatically by the datasource from the assigned read structure via "move-corresponding".
               Example:
               The extraction structure DTFIGL_4 for datasource 0FI_GL_4 (General ledger: line item) should be enhanced by the VALUT (value date) field.
               To do this, create structure CI_BSIS in the data dictionary of the R/3 source system and include the VALUT field in it. The data dictionary in the R/3 source system shows that the VALUT field is contained in the read structure of the datasource (table BSIS). For that reason the VALUT field is automatically filled by datasource 0FI_GL_4.
               ATTENTION:
               By using Note 430303 you can enhance DataSource 0FI_GL_4 by all fields from table BSEG (instead of BSIS); then the fields are filled automatically in the extractor.
    1. Fields of the customer enhancement in the customer include are not contained in the read structure (see the table above).
                In this case you have to program a function module to fill the field of the customer enhancement. To do this, there is a Business Transaction Event available (open FI interface for process 00005021). Create any function module you like and use function module SAMPLE_PROCESS_00005021 as a template for the interface (input parameter, changing parameter).
               Interface of function module SAMPLE_PROCESS_00005021:
                Input-parameter I_OLTPSOURCE: datasource that is currently extracting data from the R/3 source system.
                Changing-Parameter C_STRUCTURE: Extraction structure of the data source currently extracting including fields from the assigned customer include. When you call this customer defined function module, all the fields of the extract structure are transferred filled.
               Check whether the type pool SBIWA is declared in the TOP include of the function group.
    If not, add it with the statement TYPE-POOLS: SBIWA.
               Then maintain table TPS31 with Transaction SM30. Create the following entry:
               PROCS LAND APPLK FUNCT
               00005021 <fname>
               <fname> stands for the customer defined function module.
                By doing so, the function module you defined is called for each extracted record. Note that in this case the performance of the extraction may be reduced significantly regardless of the table read and the complexity of the programmed logic.
               Example:
               You want to enhance the extraction structure DTFIAR_3 for datasource 0FI_AR_4 (customers: line item) by the ORT01 (city) field from the customer master record.
                To do this, create structure CI_BSID in data dictionary of the R/3 source system and include the ORT01 field in that. The data dictionary in the R/3 source system displays that the ORT01 field is NOT contained in the read structure of datasource 0FI_AR_4 (Table BSID).
                Therefore you have to program a function module that reads the customer master in the R/3 system (table KANN1) and fills the ORT01 field of the customer enhancement. In the changing parameter C_STRUCTURE the filled fields of the extraction structure DTFIAR_3 are available to you. With the KUNNR field of extraction structure DTFIAR_3, you can select the respective master data record from table KNA1 and determine field ORT01 of the customer enhancement.
    After you create the customer include in the R/3 source system you have to post process the accompanying datasource with Transaction RSA6. Select the application component according to the above table and change the datasource that fits the customer include. The "Hide fields" flag should be removed in the field list for the fields of the customer include. Then save the field list.
    If the fields of the customer include is not displayed in Transaction RSA6, refer to note 415530.
    1.  After you create the customer include in the R/3 source system you have to post process the accompanying datasource with Transaction RSA6. Select the application component according to the above table and change the datasource that fits the customer include. The "Hide fields" flag should be removed in the field list for the fields of the customer include. Then save the field list.
    If the fields of the customer include is not displayed in Transaction RSA6, refer to note 415530.
    Please let me know.
    Thanks,
    Sabrina.

  • 0FI_GL_4 failing due to enhancement for 0FI_AR_4

    Hi Gurus,
    I have enhanced the 0FI_AR_4 datasource with additional fields.  Create my function module and assigned it to 00005021 in table TPS31.  This works great for the AR extraction.  But now the GL extraction is failing on this function module.   This is the error message during the execution of extractor for 0FI_GL_4 ==>  'The data object "C_STRUCTURE" has no structure and therefore no component called "VBELN"..    Why would the 0FI_GL_4 extractor call the function module exit for the 0FI_AR_4?   Any help you can provide will be greatly appreciated. 
    Thank you in advance!!
    Andy

    hi
    0FI_GL_4 & 0FI_AR_4 are linked to gather.. hence when u enhance, u need to take care of this..
    read below SAP Note:
    410799

  • Enhancing 0FI_GL_4 with LSTAR (0ACTTYPE)

    Dear Colleagues!
    In my current project the customer needs the field 0ACTTYPE (LSTAR from BSEG table) to be uploaded with the extractor 0FI_GL_4.
    For this to be possible I need to enhance the extractor, right?
    Does any of you have experience with this? I have never done extractor enhancements before, and will really appreciate it if you can tell me the different steps here!
    I will sign points!
    Regards Silje

    Hi!
    I have now succeeded in enhancing the extractor.
    1) I went to RSA6 in R/3 development, found my datasource, stood on it and pressed the pencil-item (cahnga mode).
    2) Inside the extracor i doubleclicked on the extract structure: DTFIGL_4.
    3) In the column Component I wrote Include, and in the column Component Type I wrote CI_BSIS. Then a number of extra objects appeard, thereamongst LSTAR.
    4) I activated and went one step back.
    5) There I went down the list and found LSTAR. The marker was set on the column "Hide". I unmarked it beacouse I don't want this filed to be hidden. Then I activated again and went out.
    6) I checked my extractor in RSA3 and it worked!
    7) I transported my changes to test and Prod (R/3) and replicated my Prod BW.
    Thanks for all help!
    Silje

  • Enhancing 0FI_GL_4  - ABAP code is NOT working -  URGENT PLEASE ???

    Hi all,
        I want to enhance 0FI_GL_4 extractor with CHECT, RWBTR & PRIDT from PAYR table if VBELN of 0FI_GL_4  is not BLANK, with the following conditions:
    1.Load all the records of PAYRQ table into PAYRQ internal table LT_PAYRQ
    with matching BELNR, AUGBL & BUKRS from I_DTFIGL_4 internal table.
    2.Load all the records of PAYR table into PAYR internal table LT_PAYR
    with matching AUGBL & BUKRS from LT_PAYRQ internal table.
    3.Read PAYR internal table LT_PAYR with matching BELNR (from I_DTFIGL_4
          internal table) and fill the new fields  CHECT, RWBTR & PRIDT.
    The following the is ABAP code, but it is NOT working:
    DATA:I_DTFIGL_4 LIKE DTFIGL_4 OCCURS 0 WITH HEADER LINE,
         L_TABIX LIKE SY-TABIX.
    DATA: BEGIN OF LS_PAYRQ,
                 ZBUKR LIKE PAYRQ-ZBUKR,
                 BELNR LIKE PAYRQ-BELNR,
                 AUGBL LIKE PAYRQ-AUGBL,
             END OF LS_PAYRQ.
    DATA: LT_PAYRQ LIKE LS_PAYRQ OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF LS_PAYR,
                 VBLNR LIKE PAYR-VBLNR,
                 CHECT LIKE PAYR-CHECT,
                 RWBTR LIKE PAYR-RWBTR,
                 PRIDT LIKE PAYR-PRIDT,
             END OF LS_PAYR.
    DATA: LT_PAYR LIKE LS_PAYR OCCURS 0 WITH HEADER LINE.
    WHEN '0FI_GL_4'.
        I_DTFIGL_4 = C_T_DATA.
        SELECT BELNR   AUGBL  ZBUKR
          FROM PAYRQ
          INTO CORRESPONDING FIELDS OF TABLE LT_PAYRQ
          FOR ALL ENTRIES IN I_DTFIGL_4
          WHERE BELNR = I_DTFIGL_4-BELNR
            AND AUGBL = I_DTFIGL_4-AUGBL
            AND BUKRS = I_DTFIGL_4-BUKRS.
        SORT LT_PAYRQ BY BELNR.
        SELECT VBLNR CHECT RWBTR PRIDT
           FROM PAYR
           INTO CORRESPONDING FIELDS OF TABLE LT_PAYR
           FOR ALL ENTRIES IN LT_PAYRQ WHERE VBLNR = LT_PAYRQ-AUGBL
           AND ZBUKR = LT_PAYRQ-ZBUKR.
        SORT LT_PAYR BY VBLNR.
        LOOP AT C_T_DATA INTO I_DTFIGL_4.
            L_TABIX = SY-TABIX.
         IF NOT I_DTFIGL_4-VBELN IS INITIAL.     " IF BILLING DOCUMENT EXISTS
            READ TABLE LT_PAYR WITH KEY VBLNR = I_DTFIGL_4-BELNR.
            IF SY-SUBRC = 0.
               MOVE LT_PAYR-CHECT   TO  I_DTFIGL_4-ZZCHECT.
               MOVE LT_PAYR-RWBTR  TO  I_DTFIGL_4-ZZRWBTR.
               MOVE LT_PAYR-PRIDT    TO  I_DTFIGL_4-ZZPRIDT.
               MODIFY C_T_DATA FROM I_DTFIGL_4 INDEX L_TABIX.
            ENDIF.
            CLEAR:I_DTFIGL_4-ZZCHECT,I_DTFIGL_4-ZZRWBTR,I_DTFIGL_4-ZZPRIDT,
                  LT_PAYR,  LT_PAYRQ.
          ENDIF.
        ENDLOOP.
    Could you please find the problem with above ABAP code and correct it.
    Since I want to enhance it,  if VBELN is not Blank and do I have to move the IF condition (I_DTFIGL_4-VBELN IS INITIAL) to another location for better performance.
    Thanks,
    Venkat..

    Dear Gajesh,
    Please accept my thanks for your Spontaneous reply.
    Selection Screen data is given below.
    1 --> Material Number
    2 --> Inspection Lot Number
    3 --> Date of Lot Creation
    4--> Inspection Type
    Normally the clint will give the Inspection Type ie 4th input and Date of Lot creation ie 3rd Input (Range of Date).
    Please do the needful.
    With Best Regards,
    Raghu Sharma

  • Enhancement to 0FI_GL_4 for new GL extraction

    Hi,
    We have a scenario wherein we need to extract GL line item data from ECC. We have multiple ECC instance having a mix of ECC 5.0 & ECC 6.0. Also new GL is implemented in all the ECC instances. Weplan to use 0FI_GL_14 the new GL line item datasource but there is a technical pre-requisite of ECC 6.0 EHP3. Since one of the ECC instance is at 5.0 we are not able to use the same.
    http://help.sap.com/saphelp_nw70/helpdata/en/0c/b4973c115a6f3ae10000000a114084/frameset.htm
    The DataSource 0FI_GL_4 extracts the line item data of general ledger accounts from the BKPF and BSEG tables
    http://help.sap.com/saphelp_nw70/helpdata/en/45/4f8e8bbf3f4f63a5dd197ef7d53fa2/frameset.htm
    The DataSource 0FI_GL_14 extracts all data from the tables FAGLFLEXA (or similar customer tables), BKPF, BSEG, and BSEG_ADD.
    Also some similar discussion threads on sdn specify for new GL 0FI_GL_14 is to be used.
    Re: Can 0FI_GL_4 be used with New G/L? Is there a replacement DataSource?
    Thus the only solution left is to enhance 0FI_GL_4 to get ledger specific data from those additional tables as well. Has anyone encountered this scenario before? If anyone would have details of the enhancement which is required it will be helpful.
    Thanks
    Regards,
    Tanmay

    Hi,
    Can you please explain this sentence a bit in detail ?
    'Using this data soure you should extract all the movements from the begining to get YTD values for balance sheet accounts"
    I read somewhere that when new GL concept is implemented in ECC then most optimal Datasource to read FAGLFLEXT table is 0FI_GL_10.
    so despite having new GL concept can we still use 0FI_GL_4?
    pros and cons of using 0FI_GL_4 for Consolidations ?
    Appreciate your inputs.
    Regards.

  • Problems with enhancing 0FI_GL_4 Error R8570

    Dear Colleagues!
    I have some troubles enhancing the 0FI_GL_4 Structure.
    I did the things I have to do in RSA6 (include CI_BSIS for the field LSTAR), and I even got the extractor to work in RSA3 once! But now it does not work any more..
    I suddenly get the error message:
    "Extraction Structure includes invalid field INCLUDE with ABAP type" (R8570).
    Does anyone out there know what this means??
    Hope you can help, will certainly sign points!
    Regards Silje

    I think I found it:
    I had an append in the DTFIGL_4, in addition to the INCLUDE. So I deleted the Append and now the LSTAR filed is there and picking up data.
    But I cant seem to transport this to test! Whenever I activate the DTFIGL_4 or CI_BSIS it does not lay on a transport!
    I checked Object Directory for both, and CI_BSIS was on package ZZBW (that I am used to) but DTFIGL_4 was on another package (BWFI) and SAP was set as user. How can I transport my now well functioning datasource from dev to test?
    Silje

  • Enhanced 3 fields unavailable in BI after DS enhancement

    I did datasource enhancement in R/3 to add 3 fields into DS "0FI_GL_4". Then I go to RSA6 to click unhide for those 3 fields, activate DS. And then I put coding in CMOD. After that I replicate DS to BW system. I found those 3 fields are existing in DS, but the Transfer check box show uncheck for those 3 fields. That mean those 3 enhanced fields are still unavailable in BI. Does anybody know the reason for that?

    Hi,
    Need few clarifications.
    You said that Transfer check box is Unchecked. Which Transfer check box you are refering to?
    Regards,
    Nagasekhar

  • [Urgent]Session terminates during DS enhancement due to big data

    Hi experts,
       I have 0FI_GL_4 for DS enhancement. The business requirement is complicated but we have already fully optimized that ABAP code. Now our R3 side has 2.5 million records in BSEG and if we start BW initial extraction , the session will use more than 2G memory (use ST06 - Top CPU) after 0.5 million data's extraction which will automatically terminated by system!
        Problem is that I can not write better code for the requirement. Any workaround to split this initialization?
    Regards,
    Aaron

    Hi Anil,
      Thanks for you advice! Here's my concerns for multi initial / delta :
    1, What's your suggest condition to divide the whole GL4 data source? If divide by fiscal year, my initial data is still that big ;  if divide by company code, do we have to maintain new initial if a single new company code is added in R3 (that's highly probably in our project )
    2, If we go with multi initial /  delta, does the update method between GL4 ODS to its afterward data provider also the same with before? I mean will the ODS generate several deltas for them? Or it will only contain a delta package which we don't need to take special care on
    Regards,
    Aaron

  • Remote cube on Data Source 0FI_GL_4

    HI,
    I have a requirement of  reconciling  the Line Items from R/3 to BW.
    So i tried to create Remote cube with Direct access, but coudnt due to 0FI_GL_4 data source doesnt support Direct access and reconciliation.
    I can see that Data Source  0FI_GL_4  is being fetched by Function module BWFID_GET_FIGL_ITEM and the base table is DTFIGL_4.
    My question is can I create the Generic data source based on the function module by taking the copy of existing FM BWFID_GET_FIGL_ITEM  and change Direct access option to 2(Supports Preaggregation).
    Do i need to change any settings at table level and parameters to get the required solution.
    Please sugget me how to proceed the development to reconcile the Line Items from R3 to BW.
    Regards,
    Siva..
    Edited by: Siv Kishore on Apr 7, 2011 4:59 PM

    HI Banerjee,
    Thanks for the update.
    As you said i cant use the data source 0FI_GL_1, Because we need to reconcile many fields from R/3 to BW, but  those fields are not available in this data source and it will be complicated to enhance such fields.
    can I create View based generic data source on BSEK and BSEG tables, Will it work? if yes do i need to follow any criteria to get the Correct Line Items.
    Please suggest me is there any SAP suggested solution or if you worked on such kind of development.
    Regards,
    Siva Thottempudi..
    Edited by: Siv Kishore on Apr 12, 2011 4:06 PM

  • 0FI_GL_4 data source input selection screen

    Dear experts,
    I have enabled the input selection option tickfor fields PRCTR and KOSTL in data source 0FI_GL_4 with RSA6.
    Both the fields are available in extract checker RSA3 too. But while does not have any effect while running the extractor. PRCTR and KOSTL are not having any effect while using in selection screen. Kindly let me know if any process there to enhance the standard program by putting the extra field in the selection (open cursor).
    Jigar

    Hi Leandro,
    First, if you want to change a selection field, you need to do it in RSA6, checking the selection flag. I wouldn't touch the table..
    Not always the filter is just checking the flag, I don't know particulary 0FI_GL_4, but the filter might be done in the Function Module logic.
    Where have you updated that field? 0GL_ACCOUNT is an infoobject, so it's in BW. If you want to filter in the InfoPackage, you need to filter in ERP, so it's a field (HKONT) and not an Infoobject.
    For 0FI_GL_4, if you check transaction RSA2, you'll see that selection is impossible, so I'm not sure if changing the table value manually would be enough.
    Hope this helps.
    Regards,
    Diego

  • Enhancement problem

    Hi All,
    I am trying to enhance the datasource 0FI_GL_4 , I added the field Kursf to this datasource
      and then wrote an user exit to populate this field.When i tried to check the data in Rsa3,
      I was just able to find this field but there was'nt any data in it.
       Following is the code that i used to populate.Please tell me if anything is wrong with the
       code.
    Thanks in advance.
    data: i_tab like dtfigl_4,
    l_tabix like sy-tabix.
    tables:bkpf.
    case i_datasource.
    when '0fi_gl_4'.
    l_tabix = sy-tabix.
    loop at c_t_data into i_tab.
    select kursf into i_tab-zzkursf from bkpf
    where bukrs = i_tab-bukrs.
    endselect.
      if sy-subrc = 0.
    modify c_t_data from i_tab index l_tabix.
        endif.
      endloop.
      endcase.

    Hi,
    here some corrections:
    data: i_tab like dtfigl_4,
    l_tabix like sy-tabix.
    tables:bkpf.
    case i_datasource.
    when '0fi_gl_4'.
    when '0FI_GL_4'.
    *l_tabix = sy-tabix.
    loop at c_t_data into i_tab.
    l_tabix = sy-tabix. "this one is the most important change
    *select kursf into i_tab-zzkursf from bkpf
    *where bukrs = i_tab-bukrs.
    *endselect.
    Try to find another table as you will normally get
    lots of records per company code.
    select single kursf into i_tab-zzkursf from bkpf
    where bukrs = i_tab-bukrs.
    if sy-subrc = 0.
    modify c_t_data from i_tab index l_tabix.
    endif.
    endloop.
    endcase.
    regards
    Siggi

  • Enhance Standard DataSource

    Hi all,
    Can i add some more selection criteria to a standard source. Im using  0FI_GL_4 and would like to add GL Account HKONT to my selection when extracting data (InfoPackage).
    Also can i add an additional field BUZID to this datasource? How?
    How can i do that?
    Thanks
    Edited by: SAPPER BI on Apr 22, 2008 3:31 AM

    Dear SAPPER BI
    Enhancement means in the SAP given datasource If you want to add extra fields.
    Go Through this
    http://www.bridgeport.edu/sed/projects/cs597/Fall_2003/vijaykse/step_by_step.htm
    Follow these simple steps too
    The procedure is like below.
    Take the datasource in which you enhance.
    1. If you enhancing in the LO datasaource, take the aprapriate communication strucute append the structure in that structure add the fields you wnat enhance.
    If you are enhancing other than LO you take extract structure append the structure and add the fields in that structure.
    2. Goto LBWE Tcode take the option called "Maintain Extract structure" take the fields which you enhanced from pool take push in to extract strucure.
    If you enhancing other than LO no need to do this.
    3. Goto RSA6, take datasource, goto change mode. The enhanced fields Hide option checked, reomove that tick and save it.
    4. Goto "CMODE" tcode, If project is already created for that enhancement goto disply mode. If the project is not created give the project name created and give the enhancemet name as "RSAP0001" and save it.
    in the component you can find 4 Function modules
    EXIT_SAPLRSAP_001 -> Transaction Data
    EXIT_SAPLRSAP_002 -> masterdata attributes
    EXIT_SAPLRSAP_003 -> Master data Texts
    EXIT_SAPLRSAP_004 -> Masterdata Hirarchies.
    Take the apprapriate FM and double click on it
    there you can find Include name. If you double click on it you can find ABAP editor.
    there we have to write the code
    example code will be like below.
    data: l_s_icctrcst like icctrcst,
    l_s_icctract like icctract,
    l_s_icctrsta like icctrsta,
    l_tabix like sy-tabix.
    case i_datasource. */ in BW 1.2B 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-kok
    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.
    This is example code.
    Also go through this link for more information
    https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=procedureTOENHANCEdATASOURCE&adv=false&sortby=cm_rnd_rankvalue
    If ur doing the replication first time, then do the following steps:
    1. Verify the R3 connection in SM59.
    2. Check all the required authorization is having for ur background user.
    3. Check whether ur data source is active in RSA6. If it is not active then activate from RSA5. Take best practice for activate the delta things like setup table deletion and initialization, etc.,
    4. Replicate the data source now in BW side.
    5. Activate all the corresponding transfer rules and update rules and info providers.
    If everything already available and now ur getting this error, then it may be RFC error or background user or R3 side Datasource problem.
    Try to extract the 2lis_01_s260 data in R3 itself (RSA3). And check whether data is extracting fine or not.
    Hope it helps you,Revert me back if you have any queries
    Assign ponts if helpful
    Regards
    Bala

Maybe you are looking for

  • Inactive Customer Report - need help!

    I need to create a report to show inactive customers based on their invoice and order history. It needs to show a list of customers that: 1. havent got an invoice on thier account between a certain set of dates 2. have no open orderr We use queries a

  • Unspecified error using odt in Visual Studio 2003

    Hello all We have Windows XP SP2. We have installed ODT version 10.1.0.4.00 on our workstation. We have MS Visual Studio 2003. We have the Oracle client 10.1.0.2.0. We also have Oracle data access product 10.1.0.4.0. When I try to access Tools - conn

  • Netui:textBox tag attributes - readonly and disabled

              What's the difference between these two?           Thanks           

  • Oracle VM - deployment strategy

    Hi All, This is my first post on this forum, and am curious to see how this forum works!!! We are planning to use OracleVM and Oracle EL in a new setup. I have scanned through the Oracle VM Manager and Oracle VM server guides and have few queries whe

  • From C to flash

    Hey, I've started using flash again (I stopped when AS2 was new) and dont know where to start :S I have programmed in C and python. Have knowledge of win32 programming, socket programming, dx and opengl. I am no stranger to AS syntax, but am to the I