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: 

issue in printing the QR Code more than 255 character in smartforms

former_member348242
Participant
0 Kudos
2,211

I have reading the E-Invoicing IRN QR CODE text and converting into QR CODE and displaying in the smart-forms.

if i read the QR Code it displays the only 255 character.

4 REPLIES 4

former_member1716
Active Contributor
0 Kudos
1,077

Hello nandeesha,

Refer the OSS note 2245060, the characters are limited to 255 here.

Regards!

prateek_dhawan18
Participant
0 Kudos
1,077

Create a SO10 text with text as <C9>&str1&&str4&&str5&&str6&&str7&&str8&&str9&</> .

C9 - is the character format in smart style which will contain your barcode name.

Also create a paragraph format in smart style as per your requirement to adjust the QR code

We know that in E-Invoicing IRN contain 3 strings which are combined with '.' .try to implement below code in your smartform.

DATA lt_swastrtab TYPE TABLE OF swastrtab.

DATA lw_swastrtab TYPE swastrtab.

*Get your dynamic qr code into gv_qrcode

gv_qrcode = gw_irn-signedqrcode.

CLEAR : str1, str2, str3.

SPLIT gv_qrcode AT '.' INTO : str1 str2 str3.

CONCATENATE str1 '.' INTO str1.CONCATENATE str2 '.' INTO str2.

CALL FUNCTION 'SWA_STRING_SPLIT'

EXPORTING input_string = str2

max_component_length = 255

TABLES

string_components = lt_swastrtab.

IF lt_swastrtab IS NOT INITIAL.

CLEAR lw_swastrtab-str.

LOOP AT lt_swastrtab INTO lw_swastrtab.

CASE sy-tabix.

WHEN '1'.

str4 = lw_swastrtab-str.

WHEN '2'.

str5 = lw_swastrtab-str.

WHEN '3'.

str6 = lw_swastrtab-str.

WHEN '4'.

str7 = lw_swastrtab-str.

ENDCASE.

CLEAR lw_swastrtab-str.

ENDLOOP.

ENDIF.

REFRESH lt_swastrtab.

CALL FUNCTION 'SWA_STRING_SPLIT'

EXPORTING input_string = str3

max_component_length = 255

TABLES

string_components = lt_swastrtab.

IF lt_swastrtab IS NOT INITIAL.

CLEAR lw_swastrtab-str.

LOOP AT lt_swastrtab INTO lw_swastrtab.

CASE sy-tabix.

WHEN '1'.

str8 = lw_swastrtab-str.

WHEN '2'.

str9 = lw_swastrtab-str.

ENDCASE.

CLEAR lw_swastrtab-str.

ENDLOOP.

ENDIF

0 Kudos
1,077

Hello

Prateek Dhawan i create standard text by so10 as you wrote and add there

<QR>&is_data-qrc&&is_data-qrc2&</> (QR is my character formats for QR code)

but when I called smart forms display all string (1 and 2) as string instead of QR code.

Normally when I add text in smart form as QR code the code display correct but I have more than 255 characters and I have to use a another approache.

Do you have any ideas why it's not working for me ?

0 Kudos
1,077

Hi Arkadiusz Czerniej ,

i am not sure whether you created a QR code through SE73 and included the same in your character format QR.

https://answers.sap.com/questions/12986196/dynamic-qr-code-for-e-invoicing-purpose.html?childToView=...

Please go through the above link , you will find my answer in detail which also covers the creation of QR code in Se73