Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Pass URL parameters from WD to BSP via Post

Is there a way to Post URL parameters in WD so that a BSP can retrieve them using get_form_field?

I am currently passing the required parameters from an event handler within my WD application to the BSP as part of the URL string, similar to below:


The above works fine. But how to Post the params so they can still be retieved in the BSP...?

Thanks in advance!

fyi... I added a PARAMS table to the outbound plug and fired it as below, but the paramscould not be read in the BSP:

wd_this->fire_to_exit_plg( url = l_url close_window = close_window PARAMS = LT_PARAMS ).

Former Member

Hi Frederic,

you can POST parameters to the URL of your BSP using the following code:

DATA: lo_client TYPE REF TO if_http_client,
      lv_url TYPE string VALUE ''.

CALL METHOD cl_http_client=>create_internal
    client = lo_client.

cl_http_utility=>set_request_uri( request  = lo_client->request
                                  uri      = lv_url ).
lo_client->request->set_header_field( name  = '~request_method'
                                      value = 'POST' ).
lo_client->request->set_form_field( EXPORTING name  = 'myfield'
                                              value = 'myvalue' ).
lo_client->send( ).

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question