cancel
Showing results for 
Search instead for 
Did you mean: 

Approval for Contract and Order based on PO date and Document Date Combinat

Former Member
0 Kudos

Dear All,

I have a critical requirement from my client.

1. If the PO date in the contract is less than 10 days or more of the document date [Created date] then further process should not be allowed. Only authorized person should release the contract, and then order creation should be possible.

For example: Customer PO date is 18-07-2011 and if the document date is 28-08-2011, then system should stop for further processing. Only after release this should be allowed to proceed.

2. Sales order scheduled date for item is 30.07.2011 and if the PO date is 18.07.2011 again system should again go for approval. Business requires this because the time gap between the PO date and the delivery date is very short, so only on approval the next process should be allowed.

Is this possible through Status profile? I have tried this but I canu2019t give condition like if it less than the PO date system should go for approval.

Kindly guide me if this is possible and share your ideas.

Best Regards,

Venugopal

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI Venu,

I think this can not be controlled by statusprofile,we should defiantly go for user exit.In my earlier project i have faced the similar situation,it was with scheduling agreement,to create new scheduling agreement the system will not allow other than the first day of the month and end with last day of the month, for this i went for userexit through MV45AFFZZ i got my requirement.

hence i request you to think the case go for User exit.

Thanks

Vinayak

Former Member
0 Kudos

Dear Vinayaka,

Thanks for your reply,but how to relate with the appoval.

Regards,

Venugopal

Former Member
0 Kudos

Dear All,

Any suggestions please....

Regards,

Senthil Venugopal

Edited by: venugopal on Jul 29, 2011 4:42 AM

Edited by: venugopal on Jul 29, 2011 6:34 AM

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Try with user status profile and RV45PFZA USEREXIT_SET_STATUS_VBUK.

Incoporate your logic over here.

Regards,

Saju.S

Former Member
0 Kudos

Hi Saju,

Thanks For your reply...But in that exit Po date and document creation date can't be fetched,Any idea of fetching those two.Then this exit will be usefull.

Regards,

Venugopal

Edited by: venugopal on Jul 29, 2011 7:58 AM

former_member188076
Active Contributor
0 Kudos

Hi

My suggestion is a bit different. In contract we have Validy Dates (Valid From and Valid To). Why not you try to use these two dates for restricting your contract and give authorisation of VA42 to only concerned person who can change the contract validity dates as per the requirement.

Thanks and regards,

Amitesh Anand

Former Member
0 Kudos

Dear Amitesh,

Thanks for your reply,but my requirement is different.

Regards,

Venugopal

Former Member
0 Kudos

Hi Venu,

In user eixt USEREXIT_MOVE_FIELD_TO_VBAP (inlcude MV45AFZZ) write the code to compare the PO date and contract creatioon date and if the PO date is 10days less than the contract creation date reject all the line items with a special reason for rejection at the item level if the document is a contract or if the document is a sales order then populate a delivery block.

Regarding the authorization to release the contract you can think of below options.

Give authorization to only specific people to remove the reason for rejection or remove the delivery block.

Or

If you want to automate the approval process then based on the delivery block setup workflow which will raise an event and trigger an email to the approver inbox. For the approval you can give options like Approve/Reject. Based on the apporver's action design the workflow to change the contract accordingly i.e either removing the delivery block or keep it as it is.

Former Member
0 Kudos

Hi All,

Thanks for your inputs,i have solved this issue.

In user exit USEREXIT_SAVE_DOCUMENT_PREPARE(MV45AFZZ) Where in the order type i have made delivery block.So while creating the order sdelivery block will be default.When VBAK-ERDAT is more than 15 days of VBAK-ERDAT then this defualt delivery block will not change else this will be removed automatically when the condition did not satisfy.So seperate authorisation for releasing the delivery block has been given.

Regards,

Venugopal