on 09-15-2011 5:25 AM
Dear All,
I want to change the Valuation Price in transaction ME51N.
The SAP´s standard gives me the price available in material master record but I need in MEREQ3320-PREIS last buying price of the material.
We have implemented MEREQ001 Customers' Own Data in Purchase Requisition enhancement . and implemented user exit
EXIT_SAPLMEREQ_010 but in that we cannot modify PREIS field which is present in IM_T_EBAN STRUCTURE (import parameter )
Is there any other way to modify MEREQ3320-PREIS (price Valuation) field during SAVE IN ME51N .
Your help is highly appreciated.
regards
Deepak.
Edited by: Deepak Dhamat on Sep 15, 2011 6:25 AM
Hi Shankar ,
Thank you for the reply .
What we want to achive is in enhancement say either using exit or BADI we want to change valuation price in me51n by
accessing value from below logic i.e
get latest purchasing document no and pass that to ekpo and get max(netpr ) and assign that to pRICE VALUATION .
select max( ebeln ) into w_ebeln from ekpo
where matnr = w_eban-matnr
and werks = w_eban-werks .
if sy-subrc = 0 .
select max( netpr ) into w_netpr from ekpo
where ebeln = w_ebeln .
Regards
Deepak.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Deepak,
Did you check the possiblility of using the BAdI method ME_PROCESS_REQ_CUST->PROCESS_ITEM ? See the parameter IM_ITEM type ref to IF_PURCHASE_REQUISITION_ITEM. May be you can use the method IM_ITEM->SET_DATA & SET_DATAX (see the parameter IM_DATA) to change the required field value.
Regards, Vinod
Hi ,
Thank you all for your support .
@Klaus : it was helpfull answer but i changed my mind to use BADI .
@vinod : Finaly i implemented badi as you said .
we are using this for only Display purpose .
method .
if sy-tcode ='ME53N' .
DATA:
ld_attr TYPE string,
ld_method TYPE string,
lo_obj TYPE REF TO object, " root object
lo_obj_2 TYPE REF TO object.
DATA : w_ebeln TYPE ekpo-ebeln ,
w_netpr TYPE ekpo-netpr .
FIELD-SYMBOLS:
<lo_lcl> TYPE ANY,
<ls_item> TYPE mereq_item.
CHECK ( im_count = 1 ). " avoid endless iteration -> see NOTE below
lo_obj ?= im_item. " casting to root object !!!!!
ld_attr = 'MY_STATE'.
ASSIGN lo_obj->(ld_attr) TO <lo_lcl>.
ld_attr = 'MY_STATE->ITEM'.
ASSIGN lo_obj->(ld_attr) TO <ls_item>.
IF <ls_item>-knttp = 'K' .
SELECT MAX( ebeln ) INTO w_ebeln FROM ekpo
WHERE matnr = <ls_item>-matnr
AND werks = <ls_item>-werks .
IF W_EBELN IS NOT INITIAL .
SELECT MAX( netpr ) INTO w_netpr FROM ekpo
WHERE ebeln = w_ebeln .
IF W_NETPR IS NOT INITIAL .
<ls_item>-preis = w_netpr .
ENDIF.
ENDIF .
ENDIF.
ENDIF.
regards
Deepak.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.