Skip to Content
0
Former Member
Apr 11, 2014 at 10:03 AM

Problem with downloading Payment Runs through transaction FDTA - Trailing Spaces

60 Views

The code that I've written passes data to TEMSE_SCHREIBEN and the file is then downloaded using transaction FDTA.

You can't pass a variable string to TEMSE_SCHREIBEN, it has to be CHAR(255). As a result we have trailing spaces after our data. This has become a huge problem as no-one has been able to come up with a solution. Originally I thought I could modify the buffer table itself to replace all hex 0020s with 0000. Unfortunately it seems that the trailing spaces are all stored as 0000 (Null) and that for some reason they're converted when downloaded. Currently the code I've been attempting to use does the following.

LOOP AT itab_string. CALL FUNCTION 'SRET_TEXT_TO_BINARY' EXPORTING TEXT = itab_string-file_data LAISO = '00' IMPORTING XBUFFER = c_string.

REPLACE ALL OCCURRENCES OF c_space IN c_string WITH c_null IN BYTE MODE.

CALL FUNCTION 'SRET_BINARY_TO_TEXT' EXPORTING XBUFFER = c_string LAISO = '00' IMPORTING TEXTBUFFER = itab_string-file_data.

PERFORM temse_schreiben USING itab_string. ENDLOOP.

This of course, is not working because the trailing hex is already 0000. Any ideas?