2014 Jul 23 12:28 PM
Hi Experts ,
I am trying to implement the method 'IF_EX_ME_PROCESS_REQ_CUST~CHECK' of badi 'ME_PROCESS_REQ_CUST' . When a PR is created, I want to check the newly created purchase requisition number just before its creation . How can I do it ?
Thanks & regards,
Deb
Hi Experts ,
I am trying to implement the method 'IF_EX_ME_PROCESS_REQ_CUST~CHECK' of badi 'ME_PROCESS_REQ_CUST' . When a PR is created, I want to check the newly created purchase requisition number just before its creation . How can I do it ?
Thanks & regards,
Deb
2014 Jul 23 12:36 PM
2014 Jul 23 1:24 PM
2014 Jul 23 1:49 PM
I am just guessing here as I don't have the system to check, but is is worth checking if the new PR number is getting generated before the exits are called otherwise you will never be able to get the New PR number.
Regards
Abhijit
2014 Jul 23 2:38 PM
2014 Jul 24 5:06 AM
Hi Raymond,
Here I mean , inside the check method I just want to know that which Purchase requisition number is just going to be created , when I am creating a Purchase requisition using Tcode : ME51N .
So, how can I do it ?
Thanks & regards,
Deb
2014 Jul 24 2:58 PM
Should not be possible, as only at commit will the NUMBER_GET_NEXT FM be called (method PREPARE_POST executed after last BAdI method CHECK call and before BAdI method POST call)
NB : Try to put a break-point at start of BAdI methods and at start of FM NUMBER_GET_NEXT
So for which purpose do you need that number ?
Regards,
Raymond
2014 Jul 24 5:14 AM
Hi Debajyoti,
PR number will be generated at
IF_EX_ME_PROCESS_REQ_CUST~POST.
Regards,
Venkat.
2014 Jul 24 1:33 PM
Hi Debajyoti -
The PR number will not be genearated till the CHECK method is called from BADI -ME_PROCESS_REQ_CUST in transaction ME51N.
The method - POST is the correct method (BADI -ME_PROCESS_REQ_CUST) where you can fnid the PR number generated in ME51N
Sample code -
DATA : lw_req_header TYPE mereq_header.
CALL METHOD im_header->get_data
RECEIVING
re_data = lw_req_header.
* PR number is lw_req_header-BANFN
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |