Application Development 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: 

function module READ_TEXT not showing values

0 Kudos

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

10 REPLIES 10

Former Member
0 Kudos

Hi,

Can u paste ur code

Rgds

Siva

Former Member
0 Kudos

hello amit ,

first check with direct se37 if it will give you the values then problm in your code .

i hope you understand.

vanu.

0 Kudos

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.

Former Member
0 Kudos

Hi,

you use function module CREATE_TEXT, to upload long text.

Regards,

Tutun

Former Member
0 Kudos

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

0 Kudos

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

0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

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