cancel
Showing results for 
Search instead for 
Did you mean: 

NewLine Character in the String received from Interactive Adobe Form

0 Kudos

Hello Experts,

Following is the issue we have with interactive Adobe Form

We have a text area within the form. User enters the text in multiple lines in this text area.

We are calling a backend function module designed in SE37 that accepts and process the data from the adobe form. We are also processing the string data user enters in the text area.

When we receive the string from the form, the newline character within the string is displayed as '#' in the debugger. We tried splitting this string using cl_abap_char_utilities=>newline and cl_abap_char_utilities=>cr_lf but NO luck. Though in the debugger we see cl_abap_char_utilities=>newline as '#' in the debugger and also '#' is present within the string, for some reason when string is processed to find cl_abap_char_utilities=>newline, we can find/locate it.

Because ABAP code is not able to identify the newline character within the string received from Adobe form, we are not able to maintain the formatting of the string as it was entered in the form.

Any help to resolve this issue is appreciated.

Thanks in Advance.

Regards,

Bhushan

Accepted Solutions (0)

Answers (2)

Answers (2)

Sandra_Rossi
Active Contributor
0 Kudos

The first thing to do is to determine what hexa value is this # (and then you'd be able to process it by abap).

You can achieve this with the debugger by switching to hexa mode (you'll get something like 0A00).

As each character corresponds to 4 "characters" in hexa mode (in a unicode system), It will be easier to put a "newline" at the beginning of the text so that the 0A00 will be displayed first.

Former Member
0 Kudos

Hi Bhushan,

I was going through your issue, and I feel this is something you can do with scripting. Basically you should read whole string and find the new line character and replace with a space or comma, as per your requirment.

Do like following:

In the exit event of the field select java script and write following code:

var strng = this.rawValue;

strng.replace(/\n/g, " ");

above im reaplcing new line with a space.

I think it should work I have not tested it. Pls update if you test it .

Regards,

Ravi.D