on 02-12-2012 1:35 PM
hi,
I need to read the status of the action ( whether it is executed or sheduled ) in a sales order.
There are various actions defined in the action profile for a sales order.
I need to programatically find out whether an action has been executed or not for a particular sales order.
Is there a function module to read this data. Or what is the approach to get this data.
Thanks,
karthik
Hello, Karthik.
For this purpose you can use next relations:
BTAdminH -> BTHeaderAction -> ACIActionContext.
There are numbers of next relations. For instance: ACIActiveActionRel, ACIActiveProcessedActionRel, ACIActiveUnprocessedActionRel, ACIInactiveActionRel etc.
Check this in GENIL_MODEL_BROWSER or in GENIL_BOL_BROWSER for ONEORDER component set.
Hope this will help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Andrei,
Thanks for the reply. I just discovered the table where this actions data is stored - PPFTTRIGG.
By passing the order number to APPLKEY field we are able to get all the details related to the action.
I think directly reading from the table would be easier and faster option.
Thanks,
Karthik
Thanks Andrei,
Yes, totally agree ! So I am changing the code to get the data from BOL entity.
But not sure how to get BTAdminH in Container_ppf badi.
I do have the guid of the order. And I know that we can start the BOL core by the following code:
DATA: lv_bol_core TYPE REF TO cl_crm_bol_core.
lv_bol_core = cl_crm_bol_core=>get_instance( ).
CALL METHOD lv_bol_core->start_up
EXPORTING
iv_appl_name = 'ONEORDER'
iv_display_mode_support = ' '.
Whats next, how do I reach till BTAdminH
Thanks,
karthik
Something like this:
data: lo_core type ref to cl_crm_bol_core,
lo_entity type ref to cl_crm_bol_entity.
lo_core = cl_crm_bol_core=>get_instance( ).
lo_core->start_up( 'ONEORDER' ).
try.
lo_entity ?= lo_core->get_root_entity( iv_object_name = 'BTOrder'
iv_object_guid = iv_guid ). //you should know GUID of BT
lo_entity = lo_entity->get_related_entity( 'BTOrderHeader' ).
// lo_entity here is BTAdminH
// so keep going to desired related entity from here
catch cx_root into lx_root.
endtry.
User | Count |
---|---|
8 | |
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.