cancel
Showing results for 
Search instead for 
Did you mean: 

Deletion Flag Not Setting Correctly on Header Record

Former Member
0 Kudos
442

Hello All,

I am seeing an issue with deletion flags not getting set.  I have deleted all sort sequences for a class in CG02, and in ESTVA and ESTVP all records show deleted but in the ESTVH table the record still show active.  This is causing an ABAP program we wrote to function incorrectly.  I have tried using the RC1PHDEL and /TDAG/CPR_RC1PHDEL programs but they also do not set the flag.

Does anyone have any idea's short of trying to re-write the ABAP logic to check the values.  I have tried putting data back into the charateristics and re-deleting it, but still does not set the header record deletion flag. 

Accepted Solutions (1)

Accepted Solutions (1)

Mark-Pfister
Active Contributor
0 Kudos

Hi Eric,

ESTVH records only get a deletion flag if the Specification header ESTRH is marked for deletion.

As far as I know there is no other way then adjusting the code in your custom program.

(You could write a Report that sets the deletion Flag on ESTVH but I would not recommend this, as it is a lot riskier and most likely takes more time.)

Kind Regards

Mark

Answers (1)

Answers (1)

dhinsap
Active Participant
0 Kudos

Hi Eric,

Plz check this thread and you might get some hint

Regards

Dhinesh

Former Member
0 Kudos

Thanks Dhinesh,

But I am not trying to delete the whole specification.  Simply data stored in a class on the specification.  If looking in CG02, the data is gone.  But if you look at the header table ESTVH for the class in question, the delete flag is not set.

Eric

christoph_bergemann
Active Contributor
0 Kudos

Dear Eric

any ABAP you have prepared should use if possible e.g:

C1F2_SUBSTANCES_READ

or

C1F2_SUBSTANCES_READ_WITH_REF

or

C1F5_SPECIFICATIONS_READ

for "reading" dara and the corresponding C1F1 and C1F5 function to "write" data. As well check:

BAPI_BUS1077_* functions (check e.g:  )


Only by using these "EHS" standard functions you can "ignore" that ESVTH entries might resist.

In any case: may be RC1SUBREORG might be of interest to you..


If you have scheduled RC1PHDEL e.g. on weekly basis so that "del" flags are added in most cases this is sufficient to ge a stable EHS system. In any case. if you are using e.g. ALE etc. you need to think "twice" how you would like to do set up of your SAP landscape.


Therefore the situation you described:#

"  I have deleted all sort sequences for a class in CG02, and in ESTVA and ESTVP all records show deleted but in the ESTVH table the record still show active."

is no problem in daily business and quite normal.

On top: may be:

RC1_1077_BAPI_EXAMPLE_CHANGE EHS: Example Program Spec.BAPIs (FctGrp. 1077): Change - SAP Report - A...

RC1_1077_BAPI_EXAMPLE_GENERAL EHS: Example Program Spec.BAPIs (FctGrp. 1077): General - SAP Report -...

RC1_1077_BAPI_EXAMPLE_DG EHS: Example Program Spec.BAPIs (FctGrp. 1077): Dangerous Goods Data - SAP ...

RC1_1077_BAPI_EXAMPLE_CHANGE EHS: Example Program Spec.BAPIs (FctGrp. 1077): Change - SAP Report - A...


are good examples provided by SAP how to do the job in EHS.

On the top: if you check the standard output variant you can learn a lot how SAP is reading the data. If you use EHS expert rules sets the same is true for writing the data.

Hope this helps as well.


C.B.

Former Member
0 Kudos

Thanks Christoph,

We are using the BAPI_BUS1077_*  function modules, but these can only handle a certain number of spec's.  That's why we wanted to check to see how many spec's had actual values in them before processing through the BAPI.   I was able to design and code a fix around my issue by checking for values in the characteristics if I found value on the header record.

Best Regards,

Eric