on 09-26-2007 9:19 AM
Hi Experts,
I am creating table in my smart form. The table contains seven columns in the first column I need to populate number value from 1 to 30 (30 is the max that is fixed) and remaining columns I need to show in blank. Already I have defined the table with seven fields for example
Number code weight ..
In the first column I need to display the numbers from 1 to 30 for example
1
2
3
4
5
.
.
.
.
30
So please tell me where I need to provide loop exactly and what variables or internal tables I can use for this. If possible please send me the sample logic. And one more doubt is after each row I need to draw one horizontal line I mean just like table model. Please help me it is very urgent. I will give the points.
Thanks a lot.
By the way, if you use latest version of SmartForm (maybe from ECC5), there is a tab named Calculations in Table node. This tab allows you to number rows automatically, without coding. Here is instruction
<b>Operation:</b> Number
<b>Target Field Name:</b> a_variable_type_i_defined_in_Global_Definitions
<b>Event:</b> Before Loop
<b>Initialization: </b>checked
(text in bold is name of column)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you have already have the internal table like you said.
In smartforms you just create a table element
then set the internal table and his structure to table element's DATA atrribution
then in TABLE atrribution ,set his box
it will automatically loop.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Just write a program line in the table where you declare a variable and increase the count.
Display this variable in first cell. As we loop the table it will increment and
print the values.
If you want lines after each row you need to select the patterns provided
in the Table node
Reward if useful......
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are you going to Use TABLE/TEMPLATE for display.
If tables looping will handle by it then otherwise for TEMPLATE you need to add LOOP node.
As for numbers in first row.
You need to add a Program Lines node before calling Loop/TABLE Node.
there write this code .
loop at itab.
v_count = v_count + 1.
itab-fld1 = v_count.
modify itab index sy-index transporting fld1.
endloop.
Assuming itab already contain the required data in other fields.
Regards,
Amit
Reward all helpful replies.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.