Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Invoke URL on submit button

Former Member
0 Likes
888

Hello Experts,

My requirment is to invoke a URL on cliking submit button. I have a customer text box and a submit button in my screen.

So when ever we enter customer number in text box and click on submit button it shud invoke URL with customer at last of it.

https://X.XXX.XX.XX:XXXX/XXXXX/XXXXX.jsp?custId=0000006000. I have got info that we can call URL using the FM "PRGN_GENER_EXECUTE_URL" by passing url to NODE_DATA.

I am not that much familar with ABAP,

Please help me calling that URL.

1 ACCEPTED SOLUTION
Read only

former_member156446
Active Contributor
0 Likes
834

you can even use call_browser FM

CALL FUNCTION 'CALL_BROWSER'
  EXPORTING
    url = l_url.

6 REPLIES 6
Read only

former_member156446
Active Contributor
0 Likes
835

you can even use call_browser FM

CALL FUNCTION 'CALL_BROWSER'
  EXPORTING
    url = l_url.

Read only

0 Likes
834

Hi Jay,

Thanks for your prompt reply...

But your ans does not reslove my problem..

Can we do this with out using dailog programming? If so how can I achive that.

My req is a screen with text box for customer number and submit button, up on clicking the submit button get the customer number and add last to the URL and call the URL.

Please suggest best way and if possible a sample code so that I can do in less time.

Thanks in Advance,

Sandhya

Read only

0 Likes
834

Check this psuedo code:

parameter: pa_kunnr type kna1-kunnr.

button.

code: if sy-ucom = 'FC_Button'.

concatenate url pa_kunnr into URL_fin.

call browser FM

pass the url_fin.

main code:

REPORT  zj_test.

PARAMETERS: p_kunnr TYPE kna1-kunnr OBLIGATORY.
DATA: url(100) TYPE c.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN PUSHBUTTON 2(10) push USER-COMMAND cli1.
SELECTION-SCREEN END OF LINE.

AT SELECTION-SCREEN.

IF sy-ucomm = 'CLI1'.
  url = 'sdn.sap.com'.  "<<<<<<<you need to play with ur url here..
  CONCATENATE  url p_kunnr INTO url.
  CALL FUNCTION 'CALL_BROWSER'
    EXPORTING
      url                    = url
    EXCEPTIONS
      frontend_not_supported = 1
      frontend_error         = 2
      prog_not_found         = 3
      no_batch               = 4
      unspecified_error      = 5
      OTHERS                 = 6.

ENDIF.

Edited by: J@Y on Nov 13, 2008 11:56 AM

Read only

0 Likes
834

Hi Jay,

Thanks for your very valuble reply.....

I have tried with your code in SE38on my SAP instance...

It dosent call the URL in IE.. I am using ECC 6.0

What do I need to do?

Thanks,

Sandhya

Read only

0 Likes
834

hmm....

looks like url = 'www.sdn.sap.com'.

www or http are the prerequisits this FM is looking for. Hope your URL have it...

Read only

Former Member
0 Likes
834

yes you can use the FM PRGN_GENER_EXECUTE_URL. just pass the full URL to the node_data.

CALL FUNCTION 'PRGN_GENER_EXECUTE_URL'
  EXPORTING
    NODE_DATA                   = 'http://www.google.com'
*   TARGET_SYSTEM               = ' '
*   LOGICAL_TARGET_SYSTEM       = ' '
          .