Hi all,
I am facing a problem :
I want to know, for a special VBAP (left say, p_vbeln – p_posnr) what was the last value of its material (MATNR)
I say ‘last value' because VBAP-MATNR can be changed.
When VBAP has not been deleted
I can read VBAP and the answer is VBAP-MATNR.
If the material has been changed at least once BUT VBAP has been deleted.
I have to select CDPOS with
Tabkey = “p_vbeln p_posnr” / CHGNID = ‘U’ / FNAME = ‘MATNR’
Then sort CDPOS by CHANGENR
Get the last CDPOS
My answer is CDPOS-VALUE_NEW
If the material has never been changed and if VBAP is deleted : I'm stuck !
- Is there a way to retrieve the MATNR that had been put on this VBAP ?
- Is there a way to log, in CDPOS, the value of MATNR when VBAP is deleted ?
(And not only FNAME = 'VBAP' - CHNGID = 'D' VALUE_NEW = '' VALUE_OLD= '' which is really useless...)
Thanks for any idea….
JC