on 05-27-2016 7:56 AM
Hi Team,
My requirement is if user select any value in objects result page,and click zbutton on result page directly it will be opened to service request page with copy object id and partner id ? how to achieve this requirement.
when ever user click the button directly open to service request creation page? how to do it?
and one more thing in object result view could not able to select the line in result view..there is no select field column in result view also..
Component - PRDIOQR
View - result view
Thanks in advance
Thanks & Regards
kalpana
Hi Team,
Still i am looking help here,Please give me any inputs ?
Thanks & Regards
kalpana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi pratheek,
Thanks for your reply...My requirement is ,Objects Search and result page
1)Objects Search and result page,if user search any object ,result will come.
2) In result screen they want to create one button ,button name-Service request.
3)If we select any object in result view,if user clicks on service request button ,it will directly navigate to service request page and object_id ,partner id copy to service request creation screen,
.
For this i could not able to create button on object result page, and after creating button for navigating service request creation how to navigate while click on button.so could you please help here.
Thanks & Regards
Kalpana
Hi Team,
Still i am looking help here..
I have created Zbutton in Objects result page and if user select any line item , and user clicks that button it directly navigate to service request creation page ..and ID partner ID copied to service request page.
For this i have created button event handler method,in zevent handler method i have written the logic.
but its not working and i could not able to navigate, service request header page...??please help?
DATA: lr_desc_object TYPE REF TO if_bol_bo_property_access,
lr_data_collection TYPE REF TO if_bol_bo_col,
lr_nav TYPE REF TO if_crm_ui_navigation_service,
lr_entity TYPE REF TO cl_crm_bol_entity,
lr_core TYPE REF TO cl_crm_bol_core,
lv_guid TYPE crm_mktgs_guid.
* Get the BOL Core Instance
lr_core ?= cl_crm_bol_core=>get_instance( ).
* Get the Root entity
lr_entity ?= lr_core->get_root_entity( iv_object_name =
'Product'
iv_object_guid = lv_guid ).
CHECK lr_entity IS BOUND.
* Create UI based Entity
CALL METHOD cl_crm_ui_descriptor_obj_srv=>CREATE_entity_BASED
EXPORTING
ir_entity = lr_entity
iv_ui_object_type =
'CRM_SRQM_INCIDENT'
iv_ui_object_action =
'D'
"display
RECEIVING
rr_result = lr_desc_object.
* Create a BOL collection to be passed to the inbound plug of
* the Called component
CREATE OBJECT lr_data_collection
TYPE
cl_crm_bol_bo_col.
* Add the UI Descriptor the BOL Collection
lr_data_collection->add( lr_desc_object ).
* Get Instance of Navigation Service
lr_nav = cl_crm_ui_navigation_service=>get_instance( ).
* Navigate to Target Component
IF lr_nav->is_dynamic_nav_supported( lr_desc_object ) = abap_true.
lr_nav->navigate_dynamically( lr_data_collection ).
ENDIF.
Thanks & Regards
Kalpana
Hello Kalpana,
In you code how did you get lv_guid ? you just get the core class instance and empty guid you passing over there. i will not go service screen.
just go through this link in this they have mentioned how to navigate and get the selected result field guid.
****************************************
* Preparation steps
****************************************
*
* Let's get current row info
CALL METHOD cl_thtmlb_util=>get_event_info
EXPORTING
iv_event = htmlb_event_ex
IMPORTING
ev_index = lv_index.
*
CHECK lv_index IS NOT INITIAL.
* Get entity for the current row
CLEAR: lv_guid.
me->typed_context->contacts->collection_wrapper->find( iv_index = lv_index ).
TRY.
lr_entity ?= typed_context->contacts->collection_wrapper->get_current( ).
*
* Retrieve GUID for current activity
IF lr_entity IS BOUND.
lv_guid = lr_entity->get_property_as_string( iv_attr_name = 'GUID' ).
ENDIF.
last doc see navigation using work area component repository.
Regards,
Srinivask.
HI Srinivas,
Thanks for your reply,
here problem is ihave written the logic in Zbutton event handler like as below code,now if i click button then it is navigating to service request creation page.now this below code is navigating to service request creation page.
but problem is i want to select objects result line and if i click button then it should navigate to service request page(SRQM_INCIDENT_H) and REUSLT view page of objectid copied to service request header level BTrefobjmain attribute (-OBJECT_ID). for this how to fetch BTADMINH fields and Relations.
This objects result component is
Compoenent - PRDIOQR
Result view context node - RESULT.
so how to fetch navigated service request header page in result view. and one more problem if i select line in result table its giving dump EH_ONSELECT line number 36,
op_header (lv_event ->row_index ).
DATA: lr_desc_object TYPE REF TO if_bol_bo_property_access,
lr_data_collection TYPE REF TO if_bol_bo_col,
lr_nav TYPE REF TO if_crm_ui_navigation_service,
lr_entity TYPE REF TO cl_crm_bol_entity,
lr_core TYPE REF TO cl_crm_bol_core,
lv_guid TYPE crm_mktgs_guid.
lr_entity ?= me_typed_context->RESULT->collection_wrapper->get_current( ).
check lr_entity is bound.
*****
*****
*******
CALL METHOD cl_crm_ui_descriptor_obj_srv=>CREATE_entity_BASED
EXPORTING
ir_entity = lr_partnernode
iv_ui_object_type = 'CRM_SRQM_INCIDENT'
iv_ui_object_action = 'D'
RECEIVING
rr_result = lr_desc_object.
CREATE OBJECT lr_data_collection TYPE cl_crm_bol_bo_col.
lr_data_collection->add( lr_desc_object ).
lr_nav = cl_crm_ui_navigation_service=>get_instance( ).
IF lr_nav->is_dynamic_nav_supported( lr_desc_object ) = abap_true.
lr_nav->navigate_dynamically( lr_data_collection ).
ENDIF.
Please proivide me the solution how to do it?
Thanks & Regards
Kalpana
Hi Kalpana,
Use this below code.
DATA : lr_entity TYPE REF TO cl_crm_bol_entity.
DATA : lr_iobject TYPE REF TO cl_crm_bol_entity.
DATA : lv_map_srv TYPE REF TO cl_crm_ui_object_mapping_srv.
DATA : lr_nav_descr TYPE REF TO if_bol_bo_property_access.
DATA : lr_nav TYPE REF TO if_crm_ui_navigation_service.
DATA : lr_data_collection TYPE REF TO if_bol_bo_col.
DATA : lv_ui_type TYPE bsp_dlc_object_type.
DATA : lr_core TYPE REF TO cl_crm_bol_core.
DATA: lv_guid TYPE crmt_object_guid.
lr_entity ?= me_typed_context->RESULT->collection_wrapper->get_current( ).
check lr_entity is bound.
* Get Service Request Guid
CALL METHOD lr_entity->if_bol_bo_property_access~get_property_as_value
EXPORTING
iv_attr_name = 'GUID'
IMPORTING
ev_result = lv_guid.
lr_core = cl_crm_bol_core=>get_instance( ).
* Get Root entity of Service Request
lr_entity = lr_core->get_root_entity( iv_object_name = 'BTOrder' iv_object_guid = lv_guid ).
IF lr_entity IS BOUND.
* Get BOR object data
lv_map_srv = cl_crm_ui_object_mapping_srv=>get_instance( ).
CHECK lv_map_srv IS BOUND.
lv_ui_type = lv_map_srv->determine_ui_object_of_entity( lr_entity ).
* Create UI based Entity
CALL METHOD cl_crm_ui_descriptor_obj_srv=>create_entity_based
EXPORTING
ir_entity = lr_entity
iv_ui_object_type = lv_ui_type
iv_ui_object_action = 'B' "display
RECEIVING
rr_result = lr_nav_descr.
CREATE OBJECT lr_data_collection
TYPE cl_crm_bol_bo_col.
* Add the UI Descriptor the BOL Collection
lr_data_collection->add( lr_nav_descr ).
lr_data_collection->insert( iv_bo = lr_entity
iv_index = 2 ).
* Get Instance of Navigation Service
lr_nav = cl_crm_ui_navigation_service=>get_instance( me ).
* Navigate to Target Component
IF lr_nav->is_dynamic_nav_supported( lr_nav_descr ) = abap_true.
lr_nav->navigate_dynamically( lr_data_collection ).
ENDIF.
ENDIF.
Regards,
S
HI Sumeet,
Thanks for your reply..in above sam code i have used in Result view page , button event hanlder,.
but problem is in object result page only Product_guid is coming in result context node, and we are not able to fetch GUID and.what ever value selected in Result view Objectid copied to service request creation page of Header level BTREFPBJMAIN -field -Objectid here we need to set that result value of objectid .
So how to set that from Object result view objectid ,partner to service request headerpage object id and sold to party?
Thanks &Regards,
kalpana
Hi,
I think you can get Service request from Productid
DATA : lv_productid TYPE comt_product_id.
DATA : lr_query_service TYPE REF TO cl_crm_bol_dquery_service,
lr_result TYPE REF TO if_bol_entity_col,
lr_query_service = cl_crm_bol_dquery_service=>get_instance( 'BTQSrvReq' ). "#EC NOTEXT
* Provide search parameters for the query
lr_query_service->add_selection_param( iv_attr_name = 'REFOBJ_IOBJECT_ID'
iv_option = 'EQ'
iv_sign = 'I'
iv_low = lv_product_id ).
lr_query_service->add_selection_param( iv_attr_name = 'OBJECT_TYPE'
iv_option = 'EQ'
iv_sign = 'I'
iv_low = ' BUS2000223' ).
* Fire the query and get the result
lr_result = lr_query_service->get_query_result( ).
lr_result will contain service request structure CRMST_QUERY_R_SRV_REQ_BTIL using guid you can write logic to navigate .
Regards,
Sumeet
Hi Sumeeth,
i have copied above code into my event handler method, now proble
Navigation ui path - CRM_SRQM_INCIDENT maintained.
but here problem is iam getting dump class cl_crm_bol_entity is not compaitable ,for the purpose of assignment ,with target type \class_cl_bsp_wd_value_node. .
and one more thing here the line,
lr_result = lr_query_service->get_query_result( ).
i am getting all service requests entities,with data is coming..here my requirement is ,Result view-result list -if user select any result value ,and click on zbutton(it is added on result view) what ever u selected object same obect is going to sit in service request creation page of place header level of objectid(product id)..here it is set automatically, then user enter other details manually and he will save the service request .thats it...
Navigation ui path - CRM_SRQM_INCIDENT
iv_ui_object_action - D is for create page of service request.
could you please provide me any comments here.
Thanks & Regards
Kalpana
Hi Sumeeth,
Still i am looking help here ,could you please help here..
i am getting service request search and result whole data..but i want service request header page data and i need to set the set property in object value of result view value in service request creation page of objectid.
provide me any inputs here.
Thanks & Regards
Kalpana
User | Count |
---|---|
5 | |
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.