Calling an URL/Hyperlink in new session on browse from button.
Dear experts!
I created a Z program on SAP GUI, and configured the logical link for this program and call it from Web UI Client. In component BTCUSTOMER_H, i redefined DO_PREPARE_OUTPUT to maintained a button called 'FORWARD'. I create method EN_ONFORWARD to process. My problem is: on component BTCUSTOMER_H, when i click on FORWARD button, a new session on browse appear and display the Z program above or navigate to my Z program ( i can navigate to a standard transaction for example: from an Opportunity, i can maintain a button and navigate to a SaleOrder by click to this button). When i searched on forum, i found some thread said about this problem but i still can not resolve my problem. Can any one show me the details, how i configure for the Z program and processing code in method EH_ONFORWARD to resolve my problem.
Can anyone help me, please!
Longnd.
Hi,
Please follow the steps for calling you logical link.
When you create a Logical Link, you also should give the Target ID.
Now In the Naivigation Bar Profile you will have some thing called as Define Geniric OP Mapping
Here add a entrty with any Name , and give your target ID here.
For eg : ZCall_ZREPORT :Target Id ; Given in the step 1.
And in you even handler of the button write the followng code.
DATA: lr_nav_descr TYPE REF TO if_bol_bo_property_access.
DATA: lr_navigation TYPE REF TO if_crm_ui_navigation_service.
DATA: lr_col TYPE REF TO cl_crm_bol_bo_col.
cl_crm_ui_descriptor_obj_srv=>create_ui_object_based(
EXPORTING iv_ui_object_type = ZCall_ZREPORT
iv_ui_object_action = 'B'
RECEIVING rr_result = lr_nav_descr ).
CHECK lr_nav_descr IS BOUND.
lr_navigation = cl_crm_ui_navigation_service=>get_instance( ).
CHECK lr_navigation IS BOUND.
Check whether navigation is supported
IF lr_navigation->is_dynamic_nav_supported( lr_nav_descr ) NE abap_true.
RETURN.
ELSE.
CREATE OBJECT lr_col.
lr_col->if_bol_bo_col~add( iv_entity = lr_nav_descr ).
lr_navigation->navigate_dynamically( lr_col ).
Similar Messages
-
How to call a screen in a new session -- Urgent
Hi all,
I need to call a screen from another program in a new session, is it possible or not? if possible, please help me. After that when clicked on one button, session should automatically closed. waiting for valuable replies....
Thanks in Advance.
Siva Sankar.Hi Gourav,
Thanks for ur quick reply. Actually i'm calling a module pool program from one screen when clicked on one button. My requirement is that module pool program should be opened in seperate session. when clicked on exit button in new session, that session should be closed. is it possible?
Thanks,
Siva Sankar. -
Calling a Program in a New Session
Hi gurus,
I have a custom report which has a button that links to another custom report. When this button is clicked, I perform a SUBMIT xxx WITH xxx and RETURN to another ABAP Report.
Is it possible to open up a new Session (so that I don't lose my original report) and call the new report in there (sort of like how the System->User Profile->Own Data menu path works - I have tried to debug this but SAP does not let me debug this!).
Any help would be appreciated.
Cheers,
Pat.Hello,
If you want a seperate session and run a program using a transaction use this function module. ABAP4_CALL_TRANSACTION
You can either use a bdctab table or can use the param id for the same.
FORM f_call_lt27 USING p_temp_nlenr TYPE y1mm_imac010_alv-nlenr.
DATA : lt_spagpa TYPE TABLE OF rfc_spagpa WITH HEADER LINE.
MOVE 'LGN' TO lt_spagpa-parid.
MOVE t2_lgnum TO lt_spagpa-parval.
APPEND lt_spagpa.
MOVE 'LEN' TO lt_spagpa-parid.
MOVE p_temp_nlenr TO lt_spagpa-parval.
APPEND lt_spagpa.
CALL FUNCTION 'ABAP4_CALL_TRANSACTION'
STARTING NEW TASK 'MSC3N'
EXPORTING
tcode = 'LT27'
skip_screen = 'X'
TABLES
spagpa_tab = lt_spagpa.
ENDFORM. " f_call_lt27
Regards,
Shekhar KUlkarni -
How to call a transaction (in a new session) from a program
Hi ,
I need to call a transaction from my report on the click of a button in toolbar.
But the transaction should open in a new session.
This is the code that i have written, MM03 is getting opened in the same session.
call transaction 'MM03' and skip first screen.
Hope that my question is clear.
Thanking you in advance..
Shankarcheck this
<b>CALL FUNCTION 'ABAP4_CALL_TRANSACTION' STARTING NEW TASK 'TEST'
DESTINATION 'NONE'
EXPORTING
TCODE = 'SM59'
EXCEPTIONS
COMMUNICATION_FAILURE = 1 MESSAGE MSG_TEXT
SYSTEM_FAILURE = 2 MESSAGE MSG_TEXT.
IF SY-SUBRC NE 0.
WRITE: MSG_TEXT.
ELSE.
WRITE: 'O.K.'.
ENDIF.</b>
<b>u can avoid such errors thru this FM
check FI_DUPLICATE_INVOICE_SHOW program for sample code.</b>
regards
Prabhu
Message was edited by: Prabhu Peram -
Call http url in Abap - Should not open Browser
Hi Friends,
I have a requirement where i need to check whether a perticular http service is running or not. For that i need a some code to call http url from abap and it should not open the browser. If that perticular url is not found or time out then i should know that in program...
Is there any way to do that..just run the following url (after changing the values for host,etc) from browser
http://<abaphost>.<domain>.com:<port>/sap/public/ping
to get the values for http://<abaphost>.<domain>.com:<port> just go to transaction se80 and choose bsp application option and choose any existing bsp application and then doubl click on a page. on the right side click on the attributes tab and at the end you can find the url
Regards
Raja -
Call a transaction in a new session within a program
Hi Friends,
I have a requierment to call a custom Z Tcode within a module pool program. When I click on a particular pushbutton the custom transaction should get called in such a way that user should be able to be in the called transaction as well as in the calling program.
Can someone please help me on how to go about this? I have tried SUBMIT, CALL TRANSACTION, LEAVE TRANSACTION, etc.,
Thanks,
DikshithaHi dixitha,
1. You want to open VA01 in NEW WINDOW
2. You want to PASS some values to VA01 (eg. Order Type, Sales Organization etc)
There are two things.
1. As mentioned by Vinod, use the function module
DATA: bdcdata TYPE TABLE OF BDCDATA.
CALL FUNCTION 'CKEKUTIL_CALL_TRANSACTION_TASK'
EXPORTING
transaction = 'VA01'
* MODE = 'A'
* UPDATE = 'S'
TABLES
bdcdata_imp = bdcdata "Blank table
2. BUT, this will ONLY open the tcode VA01 with BLANK values.
If you have made a BDC program, then you will understand that
for filling up values automatically, we have to pass some informatino
(eg. program name, screen number, X
field name, field value
field name, field value ) etc.
to this , using the tables parameter BDCDATA_IMP.
So for eg., the values for this itab will be
PROGRAM DYNPRO DYNBEGIN FNAM FVAL
SAPMV45A 0101 X
VBAK-AUART OR
VBAK-VKORG 1000
This will open VA01 tcode, with order type as OR (Standard order)
and Sales organization as 1000.
(You can use SHDB tcode to get the screen field names and values and the full recording)
Hope this helps.
regards,
amit m. -
Calling a screen in a new session
Hi Friends:
I've got a report. When I execute the selection screen of that report after inputting data, it calls up a Zfunction module & inside that function module there is a screen. So it displays that screen. I've a requirement that when I execute my report, the screen output should be called in different session. Please help me out with the standard methods available or if there is any way. Is teher anything I can add alongwith "Call screen 0001'. Points will be rewarded.
Regards:
JeffCALL SCREEN... STARTING AT col1 lin1 [ENDING AT col2 lin2] any use?
rgds, matt. -
Calling external url like 'GOOGLE' when user clicks on toolbar button
Hi All,
I have done the following steps for url creation:
1. I have created an event and assigned it to newly created toolbar grp.Then in 'Define Application Layout' I have created an entry specifying name of application, toolbar, event, tab grp and version.
2. Then in navigation for url generation I have created a method with blank object name. This method I have then assigned to a role.Here i have specified path for extenal link say 'google'.
3. I have assigned same role to me in su01 transaction.
4. when i run my application ,toolbar is getting displayed but when I click on toolbar nothing is getting open up.
Is this the correct way for url generation or do i need to do something else?Is there any coding needs to be done?I have provided with steps done by me.Please help me further.
Regards,
vikasHi.
That's not possible in the PCUI since when the button is pressed a PCUI event is triggered and handle by the PCUI framework and we don't have access to the layout in order to react to such event (like placing javascript windows.open or kind of). The events defined in the PCUI are only supported by the PCUI framework. You could create an HTML container and then start the external web application (www.google.com or whatever) in this container (there is a good blog written by Gregor Wolf at <a href="/people/gregor.wolf3/blog/2005/05/27/use-crm-pcui-html-viewer-to-call-a-custom-url:///people/gregor.wolf3/blog/2005/05/27/use-crm-pcui-html-viewer-to-call-a-custom-url) or as Raj said you can use "Object Link Navigation" in order to start a new window with the PCUI layout where you can create another container with the web application you want to display (for more details have a look to the PCUI cookbook).
Best regards.
Armando Rodriguez. -
Simply calling a URL such as yahoo when i click a button
i have a requirment where i need to use a URL provided and call it in the exporer. please could any one help if there is a function module or some other way of doing it.
CALL METHOD cl_gui_frontend_services=>execute
EXPORTING
application = 'IEXPLORE.EXE'
parameter = 'WWW.GOOGLE.COM'
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
bad_parameter = 3
file_not_found = 4
path_not_found = 5
file_extension_unknown = 6
error_execute_failed = 7
synchronous_failed = 8
not_supported_by_gui = 9
OTHERS = 10 .
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
This will work on Windows -
How to call URL in background or close the browser from ABAP
Requirement changed.. no longer an issue. Thanks.
Message was edited by:
Atul DevasthaliHi He,
This question has been asked (and answered) many times in this forum.
Please do a search for words like "InitialContext", "RMIInitialContextFactory",
and "weblogic". You will find lots of information.
Also, the following web page has links to documentation, "how-tos"
and sample code:
http://otn.oracle.com/tech/java/oc4j/content.html
Have you looked at it?
Good Luck,
Avi. -
hi,
I wrote some test client for testing my server. I create URL and call URL.getContent(). This open new session. But I want use one session. How I can use request for same session?
<code>
for (int i=0; i<10; i++)
URL url = new URL(BASE_ADDRESS + "/adetail.jsf?fid=" + i);
URLConnection connection = url.openConnection();
// new session is created
Object content = connection.getContent();
</code>As i stated, when i click links from 3rd party applications, such as skype; a youtube link or something similar. Firefox opens a new session however it does not visit the clicked url
-
Open new session on submitting a program thru FM call
Hi expertz...need your help up here.
Have a situation where we need to trigger another program(say zabc : PO History) when the user selects a line in the ALV list and then clicks a button (to call zabc), the new program should run in the background and open up or display the results in a New Session.
Have tried to use FM 'SUBMIT_REPORT' with STARTING NEW TASK but it dosnt work. Please see the call below.
CALL FUNCTION 'SUBMIT_REPORT' "STARTING NEW TASK 'TEST1'
EXPORTING
RDIR = TRDIR
report = 'ZPRPP_WORKORDERPURCHASING'
RET_VIA_LEAVE = ' '
VARIANT = ' '
VARIPROG = 'ZPRPP_WORKORDERPURCHASING'
SKIP_SELSCREEN = 'X'
EXPRESSIONS =
IMPORTING
VARIANT =
TABLES
SELECTION_TABLE = i_rspar
EXCEPTIONS
JUST_VIA_VARIANT = 1
NO_SUBMIT_AUTH = 2
OTHERS = 3
Any Idea!.
Thanks
JaifHi,
copy your function module SUBMIT_REPORT to ZSUBMIT_REPORT and make it remote enabled.
Now, where ever you want to call this FM, call as below,
CALL FUNCTION 'ZSUBMIT_REPORT' STARTING NEW TASK 'T'
EXPORTING
* RDIR = TRDIR
report = 'ZPRPP_WORKORDERPURCHASING'
RET_VIA_LEAVE = ' '
* VARIANT = ' '
VARIPROG = 'ZPRPP_WORKORDERPURCHASING'
SKIP_SELSCREEN = 'X'
* EXPRESSIONS =
* IMPORTING
* VARIANT =
TABLES
SELECTION_TABLE = i_rspar
EXCEPTIONS
JUST_VIA_VARIANT = 1
NO_SUBMIT_AUTH = 2
OTHERS = 3.
Check it out, it works for me. -
Call transaction in new session not working inside CRM Interaction Center
Hi Experts,
I have developed a report which contains a screen with push button. When user clicks on button a transaction (FPL9) is being called and opened in new session or window. But when the report is being called in CRM Interaction Center using transaction launcher and button is clicked no new session or new window is being opened. Our requirement is FPL9 transaction will be opened in new session / window inside Interaction Center also.
Please help me how to open a new session or window in interaction center on push botton click.
Thanks in advance.
Regards,
ArnabHi Anil..
This is the Solution for ur Requirement. try this program and change as per ur need.
REPORT ZSEL_CALL_TCODE.
data : IT_KNA1 TYPE TABLE OF KNA1 WITH HEADER LINE.
DATA : IT_SPA TYPE TABLE OF RFC_SPAGPA WITH HEADER LINE.
SELECT * FROM KNA1 INTO TABLE IT_KNA1 .
LOOP AT IT_KNA1 .
WRITE:/ IT_KNA1-KUNNR HOTSPOT ON.
HIDE IT_KNA1-KUNNR .
ENDLOOP.
CLEAR IT_KNA1-KUNNR.
AT LINE-SELECTION.
CASE SY-LSIND.
WHEN 1.
IF IT_KNA1-KUNNR IS NOT INITIAL.
REFRESH IT_SPA.
IT_SPA-PARID = 'KUN'.
IT_SPA-PARVAL = IT_KNA1-KUNNR.
APPEND IT_SPA.
CALL FUNCTION 'ABAP4_CALL_TRANSACTION' STARTING NEW TASK 'S1'
EXPORTING
TCODE = 'XD02'
SKIP_SCREEN = ' '
MODE_VAL = 'A'
UPDATE_VAL = 'A'
IMPORTING
SUBRC =
TABLES
USING_TAB =
SPAGPA_TAB = IT_SPA
MESS_TAB =
EXCEPTIONS
CALL_TRANSACTION_DENIED = 1
TCODE_INVALID = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
ENDCASE.
<b>Reward if Helpful.</b> -
Call transaction in new session with the value at hotspot
Hi all,
As a hotspot functionality I would like to open a new transaction in a new session with the value at hotspot. For that reason, I am using the FM ABAP4_CALL_TRANSACTION with the option STARTING NEW TASK.
This FM is not working because Parameter ID is not Maintained for the field (Hotspoted). So no value is passing to new transaction.
Please suggest any other way to implement this.
ThanksHi Anil..
This is the Solution for ur Requirement. try this program and change as per ur need.
REPORT ZSEL_CALL_TCODE.
data : IT_KNA1 TYPE TABLE OF KNA1 WITH HEADER LINE.
DATA : IT_SPA TYPE TABLE OF RFC_SPAGPA WITH HEADER LINE.
SELECT * FROM KNA1 INTO TABLE IT_KNA1 .
LOOP AT IT_KNA1 .
WRITE:/ IT_KNA1-KUNNR HOTSPOT ON.
HIDE IT_KNA1-KUNNR .
ENDLOOP.
CLEAR IT_KNA1-KUNNR.
AT LINE-SELECTION.
CASE SY-LSIND.
WHEN 1.
IF IT_KNA1-KUNNR IS NOT INITIAL.
REFRESH IT_SPA.
IT_SPA-PARID = 'KUN'.
IT_SPA-PARVAL = IT_KNA1-KUNNR.
APPEND IT_SPA.
CALL FUNCTION 'ABAP4_CALL_TRANSACTION' STARTING NEW TASK 'S1'
EXPORTING
TCODE = 'XD02'
SKIP_SCREEN = ' '
MODE_VAL = 'A'
UPDATE_VAL = 'A'
IMPORTING
SUBRC =
TABLES
USING_TAB =
SPAGPA_TAB = IT_SPA
MESS_TAB =
EXCEPTIONS
CALL_TRANSACTION_DENIED = 1
TCODE_INVALID = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
ENDCASE.
<b>Reward if Helpful.</b> -
Call transaction in new session (but only one)
Dear all,
as a hotspot functionality I would like to open a new transaction in a new session. For that reason, I use the FM ABAP4_CALL_TRANSACTION with the option STARTING NEW TASK.
However I would like to restrict the new tasks in a way that only one session is used (no matter how often the user clicks the hotspot. Kind of like the ABAP Help in the workbench.
I checked the class CL_IMC_MODE to see if it could work as a new internal session but the new mode dumped when I pressed the back button and according to the dump Statements that closes the internal mode unexpectedly like LEAVE are not allowed. Since I call standard transactions (like VA03) I can hardly prevent that. Did I miss something or do you have any other idea how I could solve my problem?
Thank you for any input.
ChristianHi Christian,
Here is a sample code that takes in a sales order number, displays the document number as hotspot and when the user clicks on the hotspot, it opens a new window for displaying the order. No matter how many times the user clicks on the hotspot, it will only display one window for VA03. I hope this solves your problem.
REPORT ztest.
PARAMETERS: p_vbeln LIKE vbak-vbeln.
DATA: ls_vbak LIKE vbak.
DATA: BEGIN OF i_rfc_spagpa OCCURS 0.
INCLUDE STRUCTURE rfc_spagpa.
DATA: END OF i_rfc_spagpa.
DATA: v_mode LIKE sy-index.
START-OF-SELECTION.
SELECT SINGLE * FROM vbak
INTO ls_vbak
WHERE vbeln = p_vbeln.
IF sy-subrc <> 0.
*-- error.
ENDIF.
WRITE:/ ls_vbak-vbeln HOTSPOT,
ls_vbak-vkorg.
AT LINE-SELECTION.
CASE sy-ucomm.
WHEN 'PICK'.
*-- Delete the previous session and then call VA03 in a new session
CALL FUNCTION 'TH_DELETE_MODE'
EXPORTING
mode = v_mode.
CLEAR: i_rfc_spagpa, i_rfc_spagpa[].
i_rfc_spagpa-parid = 'AUN'.
i_rfc_spagpa-parval = p_vbeln.
APPEND i_rfc_spagpa.
CLEAR i_rfc_spagpa.
CALL FUNCTION 'ABAP4_CALL_TRANSACTION' STARTING NEW TASK 'TEST'
EXPORTING
tcode = 'VA03'
skip_screen = 'X'
mode_val = 'A'
update_val = 'A'
* IMPORTING
* SUBRC =
TABLES
* USING_TAB =
spagpa_tab = i_rfc_spagpa
* MESS_TAB =
EXCEPTIONS
call_transaction_denied = 1
tcode_invalid = 2
OTHERS = 3 .
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
WHEN OTHERS.
ENDCASE.
Maybe you are looking for
-
Need to change default map on iphone. The default maps app is dangerous - it wanted to take me down pedestrian areas and through no entries whilst trying to navigate in Leicester. It needs to be removed from my phone as it is a hazard. I clicked on a
-
No picture appears in window when importing from HD camcorder.
I've used iMovie 8 several times, importing from the same camera and for some reason now, when I'm trying to import, the video picture is not showing in the import screen - only on the camera. I've checked all connections and settings, and still no p
-
Preview - Old (?) problem resolved?
Hi there, I just got down to install a juvenile Maverick on my MacPro and MacBook, via USB install-from-scratch. All is working perfectly fine, except Preview. I read a lot about this issue in the forum here, but wonder if a genuine fix has been foun
-
How can I install a previously purchased version without the updates
IPad 1 VErsion 5.1 WAnt to reinstall OnLive Desktop from Aug 19,2014 or before version PUrchased App in 2012
-
Hi, I can not reinstall either acrobat 8 pro or acrobat 9 pro because the insallation stalls when it point s to some indicator within office 2007 I have completely uninstalled all the adobe programs from my system and cleaned all the references withi