06-12-2014 12:51 AM
Hello I need your help, please.
We need to export the long text from materials. This descriptions are in the text tab from ME23N
XXX
YYYY
ZZZZZZZZZ
This field is been Reading with READ_TEXT
I need to export to excell in one cell all text XXXYYYZZZZZZZZZZ
How can I do it??
Regards,
Ada
06-12-2014 4:18 AM
Hi Ada,
FM 'READ_TEXT' will return you a
TABLES
LINES = TD_LINE
so, loop this TD_LINE internal table, and 'CONCATENATE' them to a zstring, i think this is you wanted.
Regards,
Archer
06-12-2014 4:24 AM
Hi Ada Jacobo Dominguez
When u read the long text by Read_text it will converted into Internal table
pass the itab into this FM it will give u as single text string
data : text type string
CALL FUNCTION 'IDMX_DI_TLINE_INTO_STRING'
EXPORTING
it_tline = ITAB[]
IMPORTING
EV_TEXT_STRING = TEXT
06-12-2014 4:48 AM
Hi Ada,
You can proceed with th example provided below:
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT "Client
ID = 'ZG01' "Text ID
LANGUAGE = 'EN' "Language
NAME = TH_INDATA_F01-VBELN_A "Text Name
OBJECT = 'VBBK' "Object
TABLES
LINES = TD_LINE "Returning table for Text as Internal Table
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8.
CALL FUNCTION 'IDMX_DI_TLINE_INTO_STRING'
EXPORTING
it_tline = TD_LINE[] "Returning Table
IMPORTING
EV_TEXT_STRING = TEXT "Text as String, as you wanted
Please validate the same at your end and let us know in case you want any further inputs.
BR/Thanks
Pranav Agrawal