Skip to Content
0

MCS10001 changing records are not reflected in table 'S5***'

May 14 at 07:51 AM

28

avatar image
Former Member

Hi, exparts.

I want to use customer (not parvw = 'AG','WE','RE','RG' but 'Z1') as key of LIS table(S5***).

I wrote this code in MCS10001 EXIT_SAPLMCS1_002 ↓

FIELD-SYMBOLS:TYPE table.
FIELD-SYMBOLS:TYPE table.
DATA lv_old_kz VALUE '1'.
DATA lv_new_kz VALUE '2'.
DATA tb_pa LIKE vbpavb OCCURS 0 WITH HEADER LINE.REFRESH tb_pa. 

CLEAR tb_pa.

CASE i_xmcvbap-supkz.

WHEN lv_old_kz .
ASSIGN ('(SAPMV45A)YVBPA[]') TO  ‹Y1›.

IF sy-subrc EQ 0.tb_pa[] =.
READ TABLE tb_pa WITH KEY  parvw = 'Z1'.

IF sy-subrc ne 0.
ASSIGN ('(SAPMV45A)XVBPA[]') TO ‹Y1›.

IF sy-subrc EQ 0.tb_pa[] =.

ENDIF.

ENDIF.

ENDIF.

WHEN lv_new_kz.
ASSIGN ('(SAPMV45A)XVBPA[]') TO ‹Y1›.

IF sy-subrc EQ 0.tb_pa[] =.

ENDIF.

ENDCASE.
....

It go well when record is registared , but when changing value of customer(parvw = 'Z1'), changing value is not reflected in table.

The code I wrote is wrong?

Thanks for your time and reading.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

avatar image
Former Member May 15 at 12:38 AM
0

I solved the problem.

It is because I wrote same code in MCS10001 EXIT_SAPLMCS1_001 that it doesn't go well when changing record.

Thanks for your help.

Share
10 |10000 characters needed characters left characters exceeded
Rajkumar Narasimman May 14 at 10:45 AM
0
"when changing value of customer(parvw = 'Z1'), changing value is not reflected in table.

From the above code, it looks there is no modification code. Even if any change done inside enhancement, you can still check in debugger using WATCH POINT at where the the changes are reverted?

Share
10 |10000 characters needed characters left characters exceeded