Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to export fields long text to excell

0 Kudos

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

3 REPLIES 3

Former Member
0 Kudos

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


former_member193737
Participant

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

Former Member

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

  • IMPORTING
  •   HEADER                     =

  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