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: 

# not appearing in object-oriented ALV output

Former Member
0 Kudos
244

Dear All,

When I am using the object-oriented alv display function set_table_for_first_display, I can see that my internal table contains entries with #. But when I am trying to display this in the alv format, # is not appearing in the alv ouput.

Please could anyone help me out with this.

Regards,

Sushanth H.S.

9 REPLIES 9

abdul_hakim
Active Contributor
0 Kudos
217

HI

Could you please update your code here.

Regards,

Hakim

Former Member
0 Kudos
217

Hi

Sushanth Srinivas

Are you use data of DDIC table

or

Fetching data from exel file ?

regards

Nishit

0 Kudos
217

Hi,

I am reading from a file in the application server in my program.

When I read the file and check in my internal table corresponding to the file, I find that the # appears in my internal table, but when the same internal table is displayed in the ALV, # entry is not appearing in the output.

Regards,

Sushanth H.S.

0 Kudos
217

Hi Sushanth,

When reading from application server into an internal table, any tab space or new lines or some special characters will appear in the form of #. This is different from the symbol Hash. SAP wil internally identify these special characters and print the appropriate one while displaying in ALV.

Hope this will helps you.

Regards,

Swarna Munukoti.

Edited by: Swarna Munukoti on Nov 26, 2008 10:42 AM

0 Kudos
217

hello

Sushanth Srinivas ,

You are reading file from application server ,

So in this process special characters are appear looking like as #.

might u have set LVC_T_FCAT-SYMBOL field in building fieldcatalog ..

check it.

But during display SAP converts them into their proper appearance..

might this help u out.

Regards

Nishit Joshi

0 Kudos
217

hello

Sushanth Srinivas ,

You are reading file from application server ,

So in this process special characters are appear looking like as #.

might u have set LVC_T_FCAT-SYMBOL field in building fieldcatalog ..

check it.

But during display SAP converts them into their proper appearance..

might this help u out.

Regards

Nishit Joshi

0 Kudos
217

Hi Swarna,

Thanks for your reply.

I would like to know one from you if there is any way by which we could read a file and find out if there are any tabs or spaces or special characters. If yes, then please could you tell me about the same.

Regards,

Sushanth H.S.

0 Kudos
217

Hi,

For reading these characters use the class CL_ABAP_CHAR_UTILITIES. See all the attributes available like

CHARSIZE
ENDIAN
MINCHAR
MAXCHAR
HORIZONTAL_TAB
VERTICAL_TAB
NEWLINE
CR_LF
FORM_FEED
BACKSPACE

Example

DATA : itab TYPE TABLE OF string,
       wa   TYPE string,
       val1 TYPE string,
       val2 TYPE string.

CONCATENATE 'ABC' cl_abap_char_utilities=>horizontal_tab 'DEF' INTO wa.
APPEND wa TO itab.

CONCATENATE 'ABC' cl_abap_char_utilities=>horizontal_tab 'DEF' INTO wa.
APPEND wa TO itab.

CONCATENATE 'ABC' cl_abap_char_utilities=>horizontal_tab 'DEF' INTO wa.
APPEND wa TO itab.

LOOP AT itab INTO wa.

  SPLIT wa AT cl_abap_char_utilities=>horizontal_tab INTO val1 val2. 

  WRITE : / val1, val2.

ENDLOOP.

Regards

Edited by: Rajvansh Ravi on Nov 26, 2008 1:38 PM

Former Member
0 Kudos
217

Hi,

while building the Fieldcatalog from stucture LVC_S_FCAT ,set SYMBOL which is used in ALV control: Output as symbol.