Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3180

0FI_AR_4 Enhancement

$
0
0

Hello all

 

I want to enhance 0FI_AR_4 Data source to include field SPART, GSBER, VKBUR. I have used Table VBAK also I have created and add those fields in append and wrote below ABAP code, I have uncheck both check boxes and double checked the data activation but still field remains empty.


WHEN '0FI_AR_4'."Customers: Line Items with Delta Extraction

 

      TYPES:BEGIN OF ty_VBAK,

              VBELN TYPE VBELN,

              SPART TYPE SPART,

              GSBER TYPE GSBER,

              VKBUR TYPE VKBUR,

          END OF ty_VBAK.

 

  DATA: it_vbak TYPE STANDARD TABLE OF ty_vbak,

  it_data TYPE STANDARD TABLE OF DTFIAR_3.

 

 

 

  FIELD-SYMBOLS: <FS_VBAK> TYPE ty_vbak,

                 <fs_data> TYPE DTFIAR_3.

 

   IF not c_t_data[] is INITIAL.

 

*--Copy data to Temp Table

     it_data[] = c_t_data[].

     CLEAR c_t_data[].

 

*--Fetch the cus. Sales. Org Details

 

  SELECT VBELN spart gsber vkbur from vbak

  INTO TABLE it_vbak FOR ALL ENTRIES IN it_data WHERE VBELN = it_data-VBELN.

   IF sy-subrc EQ 0.

 

*--Populate the data to output

        LOOP AT it_data ASSIGNING <fs_data>.

  READ TABLE it_vbak assigning <fs_vbak> WITH KEY VBELN  = <fs_data>-VBELN.

  IF sy-subrc EQ 0.

   <fs_data>-ZZSPART  = <fs_vbak>-spart.

   <fs_data>-ZZGSBER  = <fs_vbak>-gsber.

   <fs_data>-ZZSALESOFFICE  = <fs_vbak>-vkbur.

 

    APPEND <fs_data> to c_t_data[].

 

        ENDIF.

     ENDLOOP.

       c_t_data[] = it_data[].

       FREE it_data[].

    ENDIF.

  ENDIF.

 

Please let me know if there anything I have written incorrectly?

 

Thanks

Ebi


Viewing all articles
Browse latest Browse all 3180

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>