‎2006 Sep 06 6:47 AM
Hi everyone.
I'm using 'reuse_alv_list_display'.
I'm using structure in 'reuse_alv_list_display'.
STRUCTURE_NAME = 'ZTS001'.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_CALLBACK_PROGRAM = PGM
I_CALLBACK_PF_STATUS_SET = 'SET_STATUS'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
I_STRUCTURE_NAME = STRUCTURE_NAME
IS_LAYOUT = LAYOUT
IT_FIELDCAT = FIELDCAT
IT_EXCLUDING =
.
.
.
.
Now I want to display not all of structure columns but the structure columns partially.
what should I do..?
‎2006 Sep 06 6:54 AM
Hi,
ALV gives a facility of choosing layout when the report is displayed. The report will list out all the colums, but you can chnage the layout and can choose which ever columns you want to display. So in this way you can manipulate the format of the report by changing the layout.
Sushil.
‎2006 Sep 06 6:55 AM
Hi James,
You can declare an internal table with those fields and pass that internal table name as structure.
data: begin of itab occurs 0,
bukrs like t001-bukrs,
......
end of itab.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
I_CALLBACK_PROGRAM = PGM
I_CALLBACK_PF_STATUS_SET = 'SET_STATUS'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
<b>I_STRUCTURE_NAME = 'ITAB'</b>
IS_LAYOUT = LAYOUT
IT_FIELDCAT = FIELDCAT
* IT_EXCLUDING =
‎2006 Sep 06 6:56 AM
Hi,
In the Fieldcatalog, you will find a field NO_OUT, so when you are building the fieldcatalog, what ever the fields you do not want to show in the output, then FIELDCATALOG-NO_OUT = 'X'. so those fileds will not appear in the output.
Regards
Sudheer
‎2006 Sep 06 6:59 AM
Use FM : REUSE_ALV_FIELDCATALOG_MERGE and pass the structure 'ZTS001' and get the fieldcatalog into an internal table T_FIELDCAT.
lets say you dont want to display field 'MATNR' isn ZTS001.
then you can ..
READ TABLE T_FIELDCAT WITH KEY FIELDNAME = 'MATNR'.
if sy-subrc eq 0.
T_FIELDCAT-No_OUT = 'X'.
Now instead of passing Structure name to REUSE_ALV_GRID_DISPLAY, pass the field catalog T_FIELDCAT in the fieldcatalog tables parameter.
modify t_fieldcat index sy-tabix.
endif.
Message was edited by: Sharath kumar R