Hi -
I understand you want to validate the valuation type in Purchase Requisition with the the valuation type in material master when Valuation Category is 'S' in material master. If that is the case.
IF lw_req_item IS NOT INITIAL.
1. Retrieve BWTAR, BWTTY from MBEW where matnr = lw_req_item-MATNR and bwkey =lw_req_item .
2, If BWTTY = 'S' in step 1.
3. then check if BWTAR <> lw_req_item-Bwtar.
mmpur_message_forced <msgty> <msgid> <msgno> <msgv1> <msgv2>
<msgv3> <msgv4>.
msgid = you can have custom message created in SE91.
ENDIF.
ENDIF.
Dear Atul sir, I am getting error after writing this code.how to solve it..please guide me...
when i debugging is not fetching from the mbew table..
can you tell me what is the data declaration and the select query line