Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ALV

Former Member
0 Likes
493

what is the fieldname to hide the field in the ALV report?

what is the fieldname to hide the field in the ALV report?

4 REPLIES 4
Read only

Former Member
0 Likes
475

Hi,

In the field catalog internal table give NO_OUT = 'X' for the corresponding column.

Thanks,

Naren

Read only

Former Member
0 Likes
475

Hi

use the field

FIELDCAT-NO_OUT = 'X'.

Reward points if useful

Regards

Anji

Read only

Former Member
0 Likes
475

hi,

check this link

regards,

roxana

Read only

Former Member
0 Likes
475

Hi, in this code i am hiding vbeln.

just check this sample code....

REPORT ZTESTALV .

TYPE-POOLS:SLIS.

DATA: BEGIN OF ITAB OCCURS 0,

VBELN LIKE VBAK-VBELN,

POSNR LIKE VBAP-POSNR,

END OF ITAB.

SELECT VBELN

POSNR

INTO TABLE ITAB

FROM VBAP

UP TO 20 ROWS.

DATA: IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,

X_FIELDCAT TYPE SLIS_FIELDCAT_ALV.

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

I_PROGRAM_NAME = SY-REPID

I_INTERNAL_TABNAME = 'ITAB'

I_INCLNAME = SY-REPID

CHANGING

CT_FIELDCAT = IT_FIELDCAT

EXCEPTIONS

INCONSISTENT_INTERFACE = 1

PROGRAM_ERROR = 2

OTHERS = 3.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

LOOP AT IT_FIELDCAT INTO X_FIELDCAT.

IF X_FIELDCAT-FIELDNAME = 'VBELN'.

X_FIELDCAT-NO_OUT = 'X'.

MODIFY IT_FIELDCAT FROM X_FIELDCAT.

ENDIF.

ENDLOOP.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = SY-REPID

IT_FIELDCAT = IT_FIELDCAT

TABLES

T_OUTTAB = ITAB

EXCEPTIONS

PROGRAM_ERROR = 1

OTHERS = 2.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

regards