2006 Aug 25 7:16 AM
hi all,
my requirement is that when i make any PR against account assignement type 'F' (Order) them we have to enter the Order no. in the Account Assignment tab,
now i want to check that the Order No. the user is entering is should be the same for the plant for which he is entering the PR means if the user is entering the PR item for Plant 1100 then the Order No. should also be of the same plant i.e 1100 not of other plant.
for this i am using the BADI 'ZME_PROCESS_REQ_CUST',
i have checked in the PROCESS_ITEM Method but in this the Order no. doesnot come in the inetrnal table, but if i go for PROCESS_ACCOUNT Method in this i got the Order No. but i am not able to get the Plant of the Item no.
how can i proceed for the same is there any way out to put the check that i needed.
i hope i have cleared my query.
abhishek.
2006 Aug 25 7:40 AM
Hi Abhishek,
What you can do is, <b>export</b> the plant number from PROCESS_ITEM method to memory ID and <b>import</b> the same in PROCESS_ACCOUNT method and do the required validation.
Hope it helps to resolve your issue.
Regds,
Akshay Bhagwat
hi all,
my requirement is that when i make any PR against account assignement type 'F' (Order) them we have to enter the Order no. in the Account Assignment tab,
now i want to check that the Order No. the user is entering is should be the same for the plant for which he is entering the PR means if the user is entering the PR item for Plant 1100 then the Order No. should also be of the same plant i.e 1100 not of other plant.
for this i am using the BADI 'ZME_PROCESS_REQ_CUST',
i have checked in the PROCESS_ITEM Method but in this the Order no. doesnot come in the inetrnal table, but if i go for PROCESS_ACCOUNT Method in this i got the Order No. but i am not able to get the Plant of the Item no.
how can i proceed for the same is there any way out to put the check that i needed.
i hope i have cleared my query.
abhishek.
2006 Aug 25 7:24 AM
the BADI u are using for Purchase not for PR , check this ME_REQ_POSTED but i will tigger when u are trying to POST the PR.
regards
Prabhu
2006 Aug 25 7:40 AM
Hi Abhishek,
What you can do is, <b>export</b> the plant number from PROCESS_ITEM method to memory ID and <b>import</b> the same in PROCESS_ACCOUNT method and do the required validation.
Hope it helps to resolve your issue.
Regds,
Akshay Bhagwat
2006 Aug 25 10:11 AM
2006 Aug 25 10:27 AM
Hi Abhishek,
You will have to use Export statement as:
method IF_EX_ME_PROCESS_REQ_CUST~PROCESS_ITEM .
data: lv_plant type werks.
data: l_mereq_item type MEREQ_ITEM.
l_mereq_item = im_item->get_data( ).
export lv_plant from l_mereq_item-werks to memory id 'ZXX'.
..
..
endmethod.
Hope it helps.
Regds,
Akshay
2006 Aug 25 7:49 AM
Hi,
ME_PROCESS_REQ_CUST is the right badi for this requirement.
In the method PROCESS_ACCOUNT get the order number and store it in a abap memory using EXPORT OPTION.
Next,
In the method POST import the order number from memory, get all the PR items from method GET_ITEMS and do the comparision.
2006 Aug 25 10:06 AM
2006 Aug 25 10:22 AM
field symobls should work.
in the method POST, you can access the field 'AUFNR' of the main program.
use syntax:
ASSIGN '(mainprogramofPR)fieldnameofAUFNR' into <fs>.
give it a try and let us know.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |