ABAP losing a space

Hi,
I have an ABAP program (Generate and Execute in our Dev environment) which extracts various columns from a SAP BW DSO.

If the last character in the column is a space the ABAP program ignores it/does not retrieve it.
For example if column 1 contained 'The quick brown fox ’ and column 2 contained ‘jumps over the lazy dog’ when these columns are extracted they become ‘The quick brown fox’ and ‘jumps over the lazy dog’ so when they are concatenated they become
‘The quick brown foxjumps over the lazy dog’.

We have tried removing the “condense temp no-gaps” lines in the ABAP code but this made no difference.

Has anyone encountered this problem and if so, what was the solution? (assuming there was one :lol: )


kilbair :uk: (BOB member since 2012-11-30)

I fear there is no solution for that. Need to think through it and ask around…

Where do you do the concat? Not inside the ABAP dataflow obviously.


Werner Daehn :de: (BOB member since 2004-12-17)

The concat is performed in a (non ABAP) dataflow later on in the job.


kilbair :uk: (BOB member since 2012-11-30)

later on in the SDS job.


kilbair :uk: (BOB member since 2012-11-30)

Hi,

one of our SAP developers kindly supplied a workaround for this problem.
Thought you might like to know what it was :

2 new fields
data: fdpos1 like sy-fdpos.
data: fdpos2 like sy-fdpos.

comment out this line
• sy-fdpos = strlen( ).

new lines
If type1 eq ‘C’.
DESCRIBE field length fdpos1 in character mode.
fdpos2 = strlEN( ).
if fdpos2 lt fdpos1.
sy-fdpos = strlEN( ) + 1.
else.
sy-fdpos = strlEN( ).
endif.
else.
sy-fdpos = strlEN( ).
endif.


kilbair :uk: (BOB member since 2012-11-30)