‎2008 Jan 17 11:43 AM
Hi,
I would like to know if I can create my selection-screen using a subroutine.
Here is my selection-screen.
SELECTION-SCREEN : BEGIN OF LINE, COMMENT 1(45) text-aaa, POSITION 50.
PARAMETERS : p_aaa TYPE rcgfiletr-ftappl OBLIGATORY.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN : BEGIN OF LINE, COMMENT 1(45) text-bbb, POSITION 50.
PARAMETERS : p_bbb TYPE rcgfiletr-ftappl OBLIGATORY.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN : BEGIN OF LINE, COMMENT 1(45) text-ccc, POSITION 50.
PARAMETERS : p_ccc TYPE rcgfiletr-ftappl OBLIGATORY.
SELECTION-SCREEN END OF LINE.
I tried this but it doesn't work.
PERFORM test : USING text-aaa p_aaa,
USING text-bbb p_bbb,
USING text-ccc p_ccc.
FORM test USING text parameter.
SELECTION-SCREEN : BEGIN OF LINE, COMMENT 1(45) text, POSITION 50.
PARAMETERS : parameter TYPE rcgfiletr-ftappl OBLIGATORY.
SELECTION-SCREEN END OF LINE.
ENDFORM.
Error message : SELECTION-SCREEN statement is not allowed in FORM
Has anyone got an idea ?
Regards
‎2008 Jan 17 11:53 AM
You can't declare Selection-SCREEN in a Form.
So Declare all your selection-sCreen in a Include Program and use that Include in your Main Program.
Kanagaraja L
‎2008 Jan 17 11:53 AM
You can't declare Selection-SCREEN in a Form.
So Declare all your selection-sCreen in a Include Program and use that Include in your Main Program.
Kanagaraja L
‎2008 Jan 17 1:04 PM
First, you can not use selection-screen in FORM and PERFORM somewhere.
Second, you can use subscreen or include it is up to your screen design.
reward points if it helps.
michael
‎2008 Jan 17 2:09 PM
Thanks for your reply. I hoped there was another way because I have 14 times the same block in my selection-screen.
Rgds,