Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass the value from z-program to screen

Former Member
0 Kudos

Hi,

I have created a Z-report which is displaying the data according to the selection screen,but while going to click on 1 pushbutton,it should call z-transaction.

My problem is how i will pass the selected data to my screen.suppose i have selected 1 material no.,i want to pass the material no. to my matnr field in my screen(which is already present in my screen)

1 ACCEPTED SOLUTION

former_member1245113
Active Contributor
0 Kudos

Hi Priya,

you can use IMPORT EXPORT to pass values from one program to another or SET PARAMETER and GET PARAMETERS

For further info please go through the KEY word documentaion.

Please note If you are using screen the screen field name and Program variable name should be same then the data transfer takes place automatically.

Regards

Ramchander Rao.K

7 REPLIES 7

Former Member
0 Kudos

Hi,

The input value is passed to the z-program using 'WITH' statement as shown in below sample statement

submit ZXXX and return

with begda = p_begda

with endda = p_endda

Hope it helps u.

Regards,

K.Tharani.

0 Kudos

my program is module-pool program. can i use the submit statement?

0 Kudos

Just try it....

former_member1245113
Active Contributor
0 Kudos

Hi Priya,

you can use IMPORT EXPORT to pass values from one program to another or SET PARAMETER and GET PARAMETERS

For further info please go through the KEY word documentaion.

Please note If you are using screen the screen field name and Program variable name should be same then the data transfer takes place automatically.

Regards

Ramchander Rao.K

former_member386202
Active Contributor
0 Kudos

Hi,

USe submit statement Refer below code

SUBMIT zk_ra_enhancement "TO SAP-SPOOL

"IMMEDIATELY 'X'

"WITHOUT SPOOL DYNPRO

USING SELECTION-SCREEN 1000

WITH cn_pspnr IN r_wbs

WITH r_budat BETWEEN '00000000' AND l_cdate

AND RETURN.

Regards,

Prashant

Former Member
0 Kudos

HI.

Create SET PF-STATUS 'STATUS'.like as follows.

1 .double click on 'STATUS1' create pushbutton by appilcation tool bar.

2 .In fuction attributs ,In fuction code give your t-code.

3.In Fucntion type give T.

Eg:

module STATUS_1001 output.

SET PF-STATUS 'STATUS1'.

SET TITLEBAR 'TITLE1'.

endmodule. " STATUS_1001 OUTPU

It will helpfull u.

Regards.

Jay

Former Member
0 Kudos

HI.

Create SET PF-STATUS 'STATUS'.like as follows.

1 .double click on 'STATUS1' create pushbutton by appilcation tool bar.

2 .In fuction attributs ,In fuction code give your t-code.

3.In Fucntion type give T.

Eg:

module STATUS_1001 output.

SET PF-STATUS 'STATUS1'.

SET TITLEBAR 'TITLE1'.

endmodule. " STATUS_1001 OUTPU

It will helpfull u.

Regards.

Jay