Application Development and Automation 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: 
Read only

Read material sales text

Former Member
0 Likes
1,536

Hi,

We need to retrieve Material Sales Text for thousands of materials.We are using the function module READ_TEXT to retrieve text one material at a time.Is there any best possible way of handling this? like retrieving sales text for bunch of materials at a time rather than one at a time.

Hi,

We need to retrieve Material Sales Text for thousands of materials.We are using the function module READ_TEXT to retrieve text one material at a time.Is there any best possible way of handling this? like retrieving sales text for bunch of materials at a time rather than one at a time.

2 REPLIES 2
Read only

Former Member
0 Likes
648

Refer to table STXH & STXL. Don't know on the area of performance how this will work.

Regards

Vinod

Read only

Former Member
0 Likes
648

Hai

variable "id1" contains Document No , Check With other Id No , and your material table

CALL FUNCTION 'READ_TEXT'

EXPORTING

  • CLIENT = SY-MANDT

id = '0014'

language = sy-langu

name = id1

object = 'VBBK'

  • ARCHIVE_HANDLE = 0

  • LOCAL_CAT = ' '

  • IMPORTING

  • HEADER =

TABLES

lines = itab_w

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 itab_w INTO g_text3.

nu = nu + 1 .

IF nu = 1 .

MOVE : g_text3 TO g_text4 .

ENDIF .

APPEND g_text3 .

*clear g_text4 .

ENDLOOP.

Regards

Sarath P G