Skip to Content

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

Need UDF to concat 4 inputs of variable length

Hi Experts,

I have a requirement where i need to concat 4 fields as an input to get the desired reuslt.

Input1- fix length

Input2 - fix length

Input3- Variable length

Input4- Variable length.

I want the desired output of input3 to be of length 10 and and of input4 to be of length 18.

If the length is less than the desired output it should add spaces in the end.

For eg;





Than utput need to be 330001JPOW      SEMISOFT COAL   

Can you please suggest how to achieve this?

Former Member

Hi Chandrabhan

Check out the last UDF listed in the following article on padding trailing spaces.

UDF Basic Building Block

For concatenation of the 4 values, you can just use the + operator.


Eng Swee

1 View this answer in context
Not what you were looking for? View more on this topic or Ask a question