Skip to Content
0

Update a structure table

Nov 02, 2016 at 03:38 PM

45

avatar image

Hi Guys,

I need your assistance on how I can update a structure table within a BADI implementation. The following coding we have define. Any idea how we fill up the append structure? Thank you. Best Regards, Raynard

method IF_EX_BNK_UI_ENHANDE~UI_ITEM.
DATA: BEGIN OF BNK_BTC_ITEM_UI,
 VBLNR TYPE BNK_BTC_ITEM_UI-VBLNR,
 ZREFTXT TYPE BNK_BTC_ITEM_UI-ZREFTXT,
END OF BNK_BTC_ITEM_UI.

data: field1(30) type c.

data: field2(30) type c.

data: wa_ct type ttfieldname.

data: idxx1 type sy-index.
DATA: BEGIN OF REGUP,
 VBLNR TYPE REGUP-VBLNR,
 SGTXT TYPE REGUP-SGTXT,END OF REGUP.

* clear idxx1.

SELECT VBLNR SGTXT FROM REGUP INTO CORRESPONDING FIELDS OF REGUPWHERE VBLNR = CF_BNK_BTC_ITEM_UI-VBLNR.

* idxx1 = idxx1 + 1.

endselect.

if sy-subrc = 0.

WRITE regup-sgtxt to CF_BNK_BTC_ITEM_UI-ZREFTXT.

write 'BNK_BTC_ITEM_UI-ZREFTXT' to field1.

write 'BNK_BTC_ITEM_UI-ZREFTXT' to field2.

insert field1 into CT_BNK_moni_fields index 1.

insert field2 into CT_BNK_app_fields index 1.

else.clear regup.

endif.
endmethod.
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

max bianchi Nov 02, 2016 at 03:50 PM
0

Hi

You need to use an headerline structurated like BADI table, so you can fill it and then append it to the table

Max

Share
10 |10000 characters needed characters left characters exceeded
Raynard Coscolluela Nov 02, 2016 at 09:18 PM
0

Hi Max,

What do you mean? Can you share an example?

Best Regards,

Raynard

Share
10 |10000 characters needed characters left characters exceeded