on 04-11-2007 10:30 AM
Hi,
I have asked to provide a matrix type layout in SAP Script.Also in this matrix, number of columns is not fixed. At runtime it will be decided that how many columns will be there on the layout depending on the data fetch by the program. Can we provide this using requirement using SAP script or smartforms.
Thanks & Regards
vatsa
Hi Vatsa,
Just before getting into the SAP-script, determine how many columns needs to be displayed in the output and pass that variable to the SAP-script.
In SAP-script, whereever you define the BOX for displaying the columns, use the following commands. Use the necessary size for the width of the column.
An example is given below.
Data: W_No_of_Columns&> type i.
/: IF &<W_No_of_Columns&> EQ '4'
/: BOX HEIGHT '22.20' LN WIDTH '59' CH FRAME 10 TW
/: BOX HEIGHT '22.20' LN WIDTH '6.5' CH FRAME 10 TW
/: BOX HEIGHT '22.20' LN WIDTH '15' CH FRAME 10 TW
/: BOX HEIGHT '22.20' LN WIDTH '25' CH FRAME 10 TW
/: BOX HEIGHT '22.20' LN WIDTH '36.5' CH FRAME 10 TW
ENDIF.
/: IF &<W_No_of_Columns& EQ '5'
/: BOX HEIGHT '22.20' LN WIDTH '59' CH FRAME 10 TW
/: BOX HEIGHT '22.20' LN WIDTH '6.5' CH FRAME 10 TW
/: BOX HEIGHT '22.20' LN WIDTH '15' CH FRAME 10 TW
/: BOX HEIGHT '22.20' LN WIDTH '25' CH FRAME 10 TW
/: BOX HEIGHT '22.20' LN WIDTH '35' CH FRAME 10 TW
/: BOX HEIGHT '22.20' LN WIDTH '45' CH FRAME 10 TW
ENDIF.
Hope this helps.
<REMOVED BY MODERATOR>
Thanks,
-G
Edited by: Alvaro Tejada Galindo on Jul 8, 2008 10:57 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vatsa,
I don't know why it shouldn't work. If your internal table contains e.g. max 10 fields for columns (let's say col01 - col10) you could define the sapscript as following:
col01,,col02,,col03,, ...... ,,col10
How many colums are filled with data is irrelevant in that case. Just make sure that no initial values are printed depending on the data definition.
Hope that helps
Kind Regards
Nicola
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hai,
You can not create Dynamic columns in SAP script.
Better to use Smart-Forms.
<REMOVED BY MODERATOR>
Regds,
Rama chary.Pammi
Edited by: Alvaro Tejada Galindo on Jul 8, 2008 10:57 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.