cancel
Showing results for 
Search instead for 
Did you mean: 

FV60 - Vendor invoice doc number change based on posting date/fiscal yer

0 Kudos

Hi All,

I developed one custom workflow for vendor invoices which user can change certain invoice values during approval process of workflow.

These values are updating to document by using the function module  PRELIMINARY_POSTING_DOC_WRITE and posting the document by PRELIMINARY_POSTING_POST_ALL.

But when posting date changes ( which makes fiscal year to change ) the old document should be deleted by creating a new document with new number which is happening manually.

Could anyone suggest how to achieve this functionality through workflow?

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member227140
Active Participant
0 Kudos

you have to create a custom method in your business object which will do exactly same procedure which you are currently doing manually.

you must write code inside method which will achieve this , check if any FM/BAPI which does this thing and call that FM in your method.

now in workflow you have to create a workflow container which will check date . and if this date change made fiscal year to change then you have to  create a step and in the step create a custom task which will call the method which we created in first para of this answer and it will delete document .

if changes are other than date change/fiscal year change then you have to follow current path which you are following now .

0 Kudos

Thanks for the reply abhijeet.

Actually I am looking for the fm/bapi which will solve my issue. I checked but not able to find any.