Skip to Content

MIGO EXIT BADI(MB_MIGO_BADI)

i added a tab(subscreen) to the MIGO transaction using BADI ( MB_MIGO_BADI )

i need to display some info for the current line item choosed,

so i use the methods in the badi(PBO-detail / line-modify), but all the methods are giving me the old line item clicked/choosed,

i dont understand the purpose for that,

but any ideas on how to get the right line item data in the PAI module for my sub screen/TAB to be able to display

the right info in the tab strip for the current line item clicked?

this is the code in the line-modify method.

* In case it's Goods issue action with purchase order reference

IF ( ACTION = 'A07' AND REFDOC = 'R01') OR ( ACTION = 'A04' AND REFDOC = 'R02' ) .

WA_ITEM-LINE_ID = I_LINE_ID.

WA_ITEM-DAFTAR_FROM = CS_GOITEM-ZZDAFTAR_FROM.
WA_ITEM-DAFTAR_TO = CS_GOITEM-ZZDAFTAR_TO.


IF WA_ITEM-DAFTAR_FROM IS NOT INITIAL OR WA_ITEM-DAFTAR_TO IS NOT INITIAL .
DELETE IT_ITEM WHERE LINE_ID = I_LINE_ID .
INSERT WA_ITEM INTO TABLE IT_ITEM .
CLEAR FLAG.
ENDIF.
ELSEIF ( ( ACTION = 'A01' AND REFDOC = 'R01' ) OR( ACTION = 'A01' AND REFDOC = 'R10' AND CS_GOITEM-BWART = '561' ) ).
IF SY-UCOMM = 'MIGO_OK_SPLIT_QUAN'.
WA_ITEM-LINE_ID = I_LINE_ID.
WA_ITEM-DAFTAR_FROM = CS_GOITEM-ZZDAFTAR_FROM.
WA_ITEM-DAFTAR_TO = CS_GOITEM-ZZDAFTAR_TO.
IF WA_ITEM-DAFTAR_FROM IS NOT INITIAL OR WA_ITEM-DAFTAR_TO IS NOT INITIAL .
DELETE IT_ITEM WHERE LINE_ID = I_LINE_ID .
INSERT WA_ITEM INTO TABLE IT_ITEM .
CLEAR FLAG.
ENDIF.
ELSEIF FLAG = 'X' .
WA_ITEM-LINE_ID = I_LINE_ID.
WA_ITEM-DAFTAR_FROM = CS_GOITEM-ZZDAFTAR_FROM.
WA_ITEM-DAFTAR_TO = CS_GOITEM-ZZDAFTAR_TO.
IF WA_ITEM-DAFTAR_FROM IS NOT INITIAL OR WA_ITEM-DAFTAR_TO IS NOT INITIAL .
DELETE IT_ITEM WHERE LINE_ID = I_LINE_ID .
INSERT WA_ITEM INTO TABLE IT_ITEM .
CLEAR FLAG.

ENDIF.
ENDIF.
ENDIF.
Add a comment
10|10000 characters needed characters exceeded

Related questions

0 Answers

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.