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

Problem with Search String, conersion of New Line character.

Dear All,

I am invoking a Z* RFC from Java System.

Some value of String type is passed to the BAPI, (Let's call it Long Text).

The String variable (Long Text)may also contain New Line Character , which is represented by Carriage Return(CR) and Line Feed(LF) in Java,

CR and FL is represented by ''

and '

' respectively in Java System.

But when these values are passed to the BAPI , they are displayed as '#' character in SAP Debugger.

In the same RFC Parameter (Long Text) , I tried to search for ' & # x D ; ' , ' & # x A ; ' or '#' , with

SEARCH fv_str FOR ' & # x D ; ' , ' & # x A ; ' or '#' ,

but the ABAP Code can not find any of these string in the Long Text provided to the RFC.

Some one having any idea about the issue, please help.

Thanking You All.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 21, 2011 at 05:24 PM

    If you search this forum you will find posts about how to deal with these characters... which are hex 0D and 0A....

    See attributes for class CL_ABAP_CHAR_UTILITIES. In your abap code you need to utilize:

    CL_ABAP_CHAR_UTILITIES=>CR_LF.

    or turn off unicode switch and insert a definition, like:

    data: lv_cr type x value '0D',

    lv_lf type x value '0A'.

    and compare value in your string to that....

    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.