Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

ABAP: How to get item Qty from in exit EXIT_SAPMM06E_018

aneel_munawar
Participant
0 Kudos

Dear Experts,

How can I get Item quantity (MENGE) in this exit. I have to apply some calculations. I have checked SCN but not found any solution.

How can I do this.? 

Regards,

Aneel

5 REPLIES 5

former_member196280
Active Contributor
0 Kudos

Dear Aneel,

Try to explore for alternative user exits  or BADI where you can apply your calculations. If at all there is no suitable exit/BADI then the only option is to use the below syntax to get the item quantity.


field-symbols <fs> type any table.

DATA: gv_name(30).

CLEAR gv_name.

    MOVE '(<Program Name>)<Internal table name>'  TO gv_name.

    ASSIGN (gv_name) TO <fs>.

In your case most likely <program name> should be  MM06EF0C and internal table name should be EKPO[].


If the function call is not from the above program name then replace the program name with the correct program.


Regards,

SaiRam

former_member217546
Participant
0 Kudos

Hi Aneel,

Try like this

FIELD-SYMBOLS <fs> TYPE ANY.

ASSIGN ('(SAPLMEPO)EKPO') TO <fs>.

IF <fs> IS ASSIGNED.

................... write your code.

ENDIF.

Mohamed_Mukhtar
Active Contributor
0 Kudos

Hi Aneel,

Check the values in structure ekpo in debugging mode.

Thanks

raymond_giuseppi
Active Contributor
0 Kudos

First, in EXIT_SAPMM06E_017 "PBO FM", memorize received data (I_EKKO, I_EKPO) in global data  of exit FG (ZXM06TOP)

Then, in EXIT_SAPMM06E_018 "PAI FM", use those data

Hint: The first FM will be called twice by SAP standard, before PBO of customer screen AND before PAI of customer screen, so data will be up-to-date to perform check between standard and customer data.

Regards,

Raymond

0 Kudos

Thanks Raymond.  Your answer solved my issue.

Regards,

Aneel