Application Development and Automation 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: 
Read only

Problem in Badi ME_PROCESS_REQ_CUST

Former Member
0 Likes
2,698

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

8 REPLIES 8
Read only

Former Member
0 Likes
1,902

Did u try POST method?

Read only

former_member202818
Active Contributor
0 Likes
1,902

What you mean? the last created PR?

Read only

Former Member
0 Likes
1,902

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

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,902

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

Read only

0 Likes
1,902

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

Read only

0 Likes
1,902

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

Read only

VenkatRamesh_V
Active Contributor
0 Likes
1,902

Hi Debajyoti,

PR number will be generated at

IF_EX_ME_PROCESS_REQ_CUST~POST.

Regards,

Venkat.

Read only

atul_mohanty
Active Contributor
0 Likes
1,902

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