2008 Jul 22 8:20 AM
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".
2008 Jul 22 8:29 AM
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
2008 Jul 22 8:32 AM
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.
2008 Jul 22 8:36 AM
Hi,
try this:
DATA: PROG LIKE TEXTPOOL OCCURS 0 WITH HEADER LINE.
READ TEXTPOOL SY-REPID INTO PROG.
Regards, Dieter
2008 Jul 22 8:37 AM
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
2008 Jul 22 8:41 AM
>
> 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.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |