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: 

BAPI or function module for PO hesder text

Former Member
0 Kudos

Hi All.

Is there any function module or BAPI by which we can insert or update the PO header text?

Thanks

3 REPLIES 3

Former Member
0 Kudos

ther is no BAPI for PO header text

you can use fuction module SAVE_TEXT to save the po header text.

Former Member
0 Kudos

Hi,

Check the following code

select * into corresponding fields of table itab_stxh from stxh where

tdname = po.

loop at itab_stxh.

CALL FUNCTION 'READ_TEXT'

EXPORTING

CLIENT = SY-MANDT

id = itab_stxh-tdid

language = sy-langu

name = itab_stxh-tdname

object = itab_stxh-tdobject

ARCHIVE_HANDLE = 0

LOCAL_CAT = ' '

IMPORTING

HEADER =

tables

lines = wa_text

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 wa_text.

MOVE wa_TEXT-TDLINE TO IT_text-TDLINE .

move itab_stxh-tdid to it_text-tdid.

APPEND IT_text .

endloop.

break-point.

write : / itab_stxh-tdid, itab_stxh-tdobject.

endloop.

loop at it_text.

write : / it_text-tdid, it_text-tdline.

endloop.

Regards,

Balaji.

christine_evans
Active Contributor
0 Kudos

BAPI_PO_CHANGE. Look at import table POTEXTHEADER.