cancel
Showing results for 
Search instead for 
Did you mean: 

How to Call a Yprogram and showing Output using Webdynpro ABAP by passing the Vendor values to the program from WebDynpro

Former Member
0 Kudos

Hi All,

   Can anyone help on this,I have a requirement to show the Yprogram output by passing values to it using WebDynpro.How can I acheive this.I am new to WebDynpro can any one help in this?

Thanks In Advance

Accepted Solutions (1)

Accepted Solutions (1)

Gowtham
Contributor
0 Kudos

Hi Rohit,

If you wants to just execute the ABAP Program from Web Dynpro ABAP you can use the following Code


SUBMIT ZXXXX with par1 = 'value 1' with par2 = 'value 2' and return.


If you wants bring the values back to Web dynpro abap from ABAP Program you can use the following code.


SUBMIT ZXXXX EXPORTING LIST TO MEMORY.

  Use the FM to retrieve from memory.

CALL FUNCTION 'LIST_FROM_MEMORY'

      TABLES

           DATA = LT_DATA

      EXCEPTIONS

           NOT_FOUND  = 4

           OTHERS     = 8.


But please make sure the report is not directly calling any screens or BDC in 'A' or 'E' mode.

- Gowtham


Former Member
0 Kudos

Thanks Gowtham,

The values which i am passing are Dynamic,I need to give the attribute values from a node

ramakrishnappa
Active Contributor
0 Kudos

Hi Rohith,

If you have parameters to be passed from NODE,.

  • Read the values from the node into local work area and then pass as parameters to program

               data ls_data type wd_this->element_MY_NODE.

               data lo_node type ref to if_wd_context_node.

               data lo_element type ref to if_wd_context_element.

                    lo_node = wd_context->get_child_node( name = 'MY_NODE'  ).

               lo_element =  lo_node->get_element( index = 1 ). " Get the record from node using index

               lo_element->get_static_attributes( importing static_attributes = ls_data ).

Option 1:

   

     " Now pass the values to the program call, note this call should be made from a method of assistance class

          submit zprogram with par1 = ls_data-att1, etc.

Option 2:

          Create a transaction for your program , ex: ztcode

           now call the ztcode by passing the parameters from Webdynpro and skip first screen.

          Please search SCN, where many threads available to answer on "calling tcode from webdynpro"

          Refer the link: Calling Transaction Codes through Web Dynpro Application

Hope this helps you.

Regards,

Rama

Former Member
0 Kudos

Hi Rama,

I tried the above process,The values are passing to the program and Executing in background.But it's throwing some error like:

  • Screen output without connection to user

Answers (0)