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

could you please sort out this problem

Former Member
0 Likes
980

below is the code please look into that..and i have mention the error also..tell me any possible ways

DATA: BEGIN OF U OCCURS 100, "Text elements

TXT(138) TYPE C,

END OF U.

READ TEXTPOOL R-NAME INTO U LANGUAGE R-LANGUAGE.

DESCRIBE TABLE U LINES I.

CASE I.

WHEN 0.

WHEN OTHERS.

MOVE '????TEXT' TO S-TXT.

APPEND S.

LOOP AT U .

MOVE U-TXT TO S-TXT.

APPEND S.

DELETE U.

ENDLOOP.

ENDCASE.

/***********************

.......The error is as follows**....

Program ZABAPUPL

The line type of "U" must be compatible with one of the types

"TEXTPOOL".

below is the code please look into that..and i have mention the error also..tell me any possible ways

DATA: BEGIN OF U OCCURS 100, "Text elements

TXT(138) TYPE C,

END OF U.

READ TEXTPOOL R-NAME INTO U LANGUAGE R-LANGUAGE.

DESCRIBE TABLE U LINES I.

CASE I.

WHEN 0.

WHEN OTHERS.

MOVE '????TEXT' TO S-TXT.

APPEND S.

LOOP AT U .

MOVE U-TXT TO S-TXT.

APPEND S.

DELETE U.

ENDLOOP.

ENDCASE.

/***********************

.......The error is as follows**....

Program ZABAPUPL

The line type of "U" must be compatible with one of the types

"TEXTPOOL".

5 REPLIES 5
Read only

Former Member
0 Likes
812

Hi,

Make sure that field type of S-txt and U-txt are same.

This could be the reason for error.

Hope this helps!!!

Regards,

Lalit

Read only

matt
Active Contributor
0 Likes
812

Well, just as it says in the error message, you have to define the line type of "U" to be compatible with one of the types "TEXTPOOL".

In your ABAP editor, place your cursor on TEXTPOOL, and press F1. There you will read

"The internal table can have any table type and its row type must correspond to structure TEXTPOOL from the ABAP Dictionary. "

I.e. U must be a table of line type TEXTPOOL.

Read only

Former Member
0 Likes
812

Hi,

try this:

DATA: PROG LIKE TEXTPOOL OCCURS 0 WITH HEADER LINE.

READ TEXTPOOL SY-REPID INTO PROG.

Regards, Dieter

Read only

Former Member
0 Likes
812

check the corrected code

data  i type i.
READ TEXTPOOL sy-repid into U LANGUAGE sy-laNGU.
DESCRIBE TABLE U LINES I.
CASE I.
WHEN 0.
WHEN OTHERS.
MOVE '????TEXT' TO S-TXT.
APPEND S.
LOOP AT U .
MOVE U-TXT TO S-TXT.
APPEND S.
DELETE U.
ENDLOOP.
ENDCASE.

Regards

Vijay Babu Dudla

Read only

matt
Active Contributor
0 Likes
812

>

> check the corrected code

>

>

data  i type i.
> READ TEXTPOOL sy-repid into U LANGUAGE sy-laNGU.
> DESCRIBE TABLE U LINES I.
> CASE I.
> WHEN 0.
> WHEN OTHERS.
> MOVE '????TEXT' TO S-TXT.
> APPEND S.
> LOOP AT U .
> MOVE U-TXT TO S-TXT.
> APPEND S.
> DELETE U.
> ENDLOOP.
> ENDCASE.

>

>

> Regards

> Vijay Babu Dudla

This will not help, as the problem is in the definition of U.