Application Development and Automation 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: 
Read only

Function Module READ_TEXT short dump

Former Member
0 Likes
1,768

Hi All,

I've created a bespoke long text object so I can save some long text to it. I created it by copying the SAP standard long text object for CATS (timesheets) in SE75. I save to this object using the function module SAVE_TEXT and I read it back using the function module READ_TEXT. I get a short dump during READ_TEXT which says:

"CONNE_IMPORT_WRONG_COMP_TYPE

Error when attempting to IMPORT object "TLINE".

When importing the object "TLINE", the component no. 1 in the dataset has a different type from the corresponding component of the target object in the program "SAPLSTXD ".

The data type is "I" in the dataset, but "C" in the program."

I've looked on OSS (as it's a SAP standard program) but can't find anything. I get no errors when trying to read the standard object CATS only when I try and read my new object, so I'm thinking that I haven't set it up correctly. An entry in table STXH occurs for both objects so I know I have saved some long text in my object.

Can anyone help?

Gill

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,087

Hi,

as the statement suggest

"When importing the object "TLINE", the component no. 1 in the dataset has a different type from the corresponding component of the target object in the program "SAPLSTXD "."

Table Line contains field TDLINE where the value is read and it is CHAR of length 132.

and TDFORMAT of type CHAR2.

error may be due to moving integer value.

-


also check table which ur passing to LINES is with header line ...u can also use LIT_lines[] if no header line.

Message was edited by: Manoj Gupta

4 REPLIES 4
Read only

Former Member
0 Likes
1,088

Hi,

as the statement suggest

"When importing the object "TLINE", the component no. 1 in the dataset has a different type from the corresponding component of the target object in the program "SAPLSTXD "."

Table Line contains field TDLINE where the value is read and it is CHAR of length 132.

and TDFORMAT of type CHAR2.

error may be due to moving integer value.

-


also check table which ur passing to LINES is with header line ...u can also use LIT_lines[] if no header line.

Message was edited by: Manoj Gupta

Read only

Former Member
0 Likes
1,087

Hi,

have you passed the correct parameters to the FM.

try to check the sample...

data: it_lines like tline occurs 0 with header line.
    CALL FUNCTION 'READ_TEXT'
         EXPORTING
              CLIENT                  = SY-MANDT
              ID                      = 'Z056'
              LANGUAGE                = 'E'
              NAME                    = L_NAME
              OBJECT                  = 'VBBP'
         TABLES
              LINES                   = IT_LINES
        EXCEPTIONS
             ID                      = 1
             LANGUAGE                = 2
             NAME                    = 3
             NOT_FOUND               = 4
             OBJECT                  = 5
             REFERENCE_CHECK         = 6
             WRONG_ACCESS_TO_ARCHIVE = 7
             OTHERS                  = 8

i think it is because of it_lines declaration.

Regards

vijay

Read only

0 Likes
1,087

Thanks people, I was passing a table using the incorrect structure and that was causing the error.

It's solved now.

Thanks for your help.

Read only

0 Likes
1,087

Don't forget to close the Thread if your Problem solves.

and Reward Points for helpful answers.

Regards

vijay