2007 Jan 16 5:44 PM
Hi all,
I have defined a structure in the code using TYPES.
I want to build a field catalog for the structure.
To build the field catalog I use the Function Module LVC_FIELDCATALOG_MERGE and I am exporting the structure to the field i_structure_name .
But i find that the field catalog is not getting created.
If I pass a standard structure then the field catalog is geting created.
please tell me how to build the field catalog for a structure defined in the code.
Regards,
Vijay
*************ENTRIES WILL SURELY BE REWARDED******
Hi all,
I have defined a structure in the code using TYPES.
I want to build a field catalog for the structure.
To build the field catalog I use the Function Module LVC_FIELDCATALOG_MERGE and I am exporting the structure to the field i_structure_name .
But i find that the field catalog is not getting created.
If I pass a standard structure then the field catalog is geting created.
please tell me how to build the field catalog for a structure defined in the code.
Regards,
Vijay
*************ENTRIES WILL SURELY BE REWARDED******
2007 Jan 16 5:50 PM
HI,
use REUSE_ALV_FIELDCATALOG_MERGE in combination with LVC_TRANSFER_FROM_SLIS.
Regards
Sudheer
2007 Jan 17 11:40 AM
hi,
By exporting the ur structure name to the field i_structure_name to the FM LVC_FIELDCATALOG_MERGE wont help.
The value to be passed to the i_structure_name should be the standard database table /structure. The internal table name is to be passed to the i_internaltable_name field
You can create a fieldcataog as per the following code
TYPE-POOLS slis.
DATA : gt_fieldcat TYPE slis_t_fieldcat_alv ,
gwa_fieldcat TYPE LINE OF slis_t_fieldcat_alv ,
DATA : BEGIN OF itab OCCURS 0,
rec_num(6) TYPE c,
mesgtyp TYPE c,
message(50) TYPE c,
icon(4) TYPE c, "NOTE
END OF itab.
*Field catalog
REFRESH gt_fieldcat .
CLEAR gwa_fieldcat.
gwa_fieldcat-fieldname = 'REC_NUM'.
gwa_fieldcat-seltext_l = 'REC_NUM'.
APPEND gwa_fieldcat TO gt_fieldcat .
CLEAR gwa_fieldcat.
gwa_fieldcat-fieldname = 'ICON'.
gwa_fieldcat-seltext_l = 'ICON'.
*gWA_FIELDCAT-ICON = 'X'. "NOTE
APPEND gwa_fieldcat TO gt_fieldcat .
CLEAR gwa_fieldcat.
gwa_fieldcat-fieldname = 'MESSAGE'.
gwa_fieldcat-seltext_l = 'MESSAGE'.
APPEND gwa_fieldcat TO gt_fieldcat .
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |