Skip to Content

Hi Friends,

I am giving simple scenario how to transfer data to webdynpro apllication through URL.

My Scenario is to give salesorder number to WebDynpro apllication through URL.

First we created a Sales Order Number Input field Where i want to fill my through URL.

After Clicking it will display the item table with  the same sale order number.

As we all know their is one Input plug which is by default with name “Default”.

Will create context node in component controller with vbak structure and then we will drag and drop it in view and window controller.

Their is one handle default method in window methods we will give parameters to that handledefault method.

paramter-vbeln                 type-importing            associate type- vbak-vbeln

In Handle Default

method HANDLEDEFAULT .

     DATA LO_ND_VBAK TYPE REF TO IF_WD_CONTEXT_NODE.

     DATA LO_EL_VBAK TYPE REF TO IF_WD_CONTEXT_ELEMENT.

     DATA LS_VBAK TYPE WD_THIS->ELEMENT_VBAK.

     DATA LV_VBELN TYPE WD_THIS->ELEMENT_VBAK-VBELN.

*   navigate from <CONTEXT> to <VBAK> via lead selection

     LO_ND_VBAK = WD_CONTEXT->GET_CHILD_NODE( NAME = WD_THIS->WDCTX_VBAK ).

*   @TODO handle non existant child

*   IF lo_nd_vbak IS INITIAL.

*   ENDIF.

*   get element via lead selection

     LO_EL_VBAK = LO_ND_VBAK->GET_ELEMENT( ).

*   @TODO handle not set lead selection

     IF LO_EL_VBAK IS INITIAL.

     ENDIF.

*   @TODO fill attribute

    lv_vbeln = vbeln.

*   set single attribute

     LO_EL_VBAK->SET_ATTRIBUTE(

       NAME =  `VBELN`

       VALUE = lv_VBELN ).

endmethod.

Now save and activate.

While giving parameter just give http://————.——–.com:8000/sap/bc/webdynpro/sap/zwd_vbak_1?sap-language=EN&vbeln=0000004970

Just add &vbeln=(Value) in URL it will directly give value in sales order number input box.

Regards,

Mangesh Sonawane

To report this post you need to login first.

1 Comment

You must be Logged on to comment or reply to a post.

  1. sanjeet kumar

    Hi Mangesh

    I am try to developed same scenario  but it will given error

    • The following error text was processed in the system TR1 : The ASSERT condition was violated.
    • The error occurred on the application server ibides_TR1_00 and in the work process 2 .
    • The termination type was: RABAX_STATE
    • The ABAP call stack was:
      Method: _IF_WDR_INTERNAL_API~ASSIGN_UNTYPED_REFERENCE of program SAPLWDR_RG_PROXY_FACTORY
      Method: HANDLEDEFAULT of program /1BCWDY/FWFT08DMFIGVNO9EJA8R==CP
      Method: IF_WDR_VIEW_DELEGATE~WD_INVOKE_EVENT_HANDLER of program /1BCWDY/FWFT08DMFIGVNO9EJA8R==CP
      Method: INVOKE_EVENTHANDLER of program CL_WDR_DELEGATING_IF_VIEW=====CP
      Method: DISPLAY_TOPLEVEL_COMPONENT of program CL_WDR_CLIENT_COMPONENT=======CP
      Method: INIT of program CL_WDR_CLIENT_APPLICATION=====CP
      Method: EXECUTE of program CL_WDR_MAIN_TASK==============CP
      Method: IF_HTTP_EXTENSION~HANDLE_REQUEST of program CL_WDR_MAIN_TASK==============CP
      Method: EXECUTE_REQUEST of program CL_HTTP_SERVER================CP
      Function: HTTP_DISPATCH_REQUEST of program SAPLHTTP_RUNTIME

    please give me full document

    Regards

    sanjeet Kumar

    (0) 

Leave a Reply