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: 

BAPI_GOODSMVT_CREATE, How to override SAP's calculation of the Expiration Date?

Former Member
0 Kudos

Hi ,

We have same issue as mentioned in the other post by Ying. ( ) But unfortunately the solution had not shared by anyone in the post.

we are using BAPI_GOODSMVT_CREATE to create Goods Receipts for production order (T-code MB31).

I'm successful to use this bapi to create Goods Receipts, but there is 1 problem for me, the bapi not able to override the SAP calculation of the expiration date.

Let's say in MARA table, the material having a Total Shelf Life (MARA-MHDHB) of '100' and Shelf-Life Period Indicator (MARA-IPRKZ) 'D'.

But my requirement is I have to input a Production Date '03/30/2013' and an Expiration Date '09/30/2013' into BAPI_GOODSMVT_CREATE to create the record.

Expected Result:

Production Date = 03/30/2013

Expiration Date = 09/30/2013

Actual Result created by using BAPI_GOODSMVT_CREATE:

Production Date = 03/30/2013

Expiration Date = 07/082013 (Reason to get this: SAP get the Total Shelf Life 100days from the material and add to Production Date)

My Main Question: Is there anyway to skip the SAP calculate the Expiration Date for BAPI_GOODSMVT_CREATE?

Picture below is how I skip SAP calculate the Expiration Date by select 'No'. But I not sure how the bapi capture this action

So could you please help me on this ?

Thank you.

Regards,

Ch.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi ,

I found the solution my self . Thank you .

Implemented the badi VB_SLED_MANAGEMENT and modified the two parameters C_CHECK & C_CAL as SPACE.

Regards,

Chitturi.

1 REPLY 1

Former Member
0 Kudos

Hi ,

I found the solution my self . Thank you .

Implemented the badi VB_SLED_MANAGEMENT and modified the two parameters C_CHECK & C_CAL as SPACE.

Regards,

Chitturi.