cancel
Showing results for 
Search instead for 
Did you mean: 

Hi

Former Member
0 Kudos
232

While creating the Sales order through VA01 and before saving the Sales order we need to give the output type.

This output type is going to attach the some 'Z' progarm. In 'Z' program we call the Function module for Delivery creation and commit work. But the Commit and Submit commands are not working through output type. If it is not work it out through output type how we will go about this?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

At the item category level,we can set the indicator immediate delivery .

So once you saved it ,it automatically generates the delivery document.

Hope this would help you out.

Thank you.

Regards,

karun M

christian_wohlfahrt
Active Contributor
0 Kudos

Hi!

Just to be sure I got your description right:

- you defined an output message for a sales order (successfully)

- you don't want to print something, but call an own program for creation of a delivery (for this sales order).

Now you struggle with restrictions, because your message is executed in update task and commit work, call transaction, submit... aren't allowed.

Option 1: Don't execute the message immediately, but by a report (rsnast00). This can run in background (e.g. scheduled every 5 minutes) and you can create the delivery.

You can only create a subsequent delivery, when sales order is completely booked (otherwise no reference will be possible, document wouldn't exist so early).

Option 2: you trigger a job (function module BP_EVENT_RAISE), which creates the delivery. This event can be called in user-exit 'save document' (MV45AFZZ). You might need a change pointer to tell, which sales order wants to have a delivery. Works well, too.

Option 3: Define a workflow (but I haven't checked, if sales order can trigger this in your required way).

Regards,

Christian