07-23-2014 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
07-23-2014 12:36 PM
07-23-2014 1:24 PM
07-23-2014 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
07-23-2014 2:38 PM
I want to check the newly created purchase requisition number
Can you explain, do you want to check a new requisition data or do you explicitly require the actual number of the requisition for following actions ?
(In second case there is a BTE 01000710)
Regards,
Raymond
07-24-2014 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
07-24-2014 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
07-24-2014 5:14 AM
Hi Debajyoti,
PR number will be generated at
IF_EX_ME_PROCESS_REQ_CUST~POST.
Regards,
Venkat.
07-24-2014 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