on 05-13-2011 6:50 PM
Hi All,
1. If i want to develop my WD componant in the standard componant /SAPSRM/WDC_DODC_RFQ_H_BD
I have to know : which context attributs match with the GUID of the contract (RFX) and the number of the contract in the component /SAPSRM/WDC_DODC_RFQ_H_BD ?
2. I can add a TAB by configuration in /SAPSRM/WDCC_FPM_OIF_RFQ_PR_PU of the component FPM_OIF_COMPONENT to inject my WD componant.
But i want to know how to get the GUID and contract number RFX ?
Thanks in advance,
Best regards.
Hi,
Try use something like this:
DATA:
lo_fpm TYPE REF TO if_fpm,
lo_fpm_parameters TYPE REF TO if_fpm_parameter,
lo_idr TYPE REF TO if_fpm_idr.
lo_fpm = cl_fpm=>get_instance( ).
lo_fpm_parameters = lo_fpm->mo_app_parameter.
DATA lv_bo_type TYPE string.
DATA lv_rfx_guid TYPE bbp_guid.
CALL METHOD lo_fpm_parameters->get_value
EXPORTING
iv_key = 'SAPSRM_REFBOTYPE'
IMPORTING
ev_value = lv_bo_type.
IF lv_bo_type EQ 'BUS2200'. "new rfx
CALL METHOD lo_fpm_parameters->get_value
EXPORTING
iv_key = 'SAPSRM_BOID'
IMPORTING
ev_value = lv_rfx_guid.
ELSE. "existing rfx
lo_idr ?= lo_fpm->get_service( cl_fpm_service_manager=>gc_key_idr ).
CALL METHOD lo_idr->get_key_entries
IMPORTING
et_key_entries = lt_idr_ids.
DATA: lr_data TYPE REF TO data,
lo_node_info_app TYPE REF TO if_wd_context_node_info,
ls_attr_info TYPE wdr_context_attribute_info,
lv_index TYPE i,
lo_element TYPE REF TO if_wd_context_element,
lv_value_attr TYPE string,
lv_po_objid type crmt_object_id.
FIELD-SYMBOLS: <s_id_entry> TYPE zcl_idr_entry,
<data> TYPE ANY,
<data_unit> TYPE ANY.
LOOP AT lt_idr_ids ASSIGNING <s_id_entry>.
IF NOT <s_id_entry>-value_node_app IS INITIAL.
lo_element = <s_id_entry>-value_node_app->get_lead_selection( ).
IF NOT lo_element IS INITIAL.
lo_node_info_app = <s_id_entry>-value_node_app->get_node_info( ).
lv_value_attr = <s_id_entry>-value_attr.
ls_attr_info = lo_node_info_app->get_attribute( lv_value_attr ).
CREATE DATA lr_data TYPE (ls_attr_info-type_name).
ASSIGN lr_data->* TO <data>.
IF lv_value_attr = 'BE_REFOBJ'.
lv_index = -1.
CALL METHOD <s_id_entry>-value_node_app->get_attribute
EXPORTING
index = lv_index
name = lv_value_attr
IMPORTING
value = <data>.
exit.
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.
move <data> to lv_rfx_objid.
select single guid
into lv_rfx_guid
from CRMD_ORDERADM_H
where object_id = lv_rfx_objid.
ENDIF.
Regards,
Marcin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.