‎2009 Apr 24 10:06 AM
Hi there,
I got a quite basic question.
I want to transfer a text String with differing length to a external tool. Since I don't know how long the String will be, I had to set the number of characters to 30.000. Is there a way to transfer dynamic structures?
Obviously the character typ "String" is not allowed for RFC....
Thanks
Oliver
‎2009 Apr 24 10:16 AM
Hi Oliver,
What you can do is to have a table with a field of say 100 characters.
Since this is a table, you can add more lines when the length increases .
YOu can make use of Function module RKD_WORD_WRAP to convert a big string into a table of shorter strings.
Sample usage of this FM:
CALL FUNCTION 'RKD_WORD_WRAP'
EXPORTING
TEXTLINE = L_TEXT
OUTPUTLEN = 100
* IMPORTING
* OUT_LINE1 =
* OUT_LINE2 =
* OUT_LINE3 =
TABLES
OUT_LINES = OUT_LINES
EXCEPTIONS
OUTPUTLEN_TOO_LARGE = 1
OTHERS = 2
.Then pass this OUTLINES to the RFC tables parameter.
Regards,
Ravi Kanth Talagana
‎2009 Apr 24 10:16 AM
Hi Oliver,
What you can do is to have a table with a field of say 100 characters.
Since this is a table, you can add more lines when the length increases .
YOu can make use of Function module RKD_WORD_WRAP to convert a big string into a table of shorter strings.
Sample usage of this FM:
CALL FUNCTION 'RKD_WORD_WRAP'
EXPORTING
TEXTLINE = L_TEXT
OUTPUTLEN = 100
* IMPORTING
* OUT_LINE1 =
* OUT_LINE2 =
* OUT_LINE3 =
TABLES
OUT_LINES = OUT_LINES
EXCEPTIONS
OUTPUTLEN_TOO_LARGE = 1
OTHERS = 2
.Then pass this OUTLINES to the RFC tables parameter.
Regards,
Ravi Kanth Talagana
‎2009 Apr 24 10:30 AM
Unfortunatellty the structure I have to transfer is a table :(.. so I have different rows containing strings...
‎2009 Apr 24 10:58 AM
Hi,
How about delimiting the set of lines belonging to one string from another set using a string of
'----
' (100 hyphens)
assume that you have a table of strings say it_strings
loop at it_strings.
CALL FUNCTION 'RKD_WORD_WRAP'
EXPORTING
TEXTLINE = IT_STRINGS-STRING
OUTPUTLEN = 100
* IMPORTING
* OUT_LINE1 =
* OUT_LINE2 =
* OUT_LINE3 =
TABLES
OUT_LINES = OUT_LINES
EXCEPTIONS
OUTPUTLEN_TOO_LARGE = 1
OTHERS = 2
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
append lines of out_lines to it_final.
it_final-data = '---------------------------------------'.
append it_final.
clear it_final.
endloop.Regards,
Ravi Kanth Talagana
‎2009 Apr 24 1:13 PM