Skip to Content
author's profile photo Former Member
Former Member

Custom report: How to remove this Strange Symbol # from BSEG-SGTXT.

Hi,

I'm having a strange problem with symbol #

I am downloading data from BSEG table into excel file (using tab delimiter) using custom report and there is a field SGTXT with value ' Half Advance# '

I am using below statement to remove # from SGTXT, but the symbol is not deleting.

REPLACE ALL OCCURRENCES OF '#' in gs_output-SGTXT with ' '.

Looks like it is not HASH symbol, because when I tried

FIND ALL occurrences OF '#' IN gs_output-SGTXT MATCH COUNT lv_num.

RESULT of lv_num is showing as 0

When I add HASH symbol to that field and tried.

Concatenate '#' gs_output-SGTXT into gs_output-SGTXT.

FIND ALL occurrences OF '#' IN gs_output-SGTXT MATCH COUNT lv_num.

RESULT of lv_num is showing as '1'.

Any idea what might be that symbol?

The problem is when I downloaded the data into excel, it is thinking that the symbol is END OF ROW. Hence it is moving remaining fields after SGTXT into next row.

Somehow I have to remove that symbol from my custom report. Is there any FM or Method which will remove this strange symbol???

Kindly suggest.

Thanks

Seema

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Posted on Jan 17, 2013 at 06:45 AM

    Hi reddy ,

    Yes , you are correct # symbolizes end of row and begin of next line

    try this :

    REPLACE ALL OCCURRENCES OF `#` in gs_output-SGTXT with ` `.

    Regards ,

    Yogendra Bhaskar

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 17, 2013 at 06:46 AM

    Hi,

    Check this thread & look at every reply.

    http://scn.sap.com/thread/1594832

    actually that is a garbage character.

    Thanks

    Gourav.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 17, 2013 at 06:48 AM

    (FAQ) The "#" character is displayed for any non displayable character. Here you could try to use the static attributes of classe CL_ABAP_CHAR_UTILITIES like CL_ABAP_CHAR_UTILITIES=>NEWLINE, CR_LF or FORM_FEED instead of "#".

    Regards,

    Raymond

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 17, 2013 at 06:49 AM

    check out this function module.

    SCP_REPLACE_STRANGE_CHARS

    hope it helps,

    Vinoth

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.