cancel
Showing results for 
Search instead for 
Did you mean: 

Inconsistencies BALHDR / BALDAT (?)

harald_leissl
Explorer
0 Kudos

Hello experts,

before opening an OSS-note I wanted to ask here, maybe someone has similar experiences. I found a lot of similar discussions, but most of it were about data volume, not about quantity of ABAP-table-entries.

We use Report SBAL_DELETE to reduce entries in tables BALHDR and BALDAT daily. If my understanding is correct the link between both tables is done by field LOG_HANDLE. When using the report we can see that the number of entries in the tables are decreasing. I checked this, selected logs were deleted in both tables BALHDR and BALDAT.

But it seems there is a big gap between both tables, in our System we have 13608 entries in BALHDR and 105.642.247 entries in BALDAT. So I made some Analysis on the base of linking LOG_HANDLE-field. I found out that a lot of LOG_HANDLE's in BALDAT are NOT in BALHDR. For my understanding this shouldn't be... am I right? I just found 1 hint in scn wiki:

     LOG_HANDLE record in BALDAT and BALHDR tables. - ABAP Development - SCN Wiki

Or can there be processes (especially in SCM-System) where BALDAT entries exist without linked BALHDR data?

If this is really a problem...

1. Is my suggestion correct that report SBAL_DELETE can't handle BALDAT if BALHDR is missing for the same log?

2. Did someone have a similar Situation? Or does someone have an idea how this can happen (we don't use any Z-reports related to log-creation / deletion)?

3. Does someone have an idea to solve it (except of opening OSS note )? Is there maybe a report to clear such entries?

Many thanks in advance!

Best regards

Harald

Accepted Solutions (1)

Accepted Solutions (1)

harald_leissl
Explorer
0 Kudos

Hello Thanga,

found the solution... don't ask me why I didn't find the support note 2057897 at 1st view... this is exactly my problem and the solution. And it fits to our patch-lvl.

Attached report "SBAL_DELETE_ORPHAN_MESSAGES" of the support message seems to work as described, it deletes orphan entries of BALDAT.

Sorry for circumstances and thx again. Hope this helps others with similar problem (seems it is for all SAP systems using BALDAT, not only SCM-system!!!)

Best regards

Harald

thanga_prakash
Active Contributor
0 Kudos

Hello Harald,

That's good news.

Thanks for updating the solution in the thread.

Cheers!!!!

Regards,

Thanga

Answers (2)

Answers (2)

thanga_prakash
Active Contributor
0 Kudos

Dear Harald,

You are right, SBAL_DELETE can't handle can't handle BALDAT if BALHDR is missing for the same log.

Check the note 1436329 - Application log, parallel deletion, and performance  with the help of this note you can run the deletion in parallel with improved performance.

About deleting the data from BALDAT for which there is no data in BALHDR, one suggestion is via program, Do a check on BALDAT table, check does it has entry in BALHDR table if not delete it from BALDAT table. As I checked so far there is no program to correct this discrepancy between BALDAT with BALHDR table.

Regards,

Thanga

harald_leissl
Explorer
0 Kudos

Hello Thanga,

thx again for spending your time.

I checked note 1436329 already before, didn't help me.

Same for archiving, it doesn't archive such "inconsistent" BALDAT-entries.

I was afraid of getting the answer to program a deletion program for 2 reasons:

1. We talk about over 100.000.000 entries in BALDAT in a productive system, so there can't be manual check of deleted entries. I would have to trust that deletion is correct. And in productive area it sounds a little bit... dangerous.

2. It is a standard table from SAP, and (for my opinion) we didn't affect it with self-developed coding. So it would be interesting why there is such waste in the table.

I will open OSS to SAP and will give you feedback. Please understand that I want to have this discussion "open" until feedback from SAP. If SAP has similar solution (just to delete) I will mark your answer as correct. If SAP provides another solution I will write it down in the discussion to have a solution for others (if someone has similar problem). Hope this is ok for you.

Regards

harald


thanga_prakash
Active Contributor
0 Kudos

Hello Harald,

I am absolutely ok with your option.

Kindly update the thread as soon as you got a reply from SAP.

Regards,

Thanga

thanga_prakash
Active Contributor
0 Kudos

Hello Harald,

Try with program RSSLG200.

Regards,

Thanga

harald_leissl
Explorer
0 Kudos

Hello Thanga,

thx for fast reponse!

Checked the mentioned program, in the properties of the program there is mentioned that I should use Transaction SLG2 (the program SBAL_DELETE which I used before). Can it be that this program is outdated? Sorry for not mentioning version of SCM we are using... We use SCM 7.0.

Nethertheless I tested it in testing area, program still works but has no positive effect to our situation.

If you have some more ideas feel free to let me know

Thanks!

Regards

Harald

thanga_prakash
Active Contributor
0 Kudos

Hello Harald,

Yes, the program might be outdated.

If your motive is to clear those tables then have you tried Archiving it using program SBAL_ARCHIVE.

Read the documentation of the program it is clearly mentioned how to use the program.

Regards,

Thanga