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: 

To transfer Selection Screen field value from a program to another Program

Former Member
0 Kudos
1,226

Hello,

Program Z_ABC having Select Option Field XYZ.

I need to transfer all the values entered on Selection Option Field XYZ to another Program Dialog Z_DIALOG.

10 REPLIES 10

former_member212713
Contributor
0 Kudos
229

Hi KeyurP;

1. Create GET/SET parameters ID From SE80->Create->More-> GET/SET parameters ID

2. Write to Source program


SET PARAMETER ID: 'Zobject' FIELD GV_exp.

3. Write to Target program


GET PARAMETER ID : 'Zobject' FIELD GV_imp,

Best Regards.

0 Kudos
229

I am using Select Options!! what if entering multiple values???

currently i am able to fetch only single entry!

Edited by: KeyurP on Jun 15, 2011 12:03 PM

0 Kudos
229

Select-options are stored as internal table at the backend.

You can easily export/import it. Irrespective of single or multiple value.

EXPORT s_opt TO MEMORY ID 'table'.

Edited by: sap_wiz on Jun 15, 2011 3:38 PM

Former Member
0 Kudos
229

Hi,

You can use import/export. Use F1 for the syntax.

ThomasZloch
Active Contributor
0 Kudos
229

The easiest way (based on the little information you provided) would be to include the same XYZ select option in Z_DIALOG as well and pass the values via SUBMIT ... WITH ... IN ...

Thomas

0 Kudos
229

I dont think so, SUBMIT statement is useful for DIalog Program!!

Edited by: KeyurP on Jun 15, 2011 12:43 PM

0 Kudos
229

raymond_giuseppi
Active Contributor
0 Kudos
229

Export and Import the whole internal table (range)

* Caller
EXPORT XYZ[] TO MEMORY ID 'XYZ'.
* PBO of called dialog
IMPORT XYZ[] FROM MEMORY ID 'XYZ'.

Regards,

Raymond

Former Member
0 Kudos
229

Hi

U can pass selection screen values via SUBMIT keyword.

SUBMIT ZPROG2 WITH S_LOW_PROG2 = S_LOW_PR0G1-LOW

WITH S_HIGH_PROG2 = S_HIGH_PROG1-HIGH AND RETRURN.

IN Seconde program u can pass s_low and s_high values .

Thanks & Regards,

MURALIII

0 Kudos
229

Hi,

Try to use the function module 'RS_REFRESH_FROM_SELECTOPTIONS'.

For ex:

CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'

EXPORTING

curr_report = sy-repid

TABLES

selection_table = it_soptions

EXCEPTIONS

not_found = 1

no_report = 2

OTHERS = 3.

IF sy-subrc <> 0.

EXIT.

ENDIF.

SUBMIT riaufk20 WITH dy_selm = 'D'

WITH SELECTION-TABLE it_soptions

AND RETURN.

Hope it solves your issue.

Regards,

Chenthamarai.