Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Sales Text Display

Hi

i displayed the Sales text for one sales order and im struck at displaying all sales order texts

TABLES:VBAK.

SELECT-OPTIONS : S_VBELN FOR VBAK-VBELN.

DATA: BEGIN OF ITAB_VBAP OCCURS 0,

VBELN LIKE VBAP-VBELN,

POSNR LIKE VBAP-POSNR,

ARKTX LIKE VBAP-ARKTX,

END OF ITAB_VBAP.

data : itab type table of TLINE with header line.

*data : v_name type THEAD-TDNAME.

*data : v_id type THEAD-TDID.

*data : v_object type THEAD-TDOBJECT.

*v_name = '0000004969000010'.

*v_id = '0001'.

*v_object = 'VBBP'.

SELECT VBELN POSNR ARKTX FROM VBAP INTO TABLE ITAB_VBAP WHERE VBELN IN S_VBELN.

LOOP AT ITAB_VBAP.

WRITE: / ITAB_VBAP-VBELN,ITAB_VBAP-POSNR,ITAB_VBAP-ARKTX.

ENDLOOP.

CALL FUNCTION 'READ_TEXT'

EXPORTING

CLIENT = SY-MANDT

ID = '0001'

LANGUAGE = sy-langu

NAME = '0005000134000010'

OBJECT = 'VBBP'

  • ARCHIVE_HANDLE = 0

  • LOCAL_CAT = ' '

  • IMPORTING

  • HEADER =

TABLES

LINES = itab

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.

IF sy-subrc EQ 0.

loop at itab.

write: / itab.

endloop.

ELSE.

WRITE:/ 'Sy-Subrc = ', sy-subrc.

ENDIF

Tags:
Not what you were looking for? View more on this topic or Ask a question