Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Padding blanks to a character field and concatenating

Though in ABAP world for a long time...I've always struggled with simple string conversions like this one.

I'm writing an ABAP object that retrieves dfies data of a structure and based on the length of each field, I concatenate the overall values appropriately separated by blanks.

Ex:

Struct1 has

fld1 length 10 "ABAP"

fld2 length 7 "field"

fld3 length 5 "conv"

My output should go into newStr type string this way

"ABAP field conv "

Please let me know the easiest and efficient string functions I can use to get this. Somehow shift left by n places, did not work.

thanks.

Tags:
Not what you were looking for? View more on this topic or Ask a question