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: 

How to get change /display mode of Purchase Requisition

Former Member
0 Kudos

Hi,

For purchase order we can check the change/display of using FM MEPO_DOC_GET_TRANSACTION_STATE'.

How can we check the change/display mode for Purchase Requisition?

Regards,

Pravin

1 ACCEPTED SOLUTION

raymond_giuseppi
Active Contributor

Did you try FM MEREQ_GET_FACTORY, then methods IF_PURCHASE_REQ_FACTORY~LOOKUP_HEADER and IF_PURCHASE_REQUISITION~GET_TRANSACTION_STATE ?

Regards,

Raymond

5 REPLIES 5

atul_mohanty
Active Contributor
0 Kudos

Hi Pravin -

How do you want to check this and where you want to check ?

In BADI - ME_PROCESS_REQ_CUST, there is method OPEN.

The field IM_TRTYP field it contains the transaction type.

A = Display

V = Change

H = Add (Creation)

You can refer to the fixed value of domain TRTYP in SE11

raymond_giuseppi
Active Contributor

Did you try FM MEREQ_GET_FACTORY, then methods IF_PURCHASE_REQ_FACTORY~LOOKUP_HEADER and IF_PURCHASE_REQUISITION~GET_TRANSACTION_STATE ?

Regards,

Raymond

0 Kudos

Thanks for your reply,

I am doing the changes in one of the exit program, I tried with above solution but did not work.Could you please suggest any other alternative.

0 Kudos

Do you mean in Enhancement MEREQ001 (SMOD) ?

If yes, use IF_PURCHASE_REQUISITION_ITEM~GET_REQUISITION and then  IF_PURCHASE_REQUISITION~GET_TRANSACTION_STATE as in previous answer.

Regards,
Raymond

0 Kudos

Hi Pravin -

Check what Raymond said . Other check the details as follows ;

As I mentioned in the post earlier, you can use open method in BADI - ME_PROCESS_REQ_CUST.

This method will trigger when you move from change -> display or display -> change and also when u enter the particular transaction.

In that method, you can write a function module to export the value of IM_TRTYP and another function module in your exit to import the value of IM_TRTYP. Those two function module should be under one function group and u can store the value of IM_TRTYP in global variable.

Let us know, if it helps