09-09-2009 6:43 AM
Hi All,
in transaction IW33, the components long text is not being captured by the function module ,when that text have been once saved and again edited and saved .
the probelm also persists when the text is too small .kindly suggest what could be the cause of error .
for other scenarios the function module is showing values .
Thanks in Advance.
amit
09-09-2009 6:47 AM
09-09-2009 7:18 AM
hello amit ,
first check with direct se37 if it will give you the values then problm in your code .
i hope you understand.
vanu.
09-10-2009 1:59 PM
Hi,
In the SE37 also, the function module is not showing the values.but in iw33 the component consist of long text.
even the code is working proper when the function module displays the text.
Thanks,
Amit.
09-10-2009 2:09 PM
Hi,
you use function module CREATE_TEXT, to upload long text.
Regards,
Tutun
09-10-2009 2:20 PM
Hi Amit,
check entry in table STXH with your input directly .
if it shows value then it should read by FM READ_TEXT.
Feel free to ask if you have any doubts.
Regards,
Vijay
09-16-2009 6:39 AM
Hi,
thanks 4 ur replies.
I have tried what all have been suggested from u all. but the problem persists .when the text is small ,it is not displayed and if the text length is increased then the same is being read properly.
Kindly suggest.
Thanks
amit
09-16-2009 6:45 AM
Hi Amit again,
I am surprised with your issue.
I will again suggest that.
after passing all required values to Fm Read_text, check Sy-subrc.
if sy-subrc = 0.
then there must be some text.
go to return table tline.
check the table.
Regards,
Vijay
09-16-2009 7:17 AM
Hi Amit,
The problem is with the READ_TEXT.
If your long text is just one line and it is less than 41 characters , the READ_TEXT cannot read that as longtext, instead it
will consider as SHORT TEXT thus it wiill never retrieve the long text.
Hope this will help you.
Regards,
Smart Varghese
09-16-2009 7:34 AM
handle read_text like this
PARAMETERS:P_VBELN1 LIKE THEAD-TDNAME,
LANGU LIKE THEAD-TDSPRAS,
ID LIKE THEAD-TDID,
OBJECT LIKE THEAD-TDOBJECT.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = ID
LANGUAGE = LANGU
NAME = P_VBELN1
OBJECT = OBJECT
ARCHIVE_HANDLE = 0
LOCAL_CAT = ' '
IMPORTING
HEADER =
TABLES
LINES = LINE1
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 <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
09-16-2009 10:22 AM
Hi,
Use conversion exit for name in function module, conver this name value in to upper case.
check this sample program,
it works for long text less than 40 characters also.
pass name1 in to conversion exit
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = NAME1
IMPORTING
OUTPUT = NAME1.
TRANSLATE NAME1 TO UPPER CASE.
CALL FUNCTION 'READ_TEXT'
EXPORTING
ID = ID
LANGUAGE = LANGUAGE
NAME = NAME1
OBJECT = OBJECT
TABLES
LINES = LI_LINE
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 = 0.
LOOP AT LI_LINE.
GI_FINAL-SO_TEXT = LI_LINE-TDLINE.
MOVE:GI_MVKE-MATNR TO GI_FINAL-MATNR,
GI_MVKE-VKORG TO GI_FINAL-VKORG,
GI_MVKE-VTWEG TO GI_FINAL-VTWEG.
APPEND GI_FINAL.
CLEAR GI_FINAL.
ENDLOOP.
ENDIF.
Edited by: siva prasad on Sep 16, 2009 11:23 AM