2007 May 25 1:07 PM
hi
in alv interactive list how can i display the fields in which the fields doesn't present in database tables.
2007 May 25 1:15 PM
hi,
1. Create an Internal table with all the fields you required.
2. Create a fieldcatlog with repect to that internal table.
3. Automaticall u will get all the field in the output.
Rgds
Anversha
2007 May 25 1:12 PM
Hi
U can use the fm REUSE_ALV_FIELDCATALOG_MERGE to create the catalog in order of definition of output table:
BEGIN OF T_OUTPUT OCCURS 0,
FIELD1 LIKE .....,
..................
END OF T_OUTPUT.
GT_REPID = SY-REPID.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = GT_REPID
I_INTERNAL_TABNAME = 'T_OUTPUT'
I_INCLNAME = GT_REPID
CHANGING
CT_FIELDCAT = GT_FIELDCAT[].
If you need u can insert the characteristics of a field in catalog table by your self:
LS_FIELDCAT-FIELDNAME = ......
....................................
APPEND LS_FIELDCAT TO GT_FIELDCAT.
Max
2007 May 25 1:12 PM
Hi
You hardcode the Values for the fields which are not there in database table
and which yopu wants to display in the output.
that is the only way to display the fields which are not there in databse.
So during the internal table population hardcode the values and fill the internal table.
Reward points if useful
Regards
Anji
2007 May 25 1:14 PM
Hi,
in that case u should prepare the fieldcat manually like shown below.
CLEAR AFIELD.
AFIELD-Col_pos = 1.
AFIELD-seltext_m = 'NAME'.
AFIELD-KEY = 'X'.
AFIELD-datatype = 'CHAR'.
AFIELD-intlen = '20'.
APPEND AFIELD TO FIELDCAT.
CLEAR FIELDCAT.
CLEAR AFIELD.
AFIELD-Col_pos = 2.
AFIELD-seltext_m = 'NUMBER'.
AFIELD-datatype = 'CHAR'.
AFIELD-intlen = '10'.
APPEND AFIELD TO FIELDCAT.
CLEAR FIELDCAT.
rgds,
bharat.
2007 May 25 1:15 PM
hi,
1. Create an Internal table with all the fields you required.
2. Create a fieldcatlog with repect to that internal table.
3. Automaticall u will get all the field in the output.
Rgds
Anversha
2007 May 25 1:18 PM
Please try to close your previous threads by rewarding points...
The question with heading <b>Count</b>
2007 May 25 1:31 PM
hi,
define an final internal table.
data : begin of itab_final,
field1 like <table name>-<fieldname>,
field2 like <table name>-<fieldname>,
end of itab_final.
d_fieldcat_wa-fieldname = 'FIELD1'.
d_fieldcat_wa-seltext_l = 'field 1'.
d_fieldcat_wa-col_pos = 1.
append d_fieldcat_wa to d_fieldcat.
clear d_fieldcat_wa.
d_fieldcat_wa-fieldname = 'FIELD2'.
d_fieldcat_wa-seltext_l = 'field 2'.
d_fieldcat_wa-col_pos = 2.
append d_fieldcat_wa to d_fieldcat.
clear d_fieldcat_wa.
data : gd_repid like sy-repid.
gd_repid = sy-repid.
call function module reuse_alv_grid_display.
exporting.
program name = gd_repid.
t_fieldcatalog = d_fieldcat.
importing.
t_outtab = itab.
exceptions.
Reward with points if helpful.