on 08-30-2008 5:01 AM
Hi all,
I have to prepare final internal table based on the no. of records of individual table. i.e. I should append the data from the table which has large no of records first. Then I should modify the final table with other individual tables. I have reservation list table(RESB), purchase requisition table(EBAN), purchase order delivery schedules table(EKET) , GRs table (MESG) .I have prepared data for individual tables. We can't say particularly that this table'll have large no. of records always. So how can I append the first table into final internal table ? I have separate work areas for each table in my SMARTFORM.
Edited by: Jayasri P. on Aug 30, 2008 6:02 AM
Hi,
1.Take a temporary internal table with two fields, first with type i and 2nd with type string,
2.Store all the value you get from line attribute of 5 tables and name in 2nd.
3.SORT the table in descending order w.r.to field 1.
Now,your first row in tem itab will give the line no and the table name of the table having max no of rows.
Regards,
Anirban
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
DESCRIBE TABLE statement with LINE addition will give you the no of record in an internal table.
For further detail check,
http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb3798358411d1829f0000e829fbfe/content.htm
you can stire the LINE value of each and comare them to get the table with max record.
Regards,
Anirban
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have 5 individual tables . So I have created 5 variables . How can we find the max. value of 5 variables? If we can find the max. value of those variables, how can we pass the data of that particular individual table to final table dynamically as the no. of records can't be maximum for a particular table every time.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
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.