2008 Nov 26 4:41 AM
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.
2008 Nov 26 4:53 AM
2008 Nov 26 6:58 AM
Hi
Sushanth Srinivas
Are you use data of DDIC table
or
Fetching data from exel file ?
regards
Nishit
2008 Nov 26 8:39 AM
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.
2008 Nov 26 9:42 AM
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
2008 Nov 26 10:24 AM
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
2008 Nov 26 10:25 AM
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
2008 Nov 26 12:34 PM
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.
2008 Nov 26 12:37 PM
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
2008 Nov 26 9:32 AM
Hi,
while building the Fieldcatalog from stucture LVC_S_FCAT ,set SYMBOL which is used in ALV control: Output as symbol.