07-14-2006 4:57 AM
I have an issue that requires me to use a userexit or BADI. When Planned Orders are converted to PRs in MD14/MD15, the field EBAN-ADRN2 are not populated with a delivery address which is to be based on MRP Controller (EBAN_DISPO). So I need to use a user exit to fix this problem. So far I can seem to find any user exits for this.
So I have decided to use the BADI ME_REQ_POSTED to update the ADRN2 field in EBAN. I don't know if this is the best BADI to use. From my research I think this BADI can be only used for data checking and not updating.
I need to know whether I can proceed with using this BADI or not is there any other that I can use? I am also new to Abap Objects. I don't know how to code and what functions to use. I need some help on the coding part.
I need to solve this urgently. Please do help.
07-14-2006 5:40 AM
Hi Canna ,
Just Implement this BADI in ur test Client and try to make use of tables
<b>IM_EBAN---> New, So pass ur ADRN2 here .
IM_EBAN_OLD
IM_EBKN------>New
IM_EBKN_OLD</b>
and Put a break-point and see the values of IM_EBAN .
Regards
Prabhu
07-21-2006 2:55 AM
Now I am using a different BADI which is MD_PURREQ_CHANGE. There are two methods in this BADI and I am using CHANGE_BEFORE_SAVE_CONV which saves changes to the PR created From Planned Order in MD15. Here is the code that I did in this method:
if im_plaf-dispo = 'GS1'.
ch_eban-adrn2 = '22658'.
ch_changed = 'X'.
elseif im_plaf-dispo = 'PW1'.
ch_eban-adrn2 = '22722'.
ch_changed = 'X'.
endif.
The method receives the PLAF table and changes the EBAN-ADRN2 field which is the delivery address.
This BADI works fine. The ADRN2 field in EBAN is successfully populated. But whhen I attempt to view the PR in ME53N, I am receiving an 'EXIT' message from the system saying 'Address doesn't exist 22658 11000221 00001'; and the process is terminated and returned to the initial SAP screen.
I would like to know if my code is correct or is there anyone who can give me an idea on why this happening.
07-21-2006 5:37 AM
Hi Canna ,
try to find out message class , Numer ,from where its coming ?
Regards
Prabhu
01-29-2008 4:09 PM
Hi,
How did you activate the BAdi 'MD_PURREQ_CHANGE' in the MD15?, i need to do exactly the same to change the EBAN-PREIS instead of ADRN2.
I've already configure the implementation and place a breakpoint into the code but it doesn't stop
Anyway you can help me would be useful...
06-09-2008 4:02 PM
Hi,
Even I'am unable to change the eban-preis in this badi 'MD_PURREQ_CHANGE --> CHANGE_BEFORE_SAVE_CONV' . If u guys suceeded in the same pls let me know as I have the same requirement of chamging the PREIS filed while converting the Planned ord to P Req
Thanks in Advance,
Jignesh