on 2010 May 19 2:19 PM
Hello Experts,
I have a Activity created for Blocking/unblocking(Status) the product-Flat.
On choosing the status 'Blocking' from activity page and saving the Action is triggered - In Action the processing type is Method call, i have implemented the BADI 'EXEC_METHODCALL_PPF' . With in this method a simple update statement to set the status of a product in the ztable to 'blocked' is put.
But for this the Method will have to read the product entered in the activity journal.
My Question is how to read or get the activity id or guid within the action method. So that the product is read and only then can i proceed.
Please give me some direction on how to proceed on this.
Thanks,
Jaya.
I think you can access the FM CRM_ORDER_READ from with in the badi defintion and read the Product information of the activity from segments ET_PRODUCT_I or ET_SCHEDLIN
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Shaik............
CRM_ORDER_READ & CRM_ORDER_READ_OW will definitly help me but what I wanted was the GUID of current activity within the action method , which i will then pass to the above function....... So here is the code, Nothing great!!! looked into the standard Actions defined.
get document info
lcl_action_execute = cl_action_execute=>get_instance( ).
*----
consistency checks
no preview supported
IF ip_preview = true.
MESSAGE s007(crm_action).
EXIT.
ENDIF.
me->init( ).
get parameter from reference object
CALL METHOD lcl_action_execute->get_ref_object
EXPORTING
io_appl_object = io_appl_object
ip_action = ip_action
ii_container = ii_container
IMPORTING
ev_guid_ref = mv_ref_guid
ev_kind_ref = lv_ref_kind.
append mv_ref_guid to lv_guid.
................Now i can pass this lv_guid to the function CRM_ORDER_READ ( Which is called only when the activity is already created in the database...ie when the status is set for the 2nd time ),
CRM_ORDER_READ_OW ( to read from buffer bcoz 1st time when i set the status my activity is not yet created in the database).
................ full points to me
User | Count |
---|---|
10 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.