Skip to Content
0
Former Member
Jul 09, 2013 at 06:01 AM

Delivery header text not changing for last entry after PGI

304 Views

Team,

my requirement is change the header text data through custom screen after PGI . I am creating one by one presuppose I done process for 5 entries fist 4 entries is updating and last entire header text not changing.

for your reference below code I am using .

wa_thead-tdobject = vbbk.

wa_thead-tdname = v_vbeln.

wa_thead-tdid = lrno.

wa_thead-tdspras = sy-langu.

wa_tline-tdformat = '*'.

wa_tline-tdline = wa_del-lrno .

append wa_tline to gt_tline.

CALL FUNCTION 'EDIT_TEXT'

EXPORTING

display = ' '

header = wa_thead

save = 'X'

IMPORTING

newheader = wa_thead

TABLES

lines = it_readtxt1[]

EXCEPTIONS

id = 1

language = 2

linesize = 3

name = 4

object = 5

textformat = 6

communication = 7

OTHERS = 8.

CALL FUNCTION 'SAVE_TEXT'

EXPORTING

client = sy-mandt

HEADER = wa_thead

INSERT = ' '

* SAVEMODE_DIRECT = 'X'

* IMPORTING

* NEWHEADER = wa_thead

TABLES

LINES = gt_tline

EXCEPTIONS

ID = 1

LANGUAGE = 2

NAME = 3

OBJECT = 4

OTHERS = 5.

IF SY-SUBRC <> 0.

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

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

else.

clear: wa_thead.

refresh gt_tline.

ENDIF.

CALL FUNCTION 'COMMIT_TEXT'

EXPORTING

object = wa_thead-tdobject

name = wa_thead-tdname

id = wa_thead-tdid

language = sy-langu

savemode_direct = 'X'.

Regards,

Mohan.