Skip to Content
author's profile photo Former Member
Former Member

Call Webdynpro Application From a ABAP Program

Hi,

I have a Webdynpro application and I need to call this application from a ABAP program, sending a value from this program.

How can I call a Webdynpro and how send a parameter?

Thanks,

Martina.

Edited by: Gerle Martina on Feb 2, 2012 3:48 PM

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Feb 03, 2012 at 09:36 AM

    Hi harshith_reddy,

    thanks for your quick answer. Your code was very helpful!

    But I still have problems with the parameters.

    You sent me this link:

    http://wiki.sdn.sap.com/wiki/display/WDABAP/HowtoreadURLparametersinWebDynprofor+ABAP

    I built a function that opens a webdynpro application. In this webdynpro application i want see a table with all data sets, for example with the number '123' from another table. This number is a input parameter from my function and i wrote the parameter in the url.

    But where at my webdynpro application am i able to pick out this parameter?

    And is the methode 'HANDLEDEFAULT' from the sap wiki a methode from an inbound plug?

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Gerle Martina,

      Pass your url parameter with name str and In the window find the eventhandler HANDLEDEFAULT

      and declare importing parameter with same name as 'STR type string' and implement following code.

       methodHANDLEDEFAULT. 
      data : value type string.
      CALL METHOD wdevent->get_string
        EXPORTING
          name   = 'STR'
        receiving
          value  = value.
      ENDMETHOD.
      

      you have different methods in the class cl_wd_custom_event. You can use them depending on data type.

  • Posted on Feb 03, 2012 at 03:29 AM

    I know upto calling a webdynpro application from abap.

    But not sure how to send parameters to it, i will be watching this thread for answer as well.

    Go to Transaction SE93 ,and create a new transaction,(Transaction With Parameters)

    In Default value tab, Give Transaction as "WDYID", tick skip initial screen.

    and in the table

    Name of the screen Field Value

    APLLICATION <your_wed_dynpro_application_name>

    STARTMODE <its optional> (Give 'GUI')

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 02, 2012 at 04:40 PM

    Hi Gerle,

    This code opens a WD application from ABAP

    DATA:gv_url_string TYPE string,
          gv_url_c TYPE string.
    *     gv_url_c(250) TYPE c.
    
    CONSTANTS:gc_login_auth TYPE string VALUE '?sap-system-login-basic_auth=X',
              gc_client     TYPE string VALUE '&sap-client=',
              gc_lang       TYPE string VALUE '&sap-language=',
              g_browser type string value 'INTERNET EXPLORER'.
    
    ***Get the Url of Webdynpro Applicaion with HTTPS Protocol
    CALL METHOD cl_wd_utilities=>construct_wd_url
      EXPORTING
        application_name = 'ZWDA'   "your component name
        in_protocol      = 'HTTPS'
      IMPORTING
        out_absolute_url = gv_url_string.
    
    ***If the server and port have not got added, try without HTTPS Protocol
    IF gv_url_string CS '//:/'.
      CALL METHOD cl_wd_utilities=>construct_wd_url
        EXPORTING
          application_name = 'ZWDA'
        IMPORTING
          out_absolute_url = gv_url_string.
    
    ***If server and port have still not got added
      IF gv_url_string CS '//:/'.
    **Raise a Error Message
      ENDIF.
    ENDIF.
    
    ***Build the URL
    CONCATENATE gv_url_string
                gc_login_auth
                gc_client sy-mandt
                gc_lang   sy-langu
      INTO gv_url_c.
    
    ****Call the Browser
    *CALL FUNCTION 'CALL_BROWSER'
    *  EXPORTING
    *    url                    = gv_url_c
    *     EXCEPTIONS
    *    frontend_not_supported = 1
    *    frontend_error         = 2
    *    prog_not_found         = 3
    *    no_batch               = 4
    *    unspecified_error      = 5
    *    OTHERS                 = 6.
    

    To pass parameter to WDA add the parameter to the url and follow the link to retrieve it in Webdynpro application

    link : http://wiki.sdn.sap.com/wiki/display/WDABAP/HowtoreadURLparametersinWebDynprofor+ABAP

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 06, 2012 at 09:16 AM

    Hi,

    >

    > I have a Webdynpro application and I need to call this application from a ABAP program, sending a value from this program.

    >

    > How can I call a Webdynpro and how send a parameter?

    >

    > Thanks,

    > Martina.

    >

    > Edited by: Gerle Martina on Feb 2, 2012 3:48 PM

    hi,

    Create a t-code for your application in wda and then use

    call transaction 'TRANSACTION '.

    Hope it helps

    Regards,

    Sahai.S

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 06, 2012 at 12:56 PM

    My problem is solved.

    Thanks to all of you!

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.