Skip to Content

How could i know, Screen field value has been changed or not In Me22N.


I am facing one problem.My Requirement is In me22N down payment field is available. Down payment amount is entering the user partially.

Means Suppose In Me21n document total is 50000.00 . First time while adding they entered 5000.00 , Renaming Balance is 45000.00.

So, i need to validate the down payment every time user save the document. I can able validate the records the problem is.

Total amount 50000.00.

1st time 5000.00

2nd time 30000.00

3rd time 15000.00

Down payment is completed, Now User is login into the Screen i did some changes in the other fields. And saving the Document.

Actual amount is 50000.00 already posted. but last 3rd time amount 15000.00 is showing in me22n. the coding part is thinking again user has entered 15000.00 for down payment. 500000+15000 > Actual amount 50000.00 Error message is triggering. But last 15000.00 Actually user has not entered. i.e Previous Transaction amount.

So, My questions is I open me22n. i did some changes in down payment. before saving the records how could i know whether the field has been changed or not. Any idea.

If your answer is compare the database value of the po in the data base. I hope this is wrong.

4000.00 I was entered and saved, Again i open the me22n this time also 4000.00 i was entered, So, Changes has done. So, i can not compare screen values to the Database values. Need valuable suggestions.

donwlpa.png (72.7 kB)
Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    Apr 14, 2016 at 06:14 AM

    Use BAdI ME_PROCESS_PO_CUST, in the methods PROCESS_HEADER or CHECK, you have access to header

    • Get (current screen PAI) value with IM_HEADER->GET_DATA, to previous (last PBO) value with GET_PREVIOUS_DATA and database value with GET_PERSISTENT_DATA. (MEPOHEADER-DPAMT)
    • With IM_HEADER->GET_ITEMS you get the list of items, and for each item you can get history with <ITEMS>-ITEM->GET_HISTORY.

    So now reformulate your requirement (90%) and code it (10%).



    Add comment
    10|10000 characters needed characters exceeded

  • Apr 13, 2016 at 09:27 PM

    Hi NewB,

    Remember that down payment amount can be done using F-47, F-48, F-54 tcodes. If it has done with ref. to PO then it will dispaly in the PO history, checkEKBE Table.


    Add comment
    10|10000 characters needed characters exceeded