on 2016 Nov 02 3:38 PM
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.
Request clarification before answering.
In S/4 you could do this:
CT_BNK_MONI_FIELDS = VALUE #( ( 'BNK_BTC_ITEM_UI-ZREFTXT' ) ).
CT_BNK_APP_FIELDS = VALUE #( ( 'BNK_BTC_ITEM_UI-ZREFTXT' ) ).In ECC you could do this:
DATA: wa TYPE fieldname.
wa = 'BNK_BTC_ITEM_UI-ZREFTXT'.
APPEND wa TO: CT_BNK_MONI_FIELDS, CT_BNK_APP_FIELDS.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi gurus, I'm facing the same problem, please could you tell me how you solve this issue?
Thanks in advance.
Daniel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Max,
What do you mean? Can you share an example?
Best Regards,
Raynard
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
You need to use an headerline structurated like BADI table, so you can fill it and then append it to the table
Max
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 7 | |
| 7 | |
| 6 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.