Skip to Content
0
Former Member
Jul 21, 2016 at 07:45 AM

User defined column name not coming to output screen using OOPS Alv.

2047 Views

Hi all experts,

I deloped one sales report. Its working fine. But i added one user defined field 'status' in my final table declaration.

once i checked with break point that column heading is coming correctly but once i use cl_salv_table to display report

the column heading is not coming but the value of this field coming correctly.

I have go through thread but i am not able rectify my issues. so can you guys as well as all experts please help me out over here.

I am sharing screen shot please once go through that. Some declaration i might have to do but i am not understand which i need to do for the same.

Thanks in advance to all.

Thanks & Regards,

kaushik.

Report declaration

DATA : R_ALV TYPE REF TO CL_SALV_TABLE.
DATA : R_FUNCTIONS TYPE REF TO CL_SALV_FUNCTIONS_LIST.
DATA : R_COLUMNS TYPE REF TO CL_SALV_COLUMNS_TABLE.


FORM DISPLAY .
IF P_OP = 'X' AND P_CL = ' '.
try.
call method CL_SALV_TABLE=>FACTORY
* exporting
* LIST_DISPLAY = IF_SALV_C_BOOL_SAP=>FALSE
* R_CONTAINER = R_ALV
* CONTAINER_NAME =
importing
R_SALV_TABLE = R_ALV
changing
T_TABLE = T_FINAL
.
R_FUNCTIONS = R_ALV->GET_FUNCTIONS( ).
R_FUNCTIONS->SET_ALL( IF_SALV_C_BOOL_SAP=>TRUE ).

R_COLUMNS = R_ALV->GET_COLUMNS( ).
R_COLUMNS->SET_OPTIMIZE( IF_SALV_C_BOOL_SAP=>TRUE ).



R_ALV->DISPLAY( ).

catch CX_SALV_MSG .
MESSAGE 'ERROR WHILE DISPLAYING THE REPORT .' TYPE 'I' DISPLAY LIKE 'E'.
LEAVE LIST-PROCESSING.
endtry.

please see the column heading after net value...

Attachments

pastedImage_0.png (18.0 kB)