‎2008 Apr 08 2:28 PM
How to create dynamic selection screen using macros? Please give me the solution its very urgent as I am not aware of Macros.
‎2008 Apr 08 2:35 PM
Hi!
Somehow like this:
define chfile.
selection-screen begin of line.
parameters: &1 as checkbox default ' ' USER-COMMAND chk.
SELECTION-SCREEN COMMENT 5(20) &2.
parameters: &3 like rlgrap-filename.
selection-screen end of line.
end-of-definition.
selection-screen begin of block file with frame title text-b01.
chfile p_jell text-f01 p_fjell.
chfile p_oszt text-f02 p_foszt.
selection-screen end of block file.Regards
Tamá
‎2008 Apr 08 2:37 PM
Here is an example that I used that saved a lot of redundent code.
DEFINE filefrom2.
* &1 file field name
* &2 screen field name
* &3 screen if file null field name
* &4 radio group name
* &5 modif id name
* text-305 = From
* text-306 = File
* text-307 = Screen
* text-309 = Default When File Blank
selection-screen comment 27(04) text-306 modif id &5.
selection-screen position 33.
parameters: &1 radiobutton group &4 modif id &5.
selection-screen comment 37(06) text-307 modif id &5.
selection-screen position 44.
parameters: &2 radiobutton group &4 default 'X' modif id &5.
selection-screen comment 49(23) text-309 modif id &5.
selection-screen position 73.
parameters: &3 radiobutton group &4 modif id &5.
END-OF-DEFINITION.
DEFINE filefrom3.
* &1 file field name
* &2 screen field name
* &3 screen if file null field name
* &4 radio group name
* &5 modif id name
* text-305 = From
* text-306 = File
* text-307 = Screen
* text-309 = Default When File Blank
selection-screen comment 21(04) text-306 modif id &5.
selection-screen position 27.
parameter &1 radiobutton group &4 default 'X' modif id &5.
selection-screen comment 31(06) text-307 modif id &5.
selection-screen position 38.
parameter &2 radiobutton group &4 modif id &5.
selection-screen comment 43(23) text-309 modif id &5.
selection-screen position 67.
parameter &3 radiobutton group &4 modif id &5.
END-OF-DEFINITION.
In the definition of the selection screen, this was used
filefrom p_ltypf p_ltyps gr15 lfs.
* and this
filefrom2 pfcrdt pscrdt pdcrdt gr16 new.
* and this
filefrom3 pacfdt pacsdt pacddt gr41 acc.