Skip to Content
0
Former Member
Jul 04, 2011 at 12:49 PM

READ_TEXT and trailing spaces

135 Views

Disclaimer: I am not an ABAP programmer, I am a DataStage data migration developer, but I have been given an ABAP program to use to extract long text from SAP. I have a concern about the behaviour of the program.

It declares a text line in a structure:

DATA:   BEGIN OF EX OCCURS 0,
          MATNR(18)        TYPE C,
          TEXTTYPE(4)      TYPE C VALUE 'MATERIAL',
          SEQNO(4)         TYPE N,
          TEXT_TDFORMAT(2) TYPE C,
          TEXT_DETS(132)   TYPE C,

It then calls READ_TEXT and copies the text into this structure one line at a time and then sends it over a CPI-C connection to DataStage.

When I receive the data, every line is padded to 132 characters with spaces.

My concern is, could the lines contain genuine spaces at the end, that are getting lost in among the padding?