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: 

Purchase Order Description Text

Former Member
0 Kudos

Hi All,

I am trying to display a POD text but it is cutting off, can anyone help to write the purchase order description text. Currently it can only display only 130 characters.

gv_repid = sy-repid.

SELECT SINGLE ebeln INTO i_tab-ebeln FROM ekpo WHERE matnr = i_tab-matnr.

line_id = 'BEST'.

line_name = i_tab-matnr.

line_lang = sy-langu.

line_object = 'MATERIAL'.

CALL FUNCTION 'READ_TEXT'

EXPORTING

id = line_id

language = line_lang

name = line_name

object = line_object

TABLES

lines = i_tabs

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.

ENDIF.

LOOP AT i_tabs.

CONDENSE i_tabs-tdline.

CONCATENATE i_tab-text i_tabs-tdline INTO i_tab-text SEPARATED BY space.

MODIFY i_tab TRANSPORTING text.

ENDLOOP.

Regards,

Fred

4 REPLIES 4

Former Member
0 Kudos

What is the length of i_tab-text ??

Darren

Former Member
0 Kudos

Hello Fred.

As you want to write to the existing one,

You need to Use "SAVE_TEXT" after the Loop-Endloop.

This will append to the existing text and if it has no text then use "insert" option in the Function module itself.

probably, for display how have you done the declarations?

Hope this solves your problem.

If you still have any query give feedback.

Good Luck & Regards.

Harsh Dave

0 Kudos

Hi

This is my code:

FORM reading_text.

Begin of i_tab occurs 0,

text(150) type c

end of i_tab.

gv_repid = sy-repid.

SELECT ebeln INTO i_tab-ebeln FROM ekpo WHERE matnr = i_tab-matnr.

EXIT.

ENDSELECT.

line_id = 'BEST'.

line_name = i_tab-matnr.

line_lang = sy-langu.

line_object = 'MATERIAL'.

ALL FUNCTION 'READ_TEXT'

EXPORTING

id = line_id

language = line_lang

name = line_name

object = line_object

TABLES

lines = i_tabs

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.

ENDIF.

LOOP AT i_tabs.

CONDENSE i_tabs-tdline.

CONCATENATE i_tab-text i_tabs-tdline INTO i_tab-text(150) SEPARATED BY space.

MODIFY i_tab TRANSPORTING text.

ENDLOOP.

CALL FUNCTION 'SAVE_TEXT'

EXPORTING

header = i_tab-text

TABLES

lines = i_tabs.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

It's giving me a dump:call_function_conflict_leng

There are other fields in an internal table.

Regards,

Fred

Edited by: Fred Mogaadile on Sep 26, 2008 6:17 AM

Edited by: Fred Mogaadile on Sep 26, 2008 6:19 AM

0 Kudos

Hi Fred,

The max. length of the line you can read is 132 characters in the tables parameter.Infact it stores only 132 characters for each line when you save the text.

Thanks

Lakshman