Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

Getting quantity from MIGO using field-symbols

$
0
0

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 ?

 



Viewing all articles
Browse latest Browse all 8332

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>