cancel
Showing results for 
Search instead for 
Did you mean: 

MM_MATBEL records not consider for archiving

surya_kiran1
Participant
0 Kudos

HI Experts,

I have done archiving for MM_MATBEL in PRD system.In PRD system 2 records are not considered for archiving...but the same records i can able to archive in QA system.. I compared the both the records in table level(MKPF and MSEG) in both the systems(QA and PRS systems).all fields are same...

I checked below condition also..

MKPF table records it will check corresponding VBFA & VBAK table entries by using MKPF-MBLNR = VBFA-VBELN and if corresponding entries exist then document will archive else” Material document cannot be archived.

Please help me on this issue to resolve.

Best Regards,

Surya KIran.

Accepted Solutions (1)

Accepted Solutions (1)

JL23
Active Contributor
0 Kudos

In which ABAP source is this statement "I checked below condition also.." that you checked ?

Is this statement not available in both systems?

Is the document flow entry different in both systems?

Answers (7)

Answers (7)

JL23
Active Contributor
0 Kudos

I did a test with the same settings as in your selection screen, and I get a spool file from the write job with this info:

Even the joblog shows that 1 document was archived

I even did a test using a wrong material document number and got a job log that tells me that nothing met the selection criteria:

Compared with my screenshots is your program not really working as expected. You have to find out whether it is modified (exit / Badi) or just old and not up-to-date....

Eventually you have to open a call at SAP Support to have them look into your system.

surya_kiran1
Participant
0 Kudos

Hi Jurgen,

Are you certain that the customizing of document life is maintained for the plant in those documents?

Yes...we have maintained the document life to plants for those documents.

Best Regards,

Surya Kiran.

JL23
Active Contributor
0 Kudos

Based on OSS note 591198 - Archiving MM_MATBEL: Standardization your log should have more info.

So I still believe there is a manipulation using the BADI which is described in OSS note 725173 - BAdI for archiving object MM_MATBEL

But even then I would expect a message E04 Material document cannot be archived

Are you certain that the customizing of document life is maintained for the plant in those documents?

surya_kiran1
Participant
0 Kudos

Hi Jurgen,

Many Thanks for your valuable suggestions.

1. Let us first start differently. What is your system? You have tagged this questions with a S4HANA tag, is this right or wrong? In S4HANA is the program RM07MARCS disabled.

Yes...My system is not S4HAANA system.i tagged wrongly..i will change that.

and my question is not related to Open text and related to SAP only.

2. Are you in an Industry solution like IS OIL or Retail, or just standard core ERP?

ERP only.

Please find the attached selection screen shot.

mm-matbel-screenshot3.jpg

Best Regards,

Surya Kiran.

JL23
Active Contributor
0 Kudos

What info does the spool file have after execution? What info is in the job log?

surya_kiran1
Participant
0 Kudos

Hi Jurgen,

Many thanks for your support.

Please find the attachement of job log and spool.

mm-matbel-screenshot4.jpgmm-matbel-screenshot5.jpg

Best Regards,

Surya Kiran.

JL23
Active Contributor
0 Kudos

These screenshots do not help. Screenshots of the selection screen from SARA would be needed as well as from MKPF table with those fields that correspond to the selection screen to allow us to validate.

Let us first start differently. What is your system? You have tagged this questions with a S4HANA tag, is this right or wrong? In S4HANA is the program RM07MARCS disabled.

So I have to assume you are not in S4HANA if you still refer to RM07MARCS. In this case remove the tag. Is your question at all related to the Open Text solution, or don't you have that? If you don't have it then exchange the tag to NW ABAP Data Archiving.
Are you in an Industry solution like IS OIL or Retail, or just standard core ERP?

The main difference in archiving execution between 2 systems which have the same data would be the variants used in the archiving object.

E.g. with a wrong setting you just do test archiving, which means no data is physically archived. Or since the deletion job has its own variants, it could be that you really archived, but executed the deletion with a test variant. The name of the variant does not play any role, it is the setting in the variant. I have seen such intelligent names like "Prod" and in its detail it has the flag for test mode active.

The log of my write job has actually the number of archived objects and so has the log of the deletion run the number of deleted records.

If all went well and just 2 records have not been archived then execute the archiving again explicitly for those 2 documents with a full log which should then be able to tell what happend.

surya_kiran1
Participant
0 Kudos

HI Experts,

Still not resolved my problem...

Please help me on to solve this issue...

Best Regards,

Surya Kiran.

JL23
Active Contributor
0 Kudos

you should provide more info, see the comment that I made 3 days ago, you can't expect a problem solution without providing information. You may need to contact SAP Support if you can't provide the information here.

surya_kiran1
Participant
0 Kudos

Hi Jurgen,

many thanks for your valuable reply.

In which ABAP source is this statement "I checked below condition also.." that you checked ?

In the program level i have checked that condition.

Is this statement not available in both systems?

yes....It is available in both the systems.

Is the document flow entry different in both systems?

Doc entries are same in both the systems.

Best Regards,

Surya KIran.

JL23
Active Contributor
0 Kudos

I wanted the name of the program. Of course I know that one would find the statements at program level.

If the data and program in both system are equal then the result should be equal too.

I am asking about the program name as the material document archiving usually has no dependencies and I suspect it is custom code and I would like to look into this program in my system to be certain before I give an answer.

surya_kiran1
Participant
0 Kudos

Hi Jurgen,

Many thanks for your reply.

Programme name is : RM07MARCS(Standard report only).

If the data and program in both system are equal then the result should be equal too.

yes...I am also thinking the same...

Best Regards,

Surya Kiran.

JL23
Active Contributor
0 Kudos

RM07MARCS has no check on VBFA in my system.

The logic that you explained has no real logic for me after reading it again. You wrote "MKPF table records it will check corresponding VBFA & VBAK table entries by using MKPF-MBLNR = VBFA-VBELN and if corresponding entries exist then document will archive else” Material document cannot be archived."

Most material documents will never have a corresponding entry in VBFA, since they have no relation to a sales documents like a stock transfer from one location to another with 311 or a transfer posting from quality to unrestricted, so they could never be archived based on above logic.

Kindly add a screenshot from the program page where this statement is seen. (context is important too, not just the statement itself)

surya_kiran1
Participant
0 Kudos

Hi Jurgen,

Thanks for providing preply.

That logic is related to functional level not adjusted in programm level (Apology for that what i wrote that is i got from fuctional).

Please find the attached screenshot for PRD log message and QAS and PRD records screenshot.mm-matbel-screenshot.jpgmm-matbel-screenshot2.jpg

Best Regards,

Surya Kiran.