cancel
Showing results for 
Search instead for 
Did you mean: 

Right Justification in File Content Conversion

Former Member
0 Kudos

I have a requirement where the data should be right justified in File content conversion of a Receiver Adapter .

For example  it should be coming as   "      5864"  instead of "5864     ". Please help in completing this requirement.

Accepted Solutions (0)

Answers (1)

Answers (1)

engswee
Active Contributor
0 Kudos

Hi Srinath

AFAIK, there is no setting in FCC to achieve this. You can do this instead in the Message Mapping step by doing a right justify on that target fields.

You can search for plenty of solutions on the internet to perform a right justify and include it in a UDF.

Below is an example of a UDF of execution type single values with single input. It right justifies the String based on a total length of 15. You can change the field length according to your requirement.


return String.format("%15s", input);

Rgds

Eng Swee