on 05-14-2009 6:35 PM
Hello,
I am implementing EXEC_METHODCALL_PPF BADI and " EXECUTE " method. I want to get GUID for the Order inside the BADI.
This GUID will be passed to a smartform called from BADI. With the help of GUID I need to fetch data for ORDER and display into smartform.
How can I get GUID in BADI?
Which function module should I use to read order data with GUID?
Thanks,
Madhura
Hi Madhura.
Use the following code to get the header guid.
METHOD if_ex_exec_methodcall_ppf~execute.
* CRM constants
INCLUDE crm_direct.
DATA: lc_action_execute TYPE REF TO cl_action_execute,
lt_container TYPE swconttab,
ls_container TYPE swcont,
lv_kind_ref TYPE crmt_object_kind,
lv_guid_ref TYPE crmt_object_guid,
lv_preview TYPE char01,
lv_message TYPE char80,
lv_process_type TYPE crmt_process_type,
lt_orderadm_i TYPE crmt_orderadm_i_wrkt,
ls_orderadm_i TYPE crmt_orderadm_i_wrk,
lv_header_guid TYPE crmt_object_guid,
lv_guid TYPE crmt_object_guid,
lv_relevant TYPE crmt_boolean,
lv_inception TYPE crmt_boolean,
lv_reversal TYPE crmt_boolean,
lv_term_header TYPE crmt_object_guid,
lv_term_item TYPE crmt_object_guid,
lv_start_date TYPE crmt_date_wrk,
lv_end_date TYPE crmt_date_wrk,
lv_object_id TYPE crmt_object_id,
lv_item_no TYPE crmt_item_no,
lt_to_be_incepted TYPE crmt_object_guid_tab,
lt_to_be_reversed TYPE crmt_object_guid_tab,
lt_idno TYPE bal_r_idno,
ls_idno TYPE bal_s_idno,
lt_guid_tab_comp TYPE crmt_object_guid_tab,
lt_guid_tab_hdr TYPE crmt_object_guid_tab,
lv_1o_main TYPE REF TO cl_crm_1o_main.
* determine item guid from action framework
CREATE OBJECT lc_action_execute.
rp_status = '1'.
CLEAR: lt_guid_tab_hdr,
lt_guid_tab_comp.
CALL METHOD lc_action_execute->get_ref_object
EXPORTING
io_appl_object = io_appl_object
ip_action = ip_action
ii_container = ii_container
ip_preview = ip_preview
IMPORTING
ev_guid_ref = lv_guid_ref
ev_kind_ref = lv_kind_ref
et_container = lt_container
ev_preview = lv_preview.
You can use CRM_ORDERADM_I_READ_OB to read the item details.
Regards
Apoorva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
7 | |
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.