2011 Jan 06 2:46 PM
Hello,
i filled my internal table and i can see 14 rows in this internal table.
But when loop at fieldcat to fill it as below, i can see 13 rows in my u_er_fieldcat. how can this happen?
I checked fields and internal tables there is no wrong with those.
PERFORM fieldcat_modify USING er_fieldcat[].
FORM fieldcat_modify USING u_er_fieldcat TYPE slis_t_fieldcat_alv.
DATA: xs_fieldcat TYPE slis_fieldcat_alv.
LOOP AT u_er_fieldcat INTO xs_fieldcat.
CASE xs_fieldcat-fieldname.
WHEN '...'.
xs_fieldcat-seltext_l = '...'.
xs_fieldcat-ddictxt = 'L'.
WHEN '....'. .....
2011 Jan 06 2:52 PM
why don´t you use this function?
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = repid
i_internal_tabname = tab
i_inclname = repid
i_bypassing_buffer = ' '
i_buffer_active = ' '
CHANGING
ct_fieldcat = it_fieldcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
CHECK sy-subrc = 0.
2011 Jan 06 3:39 PM
2011 Jan 06 3:46 PM
Hi aydnbk,
ALV is used to display internal tables. The field catalog is used to control the way each column is displayed.
The internal table has a column structure for the data. Each line of the field catalog table refers to one column of the display table.
If you use SALV technology you do not need to create the field catalog.
First check the sample programs in your system.
Regards,
Clemens
2011 Jan 07 2:25 AM
Hi aydnbk ,
A fieldcat will determine the number of columns and not number of rows in your output.
Regards,
Jovito.
2011 Jan 07 7:47 AM
Hello,
as mentioned you ahve 14 rows in the internal table but as you get into the perform routine no. of rows become 13.
this should not happen ideally.
how many colums do you see at the time of output?
and do consider about MANDT if you have in ur field catalog?
This you need yto analyze by yourself that how and when a row from the internal table getting deleted.
Regards,
Yadesh
2011 Jan 07 1:17 PM
Hey,
Pls check whether the internal table has declared with HEADER LINE and without clearing the WORK AREA, you may find 14 entries in the internal table.
That may be the reason...
2011 Jan 12 10:28 AM
Hi,
As per your issue.
You should know one thing, when creating records or assigning records from one to another
Internal table is automatically expands as dynamically.
and check once where using sequence of when condition check once.
whether using correct statemnts are not.
I think it helpful for you