Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

QRcode with multiple lines

Former Member
0 Likes
8,118

Hello, guys...

I'am making a smartforms with a table and qrcode. This qrcode have the information of each table item and I need to have a line break for each item information. Exemple:

Line;Material;Description

1;MATNR1;MAKTX1

2;MATNR2;MATKX2

3;MATNR3;MATKX3

For this I tried to pass all information in one STRING with CL_ABAP_CHAR_UTILITIES=>CR_LF or NEWLINE to separete lines, but the smartform print "##" and the data is not separeted.

I tried too create a SO10 text, spliting the string and pass to multiple lines

However, only the GV_QRCODE1 was inserted in the qrcode the other fields, even if they have value, aren't inserted.

Does anyone know how to solves this problem?

Regards,

Guilherme

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
6,181

Resolved the issue.

I used '\c013\' to split my string.

Unfortunately smartforms F8 execution didn't recognize the '\' and not show qrcode in preview.

6 REPLIES 6
Read only

Former Member
0 Likes
6,182

Resolved the issue.

I used '\c013\' to split my string.

Unfortunately smartforms F8 execution didn't recognize the '\' and not show qrcode in preview.

Read only

0 Likes
6,181

Dear Guilherme

can you please explain in detail, how did you solve this?

Thank you, Dipesh

Read only

0 Likes
6,181

Dear Dipesh,

For more details you can see sap note 2358186.

In my case, I passed a table to smartform with a STRING field with the concatenated information

In smartforms, I created four STRING variables and put an ABAP code to fill them with the STRING from the qrcode(This size handling exists because smartforms only accepts the maximum size 255 in a variable)

To display on the screen, a text was created in smartforms with reference to a text from SO10

Hope this helps you.

Regards,

Guilherme

Read only

0 Likes
6,181

Dear Guilherme

I am very thankful to you for your quick response. This meant a lot for me.

What I understand is you are using SO10 text to print the QR code. I would like to understand more how you are assigning QR code data to SO10 Text.

I mean, are you assigning <FS_SAIDA>-BARCODE to GV_QRCODE1 and so on?

Thank you, Dipesh


Read only

0 Likes
6,179

Dear Dipesh,

In the Global Definitions I declared GV_QRCODE*

Now I have to fill this variables, so a ABAP point was created before call the qrcode text.

In this point we get as Input Parameter the string with qr code text, I split the string to the 4 variables with the values passing them in the Output Parameters.

If you put the same name in the global definition and in the variables of SO10 smartforms will make the assign automatically.

Regards,

Guilherme

Read only

former_member782991
Discoverer
0 Likes
6,179

Dear Guilherme

I am also facing the same issue last couple of days to print QR code with multiple line

can you help me how did you you solve your case.

For me, let me explain what I am doing

data: lv_ch1(2) type c.
lv_ch1 = CL_ABAP_CHAR_UTILITIES=>CR_LF.
CONCATENATE gv_str1 gv_str2 gv_str3 gv_str4
INTO gv_str5 SEPARATED BY '\c013\'.

This compressed my QR code, I could see final string got separated with separator but individual string is not getting separated by new lines

I will be very grateful to you, Thank you in Advance.

Thank you, Dipesh