cancel
Showing results for 
Search instead for 
Did you mean: 

'#' is not detecting..

Former Member
0 Kudos

Hi all,

I am uploading data from Notepad.txt ( Tab Separated) in a Web Dynpro Component.

Notepad File:

1001     name0     1000     BeckerBerlin     1000     1/1/2013     31/12/2013

While debugging it is showing like this.

1001#name0#1000#BeckerBerlin#1000#1/1/2013#31/12/2013#

Now i am using this code,

REPLACE ALL OCCURRENCES OF '#' in lv_string WITH space .

or

SPLIT lv_string AT '#' INTO lv_empid

                                  lv_ename

                                  lv_clnid

                                  lv_cname

                                  lv_pmgid

                                  lv_begda

                                  lv_endda.

This '#' is not detecting.. Help me in this..

Thanks in advance..



Accepted Solutions (0)

Answers (3)

Answers (3)

amy_king
Active Contributor
0 Kudos

Hi Arun,

As Chandra has mentioned, the # character you see is actually a tab. For non-printing characters like a tab or carriage return, SAP uses the # character to visually represent the non-printing character. If you take a look at class interface CL_ABAP_CHAR_UTILITIES in your system, you'll see several attributes that you can use to reference these non-printing characters in your code, for example...

  • HORIZONTAL_TAB
  • VERTICAL_TAB
  • NEWLINE
  • CR_LF
  • FORM_FEED
  • BACKSPACE

Cheers,

Amy

Former Member
0 Kudos

That is not '#' that is symbol of   cl_abap_char_utilities=>horizontal_tab..

so try to replace all occurrence of   cl_abap_char_utilities=>horizontal_tab into your variable.

we have one more  cl_abap_char_utilities=>newline, this also visible in '#' format only. this is used for new line character.

ramakrishnappa
Active Contributor
0 Kudos

Hi,

Please change the code as below

SPLIT lv_string AT CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB INTO lv_empid

                                  lv_ename

                                  lv_clnid

                                  lv_cname

                                  lv_pmgid

                                  lv_begda

                                  lv_endda.

Hope this helps you.

Regards,

Rama

former_member221367
Participant
0 Kudos

Hi Arun ,

you can  remove space between two fields in your uploading file(Notepad.txt ) ie

1001name01000 BeckerBerlin10001/1/201331/12/2013