Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in Badi ME_PROCESS_REQ_CUST

Former Member
0 Kudos

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

8 REPLIES 8

former_member200338
Active Contributor
0 Kudos

Did u try POST method?

former_member202818
Active Contributor
0 Kudos

What you mean? the last created PR?

Former Member
0 Kudos

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

raymond_giuseppi
Active Contributor
0 Kudos

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

0 Kudos

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

0 Kudos

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

VenkatRamesh_V
Active Contributor
0 Kudos

Hi Debajyoti,

PR number will be generated at

IF_EX_ME_PROCESS_REQ_CUST~POST.

Regards,

Venkat.

atul_mohanty
Active Contributor
0 Kudos

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