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: 
Read only

Problem with trailing spaces in fixed width layout file

Former Member
0 Likes
568

Hi

We are writing a fixed width layout file using the standard Transfer command in ABAP and we are seeing a problem - when the last field ( character data type ) of the record is blank ( has an initial value ) - the whole layout of the record gets shortened as if the last field value does not exist - this upsets the layout of the fixed width file - and the receiving application that interprets this file - has an issue..

What we do expect is that - the spaces equivalent to the character field length of the last field - gets written as trailing spaces in the record and thus the fixed width layout is maintained.

Seems to be a basic issue - are we missing something here ? Any extra add-ons to the transfer statement to be specified to avoid this issue ?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
483

Hi

I suppose your receiving application feels an character for record end, so u need to place this charater in your string.

U can use the value presents in the attribute of class CL_ABAP_CHAR_UTILITIES, I'm not sure but it could beCL_ABAP_CHAR_UTILITIES=>CR_LF.

Max

2 REPLIES 2
Read only

Former Member
0 Likes
484

Hi

I suppose your receiving application feels an character for record end, so u need to place this charater in your string.

U can use the value presents in the attribute of class CL_ABAP_CHAR_UTILITIES, I'm not sure but it could beCL_ABAP_CHAR_UTILITIES=>CR_LF.

Max

Read only

0 Likes
483

We used the length specification in the transfer ABAP statement and that fixed this issue.