cancel
Showing results for 
Search instead for 
Did you mean: 

Problem while calling the transaction code, by passing values in Webdynpro Abap using link to URL UI Element

0 Kudos

Problem while calling the transaction code, by passing values in Webdynpro Abap using link to URL UI Element

Hi All,

I have been facing an issue regarding Calling TCode in WD ABAP by using Link to URL as a column in ALV.

Actually my requirement is as follows:

I need to call a TCode which is belongs to ZReport into Webdynpro ALV(Link to URL UI element as an Column)

If I click on that particular URL  I need to call a TCode.

Here my condition is :

Here in the above ALV Grid in WD Abap, I am picking some values,

And if we click on URL link on Supplier Temp File Name column it should call a Tcode of another normal Abap Report Prgm based on Reported Product Catgory and Supplier ID.

The ABAP Report Prgm Tcode which need to call as follows.

Here my condition is the fields Supplier and RPC which are highlighted in above screen need to be get the values based on  WD ALV Grid fields i.e(RPC and Supplier) values which are in the WD ALV Grid .

I have created an Event Handler Method with Event ON_CLICK in Webdynpro.

and implemented the following Code..

DATA LO_ND_NODE_OP TYPE REF TO IF_WD_CONTEXT_NODE.

     DATA LO_EL_NODE_OP TYPE REF TO IF_WD_CONTEXT_ELEMENT.

     DATA LS_NODE_OP TYPE WD_THIS->ELEMENT_NODE_OP.

DATA: URL TYPE STRING,

         HOST TYPE STRING,

         PORT TYPE STRING.

DATA: ATWRT TYPE STRING,

        LIFNR TYPE LIFNR.

   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_ND_NODE_OP = WD_CONTEXT->GET_CHILD_NODE( NAME = WD_THIS->WDCTX_NODE_OP ).

*   get element via lead selection

     LO_EL_NODE_OP = LO_ND_NODE_OP->GET_ELEMENT( ).

     IF LO_EL_NODE_OP IS INITIAL.

CL_HTTP_SERVER=>IF_HTTP_SERVER~GET_LOCATION(

      IMPORTING HOST = HOST

             PORT = PORT ).

* DOC_NO = LS_CTX_VN_DOC-DOKNR.

*       DOC_TYPE = LS_CTX_VN_DOC-DOKAR.

*       DOC_PART = LS_CTX_VN_DOC-DOKTL.

*       DOC_VER = LS_CTX_VN_DOC-DOKVR.

*ATINN = LS_NODE_OP-ATWRT .

LIFNR = LS_NODE_OP-LIFNR.

DATA: LV_LIFNR type LFA1-LIFNR ,

       LS_LIFNR TYPE LINETYPE,

       RPC TYPE ATNAM,

       LV_DATE TYPE SY-DATUM.

LV_LIFNR = '20000007'.

     ENDIF.

CONCATENATE 'http'

     '://' host ':' port

     '/sap/bc/gui/sap/its/webgui/?sap-client=&~transaction=zw_cm01&%20ZSUPPLIER_CODE-VENDOR_NO=' LV_LIFNR

      INTO url.

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 = URL

   RECEIVING

   WINDOW = LO_WINDOW ).

LO_WINDOW->OPEN( ).

*************************************************************

Here if I was trying to test the component and click on url on ALV column it's opening and calling Tcode of Report , but the values in the RPC and Supplier were not passing or filling on the Report  Selection Screen.

When I was trying to call and pass values to any other Standard Tcodes like XK01 and MM01 any other standard its passing the values, but for my zprgm it's not working.

Please help on this .

Thanks in Advance.

Regards,

Pawith.

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Any body plz help on this................

Urgent plz...................