cancel
Showing results for 
Search instead for 
Did you mean: 

Assign action for create purchaser order - SAP SRM 7

Former Member
0 Kudos

Hi all,

Currently I am working on SRM 7.02 version. I have a requirement where in  I need to check in a code whether user has clicked on Create Purchaser Order. I understand that Sy-ucomm will not work in SRM 7. Also  /sapsrm/if_transaction_context~GET_CURRENT_ACTION( ) will not return any value when clicked on Create PO.

Please guide me how to achieve this functionality? Is there any settings I need to add in SPRO?

Kind Regards,

Gayathri

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello,

   

Are you using portal to access SRM?

Also are you trying to create a PO with /sapsrm/op_purchaser(Operational Purchaser) role?

 

Then check method CONSTRUCTOR of class /SAPSRM/CL_CH_WD_BOM_PO .

You will find the code to check the mode of PO (

/sapsrm/if_pdo_constants_gen_c=>gc_mode_display

/sapsrm/if_cll_mapper_c=>gc_mode_create) etc.

Basically you need to get a reference of the Task COntainer object and call method get_transaction_modus on it.

 

Let me know if you need more info.

 

Regards,

Sushil.

Former Member
0 Kudos

Hi Sushil,

Thanks for you reply. Currently we are using a custom role. I checked in debugging mode - the constructor of the class /SAPSRM/CL_CH_WD_BOM_PO has a variable transmode which is populated with the mode 'CREATE' which is obtained from the io_task _container.

As I am new to OO ABAP as well as webdynpro, Could you please let me know in detail how do I  get this mode in my badi/enhancement code?

Kind Regards,

Gayathri Gopalakrishnan

Former Member
0 Kudos

Hello,

could you tell what are you trying to achieve using this mode?

Regards,

Sushil.

Former Member
0 Kudos

Hi Sushil,

Thanks for your reply.

We are using external PO number functionality for which we have created a custom field too. Hence, we need to track whether user has clicked on create_PO , then clear the standard PO  number.

Kind Regards,

Gayathri Gopalakrishnan

laurent_burtaire
Active Contributor
0 Kudos

Hello Gayathri,

check OSS note below:

1334202 - How to get current action ID and transaction group

Have a look at paragraph dealing with "Workaround for other actions".

Maybe, it could help you.

Regards.

Laurent.