Hello All,
I am trying to get the quantity entered(for some computation) in MIGO, before it is posted, using the code :
EXIT: EXIT_SAPLEINR_003
Include: ZXM06U47
Code:
data: m(40) type c.
types: wa_goitem type goitem.
data: lv_erfmg type erfmg.
FIELD-SYMBOLS: <wa_goitem> type wa_goitem.
clear: m, lv_erfmg.
m = '(SAPLMIGO)GOITEM'.
assign (m) to <wa_goitem>.
if sy-subrc = 0.
lv_erfmg = <wa_GOITEM>-ERFMG.
endif.
Problem with above is, if there are more than 1 item, it is only returning the last item quantity.
I also found another table LT_XMSEG which returns all item quantity, but i'm not able to call the same using the above approach. Am i missing something ?