Application Development and Automation 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: 
Read only

While archiving MM_EKKO getting error

Former Member
0 Likes
1,033

Hi,

I am archiving the MM_EKKO object,here while archiving in log it is showing 'GR quantity is not same as GI quantity'. How to solve this issue?Can anyone tell me?

Thanks

2 REPLIES 2
Read only

eduardo_hinojosa
Active Contributor
0 Likes
922

Hi

It is related with STO? Please, check note 401318 - Archiving: Additional information

I hope this helps you

Regards

Eduardo

Read only

Former Member
0 Likes
922

Hi Ganesh,

I have seen couple of blogs raised for same issue. Finally found the solution to do it the below way in special cases. Business is also not accurate all the time there is always an in completion of documents available in PRD also . Before doing archiving follow the below steps! You won't get any error at the time of archiving

In other words unachievable data should archive with below steps: ( need to use the direct update statements). Even you can move the program to dev,Qulity,PRD environments also with specific authorization to run the programs.

Finally I have tested it works fine for me.

1.  Set deletion flag for all  incomplete purchase documents

get the data ekko and ekpo into it_ekpo

UPDATE ekpo SET loekz = x_flag
          WHERE ebeln = i_ekpo-ebeln.


2. same mentioned above set the deletion flag for purchase requirsition ( EBAN table)


3. Set the completion status for all invoice/billing docs



SELECT SINGLE * FROM  vbuk
                         WHERE vbeln = i_vbrk-vbeln
                         AND   gbstk IN status new


UPDATE vbuk SET gbstk = p_st_neu ( C)
         WHERE  vbeln = i_vbrk-vbeln


4. set the sales orders also


5. Set the status for deliveries

SELECT SINGLE * FROM  likp
                         WHERE vbeln EQ i_likp-vbeln
                         AND   vkorg EQ space.



UPDATE vbuk SET gbstk = p_st_neu
         WHERE  vbeln = i_likp-vbeln


Even you can directly try in quality by handling the tables directly, it will work!


Finally this is only the way