on 05-29-2012 2:18 PM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.