on 08-22-2007 7:07 PM
I need to know what the system field is for the counter inside a loop or table. I tried sy-tabix but that isn't recognized in SmartForms.
Regards,
Davis
Hi,
How it is possible .....becuase when u pass your value into internal table of table or loop it maintain that data in workarea so how it is possible to maintain sy-tabix for that. Make one program lines and create one temp varible and process it as per your need.
i think that might be helpful ...Rewards points
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The solution given by Deb will resolve your problem. i.e. use variable & increase its value on each loop pass.
count = count + 1.
Ashvender
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Davis,
Smartforms does not recognize sy-tabix. The way out is to declare a variable say ,count of type int in the global declaration. in the loop after every iteration put a program line code where count = count + 1.By that way you can keep track of the item line number in a loop or table.
Regards,
Mallick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I was doing that but it wasn't solving my problem. Here is the situation:
I have a table node that pulls from two different internal tables. How can I loop through each table at the same time? I was going to loop through the main table in the table node then use the index (now a counter) as the loop criteria for the second internal table (in a loop node). I am not sure how to do that because there is no index that I can jump to inside the loop node. Is there a better way to do this?
Yes I know I could alter the structure of the internal table and combine the two but I want a quick and easy way to solve it in the smartform.
Regards,
Davis
Dear Davis,
I think the best way out is to declare a program lines node and join two tables.Make a single table and then loop it under main table. For that, we have to declare types in global declaration containing the fields of both the tables. Declare the table in global declaration. I think this is the easiest way out. Making it shorter than this might make things more complex. Otherwise you might pass the count variable in loop node and equate the serial number of this loop(sy-tabix) to the count variable in the where clause. See whether this works out or not.
Regards,
mallick
User | Count |
---|---|
89 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.