‎2006 May 23 5:04 PM
hi,
I want to move select-options from one program to another program, then how should i use import and export
staments.
thanks
‎2006 May 23 5:08 PM
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.
‎2006 May 23 5:07 PM
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.
‎2006 May 23 5:08 PM
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
‎2006 May 23 5:35 PM
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,
‎2006 May 23 5:41 PM
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
‎2006 May 23 5:08 PM
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.