Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

History in CDPOS

$
0
0

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


Viewing all articles
Browse latest Browse all 8332

Trending Articles