Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

MM_MATBEL archiving

Former Member
0 Kudos

Dear Experts,

    I have a requirement to archive MKPF, MSEG tables. After running the write program, the log is displaying the document numbers that are archived. But some documents are missing. It is not showing any error messages. What might be the reson for it? Im not clear about the requirement to archive MKPF, MSEG. Please help me out.

Thanks in advance.

Regards,

Shanthi

1 ACCEPTED SOLUTION

Former Member

Hi Shanti,

Check the following points below.

  1. document type of material document should be exists in t158v table. In other wors

  MKPF-VGART = T158V-VGART AND T18V-XMKPF NE SPACE

  1. Archiving of material documents, should be exists on posting date. Check the document life in days in T159R table. The days should be

 

  maxday = sy-datlo - t159r_tab-bllfz.

  1. Check the select statement.

programL RM07MARCS

  FORM select_data_using_mkpf.

SELECT * FROM mkpf WHERE mblnr IN s_mblnr

AND   mjahr IN s_mjahr

AND   budat IN s_budat

AND   budat LE maxday

AND   (dyn_sql).

  1. Finally debug the material document which is not archived.

Rg, Kiran

7 REPLIES 7

Former Member

Hi Shanti,

Check the following points below.

  1. document type of material document should be exists in t158v table. In other wors

  MKPF-VGART = T158V-VGART AND T18V-XMKPF NE SPACE

  1. Archiving of material documents, should be exists on posting date. Check the document life in days in T159R table. The days should be

 

  maxday = sy-datlo - t159r_tab-bllfz.

  1. Check the select statement.

programL RM07MARCS

  FORM select_data_using_mkpf.

SELECT * FROM mkpf WHERE mblnr IN s_mblnr

AND   mjahr IN s_mjahr

AND   budat IN s_budat

AND   budat LE maxday

AND   (dyn_sql).

  1. Finally debug the material document which is not archived.

Rg, Kiran

0 Kudos

Hi Kiran,

   Even the document numbers which satisfied the listed conditions are not archived. One of the numbers has document type as "WA" which has got 200 days document life and its posting date is "03.07.2011". Still it is not archived. "WA" exists in t158v table and XMKPF = 'X' for it

     Does it depend on movement type/site/storage location/storage type?

Regards,

Shanthi

0 Kudos

Can you please post your write program spool output so that from that i can help you out, and also please check which option have you selected while you are archiving the MM_MATBEL in the write program screen for the detail log option 'I guess you have selected without success message'.


0 Kudos

Sorry i didnt check the document life in T159R with site and document type but checked with just document type. Now my issue is cleared. Thank you

0 Kudos

Coll Shanthi, for me it is working fine..I am searching  

0 Kudos

Hi,

   Actually site and document type combination has to be taken for document life. But i checked based on only document type. That issue is cleared now. Thank you. But what is POS Documents checkbox for in MM_MATBEL options?

0 Kudos

please refer to the SAP note for POS (Point of sale) archiving using MM_MATBEL

Note 194026 - Advance archiving for POS sale