‎2019 Jan 03 1:14 PM
Hello Everyone,
I referred to the blog(https://archive.sap.com/discussions/thread/3824600) and implemented this logic and is working fine. But when i scan the QR code, the last spaces of the fields are getting truncated.
e.g. <QR>&FIELD1&&FIELD2&</> Both these are String variables
FIeld 1 --> "000001TEXT1 000002TEXT12 ......000025TEXT25 "
Field 2 --> "000001TEXT1 000002TEXT12 ......000025TEXT25 "
I have some spaces after the TEXT25 say e.g. 2 spaces. These are getting truncated when I use the above mentioned technique. Is there a way i could get those spaces too.
Current Result --"000001TEXT1 000002TEXT12 ......000025TEXT25000001TEXT1 000002TEXT12 ......000025TEXT25"
Expected Result --"000001TEXT1 000002TEXT12 ......000025TEXT25 000001TEXT1 000002TEXT12 ......000025TEXT25 "
My QR code is a fixed position ones so all the positions matter in this case.
Request you to let me know if there is a way to respect the spaces
Regards,
Murthy
‎2019 Jan 04 4:48 AM
Hi,
How about adding suffix character like | then you can remove it later after scanning barcode?
Field 1 --> "000001TEXT1 000002TEXT12 ......000025TEXT25 |"
Hope this help,
Nam
‎2019 Jan 04 5:03 AM
hi Nam Le Huynh,
Thanks for your response.
I tried similar options. Customers generally have separate barcode scanning software which automatically reads the data based on the positions. So they have to change the properties/software at their end which is unlikely an option for us.
Same is the case with normal reports where system will ignore/do not consider the SPACE, which is at the end of a string even after using RESPECTING BLANKS.
Thanks in advance.
‎2019 Jan 04 6:36 AM
How about concatenate two variables into one with RESPECTING BLANKS and print the result instead?
(suppose field1 has desired length)
ex
CONCATENATE field1 field2 INTO field3 RESPECTING BLANKS.
The last space of field3 maybe not print but I think it is not neccessary in that case. You can still get correct result of field1 and field2 after scanning
‎2019 Jan 04 12:10 PM
Hi Nam Le Huynh,
Thanks for your suggestion.
As the QR Code has fixed positions, the last field(in this case character field) in FIELD2 if contains any spaces will be ignored. this is the problem.
I have QR Code which will have a length of more than 2000 Characters. As Scripts/Smartforms donot support this length, I am splitting in to multiple strings and passing it through standard text as mentioned in the above referred blog. I am getting all the values but some of their positions are altered. Reason being the last spaces in the field are ignore as mentioned in the above example.