Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
mangesh_sonawane
Participant

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=00000049...

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

Regards,

Mangesh Sonawane

1 Comment
Labels in this area