2008 Sep 17 10:06 AM
Dear all
Now in my program there is a internal table storing mass data.
The structure of itab as below:
A B C D
1000 abc ......
2000 jud ......
1000 edg .......
I want to catch the data like the first and the 3th,the single field A has multi-records.
TKS!
2008 Sep 17 10:32 AM
Dear all
Now in my program there is a internal table storing mass data.
The structure of itab as below:
A B C D
1000 abc ......
2000 jud ......
1000 edg .......
I want to catch the data like the first and the 3th,the single field A has multi-records.
TKS!
2008 Sep 17 10:12 AM
2008 Sep 17 10:12 AM
first sort itab by name of first column:
sort itab by 'columnname' ascending / descending, or use ALV list.
2008 Sep 17 10:31 AM
2008 Sep 17 10:32 AM
2008 Sep 17 11:11 AM
Dear all
Sorry for my poor expressing.
My purpose is getting the records from the internal tab ITAB.
The records must satisfy that one PO# links to several SO#.
And the ITAB is storing the sales order data which catching from the database table.
If i explain it clearly?
TKS!
2008 Sep 17 11:19 AM
Hello Stephen,
My understandin is that you have an internal table for SO# say t_so and for PO# say t_po nad t_so may have many records for one PO# say t_po-ebeln. This much is clear. Now what you want to do with these internal tables?
Regards
Farzan
2008 Sep 17 1:08 PM
Dear Farzan
For example,
SO# PO# Material ....
1000 ABC M1 .....
1001 ABC M3 .....
I want to get these records into another internal table.
But i use the SQL 'sort itab by t_po t_so,select t_po count(t_so) from itab group by t_so having count(*) > 1 ' can't not use on internal table!
How i can implement it?
TKS!
2008 Sep 17 4:01 PM
Now your question is clear.. So u want the count number various SOs for a PO.
do this
loop at itab.
t_final-po = itab-po#
t_final-no_of_so = 1.
collect t_final.
endloop.
this should work and result will be in t_final
Regards
Farzan
2008 Sep 18 3:04 AM
Dear Farzan
I can't understand fully......
Pls help me to find the problem in the code as below .
It can't get any records.
sort itab by bstnk vbeln.
loop at itab.
t_final-po = itab-bstnk.
t_final-no_of_so = 1.
collect t_final.
endloop.
loop at itab into itab_alv where bstnk = t_final-po.
endloop.
Thank you very much!
2008 Sep 18 5:18 AM
Hello Stephen,
You don't have to loop on itab again (loop at itab into itab_alv where bstnk = t_final-po.
) just display the itab internal table in a grid.
Also make sure that t_final-no_of_so is a numeric/ quantity field.
Regards
Farzan
2008 Sep 19 1:29 AM
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |