on 09-29-2007 12:10 PM
Dear firends,
I have written following code in sapscrit to fetch the longtext of the material
INCLUDE &MARA-MATNR(K)& OBJECT MATERIAL ID GURN LANGUAGE &NAST-SPRAS&
Test name - material no(MARA-MATNR)
object - MATERIAL
text id - GURN
LANGUAGE - EN
but i am not table read the longtext by using above code, when i see in debug mode ,i am getting warning message
"data is not available for materil 0000013,GURN,MATERIAL" like that.
i don't find any problem in code , long text also availble for material 0000013.
i don't where is the problem , please give me solve this issue.
Regards,
D.prabhu
Pass all the values between single quotes..i.e.
INCLUDE &MARA-MATNR(K)& OBJECT 'MATERIAL' ID 'GURN' LANGUAGE &NAST-SPRAS&
and check dat whether text exists for these parameters..
Check the Table STXL with these parameters..
or jus for debugginf sake run the FM READ_TEXT in SE37..
pass these same parametrs 2 it and check the result..if text exists
or whether the parameters are passed correctly
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you cannot display long text directly, for reading long text use function module "READ_TEXT"
Regards,
Sairam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
You have to fetch this Long text of this Material using READ_TEXT fun module by passing the 4 parameters as mentioned by you by writing some code in the program or by writing the external subroutine using PERFORM statement
Only Application HEADER and ITEM texts can be included in script using the INCLUDE command
So write the code for the Read _Text fun module and fetch it into Internal table lines and pass/print those to script
pass the same 4 parameters
Test name - material no(MARA-MATNR)
object - MATERIAL
text id - GURN
LANGUAGE - EN
see the sample code
data:begin of it_stxh occurs 0,
tdobject type tdobject,
tdname type tdobname,
tdid type tdid,
tdspras type spras,
end of it_stxh.
types:begin of ty_lines.
include structure tline.
types:end of ty_lines.
data:it_lines type standard table of ty_lines with header line.
it_stxh-tdid = 'GRUN'.
it_stxh-tdspras = 'E'.
it_stxh-tdobject = itab-matnr.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = it_stxh-tdid
LANGUAGE = it_stxh-tdspras
NAME = it_stxh-tdname
OBJECT = it_stxh-tdobject
ARCHIVE_HANDLE = 0
LOCAL_CAT = ' '
IMPORTING
HEADER =
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
.
IF SY-SUBRC eq 0.
loop at it_lines.
< Print these lines in script by passing to script>
endloop.
ENDIF.
Regards
Anji
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.