Modify C_T_DATA..urgent

Hi,
i want to append data to C_T_DATA. i am able to modify it but is it possible to insert data to it. my scenario is that i have 2 entries to be modified in it. one entry already exists in c_t_data, so it gets modified but what abt the second entry? how can i update it in c_t_data?.....
Regards
Sabah

Hi,
If C_T_DATA is an internal table, have you considered INSERT command?
Regards,
Aditya

Similar Messages

  • Ora-01440 on modifying column - urgent needed

    Hi
    we have following table
    SQL> desc VULNERABILITY_REG_PERIODS
    Name Null? Type
    CLIENT_ID NOT NULL NUMBER(10)
    ASSOCIATED_FAMILY NUMBER(7)
    HCP VARCHAR2(8)
    STAFF_TYPE VARCHAR2(2)
    DATE_ON_PROTECTION NOT NULL DATE
    DATE_OFF_PROTECTION NOT NULL DATE
    SECTOR VARCHAR2(2)
    AUDIT_TIMESTAMP DATE
    AUDIT_ID NUMBER
    AUDIT_ORIGIN VARCHAR2(30)
    RECORD_STATUS CHAR(1)
    i am trying to modify the column
    alter table VULNERABILITY_REG_PERIODS modify audit_id number(10,0);
    the max length of audit_id is 4
    SQL> select max(audit_id) from VULNERABILITY_REG_PERIODS;
    MAX(AUDIT_ID)
    9936
    what is the reason for above error when modifyng this column
    thanx
    kedar

    Hi,
    I think that internally, Oracle understand that NUMBER is a synonym for NUMBER(38).
    The precision can range from 1 to 38. Then, that's why this error is happening;
    You can try this below:
    SGMS@ORACLE10> create table x (cod number);
    Table created.
    SGMS@ORACLE10> insert into x values (1000);
    1 row created.
    SGMS@ORACLE10> commit;
    Commit complete.
    SGMS@ORACLE10> desc x
    Name                  Null?    Type
    COD                            NUMBER
    SGMS@ORACLE10> alter table x add (temp number);
    Table altered.
    SGMS@ORACLE10> update x set temp = cod;
    1 row updated.
    SGMS@ORACLE10> update x set cod = null;
    1 row updated.
    SGMS@ORACLE10> alter table x modify cod number (10,0);
    Table altered.
    SGMS@ORACLE10> update x set cod = temp;
    1 row updated.
    SGMS@ORACLE10> alter table x drop column temp;
    Table altered.
    SGMS@ORACLE10> desc x
    Name Null? Type
    COD NUMBER(10)
    SGMS@ORACLE10>Cheers

  • Urgent-Need help with the code.

    Hi gurus,
    I am trying to write a code where i am populating the ZZorg1,ZZorg2 and ZZorg3 in VBRP tableto 2LIS_13_VDITM.
    WHEN '2LIS_13_VDITM'.
    DATA: X_T_DATA Like MC13VD0ITM.
       Loop at C_T_DATA into X_T_DATA.
          Select Single ZZSORG1 into X_T_DATA-ZZSORG1
                        ZZSORG2 into X_T_DATA-ZZSORG2
                        ZZSORG3 into X_T_DATA-ZZSORG3
          FROM VBRP
          WHERE VBELN = X_T_DATA-VBELN
          AND   POSNR = X_T_DATA-POSNR.
        MODIFY C_T_DATA from X_T_DATA.
        ENDLOOP.
    I am getting the following error when running a error check.
    "ZZSORG2 INTO X_T_DATA-ZZSORG2" is not expected.Can anybody let me know what i am doing wrong as i new to ABAP.          
    Thanks in advance
    Resolved it,thanks
    Message was edited by:
            sap novice

    Resolved it

  • 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

  • How to enhance 2LIS_02_SCL with Conditions

    Dear Gurus,
    (PLEASE.... THIS ONE IS REALLY AN URGENT ISSUR)
    I have a situation here, where i have to enhance my Purchasing Data Data Source(2LIS_02_SCL) with the conditions from  MIRO. 
    Here in our project at the time of creating a PO they enter the Freight value and the Condition thpe along with the Transporter.  But all the above said data is tentative it may be changed at the time of MIGO which is also not a permanent one.  But what ever the data entered at the time of MIRO(Invoice Verification) is the final one.  so i have to pick the data from this transaction.  If anyone went across this situation please suggest me what should i do to enhance my data source with this data.
    Here i have to extract the Transporter, Station, Freight Value, Condition type.  Please tell me the table information also.  If the information i provided is not enough please feel free to ask for more.
    IF THERE IS ANY OSS NOTE WHICH CAN SOLVE MY PROBLEM PLEASE FORWARD THAT TO MY YAHOO ID.
           [email protected]
    Thanks in advance
    Mohan Kumar

    Hi Mohan,
    Please go through the steps.
    1) SE11, Type your ES in Data type ,and click on display
    2) Click on append structure , create the new append structure and add the new fileds,Then activate it.
    3) RSA6,select your Generic DS,enter into data source screen with change option. Make sure that the "fiel only" and "hide" options are unticked for newly added ields.and then generate the DS(menu option).
    4) Replicate the DS.
    5) Write the code in CMOD for newlu added fields.
    Procedure:-
    the enhancement depends on the type of datasource. Mostly you identify the extract structure and add your fields using a append structure. Once enhanced, you need to generate the datasource again. Then goto transaction cmod, create or choose a project, add enhancement rsap0001 and add your coding in exit...001 for transactional data, exit...002 for master data, exit...003 for texts and exit...004 for hierarchies.
    after the extract structure displayed, click 'append structure', and system will propose the append structure name 'z....', accept it and in next screen add you new field name as zz.... and activate the structure.
    double click component exit..01, double click zxrsau01, system will give something 'sap reserved' which actually just warning, quite tricky, just press 'enter' then it will go to next screen for program include zxrsau01.
    here you put the code like following :
    data : l_s_[structurename] like [extractstructure name],
    l_tabix like sy-tabix.
    case i_datasource.
    when 'your datasource name'.
    loop at c_t_data into l_s_[structurename]
    l_tabix = sy-tabix.
    fill the new field
    select ... into l_zz...
    where ....
    l_s_[structurename]-[new field name, zz....] = l_zz...
    modify c_t_data from l_s_[structurename] index l_tabix.
    endloop.
    I hope it would help you.
    Regard's
    Prasad

  • 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

  • Regarding coding

    Hi Everybody,
    Please tell me whether this coding is correct or not if not? what modifications i have to do to get values into 0FISCPER.
    I am not getting values in to 0fiscper.Please send me the solution.Its very urgent.
    When '0CO_PC_PCP_01'.
    TABLES : KEKO.
      DATA : WA_KKBW_PCP1 like KKBW_PCP1.
        lOOP AT C_T_DATA into WA_KKBW_PCP1.
        l_tabix = sy-tabix.
        SELECT SINGLE POPER BDATJ
                  INTO KEKO
                  FROM KEKO
                  WHERE KADKY = WA_KKBW_PCP1-KADKY.
        concatenate KEKO-BDATJ KEKO-POPER into wa_KKBW_PCP1-ZZFISCPER.
        wa_KKBW_PCP1-ZZFISCVARNT = 'Z1'.
        move WA_KKBW_PCP1 to C_T_DATA.
      modify C_T_DATA from WA_KKBW_PCP1 index l_tabix.
        EndLoop.
    Thanks,
    Devi

    Hi Everybody,
    Please tell me whether this coding is correct or not if not? what modifications i have to do to get values into 0FISCPER.
    I am not getting values in to 0fiscper.Please send me the solution.Its very urgent.
    When '0CO_PC_PCP_01'.
    TABLES : KEKO.
      DATA : WA_KKBW_PCP1 like KKBW_PCP1.
        lOOP AT C_T_DATA into WA_KKBW_PCP1.
        l_tabix = sy-tabix.
        SELECT SINGLE POPER BDATJ
                  INTO KEKO
                  FROM KEKO
                  WHERE KADKY = WA_KKBW_PCP1-KADKY.
        concatenate KEKO-BDATJ KEKO-POPER into wa_KKBW_PCP1-ZZFISCPER.
        wa_KKBW_PCP1-ZZFISCVARNT = 'Z1'.
        move WA_KKBW_PCP1 to C_T_DATA.
      modify C_T_DATA from WA_KKBW_PCP1 index l_tabix.
        EndLoop.
    Thanks,
    Devi

  • 2LIS_03_BF DS Enhancement

    Hello all,
    My Customer wants 2 news fields from MARA table in query column, the fields are
    YBENCODE1 - Term code - MARA
    YTYPKURZB - Type short description - MARA
    On analysing I found data for infoprovider comes from datasource
    2LIS_03_BF and 2LIS_03_BX.
    I saw the datasource 2LIS_03_BF in LBWE and found all fields come from MSEG table.
    So I believe I hav to enhance this datasrc 2LIS_03_BF by append stuctre and code in userexit.
    Now pls guide me how to proceed further steps. As MSEG is a cluster table I bit scared to
    do this task.
    1. Give me the steps
    2.What will be the logic to link these table? Has anyone come across this ? share your ideas..
    3. Any precaution to be followed ?
    4. Any possiblity to make this fields a navigational attribute of material so datasrc enhancement not required ?
    Your inputs are very much valuable for my further steps...
    thankyou!
    Bala

    Hello,
    1. All Primary keys of a perticular table from where new field is coming should be available in your datasource.
    Steps:
    Enhancing datasource:
    1. Goto rsa6 & choose datasource(2lis_03_bf) click on append structure,
    2. Give perticular name and assign required fields,
    3. Activate.
    User exit:
    1. Goto T Code : CMOD, provide perticular project.
    2. choose exit : EXIT_SAPLRSAP_001(for transactional data)
    3. double click on it you can see include, go inside by double clicking on it.
    Sample coding:
    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.
    endcase.
    Hope it Helps
    Regards,

  • SD DS enhancement

    Hi,
    I am trying to enhance the SD Billing DS 2LIS_13_VDITM
    First i am trying to Extract structure, here system will asking access key..y?
    Can you explain me what is exactly enhance ment steps and how to add std fields from std db tables?
    Regards,
    devi.

    Hi,
      this my code check it....i didn't get any data
    DATA : WA_OPP LIKE MC13VD0ITM OCCURS 0 WITH HEADER LINE,
           ZENHANCEMENT OCCURS 0 WITH HEADER LINE.
    TYPES: BEGIN OF T_VBRK,
           VBELN TYPE VBRK-VBELN,
           BUKRS TYPE VBRK-BUKRS,
           GJAHR TYPE VBRK-GJAHR,
    END OF T_VBRK.
    TYPES: BEGIN OF T_BKPF,
           BELNR TYPE BKPF-BELNR,
           XBLNR TYPE BKPF-XBLNR,
           TEMP(10) TYPE C ,
           BUKRS TYPE BKPF-BUKRS,
           GJAHR TYPE BKPF-GJAHR ,
    END OF T_BKPF.
    TYPES: BEGIN OF T_BSEG,
           BELNR TYPE BSEG-BELNR,
           VBELN TYPE BSEG-VBELN,
           SHKZG TYPE BSEG-SHKZG,
           GJAHR TYPE BSEG-GJAHR ,
         END OF T_BSEG.
    TYPES:BEGIN OF T_SHKZG,
          SHKZG TYPE BSEG-SHKZG,
          BELNR TYPE BSEG-BELNR,
         VBELN TYPE BKPF-VBELN,
          VBELN TYPE VBRK-VBELN,
          BUKRS TYPE VBRK-BUKRS,
    END OF T_SHKZG.
    DATA: IT_VBRK TYPE STANDARD TABLE OF T_VBRK WITH HEADER LINE,
          IT_SHKZG TYPE STANDARD TABLE OF T_SHKZG,
          IT_BKPF TYPE STANDARD  TABLE OF T_BKPF WITH HEADER LINE,
          LS_SHKZG LIKE LINE OF IT_SHKZG.
    *DATA : WA_OPP LIKE MC13VD0ITM OCCURS 0 WITH HEADER LINE ,
    DATA: WA_VBRK LIKE LINE OF IT_VBRK ,
          WA_BKPF LIKE LINE OF IT_BKPF ,
          WA_SHKZG LIKE LINE OF IT_SHKZG.
    *DATA: WA_C_T_DATA TYPE C_T_DATA .
    CASE I_DATASOURCE.
      WHEN '2LIS_13_VDITM'.
        SELECT VBELN
               BUKRS
               GJAHR
               FROM VBRK
               INTO TABLE IT_VBRK
               WHERE BUKRS = '1100'.
        SORT IT_VBRK BY VBELN BUKRS.
        DELETE ADJACENT DUPLICATES FROM IT_VBRK COMPARING VBELN BUKRS.
       LOOP AT IT_VBRK .
         IF SY-SUBRC <> 0.
           READ TABLE IT_BKPF INTO WA_BKPF WITH KEY BELNr = WA_VBRK-VBELN.
           READ TABLE IT_SHKZG INTO WA_SHKZG WITH KEY BELNR = WA_BKPF-TEMP.
         ENDIF.
       ENDLOOP.
    *LOOP AT IT_VBRK.
        IF IT_VBRK IS NOT INITIAL.
          SELECT BELNR XBLNR GJAHR FROM BKPF INTO CORRESPONDING FIELDS OF TABLE IT_BKPF
            FOR ALL ENTRIES IN IT_VBRK
            WHERE BELNR = IT_VBRK-VBELN
                   AND BUKRS = IT_VBRK-BUKRS.
             ORT IT_BKPF BY BELNR BUKRS.
           CONDENSE IT_BKPF-XBLNR.
           CONCATENATE BELNR GJAHR into temp.
          MOVE IT_BKPF-XBLNR TO IT_BKPF-TEMP.
          SELECT SHKZG FROM BSEG
                 INTO CORRESPONDING FIELDS OF TABLE IT_SHKZG
                  FOR ALL ENTRIES IN IT_BKPF
                  WHERE BELNR = IT_BKPF-TEMP
                   AND BUKRS = IT_BKPF-BUKRS.
          SORT IT_BKPF BY BELNR BUKRS.
          SORT IT_SHKZG BY BELNR BUKRS.
        ENDIF.
        LOOP AT IT_VBRK .
        IF SY-SUBRC = 0.
            READ TABLE IT_BKPF INTO WA_BKPF WITH KEY BELNr = WA_VBRK-VBELN.
            READ TABLE IT_SHKZG INTO WA_SHKZG WITH KEY BELNR = WA_BKPF-TEMP.
          ENDIF.
        ENDLOOP.
    *LOOP AT IT_VBRK .
    if sy-subrc = 0.
    read table it_bkpf into wa_bkpf with key BELNR = wa_VBRK-VBELN.
    read table it_shkzg into wa_shkzg with key belnr = wa_BKPF-TEMP.
    endif.
    *ENDLOOP.
       IF IT_VBRK IS NOT INITIAL.
         SELECT BELNR XBLNR FROM BKPF INTO CORRESPONDING FIELDS OF TABLE IT_BKPF
           FOR ALL ENTRIES IN IT_VBRK
           WHERE BELNR = IT_VBRK-VBELN
                  AND BUKRS = IT_VBRK-BUKRS.
               SORT IT_BKPF BY BELNR BUKRS.
           CONDENSE IT_BKPF-XBLNR.
           MOVE IT_BKPF-XBLNR TO IT_BKPF-TEMP.
         SELECT SHKZG FROM BSEG
                INTO CORRESPONDING FIELDS OF TABLE IT_SHKZG
                 FOR ALL ENTRIES IN IT_BKPF
                 WHERE belnr = IT_BKPF-TEMP
                  AND BUKRS = IT_BKPF-BUKRS.
          SORT IT_BKPF BY BELNR BUKRS.
         SORT IT_SHKZG BY BELNR BUKRS.
       ENDIF.
    *loop at it_vbrk.
    read table it_bkpf into wa_bkpf .
    endloop.
        LOOP AT C_T_DATA INTO WA_VBRK.
          READ TABLE IT_VBRK INTO WA_VBRK
          WITH KEY VBELN = WA_VBRK-VBELN
          BUKRS = WA_VBRK-BUKRS .
         BINARY SEARCH.
          IF SY-SUBRC = 0.
            READ TABLE IT_SHKZG INTO WA_SHKZG WITH KEY VBELN = WA_VBRK-VBELN
            BUKRS = WA_VBRK-BUKRS.
           BINARY SEARCH.
            IF SY-SUBRC = 0.
              MODIFY C_T_DATA FROM WA_VBRK.
            ENDIF .
          ENDIF.
        ENDLOOP .
    ENDCASE.

  • How to calculate Amount of goods received bill not received

    Hi Gurus,
    In my vendor aging report client require one filed which is amount of goods received bill not received (Goods received amount- Invoice amount)
    can u please tell me what should i do?
    Thanks in Advance
    Kavita

    Hi,
    Actually i written a code in CMOD and enhanced the data source but the value is not proper......
    something is missing ...can anyone explain
    here is my code
    when '0FI_AP_4'.
      data  wa_DTFIAP_3 type  DTFIAP_3.
        loop at c_t_data into wa_dtfiap_3.
         select single ebeln lifnr from ekko into  (it_ap03-ebeln,it_ap03-lifnr)
            where lifnr = wa_dtfiap_3-lifnr.
           it_ap03-budat = wa_dtfiap_3-budat.
           it_ap03-budat = wa_dtfiap_3-belnr.
          if sy-subrc = 0.
            append it_ap03.
           endif.
        endloop.
      loop at it_ap03.
       select SINGLE mblnr from mkpf into mkpf-mblnr WHERE budat =  it_ap03-budat and blart = 'WE' AND
         VGART = 'WE' .
         IF SY-subrc = 0.
         SELECT SUM( dmbtr ) from mseg into   it_ap03-dmbtr where mblnr = mkpf-mblnr and xauto = '' and
           bwart in ('101','102') and lifnr = it_ap03-lifnr .
       SELECT SINGLE ebeln matnr from mseg into (mseg-ebeln,mseg-matnr) where mblnr = mkpf-mblnr.
         select sum( dmbtr ) from ekbe into it_ap03-dmbtr1
         where ebeln = mseg-EBELN  and vgabe = 2  and matnr = mseg-matnr  and budat = it_ap03-budat.
         it_ap03-tamt = it_ap03-dmbtr - it_ap03-dmbtr1.
        ENDIF.
    select sum( wrbtr ) from ekbe into it_ap03-dmbtr
    where ebeln = it_ap03-EBELN  and bewtp = 'E' and budat = it_ap03-budat.
      select sum( wrbtr ) from ekbe into it_ap03-dmbtr1
    where ebeln = it_ap03-EBELN  and bewtp = 'Q'  and budat = it_ap03-budat .
      modify it_ap03.
      clear it_ap03.
      endloop.
    loop at c_t_data into wa_dtfiap_3.
    read table it_ap03 with key lifnr = wa_dtfiap_3-lifnr belnr = wa_dtfiap_3-belnr.
    wa_dtfiap_3-zzbillamt = it_ap03-tamt.
    modify c_t_data from wa_dtfiap_3.
    endloop.
    endcase.
    Edited by: kavita on Sep 11, 2010 8:48 AM

  • View creation and populating key figure to datasource appended field

    Hi
    the data we want is like in 4 tables
    J_3GVERSI  +  EQUZ + ILOA+ ANLC
    HOW should i create a view on these four tables .
    j_3gversi _ equnr
    equz - equnr, iloan
    iloa- iloan(key), comp code,asset no,asset subno
    anlc- comp code asset no asset sub no
    my two key figure values are in J_3gversi , and 1 more keyfigure i will append it to my datasource on this view and the value for this  will be obtained if i give 5 field values( from ANLC(table), compcode,asset no ,asset subnumbr, fiscal year and depreciatio area in where condition for select statement in cmod .)
    to give these 5 values in the where condition in my cmod code for my datasource I tried to make this view.
    i have linked
    j_3gversi  with equz - using equnr
    equz with iloa- using ILOAN ( since my asset no and asset sub number in this table is linked to equipment number  using ILOAN field)
    ILOA with ANLC- using ( company code, asset number and asset subnumber)
    though the field names are different for my asset number and subnumber in both the tables , they have same data element(component) -
    IS it fine to join two tables with fields having different field names but same component.
    asset number field name is  in ILOA-anlnr and ANLC-anln1 though component type is same - anln1 for both
    similarly asset subnumber has like  ILOA- anlun and ANLC- anln2 with same component type-anln2
    now in cmod for the function module i am writing select statement like this
    code in cmod for transaction data
    when mydatasource
    loop c_t_data into lv_ctdata3
    1.     SELECT SINGLE * FROM anlc WHERE bukrs EQ lv_data3-bukrs AND 
    2.                                     anln1 EQ LV_DATA3-anln1 AND 
    3.                                     anln2 EQ LV_DATA3-anln2 AND 
    4.                                     gjahr EQ Lv_data-gjahr AND 
    5.                                     afabe EQ  '01 ' . 
    6.     IF SY-SUBRC EQ  0 . 
    7.       CALL FUNCTION  'FI_AA_VALUES_CALCULATE' 
    8.         EXPORTING 
    9.           i_anlc = anlc 
    10.         IMPORTING 
    11.           e_anlcv = l_anlcv. 
    12.     ENDIF. 
    lv_data3-nbw =l_anlcv-nbw.
    modify c_t_dat from lv_data3
    end loop
    Edited by: krishnav3.5 on Jul 8, 2011 2:07 PM

    Hi ,
    IS it fine to join two tables with fields having different field names but same component.
    1.Yes we do this many times .We combine fields having different names but functionally they are the key values to match .
    No issue with that untill they are in same format and you want to match data based on those fields .
    HOW should i create a view on these four tables .
    2.For view you can create view on 2-3 tables with matching fields and for complex logic you can populate additional fields via CMOD code .
    Regards,
    Jaya

  • Performance issue in BI due to direct query on BKPF and BSEG tables

    Hi,
    We had a requirement that FI document number fieldshould be extracted in BI.
    Following code was written which has the correct logic but performance is bad.
    It fetched just 100 records in more than 4-5 hrs.
    The reason is there was a direct qury written on BSEG and BKPF tables(without WHERE clause).
    Is there any way to improve this code like adding GJAHR field  in where clause? I dont want to change the logic.
    Following is the code:
    WHEN '0CO_OM_CCA_9'." Data Source
        TYPES:BEGIN OF ty_bkpf,
        belnr TYPE bkpf-belnr,
        xblnr TYPE bkpf-xblnr,
        bktxt TYPE bkpf-bktxt,
        awkey TYPE bkpf-awkey,
        bukrs TYPE bkpf-bukrs,
        gjahr TYPE bkpf-gjahr,
        AWTYP TYPE bkpf-AWTYP,
        END OF ty_bkpf.
        TYPES : BEGIN OF ty_bseg1,
        lifnr TYPE bseg-lifnr,
        belnr TYPE bseg-belnr,
        bukrs TYPE bseg-bukrs,
        gjahr TYPE bseg-gjahr,
        END OF ty_bseg1.
        DATA: it_bkpf TYPE STANDARD TABLE OF ty_bkpf,
        wa_bkpf TYPE ty_bkpf,
        it_bseg1 TYPE STANDARD TABLE OF ty_bseg1,
        wa_bseg1 TYPE ty_bseg1,
        l_s_icctrcsta1 TYPE icctrcsta1.
        "Extract structure for Datasoure 0co_om_cca_9.
        DATA: l_awkey TYPE bkpf-awkey.
        DATA: l_gjahr1 TYPE gjahr.
        DATA: len TYPE i,
        l_cnt TYPE i.
        l_cnt = 10.
        tables : covp.
        data : ref_no(20).
        SELECT lifnr
        belnr
        bukrs
        gjahr
        FROM bseg
        INTO TABLE it_bseg1.
        DELETE ADJACENT DUPLICATES FROM it_bseg1 COMPARING belnr gjahr .
        SELECT belnr
        xblnr
        bktxt
        awkey
        bukrs
        gjahr
        AWTYP
        FROM bkpf
        INTO TABLE it_bkpf.
        IF sy-subrc EQ 0.
          CLEAR: l_s_icctrcsta1,
          wa_bkpf,
          l_awkey,
          wa_bseg1.
          LOOP AT c_t_data INTO l_s_icctrcsta1.
            MOVE l_s_icctrcsta1-fiscper(4) TO l_gjahr1.
          select single AWORG AWTYP INTO CORRESPONDING FIELDS OF COVP FROM COVP
          WHERE belnr = l_s_icctrcsta1-belnr.
          if sy-subrc = 0.
              if COVP-AWORG is initial.
           concatenate l_s_icctrcsta1-refbn '%' into ref_no.
                  READ TABLE it_bkpf INTO wa_bkpf WITH KEY awkey(10) =
                  l_s_icctrcsta1-refbn
                  awtyp = COVP-AWTYP
                  gjahr = l_gjahr1.
            IF sy-subrc EQ 0.
              MOVE wa_bkpf-belnr TO l_s_icctrcsta1-zzbelnr.
              MOVE wa_bkpf-xblnr TO l_s_icctrcsta1-zzxblnr.
              MOVE wa_bkpf-bktxt TO l_s_icctrcsta1-zzbktxt.
              MODIFY c_t_data FROM l_s_icctrcsta1.
              READ TABLE it_bseg1 INTO wa_bseg1
              WITH KEY
              belnr = wa_bkpf-belnr
              bukrs = wa_bkpf-bukrs
              gjahr = wa_bkpf-gjahr.
              IF sy-subrc EQ 0.
                MOVE wa_bseg1-lifnr TO l_s_icctrcsta1-lifnr.
                MODIFY c_t_data FROM l_s_icctrcsta1.
                CLEAR: l_s_icctrcsta1,
                wa_bseg1,
                l_gjahr1.
              ENDIF.
            ENDIF.
                ELSE. " IF AWORG IS NOT BLANK -
                concatenate l_s_icctrcsta1-refbn COVP-AWORG into ref_no.
                READ TABLE it_bkpf INTO wa_bkpf WITH KEY awkey(20) =
                ref_no
                awtyp = COVP-AWTYP
                gjahr = l_gjahr1.
            IF sy-subrc EQ 0.
              MOVE wa_bkpf-belnr TO l_s_icctrcsta1-zzbelnr.
              MOVE wa_bkpf-xblnr TO l_s_icctrcsta1-zzxblnr.
              MOVE wa_bkpf-bktxt TO l_s_icctrcsta1-zzbktxt.
              MODIFY c_t_data FROM l_s_icctrcsta1.
              READ TABLE it_bseg1 INTO wa_bseg1
              WITH KEY
              belnr = wa_bkpf-belnr
              bukrs = wa_bkpf-bukrs
              gjahr = wa_bkpf-gjahr.
              IF sy-subrc EQ 0.
                MOVE wa_bseg1-lifnr TO l_s_icctrcsta1-lifnr.
                MODIFY c_t_data FROM l_s_icctrcsta1.
                CLEAR: l_s_icctrcsta1,
                wa_bseg1,
                l_gjahr1.
              ENDIF.
            ENDIF.
               endif.
          endif.
            CLEAR: l_s_icctrcsta1.
            CLEAR: COVP, REF_NO.
          ENDLOOP.
        ENDIF.

    Hello Amruta,
    I was just looking at your coding:
    LOOP AT c_t_data INTO l_s_icctrcsta1.
    MOVE l_s_icctrcsta1-fiscper(4) TO l_gjahr1.
    select single AWORG AWTYP INTO CORRESPONDING FIELDS OF COVP FROM COVP
    WHERE belnr = l_s_icctrcsta1-belnr.
    if sy-subrc = 0.
    if COVP-AWORG is initial.
    concatenate l_s_icctrcsta1-refbn '%' into ref_no.
    READ TABLE it_bkpf INTO wa_bkpf WITH KEY awkey(10) =
    l_s_icctrcsta1-refbn
    awtyp = COVP-AWTYP
    gjahr = l_gjahr1.
    Here you are interested in those BKPF records that are related to the contents of c_t_data internal table.
    I guess that this table does not contain millions of entries. Am I right?
    If yes, the the first step would be to pre-select COVP entries:
    select BELNR AWORG AWTYP into lt_covp from COVP
    for all entries in c_t_data
    where belnr = c_t_data-belnr.
    sort lt_covp by belnr.
    Once having this data ready, you build an internal table for BKPF selection:
    LOOP AT c_t_data INTO l_s_icctrcsta1.
      clear ls_bkpf_sel.
      ls_bkpf_sel-awkey(10) = l_s_icctrcsta1-refbn.
      read table lt_covp with key belnr = l_s_icctrcsta1-belnr binary search.
      if sy-subrc = 0.
        ls_bkpf_sel-awtyp = lt_covp-awtyp.
      endif.
      ls_bkpf_sel-gjahr = l_s_icctrcsta1-fiscper(4).
      insert ls_bkpf_sel into table lt_bkpf_sel.
    ENDLOOP.
    Now you have all necessary info to read BKPF:
    SELECT
    belnr
    xblnr
    bktxt
    awkey
    bukrs
    gjahr
    AWTYP
    FROM bkpf
    INTO TABLE it_bkpf
    for all entries in lt_bkpf_sel
    WHERE
      awkey = lt_bkpf_sel-awkey and
      awtyp = lt_bkpf_sel-awtype and
      gjahr = lt_bkpf_sel-gjahr.
    Then you can access BSEG with the bukrs, belnr and gjahr from the selected BKPF entries. This will be fast.
    Moreover I would even try to make a join on DB level. But first try this solution.
    Regards,
      Yuri

  • Business Content or Information for GR/IR Account Report

    Hi All,
    I have an R3 report called GR/IR Account Report by PO Mismatch.
    Is there any business content available for this in BI.
    The below tables are using in the report.
             bsis,                         " Accounting docs by account
             bsas,                         " Cleared accounting docs by acc
             bseg,                         " Accounting doc line item
             ekko,                         " Purchase Order Header,
             ekpo,
             mkpf,                         " Material Document
             lfa1,                         " Vendor details
             ekbe,                         " PO History
             ekkn,                         " PO Acct.Assgnment
             usr21,
             addr3_val,
             ad3_flags,
             stxh.
    Could you please provide me your inputs on this
    Regards
    Srini

    The new additional fields need to be populated are
              ZZAUFNR         Order Number                                  *
              ZZBEDAT         Purchase Order Date                           *
              ZZCRE_FI         FI Doc Created By                             *
              ZZCRE_PO         PO Doc Created By                             *
              ZZEBELN         Purchasing Document Number                    *
              ZZEBELP         Item Number of Purchasing Document            *
              ZZKOSTL         Cost Center                                   *
              ZZMWSKZ         Tax on sales/purchases code                   *
              ZZPROJK      WBS element                                   *
              ZZTXZ01         Short text                                    *
              ZZUSNAM         User name                                     *
              ZZXBLNR         Reference document number                     *
              ZZHWSTE      Tax Amount in Local Currency                 *
              ZZSGTXT      Item Text                                    *
              ZZHKONT      Finance G/L Account                          *
      when '0FI_AP_4'.
    Declare the local data fields to store data temporarily
        data : l_dtfiap_3 like DTFIAP_3,
               mwskz like bsik-mwskz,
               l_ernam like   bapibname-bapibname,
               l_address like bapiaddr3,
               l_bseg  like bseg,
               l_bedat like ekko-bedat,
               l_ps_psp_pnr like prps-pspnr.
        data : gt_return type bapiret2 occurs 0 with header line.
        loop at c_t_data into l_dtfiap_3.
          l_tabix = sy-tabix.
    *Select the tax Code for the particular record from BSAK TABLE
          select single mwskz sgtxt into (l_dtfiap_3-zzmwskz,
                                          l_dtfiap_3-zzsgtxt)
                from bsak
                where bukrs = l_dtfiap_3-bukrs
                  and buzei = l_dtfiap_3-buzei
                  and belnr = l_dtfiap_3-belnr
                  and lifnr = l_dtfiap_3-lifnr
                  and gjahr = l_dtfiap_3-gjahr
                  and zuonr = l_dtfiap_3-zuonr
                  and augbl = l_dtfiap_3-augbl
                and augdt = l_dtfiap_3-augdt
                and bldat = l_dtfiap_3-bldat
                and blart = l_dtfiap_3-blart
                and bschl = l_dtfiap_3-bschl
                and budat = l_dtfiap_3-budat.
          if sy-subrc = 0.
            modify c_t_data from l_dtfiap_3 index l_tabix.
          else.
    *If corresponding Document Number is not present in BSAK check BSIK
    *TABLE
            select single mwskz sgtxt into (l_dtfiap_3-zzmwskz,
                                            l_dtfiap_3-zzsgtxt)
                    from bsik
                    where bukrs = l_dtfiap_3-bukrs
                      and buzei = l_dtfiap_3-buzei
                      and belnr = l_dtfiap_3-belnr
                      and lifnr = l_dtfiap_3-lifnr
                      and gjahr = l_dtfiap_3-gjahr
                      and zuonr = l_dtfiap_3-zuonr
                      and augbl = l_dtfiap_3-augbl
                    and augdt = l_dtfiap_3-augdt
                    and bldat = l_dtfiap_3-bldat
                    and blart = l_dtfiap_3-blart
                    and bschl = l_dtfiap_3-bschl
                    and budat = l_dtfiap_3-budat.
            if sy-subrc = 0.
              modify c_t_data from l_dtfiap_3 index l_tabix.
            endif.
          endif.
          select single hwste into l_dtfiap_3-zzhwste
              from bset
              where bukrs eq l_dtfiap_3-bukrs
                and belnr eq l_dtfiap_3-belnr
                and gjahr eq l_dtfiap_3-gjahr
                and buzei eq l_dtfiap_3-buzei.
    Select Created By and invoice Reference Number from BKPF table
          select single usnam xblnr from bkpf
              into (l_dtfiap_3-zzusnam,l_dtfiap_3-zzxblnr)
                where bukrs = l_dtfiap_3-bukrs
                  and belnr = l_dtfiap_3-belnr
                  and gjahr = l_dtfiap_3-gjahr.
          if sy-subrc = 0.
            modify c_t_data from l_dtfiap_3 index l_tabix.
          endif.
          move l_dtfiap_3-zzusnam to l_ernam.
          refresh : gt_return.
    Get the Fi doc Created By doing the function Module call
          call function 'BAPI_USER_GET_DETAIL'
            EXPORTING
              username = l_ernam
            IMPORTING
              address  = l_address
            TABLES
              return   = gt_return.
          move l_address-fullname to l_dtfiap_3-zzcre_fi.
          if l_dtfiap_3-zzcre_fi is initial.
            move l_ernam to l_dtfiap_3-zzcre_fi.
          endif.
          if not l_dtfiap_3-zzcre_fi is initial.
            modify c_t_data from l_dtfiap_3 index l_tabix.
          endif.
          if l_dtfiap_3-blart eq 'RE'.
    .....Get New Fields from PO linked to FI Document.....................
    Select PO Number from PO Line item from BSEG TABLE
            select buzei buzid ebeln ebelp
              into corresponding fields of l_bseg
              from bseg
             where bukrs eq l_dtfiap_3-bukrs
               and belnr eq l_dtfiap_3-belnr
               and gjahr eq l_dtfiap_3-gjahr.
              if l_bseg-buzei eq l_dtfiap_3-buzei.
    .....Already read this line, therefore ignore it......................
                continue.
              endif.
              if l_bseg-buzid eq 'T'.
    .....Don't read automatically created lines - Tax Line................
                continue.
              endif.
              if not ( l_bseg-ebeln is initial ).
                move l_bseg-ebeln to l_dtfiap_3-zzebeln.   " PO Number
              endif.
              if not ( l_bseg-ebelp is initial ).
                move l_bseg-ebelp to l_dtfiap_3-zzebelp.   " PO Line Item No
              endif.
              if not l_dtfiap_3-zzebelp is initial.
                modify c_t_data from l_dtfiap_3 index l_tabix.
              endif.
            endselect.
    .....Got PO Number from FI Document, Now get PO Details...............
    .....Get Short Text...................................................
    GET PO Line Item text
            select single txz01 into l_dtfiap_3-zztxz01
              from ekpo
               where ebeln eq l_dtfiap_3-zzebeln
                 and ebelp eq l_dtfiap_3-zzebelp.
            if sy-subrc = 0.
              modify c_t_data from l_dtfiap_3 index l_tabix.
            endif.
    .....Get Account Assignment...........................................
            select ps_psp_pnr aufnr kostl sakto
              into (l_ps_psp_pnr,l_dtfiap_3-zzaufnr,
                      l_dtfiap_3-zzkostl,l_dtfiap_3-zzhkont)
                  from ekkn
                   where ebeln eq l_dtfiap_3-zzebeln
                     and ebelp eq l_dtfiap_3-zzebelp.
              if sy-subrc = 0.
                modify c_t_data from l_dtfiap_3 index l_tabix.
              endif.
              select single posid into l_dtfiap_3-zzprojk
                   from prps
                     where pspnr = l_ps_psp_pnr.
              if sy-subrc = 0.
                modify c_t_data from l_dtfiap_3 index l_tabix.
              endif.
            endselect.
    .....Get Name of Person who created PO................................
            clear : l_ernam,l_bedat.
            select ernam bedat into (l_ernam, l_bedat)
                up to 1 rows
                from ekko
                 where ebeln eq l_dtfiap_3-zzebeln.
            endselect.
            move l_bedat to l_dtfiap_3-zzbedat.
            if not l_dtfiap_3-zzbedat is initial.
              modify c_t_data from l_dtfiap_3 index l_tabix.
            endif.
            refresh : gt_return.
            call function 'BAPI_USER_GET_DETAIL'
              EXPORTING
                username = l_ernam
              IMPORTING
                address  = l_address
              TABLES
                return   = gt_return.
            move l_address-fullname to l_dtfiap_3-zzcre_po.
            if l_dtfiap_3-zzcre_po is initial.
              move l_ernam to l_dtfiap_3-zzcre_po.
            endif.
            if not l_dtfiap_3-zzcre_po is initial.
              modify c_t_data from l_dtfiap_3 index l_tabix.
            endif.
          else.
    .....Get new Fields from FI Document..................................
            select buzei buzid ebeln ebelp projk aufnr kostl hkont
              into corresponding fields of l_bseg
              from bseg
             where bukrs eq l_dtfiap_3-bukrs
               and belnr eq l_dtfiap_3-belnr
               and gjahr eq l_dtfiap_3-gjahr.
              if l_bseg-buzei eq l_dtfiap_3-buzei.
    .....Already read this line, therefore ignore it......................
                continue.
              endif.
              if l_bseg-buzid eq 'T'.
    .....Don't read automatically created lines - Tax Line................
                continue.
              endif.
              if not ( l_bseg-ebeln is initial ).
                move l_bseg-ebeln to l_dtfiap_3-zzebeln. " PO Number
              endif.
              if not ( l_bseg-ebelp is initial ).
                move l_bseg-ebelp to l_dtfiap_3-zzebelp. " PO Line Item
              endif.
              move l_bseg-aufnr to l_dtfiap_3-zzaufnr.   " Order Number
              move l_bseg-kostl to l_dtfiap_3-zzkostl.   " Cost Centre
              move l_bseg-hkont to l_dtfiap_3-zzhkont.   " GL Account
              select single posid into l_dtfiap_3-zzprojk
                  from prps
                    where pspnr = l_bseg-projk.
              if not l_dtfiap_3-zzprojk is initial
                or not l_dtfiap_3-zzaufnr is initial
                or not l_dtfiap_3-zzkostl is initial
                or not l_dtfiap_3-zzhkont is initial.
                modify c_t_data from l_dtfiap_3 index l_tabix.
              endif.
            endselect.
    .....Get PO Short Text................................................
            select single txz01 into l_dtfiap_3-zztxz01
              from ekpo
               where ebeln eq l_dtfiap_3-zzebeln
               and ebelp eq l_dtfiap_3-zzebelp.
            if sy-subrc = 0.
              modify c_t_data from l_dtfiap_3 index l_tabix.
            endif.
    .....Get Name of Person who created PO................................
            clear : l_ernam,l_bedat.
            select ernam bedat into (l_ernam, l_bedat)
                   up to 1 rows
                   from ekko
                   where ebeln eq l_dtfiap_3-zzebeln.
            endselect.
            move l_bedat to l_dtfiap_3-zzbedat.
            if not l_dtfiap_3-zzbedat is initial.
              modify c_t_data from l_dtfiap_3 index l_tabix.
            endif.
            refresh : gt_return.
    Get PO Doc Created By
            call function 'BAPI_USER_GET_DETAIL'
              EXPORTING
                username = l_ernam
              IMPORTING
                address  = l_address
              TABLES
                return   = gt_return.
            move l_address-fullname to l_dtfiap_3-zzcre_po.
            if l_dtfiap_3-zzcre_po is initial.
              move l_ernam to l_dtfiap_3-zzcre_po.
            endif.
            if not l_dtfiap_3-zzcre_po is initial.
              modify c_t_data from l_dtfiap_3 index l_tabix.
            endif.
          endif.
        endloop.
    Edited by: Srinivas Gogineni on Apr 19, 2009 11:10 AM

  • Enhancement 0FI_AP_30 donu2019t working on virtual cube 0FIAP_R30

    Hi Gurus,
    I have make an enhancement for the extractor 0FI_AP_30 and 0FI_AP_3.
    I have added the Purchasing document and the item to the structure DTFIAP_3 and all working fine.
    After that I have added the following code enhancement for add the WBS element in the extraction.
    Itu2018s working only for the extraction on ODS 0FIAP_O03 and cube 0FIAP_C30 but not with the virtual cube 0FIAP_R30.
    Thank for helps,
    Franck
    CASE I_DATASOURCE.
      WHEN '0FI_AP_3' OR '0FI_AP_30'.
    * On recherche si la pièce comptable est liée à un document et un poste d'achat.
    * Si oui, on recherche l'élément d'OTP.
        SELECT * FROM EKKN INTO TABLE LT_EKKN.
        SELECT * FROM PRPS INTO TABLE LT_PRPS.
        LOOP AT C_T_DATA INTO LS_DATA.
          LV_TABIX = SY-TABIX.
          IF LS_DATA-EBELN IS NOT INITIAL AND LS_DATA-EBELP IS NOT INITIAL.
            READ TABLE LT_EKKN INTO LS_EKKN
                           WITH KEY EBELN = LS_DATA-EBELN
                                    EBELP = LS_DATA-EBELP.
            IF SY-SUBRC = 0.
              READ TABLE LT_PRPS INTO LS_PRPS WITH KEY PSPNR = LS_EKKN-PS_PSP_PNR.
              IF SY-SUBRC = 0.
                LS_DATA-POSID = LS_PRPS-POSID.
                MODIFY C_T_DATA FROM LS_DATA INDEX LV_TABIX.
              ENDIF.
            ENDIF.
          ENDIF.
        ENDLOOP.
    ENDCASE.

    HI,
    Check the below link,
    Loanding Multiproviders 0FIAP_M20 and 0FIAP_M30 (EhP3)
    For Direct update no need to extract separately its just get the data based extract structure.
    Regards,
    Satya

  • Keep getting this error when I run a program   UC_OBJECTS_NOT_CONVERTIBLE

    I created a project via CMOD for a modification to a BW extractor.  It is pretty simple coding but when I try and execute the extractor via RSA3 I get the following error.  I've attached the code as well and it is something with line 17.  can you please help
    Short text
        Data objects in Unicode programs cannot be converted.
    What happened?
        Error in the ABAP Application Program
        The current ABAP program "SAPLXRSA" had to be terminated because
        come across a statement that unfortunately cannot be executed.
    Error analysis
        The statement
           "MOVE src TO dst"
        requires that the operands "dst" and "src" are convertible.
        Since this statement is in a Unicode program, the special conver
        rules for Unicode programs apply.
        In this case, these rules were violated.
    Trigger Location of Runtime Error
        Program                                 SAPLXRSA
        Include                                 ZXRSAU01
        Row                                     17
        Module type                             (FUNCTION)
        Module Name                             EXIT_SAPLRSAP_001
    Source Code Extract
    Line  SourceCde
        1 *&----
        2 *&  Include           ZXRSAU01
        3 *&----
        4
        5 TABLES: VTTK.
        6 DATA: L_MCCOMVTTS LIKE MCCOMVTTS,
        7       L_TABIX LIKE SY-TABIX.
        8
        9
       10
       11 CASE I_DATASOURCE.
       12
       13  WHEN '2LIS_08TRTLP'.
       14
       15 *FIND TDLNR & VSART IN THE SHIPMENT HEADER TABLE
       16
    >>>>>  LOOP AT C_T_DATA INTO L_MCCOMVTTS.
       18   L_TABIX = SY-tabix.
       19   SELECT SINGLE * FROM VTTK WHERE TKNUM = L_MCCOMVTTS-TKNUM.
       20
       21 *FILL FIELDS WITH DATA FROM VTTK(SHIPMENT HEADER TABLE)
       22   IF SY-SUBRC = 0.
       23    L_MCCOMVTTS-Z_TDLNR = VTTK-TDLNR.
       24    L_MCCOMVTTS-Z_VSART = VTTK-VSART.
       25    MODIFY C_T_DATA FROM L_MCCOMVTTS INDEX L_TABIX.
       26   ENDIF.
       27  ENDLOOP.
       28 ENDCASE.

    ra you sure the
    table C_T_DATA and the work area L_MCCOMVTTS have the smae fileds with same data element .
    i think somewhere ther is adifference that why systerm is umable to populate the table data in to work area..
    <b>i have observed that C_T_DATA is not defined any format..
    Make sure u have the same structure for the work area as well</b>
    Please Close this thread.. when u r problem ise solved
    Reward if Helpful
    Regards
    Naresh Reddy K
    Message was edited by:
            Naresh Reddy

Maybe you are looking for

  • Crystal report authetication problem

    Dear experts, I have problem in my one of client regarding Crystal reports. crystal reports working fine in all other client machine but only one client machine system give the database logon failed error. please guide me. Thanks In advance

  • How do I put a metadata(caption or keywords) in multiple pictures at once ?

    I would like to make a filter of places like NYC, London and some pictures have no GPS data, I would like to put blocks of pictures with the same metadata to do so. Thanks!

  • BW to XI Sample Scenario

    I am looking for a sample bw to xi Scenario...can someone post a simple one with the steps for the same...............just file to file will do..just from bw to xi...

  • ABAP Database is not available via R3trans

    hello There! I am new as a basis and currently installing Java Add-In for Abap. My installation stopped during Phase23 of 25 Start J2EE instance. Below is the error i've got... From there i can no longer logon. R3trans check finished with return code

  • Find latest photo in album reading ApertureData.xml

    I'd like to read ApertureData.xml or any other file that can tell me the date of the latest photo I've added to an Aperture project. I don't want any Photostream photos included. Thanks for any suggestions.