2006 Jul 14 7:12 AM
Hi all.
I have a issue in alv display.
I am using field catlog for display.
the out put is ok.
in my out put I am getting 20 coloumns(fields).
but I want to display 1o field as default in my out put,but remaining 10 fields data also can I get by filtering or by change the view.
Can any body help me how to solve this issue.
Thanks in advance,
regards,
Eswar
2006 Jul 14 7:19 AM
Hi venkat,
1. for those 10 fields, which u don't won't
to display by default,
2. just give
FIELDCAT-NO_OUT = 'X'
3. In this simple example,
the one field is hidden by default.
4. just copy paste
5.
report abc.
*----
TYPE-POOLS : slis.
DATA : alvfc TYPE slis_t_fieldcat_alv.
DATA : alvfcwa TYPE slis_fieldcat_alv.
*----
data : begin of itab occurs 0.
include structure usr02.
data : end of itab.
*----
START-OF-SELECTION.
select * from usr02
into table itab.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-repid
i_internal_tabname = 'ITAB'
i_inclname = sy-repid
CHANGING
ct_fieldcat = alvfc
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
*----
IMPORTANT
LOOP AT ALVFC INTO ALVFCWA.
IF ALVFCWA-FIELDNAME = 'USTYP'.
<b> alvfcwa-no_out = 'X'.</b>
MODIFY ALVFC FROM ALVFCWA.
ENDIF.
ENDLOOP.
*----
Display
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
it_fieldcat = alvfc
TABLES
t_outtab = itab
EXCEPTIONS
program_error = 1
OTHERS = 2.
regards,
amit m.
Hi all.
I have a issue in alv display.
I am using field catlog for display.
the out put is ok.
in my out put I am getting 20 coloumns(fields).
but I want to display 1o field as default in my out put,but remaining 10 fields data also can I get by filtering or by change the view.
Can any body help me how to solve this issue.
Thanks in advance,
regards,
Eswar
2006 Jul 14 7:15 AM
Hi,
In the ALV toolbar, you have a button called as CHANGE LAYOUT. Click on this and select only those fields which you require. Store this layout.
Whenever required you can change the layout and add/remove the fields.
Best regards,
Prashant
2006 Jul 14 7:15 AM
Hai,
Create a layout using the required ten fields & set that layout as the default layout so that whenever you execute only that 10 fileds will be visible.
If useful reward the points,
Regards,
Umasankar
2006 Jul 14 7:19 AM
Hi venkat,
1. for those 10 fields, which u don't won't
to display by default,
2. just give
FIELDCAT-NO_OUT = 'X'
3. In this simple example,
the one field is hidden by default.
4. just copy paste
5.
report abc.
*----
TYPE-POOLS : slis.
DATA : alvfc TYPE slis_t_fieldcat_alv.
DATA : alvfcwa TYPE slis_fieldcat_alv.
*----
data : begin of itab occurs 0.
include structure usr02.
data : end of itab.
*----
START-OF-SELECTION.
select * from usr02
into table itab.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-repid
i_internal_tabname = 'ITAB'
i_inclname = sy-repid
CHANGING
ct_fieldcat = alvfc
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
*----
IMPORTANT
LOOP AT ALVFC INTO ALVFCWA.
IF ALVFCWA-FIELDNAME = 'USTYP'.
<b> alvfcwa-no_out = 'X'.</b>
MODIFY ALVFC FROM ALVFCWA.
ENDIF.
ENDLOOP.
*----
Display
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
it_fieldcat = alvfc
TABLES
t_outtab = itab
EXCEPTIONS
program_error = 1
OTHERS = 2.
regards,
amit m.
2006 Jul 14 7:25 AM
Hello,
User F_CAT-NO_OUT = 'X' for last 10 fields. You can select those fields later on from the Change layout button.
Regards,
Naimesh
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |