Application Development and Automation 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: 
Read only

modify

Former Member
0 Likes
376

Hi friends,

I am trying to modify the zspf table based on the entries in the table zsmm but it is not modifying . can you Please tell me the reason for this.

The primary key fields of zspf table is werks, npord, nplot.

For ex: my zspf table contains following entries

SS(plant) 1234(npord) 234(nplot) 7654(matnr)

I want to modify the above record to

SS 768 345 7865.

The following code I have written

SELECT SINGLE * FROM zsmm

WHERE zs = '0'.

IF sy-subrc EQ 0.

SELECT SINGLE * FROM zspf

WHERE werks = zsmm-werks

AND npord = zsmm-npord

AND plot = zsmm-nplot.

SELECT SINGLE * FROM zsdf

WHERE werks = zsmm-werks

AND npord = zsmm-npord

AND nplot = zsmm-nplot.

zspf-npord = zsmm-dpord.(IT contains value 768)

zspf-nplot = zsmm-dplot. (it contains 345)

zspf-matnr = zsmm-dmatnr.(it contains 7865)

zspf-prwerks = zsmm-werks. (it contains ss)

Modify zspf.

Thanks for your help.

1 REPLY 1
Read only

Clemenss
Active Contributor
0 Likes
313

Hi Babji,

you can't modify key fields.

Regards,

Clemens