cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with archiving MM_MATBEL

Former Member
0 Kudos

Hello everyone,

We are in the process of archiving MM_MATBEL. We have made all the initial settings for the Archival process, but when we run the archive session, the job finishes and says, ' no data available'. We can able to see the data in transaction code MB51.

For the Write job variant, we have mentioned only the posting period.

Is there anything else to be performed before archiving MM_MATBEL?

Kindly clarify,

Thanks,

Regards,

Irfan

Accepted Solutions (0)

Answers (4)

Answers (4)

0 Kudos

My next step would be to run the archive program with a small sample set of data and set a breakpoint at the SELECT statement from MKPF and evaluate the dynamic WHERE clause that was built.

There are also 2 BADIs that are used in the program:

ARC_MM_MATBEL_CHECK - This BADI allows you to program custom archiability

Check if this was previously implemented and if anything was coded there.

There is another BADI used ARC_MM_MATBEL_WRITE which allows custom information to be written to the archive file.  I do not think that any code that may exist here will be causing documents to NOT be archived.

Hope this helps.

Mike Arnold

Former Member
0 Kudos

HI everyone,

I  applied this note 1529166 and then executed the archive job for the period 2010 to 2011.

Now the job says 22 material documents were found and a spool is generated. But how in that year it has only 22 documents?

Regards,

Irfan

JL23
Active Contributor
0 Kudos

Make an analysis either with SE16 or with TAANA and find out how many records you have per period.

the period is the financial period, which can be different from calendar year, depending on the setup of fiscal year variants.

E.g. look at the data in SE16 for table MMKPF for your period 2011 and see if the posting date is in the same year

Former Member
0 Kudos

Hi Irfan,

It can be the scenario wherein only 22 documents amongs ALL are archivable (fullfilling the necessary criteria to get archived).

Please analyze in this angle for specific period you have chosen in selection criteria.

Hope it helps!!

Former Member
0 Kudos

please check number of entries in the table MKPF for the archiving period and if you dont find any records then all got archived or if you have some records than see the material doc year for the records some time it would be in the difference between fiscal year and calender year.

0 Kudos

Did you maintain the config table for this archiving object?

This allows you to set document life by plant/transaction type.

Please review tcode OMB9.

Former Member
0 Kudos

@manjunath : No i have performed archiving for other objects and seems no problem with this user id

@Siew: The retention period for the Material documents is 2 years (i.e.need to keep last 2 years of data in the system)

@Michael : Yes i did maintain the config table. In OMB9, doc life for all in 200.

@Jurgen : For Doc life, maintained Tx types WA,WE,WH,WI,WL,WO,WQ,WR,WZ for all plants.

Thanks,

Regards,

Irfan

colin_cheong
Contributor
0 Kudos

Hi,

Can you tell me what's the retention period of your article document that you are trying to archive?

bye

former_member183424
Active Contributor
0 Kudos

I have checked the MM_MATBEL..

My archiving is okay.

Just I have noticed that.

Suppose I have done a GR for 100 pcs for material A in plant ZZ and sloc XX

If the material stock is exist for 100 pcs, it will not archived..

Can you check the job log

JL23
Active Contributor
0 Kudos

for MM_MATBEL SAP will not check any dependency, it does not matter if you have stock.

Please tell in which job you get the message ' no data available' . Is it in the write job, or in the delete job?

Maybe the selection criteria does not fit the data or is in conflict with the residence time.

What does the spool file for the job tell you?

Former Member
0 Kudos

Its the write job which says 'No data was found for specified selection' and no spool generated.

Thanks,

Regards,

Irfan

JL23
Active Contributor
0 Kudos

what fields and values  have you used in the selection screen?

Are you certain that the residence times for each combination of plant and transaction type is defined? check in SARA. Enter MM_MATBEL, click customizing, then check the document residence times

Former Member
0 Kudos

1. Have maintained document life to be 200 for all plants and transaction type combination

2. MM_MATBEL Write job, Variant screen below,

3. Variant attribute screen

Thanks,

Regards,

Irfan

JL23
Active Contributor
0 Kudos

Please specify a material document year and switch the detail log from "no log" to something meaningful. If you are satisfied with your tests, then you may switch off the log, but how can you do a test without wanting to check the log?

Former Member
0 Kudos

Its the same after specifying material document year.

I have switched to  'complete' under log and saved it.

After the job is completed, i checked the log but it says, 'No log was generated' 

Regards,

Irfan

JL23
Active Contributor
0 Kudos

the message is talking about a log, if you left the field below the complete log as LIST, then you have to check the spool file, not the log.

Just do SM37, find your jjob and see if it has an icon for spool file, if yes, then select the job and click the spool file button

you get then a list like this:

Message was edited by: Jürgen L

Former Member
0 Kudos

Yes, but i don't find any spool generated for that job in SM37.

Regards,

Irfan

JL23
Active Contributor
0 Kudos

That is very unusual, you should even get a list if not a single document gets archived.

Try it the other way, leave all selection fields empty, just enter one material document number  where you are certain that this should be archived.

Are you in a special industry solution?

What is your release?

Former Member
0 Kudos

Even if i try with a particular material document number its the same.

The system is ECC 6 EHP4.

Thanks,

Regards,

Irfan

JL23
Active Contributor
0 Kudos

I think there is not much left what we can do with the discussion here in SCN.

My system works normal, the screen shot from above was from some years ago, but I just did a test run for a single document and I got the expected spool file.

If you dont get the spool file then I recommend to open a ticket at service.sap.com/notes

The spool file is expected to explain why no documents could be found. Once you get the spool then we can further discuss

Former Member
0 Kudos

Is this your first archiving activity ..?

My be authorization issue for spool , please check the SU53 dump and try to run the

same variant with different user login.

JL23
Active Contributor
0 Kudos

this last answer was probably to quick. I just did another test and entered "FAKE" as material document number in the selection screen. And in turn SAP did not create any spool file and I have the same error in the job log like you.

And the same situation (no spool) happens if I add a current material document number which is inside the defined residence time

Please tell what settings you have for residence time