2007 Jul 03 10:25 AM
Hi,
I am using Fm REUSE_ALV_FIELDCATALOG_MERGE to build the fieldcatalogue.
I am passing one internal table to that which has around 38 fields in it.
Each and every field from that table is decleared by reference of one field from the structure.
In this case FM REUSE_ALV_FIELDCATALOG CATALOG_MERGE is building fieldcatalogue with all 38 fields.
But now i am changing defination of one of the field from the internal table.
That is, now i have decleared that field with the data element which is newly created.
In this case FM REUSE_ALV_FIELDCATALOG_MERGE is building fieldcatwith only 37 excluding
one field for which i have changed the defination.
See below for change i have made to one of the field from the internal table.
before making changes : f1 LIKE coss-wkg002. -
>
in this case all fields are included in fieldcat.
After making changes : f1 TYPE z_ros_amt. -
>
In this case,this fields is exluded from fieldcat.
here z_ros_amt is the data element created by me with cuur type length 18.
Please guide me in this regard.
Point rewarded for sure
Thnx in advnace.
2007 Jul 03 10:28 AM
Hi,
You need to some how make use of LIKE as you will get its attributes only if u refer to its type using already delcared strucutre field.
Regards,
Sesh
2007 Jul 03 10:31 AM
Hi,
Is structure field must? I have created my own data elemnt & used the same for declaration. Bit the field is not getting populated in ALV fieldcat
Thanks
2007 Jul 03 10:29 AM
. The only care that has to be taken is while
declaring the internal table.
2. The Fields of the internal table should be declared
<b>using LIKE (and not TYPE)</b>
(If we use TYPE, then field catalogue won't get generated.It would be blank for that field)
3. Another option is to manually generate the field catalogue, by abap coding,
instead of using the FM.
However, in most cases, it is not required.
<b>(field catalogue is nothing but an internal table,
which contains detailed information about the fields.
ie. fieldname, size, type, heading, etc)</b>
reward points if it is usefull.....
Girish
2007 Jul 03 10:30 AM
1. For the FM REUSE_ALV_FIELDCATALOG_MERGE , also add the parameter
<b> I_BYPASSING_BUFFER = 'X'.</b>
2. run program <b>BALVBUFDEL</b> to delete ALV buffer before executing your program
2007 Jul 03 10:30 AM
Hi,
Did you tried creating a structure in SE11 for the ALV and then passing the structure name to the FM?
2007 Jul 03 10:35 AM
Hi,
Even you can append the new row in the internal table generated by the FM REUSE_ALV_FIELDCATALOG_MERGE for your customized field according to the requirement.
Reward points if useful.
Regards,
Suman