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: 

To retrive line item text

Former Member
0 Kudos

Hi ,

I have a requirment , for a sales order eg 123456 line item 10 , if i double click on the line item 10 , we have options tabs like shipping , billing , conditions , TEXT etc , i am just wondering if i can get the text thts been included under the text box ?? Please let me know the process.

Thanks,

vind.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Vind

Please use FM READ_TEXT to read the long texts. Table STXH should also be useful.

Regards

Arun

5 REPLIES 5

Former Member
0 Kudos

Hi Vind

Please use FM READ_TEXT to read the long texts. Table STXH should also be useful.

Regards

Arun

0 Kudos

Hi Arun ,

Can you be a bit clear how to use the fm ?? any example code pls.

Thanks,

Vind.

Former Member
0 Kudos

Use FM <b>READ_TEXT</b>

and the parameters that need to be specified for dis can be taken from STXL table

If u want to get the text for display in SCRIPTS or SMARTFORMS

then u can use <b>/: INCLUDE</b> stmt in the respective window for script

Hope dis helps..

Reward if it does

0 Kudos

Hi

Take your sales order, go to table STXH and do a search on <your sales order> on field TDNAME see the entries carefully.. this is to confirm that you have passed the right parameters

For example

CLIENT sy-mandt

<b> ID 0001</b>

LANGUAGE EN

NAME <as per the STXH entry> usually concatenation of SO+line item

<b>OBJECT VBBP</b>

Regards

Arun

Message was edited by:

Arun Nair

Former Member
0 Kudos

Hi vind,

follow the following text.

--


for %invoice--

name1 = bdoc.

CALL FUNCTION 'READ_TEXT'

EXPORTING

client = sy-mandt

id = 'Z202'

language = sy-langu

name = name1

object = 'VBBK'

TABLES

lines = l_txt

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.

LOOP AT l_txt.

l_line = l_txt-tdline.

ENDLOOP.

--


for CN/PR NO/DT--

name2 = l_delno.

CALL FUNCTION 'READ_TEXT'

EXPORTING

client = sy-mandt

id = 'Z102'

language = sy-langu

name = name2

object = 'VBBK'

TABLES

lines = l_txt1

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.

LOOP AT l_txt1.

l_line1 = l_txt1-tdline.

ENDLOOP.

--


for CARRIER--

name3 = l_delno.

CALL FUNCTION 'READ_TEXT'

EXPORTING

client = sy-mandt

id = 'Z101'

language = sy-langu

name = name3

object = 'VBBK'

TABLES

lines = l_txt2

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.

LOOP AT l_txt2.

l_line2 = l_txt2-tdline.

ENDLOOP.

if it is usefull pls reward it.

Regards

Srimanta