Application Development 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: 

Material number printing in ALV

Former Member
0 Kudos
54

Hi.

One field in my ALV is mara-matnr , now , when the ALV displays then there are no leading zeros, and there are no leading zeros in the Printout as well. However , in the printout , after the material number there is a '#' . So what displays like

10001234 , prints out as 10001234# . I do not want this pound to appear in the Printout. How to achieve this.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
29

Try to use ref field and ref tab name in field catalog,so that # symbol will not come..

  • Material #

CLEAR LS_FIELDCAT.

LS_FIELDCAT-FIELDNAME = 'MATNR'.

LS_FIELDCAT-ref_fieldname = 'MATNR'.

LS_FIELDCAT-ref_tabname = 'MARA'.

LS_FIELDCAT-TABNAME = 'I_OUTPUT'.

ls_fieldcat-seltext_L = 'Material'.

ls_fieldcat-seltext_M = 'Material'.

ls_fieldcat-seltext_S = 'Material'.

APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.

Thanks

Seshu

1 REPLY 1

Former Member
0 Kudos
30

Try to use ref field and ref tab name in field catalog,so that # symbol will not come..

  • Material #

CLEAR LS_FIELDCAT.

LS_FIELDCAT-FIELDNAME = 'MATNR'.

LS_FIELDCAT-ref_fieldname = 'MATNR'.

LS_FIELDCAT-ref_tabname = 'MARA'.

LS_FIELDCAT-TABNAME = 'I_OUTPUT'.

ls_fieldcat-seltext_L = 'Material'.

ls_fieldcat-seltext_M = 'Material'.

ls_fieldcat-seltext_S = 'Material'.

APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.

Thanks

Seshu