Skip to Content
avatar image
Former Member

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

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

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

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • May 14 at 10:45 AM
    "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?

    Add comment
    10|10000 characters needed characters exceeded