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

Stop auto-trigger of an output type upon commit after a bapi

Former Member
3,155

Hi,

There is an output type configured that gets triggered when an outbound delivery is created. My requirement is to stop the auto-trigger when I create the delivery from my report.

In my report, I am using BAPI_OUTB_DELIVERY_CREATE_STO followed by COMMIT. Upon commit, output type is triggered and I need to block it.

I created a VOFM routine which is called when I create delivery from vl01n, but it not called when I call the bapi and then commit.

How do I stop the auto-trigger? Any suggestions?

1 ACCEPTED SOLUTION
Read only

Jelena_Perfiljeva
Active Contributor
0 Likes
2,062

VOFM routines should work regardless of whether the document has been created via BAPI or in the transaction.

How exactly did you confirm that the VOFM routine doesn't work? If you set a debuggere breakpoint and was expecting to hit it that's not going toi happen because output is processed in another update process.

Check output determination analysis for the output. Although it's available in change mode only for new output, unfortunately, and not necessarily represents what happened with the existing output.

In general you're on the right path, VOFM requirement is the way to prevent output from being generated.

Hi,

There is an output type configured that gets triggered when an outbound delivery is created. My requirement is to stop the auto-trigger when I create the delivery from my report.

In my report, I am using BAPI_OUTB_DELIVERY_CREATE_STO followed by COMMIT. Upon commit, output type is triggered and I need to block it.

I created a VOFM routine which is called when I create delivery from vl01n, but it not called when I call the bapi and then commit.

How do I stop the auto-trigger? Any suggestions?

3 REPLIES 3
Read only

roberto_forti
Contributor
0 Likes
2,062

Hi Gupta, SAP recommends ever working with Function Module BAPI_TRANSACTION_COMMIT after calling BAPI's. Try to test with parameter wait = 'X'.

Regards,

Read only

2,062

In the context of this question, it doesn't really matter whether COMMIT command or BAPI is used. As soon as the document is created (and it doesn't matter how we commit changes to DB or how long we wait), the standard output determination functionality will kick in.

Read only

Jelena_Perfiljeva
Active Contributor
0 Likes
2,063

VOFM routines should work regardless of whether the document has been created via BAPI or in the transaction.

How exactly did you confirm that the VOFM routine doesn't work? If you set a debuggere breakpoint and was expecting to hit it that's not going toi happen because output is processed in another update process.

Check output determination analysis for the output. Although it's available in change mode only for new output, unfortunately, and not necessarily represents what happened with the existing output.

In general you're on the right path, VOFM requirement is the way to prevent output from being generated.