2008 Oct 22 7:58 AM
Hello all,
I define a work area WA1 with reference I defined a table (itab) by using following statement.
DATA: itab TYPE SORTED TABLE OF WA1 WITH UNIQUE KEY field1 field2 WITH HEADER LINE.
I am unable pass the table itab to FM Reuse_alv_grid_display bcoz itab is sorted table. At the same time I can't define itab as a STANDARD table with UNIQUE KEY addition.
If I define a itab as DATA: itab TYPE STANDARD TABLE OF wa1 WITH KEY field1 field2 WITH HEADER LINE.
I'm getting unnecessary day.
Give me suggestions.......
2008 Oct 22 8:14 AM
Hi,
Even i faced the same prob.
what i would suggest is, first perform all ur operations in the sorted internal table, Then after that while passing the itab to Function module, just transfer all the data from the sorted internal table to stanadrd internal table and pass the standrd itab to the FM.
this is the approach i followed.
revert back if any issues.
Regards,
naveen
2008 Oct 22 8:01 AM
Hi,
Create one more standard internal table, move contents from this sorted itab to the new one. And pass this new itab to the FM
Thanks & Regards,
Navneeth K.
2008 Oct 22 8:02 AM
Hi
YOu cannot use Unique key for standard table as the key of the standard table is always Non-Unique.
Also dont use internal table with header lines as it is completely obsolete.
Please try the below statement.
DATA itab LIKE SORTED TABLE OF wa WITH UNIQUE KEY field1 field2.
Cheers,
Hakim
2008 Oct 22 8:14 AM
Hi,
Even i faced the same prob.
what i would suggest is, first perform all ur operations in the sorted internal table, Then after that while passing the itab to Function module, just transfer all the data from the sorted internal table to stanadrd internal table and pass the standrd itab to the FM.
this is the approach i followed.
revert back if any issues.
Regards,
naveen