Application Development and Automation 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: 
Read only

selection screen

Former Member
0 Likes
556

hi,

I want to move select-options from one program to another program, then how should i use import and export

staments.

thanks

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
526

What do you mean by "move select-options from one program to another program"? Are you submitting a second program from a first program and you need to pass the select-options of the first program to the select-options of the second program? In that case all you need to do is

SUBMIT my_second_program WITH sel_opt2 IN sel_opt1.

5 REPLIES 5
Read only

Former Member
0 Likes
526

What do you mean by Import/Export? If you are going to use SUBMIT statement to call the 2nd program from the 1st, you can do like:

SUBMIT (prog)

WITH p_param1 = <value>

WITH p_param2 = <value>

WITH s_selectop1 IN <range/select option> etc.

Read only

Former Member
0 Likes
526

Sandhya,

If this exists as select-options in both programs you can pass the values while submitting the second program.

SUBMIT PROGRAM1

WITH S_OPTION1 IN S_OPTION1.

Else, you can

EXPORT S_OPTION TO MEMORY ID 'ABCD'.

In the second program

IMPORT S_OPTION FROM MEMORY ID 'ABCD'.

Regards,

Ravi

Note : Please mark all the helpful answers

Read only

0 Likes
526

Thanks Ravi,

I copied std program zProgram, enter new selection screen

as selections options.

SELECT-OPTIONS: DD_KUNNR FOR KNA1-KUNNR.

export dd_kunnr to memory id 'FILITEXTS_KUNNR'.

now i want to call this in Function module

but how should i declare (ycode).

import statment.

IMPORT ycode FROM MEMORY ID 'FILITEXTS_KUNNR'.

thanks,

Read only

0 Likes
526

You should have the same variable name while importing as well.

IMPORT dd_kunnr FROM MEMORY ID 'FILITEXTS_KUNNR'.

dd_kunnr can be declared as ranges as you have exported a SELECT OPTIONS.

Regards,

Ravi

NOte : Please mark the helpful answers

Read only

Former Member
0 Likes
527

What do you mean by "move select-options from one program to another program"? Are you submitting a second program from a first program and you need to pass the select-options of the first program to the select-options of the second program? In that case all you need to do is

SUBMIT my_second_program WITH sel_opt2 IN sel_opt1.