‎2007 Mar 07 10:55 AM
Hi!
I've get binary data from a sap function module in an internal table in structure DOCS (line length 1024). The next FM needs this data in an internal table in structure SOLISTI1 (line length 255). How do I have to convert these tables?
Thanks for any hints!
Peter
‎2007 Mar 07 10:59 AM
Hi Peter,
You can use the function module
RKD_WORD_WRAP
loop at it_docs.
refresh t_out.
CALL FUNCTION 'RKD_WORD_WRAP'
EXPORTING
textline = it_DOCS-data
DELIMITER = ' '
OUTPUTLEN = 255
TABLES
OUT_LINES = t_out
EXCEPTIONS
OUTPUTLEN_TOO_LARGE = 1
OTHERS = 2
.
append lines of t_out to t_final. "For each loop pass
endloop.
Regards,
Ravi
‎2007 Mar 07 10:59 AM
Hi Peter,
You can use the function module
RKD_WORD_WRAP
loop at it_docs.
refresh t_out.
CALL FUNCTION 'RKD_WORD_WRAP'
EXPORTING
textline = it_DOCS-data
DELIMITER = ' '
OUTPUTLEN = 255
TABLES
OUT_LINES = t_out
EXCEPTIONS
OUTPUTLEN_TOO_LARGE = 1
OTHERS = 2
.
append lines of t_out to t_final. "For each loop pass
endloop.
Regards,
Ravi
‎2007 Mar 07 11:14 AM
Sorry, this does not solve my problem, because the FM delivers 5 rows for each original row. The 5th ist just 4 bytes long and not 255.
Thanks!
Peter
‎2007 Jun 22 3:40 PM
Hi!
I've solved the problem myself by writing a temporary file and reading it with the the new length.
‎2007 Jun 22 3:49 PM
Hi!
I've solved the problem myself by writing a temporary file and reading it with the the new length.