cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to pass parameters into WebGui and requested function is not available

Former Member
0 Kudos

I am trying to bypass the VA02 screen where I can enter the order number, by passing a URL with the tcode and order number directly as a URL.  However I cannot get the actual sales order to display - all it shows is either the VA02 screen (if I use the format "..../webgui?~transaction=VA02&VBAK-VBELN=430) or I get the error message "Requested function SHOW is not available here" (if I use the format ".../webgui?~transaction=VA02&VBAK-VBELN=430&~OKCODE=SHOW).

Can anyone tell me how I can go about getting the sales order to open in edit mode through a URL and its associated parameters?  Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Gowtham
Contributor
0 Kudos

Hi Stuart,

To open the sales order in Edit mode you needs to skip the initial page by providing values to the sales order number field & OK code to the first page , try the following code.

  CONCATENATE  'http'

                              '://'

                              sy-host 

                              ':'

                              sy-port

                              '/sap/bc/gui/sap/its/webgui/?sap-client=&~transaction=*VA03%20VBAK-VBELN='

                               lv_kunnr

                              ';DYNP_OKCODE=/00'

                      INTO url.

and call this URL in an external window popup , second page will be opening without first page.

- Gowtham

Former Member
0 Kudos

Excellent - thanks for both responses guys - helped a lot!

Answers (1)

Answers (1)

Former Member
0 Kudos

Try the below code;

DATA: LV_HOST   Type  STRING,

LV_PORT Type  STRING,

LV_PROTOCOL Type  STRING.

CALL METHOD cl_http_server=>if_http_server~get_location

IMPORTING

   host = lv_host

   port = lv_port

   out_protocol = lv_protocol.

data: lv_tr type string

  VALUE '/sap/bc/gui/sap/its/webgui/?sap-client=&~transaction=*VA03%20VBAK-VBELN=30030265;DYNP_OKCODE=/00'.

DATA lv_url type string.

concatenate lv_protocol

          '://'

           lv_host

            ':'

            lv_port

            lv_tr

             into lv_url.

DATA lo_window_manager TYPE REF TO if_wd_window_manager.

   DATA lo_api_component  TYPE REF TO if_wd_component.

   DATA lo_window         TYPE REF TO if_wd_window.

   lo_api_component  = wd_comp_controller->wd_get_api( ).

   lo_window_manager = lo_api_component->get_window_manager( ).

lo_window_manager->create_external_window(

      EXPORTING

        url    = lv_url

      RECEIVING

        window = lo_window ).

   lo_window->open( ).