Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

In BADI?

Former Member
0 Likes
1,199

I have Badi definition BADI_SCD_ACCTG, Intat I have one method, In tat method (BEFORE_CHECK) having a parameter I_SCD_ITEM.

In tat parameter I have a multiple structures. In Implementation I need to copy whole data having structure I_SCD_ITEM-KOMV.

Can you please tell me the statements how to copy these structure in to internal table.

I m new to BADI

Thanks

I have Badi definition BADI_SCD_ACCTG, Intat I have one method, In tat method (BEFORE_CHECK) having a parameter I_SCD_ITEM.

In tat parameter I have a multiple structures. In Implementation I need to copy whole data having structure I_SCD_ITEM-KOMV.

Can you please tell me the statements how to copy these structure in to internal table.

I m new to BADI

Thanks

6 REPLIES 6
Read only

0 Likes
1,107

I would suggest you use Field sybolsfor that.

Declare a Field symbol as

<fs-itab> TYPE TABLE

<fs_wa> TYPE ANY.

loop into I_SCH_ITEM assigning <fs_item>

u can assign the component KOMV of <fs_itab> to <fs_wa>

Regards,

Navdeep

Read only

0 Likes
1,107

Hi Thanx for reply,I didn't get it?

Can you please tell more eloborately with syntax?

Thanks

Read only

Former Member
0 Likes
1,107

Hi

You can use the structure <b>v54a0_komv</b> or <b>v54a0_komv_tab</b> which is sued in the Type group V54A0

You can move V54A0_SCD_ITEM-v54a0_komv to internal table.

try and use.

Reward points if useful

Regards

Anji

Read only

0 Likes
1,107

Cn u just tell more about the parameter I_SCD_ITEM? You do now the type of this itab. Declare a work area of this the type of itab.

LOOP AT I_SCD_ITEM INTO wa_I_SCD_ITEM.

ASSIGN wa_I_SCD_ITEM->* to <fs_wa>.

ASSIGN COMPONENT KOMV Of structure <fs_wa> to <fs_komv>.

append <fs_wa> to your_itab.

ENDLOOP.

Regards,

Navdeep

Read only

uwe_schieferstein
Active Contributor
0 Likes
1,107

Hello Sanjana

IMPORTING parameter I_SCD_ITEM is a complex structure defined in type-pool V54A0:


TYPES: v54a0_komv  LIKE komv,                              " line type
       v54a0_komv_tab TYPE v54a0_komv OCCURS 0.  " table type
TYPES: v54a0_ykomv_tab TYPE STANDARD TABLE OF knumv
                            WITH DEFAULT KEY
                            INITIAL SIZE 0.
...
       BEGIN OF v54a0_scd_item,
         vfkp         TYPE v54a0_vfkp,
         vtfa         TYPE v54a0_vtfa,
         konv_changed TYPE c,
         calc_base    TYPE v54a0_calc_base_tab,
         vfsi         TYPE v54a0_vfsi_tab,
         vfzp         TYPE v54a0_vfzp_tab,
         vfkn         TYPE v54a0_vfkn_tab,
         vbpa         TYPE v54a0_vbpa_tab,
         vbadr        TYPE v54a0_vbadr_tab,
         komk         TYPE v54a0_komk_tab,
         komp         TYPE v54a0_komp_tab, 
         komv         TYPE v54a0_komv_tab,   " table type
         vfkomv       TYPE vfsc0_vfkomv_tab,
         tvft         LIKE tvft,
         lblni_ext    TYPE v54a0_lblni_tab,
         calc_complete TYPE c,
       END OF v54a0_scd_item,
       v54a0_scd_item_tab TYPE v54a0_scd_item OCCURS 0.

To read the entire KOMP data you can use the following coding:

DATA:
  ls_komv  TYPE komv.

  LOOP AT i_scd_item-komv INTO ls_komv.
    " do your processing
  ENDLOOP.

Regards

Uwe

Read only

0 Likes
1,107

it is work