on 09-06-2011 10:05 AM
Hello Experts,
I have a requirement where I have to call a transaction launcher to open a transaction while passing parameters to the transaction.and I have to call the same on pressing of a custom button on web UI.
Please help how to achieve this.
Hi,
please check this document:
Almost Everything About Transaction Launcher - Part I
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/3059fb20-987f-2e10-ef82-d147b9b5e8b4
Denis
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Denis,
I have alraedy went through the document but it didn't solve my problem.
Here in custom button we have to call a transaction launcher not any external URL like "google.com" ,
so if we have a transaction launcher (target ID) how do we proceed for the development?
please help.
we have tried
1.on click event of button
2.iv_data_collection passing
3.outbound plug mapping
in any of these didnt solve our problem.
Might be I am doing something wrong.Can you please elaborate.Thanks.
regards,
Arnab
Hi Arnab,
I hope you want to call the transaction launcher on a button click.
in the event handler of the button you can call outbound plug of the view. and in the outbound plug you can call the outbound plug of the window.
In that you can write code to navigate to transaction launcher.
In your web ui component you will have a global custom controller or something to which you can populate your value.The transaction launcher's handler class will have a method IF_CRM_IC_ACTION_HANDLER~PREPARE_DATA_FLOW where we can set parameter value. In this method such global controllers will be called.
Please see the below threads.
Thanks,
Rajini A.
Thanks Rajini for your valuable input. but still I am getting issues.
what I have done.
1.on event handler EH_ONAGREEMENT i called OP_NAVIGATETOTL( ) ( Outbound plug of overview page)
2.in OP_NAVIGATETOTL( ). i used Navigation link to navigate to main window inbound plug as from overview it is not feasible to call straightway the op of window.
view_manager->navigate( source_rep_view = rep_view
outbound_plug = 'NAVTOMAINWINDOW' ).
3.in Mainwindow IP_NAVIGATETOTLIP inbound plug i am calling the op of same mainwindow to go to op of mainwindow
OP_NAVIGATETOTL( ).
4. in OP_NAVIGATETOTL( ). of mainwindow i have written this code to navigate to transaction launcher
DATA : lr_navigation TYPE REF TO if_crm_ui_navigation_service,
lr_entity TYPE REF TO cl_crm_bol_entity,
lr_clipboard TYPE REF TO if_crm_ui_bol_clipboard.
TRY.
lr_navigation = cl_crm_ui_navigation_service=>get_instance( me ).
lr_navigation->navigate(
EXPORTING
iv_link_id = 'ZCRMORDER'
).
CATCH cx_root.
ENDTRY.
while testing debugger is coming to this code segment correctly as all the previous navigation is working smoothly but transaction launcher is not called by the piece of code mentioned lastly.
Am i doing something wrong???
Please help!!!!!
regards.
Arnab
Hi Arnab,
In that case please keep an external debugger in the method cl_bsp_wd_view_manager 's process_nav_queue method and SET_WORKAREA_CONTENT method of CL_CRM_UI_CORE_APPL_CONTROLLER class and see how it behaves.
Also make you sure you are giving the correct logical link name to the parameter iv_link_id.
If problem is not solved Please describe the behavior in those methods.
Thanks,
Rajini A.
Hi Rajini,
Thanks a lot for helping!
I have just applied an idea in which I have added my logical link id for transaction launcher to my navigation bar profile for my role and now a link (direct) is shown on left panel of work center.And now with the same role , on press of button transaction launcher is being called as the above mentioned code is working now.
But I have cross checked that if i make the link in left panel invisible the functionality is not working..
Please help!!!!
regards.
Arnab
hi,
i think you should be able to navigate even when you make the link invisible.
keep breakpoints in the above mentioned methods and see the behavior.
Is it that a blank screen is coming or u don't see any navigation happening?
Also keep a break point in method IF_CRM_IC_ACTION_HANDLER~PREPARE_DATA_FLOW of teh handler class of your transaction launcher and see what is happening.
Thanks,
Rajini A.
Hello Rajini,
Basically there is no blank screen , Navigation itself is not happening.I am going to check them thoroughly.
It would be highly helpful if you can give me the idea how to pass a parameter to the transaction.
I am opening BP page (TCODE = BP) so i want to pre populate the BP field .How I would do that.
Please Help!!
regards
Arnab.
Hi arnab,
I am jsut giving an approach here it may have some mistakes please correct them while coding.
In the component CRMCMP_grm_gap. you have custom controller CUCOPARTNER. enhance that and create attribute as cucogdc of type if_crm_ui_data_context.
fill that attribute with the bp number as follows.
cucogdc = cl_crm_ui_data_context_srv=>get_instance( me ).
cucogdc->set_entity( name = 'CURRENTBP'
value = lr_entity ).
here lr_entity can be the business partner entity.
You can access this bp in handler class of your transaction launcher.
Go to the method IF_CRM_IC_ACTION_HANDLER~PREPARE_DATA_FLOW of the handler class and write the code as below. Please change according to your requirement this is just a sample.
data: __gdc type ref to if_crm_ui_data_context,
__source type string,
__line type string,
__path type crmt_ic_ac_identify_path.
__gdc ?=
cl_crm_ui_data_context_srv=>get_instance( gv_view_controller ).
********** Begin of parameter declaration ***********
data PARTNER
type ty_PARTNER .
concatenate
space
'CURRENTBP/BP_NUMBER'
into __source.
if __gdc is bound.
try.
call method __gdc->GET_ENTITY_ATTRIBUTE_AS_VALUE
exporting
path = __source
importing
value = PARTNER.
catch cx_crm_bdc_no_data cx_crm_bdc_xpath_error cx_root.
clear PARTNER.
endtry.
endif.
me->set_container_object(
iv_name =
'PARTNER'
iv_object_key =
PARTNER
iv_object_type =
<BORTYPE>
).
Thanks,
Rajini A.
Edited by: rajini.aleti on Sep 7, 2011 4:25 PM
Hi Rajini,
This is the code I have in my prepare data flow. I have no idea how i would pass the parameter from button event to it.its opening BP page.
method IF_CRM_IC_ACTION_HANDLER~PREPARE_DATA_FLOW.
data: __gdc type ref to if_crm_ui_data_context,
__source type string,
__line type string,
__path type crmt_ic_ac_identify_path.
__gdc ?=
cl_crm_ui_data_context_srv=>get_instance( gv_view_controller ).
Begin of parameter declaration ***********
data ICWCPROCESSEDOBJECT
type ty_ICWCPROCESSEDOBJECT .
data NEWINTERNALMODE
type ty_NEWINTERNALMODE .
data ICWEBCLIENTBORKEYPARAMETER
type ty_ICWEBCLIENTBORKEYPARAMETER .
concatenate
'/'
'/'
'ACCOUNT_ID'
into __source.
call method cl_crm_ui_ltx_cuco_access_srv=>get_instance
exporting
iv_controller = gv_view_controller
receiving
rv_result = gv_ltx_cuco.
GV_SELECTED_ENTITY ?= GV_LTX_CUCO->GET_SELECTED_CLIPBOARD_ENTRY( ).
if gv_selected_entity is bound.
try.
__path = __source.
call method
cl_crm_ic_activity_clipboard=>get_property_as_value
exporting
iv_xpath = __path
iv_entity = gv_selected_entity
importing
ev_result = ICWEBCLIENTBORKEYPARAMETER .
catch cx_crm_bdc_no_data cx_crm_bdc_xpath_error cx_root.
clear ICWEBCLIENTBORKEYPARAMETER .
endtry.
endif.
me->set_container_object(
iv_name = '<MAINOBJ>'
iv_object_key = ICWEBCLIENTBORKEYPARAMETER
iv_object_type = gv_bortype ).
Data flow is complete - set to false if data is missing
gv_data_flow_complete = abap_true.
endmethod.
Hi,
I cant write the exact piece of code. but what you can do is try to set the entity in button event handler method as shown in my previous post.
In the prepare data flow method
if gv_selected_entity is not bound then you read from __gdc controller object and fetch the value you updated in the button's even handler method.
To help me understand better please specify in which view of the component CRMCMP_GRM_GAG you are creating button and how you are getting the BP details inside the method.
Aslo the BOL object you have used for BP transaction.
Thanks,
Rajini A.
Hi,
I have solved this issue. I have described solution here http://scn.sap.com/docs/DOC-33361.
BR,
Tauqir
I cannot see your link, can you send me the information ?.
I need to open an external app using a button from a web ui component and later get the values back from the same external application.
Thanks!
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.