08-18-2007 3:29 PM
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.
08-18-2007 4:26 PM