cancel
Showing results for 
Search instead for 
Did you mean: 

Prevent Output type creation as Sales order save

Former Member
0 Kudos

Hi,

I have a requirement in which i have to chek certain conditions and on that basis i need to stop the creation of output type for Sales order. My code is written in Sales order user exit(Form SAVE_DOCUMENT). Please let me know how can i achieve this.

The requirement routines are called before the user exit is called...so it does not seem to be possible to call routine afterwards.

Is there a way in which we can calll the requirement routine again?? Or please suggest some other way

Thanks

Saurabh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi there,

As per the standard process any O/p type will trigger only after saving the document. Not before.

So even in your case the O/p will trigger after saving the doc. So in the requirement routine of the O/p type put a code to check for the conditions which you require. When the conditions satisfy, requirement is met & your O/p will trigger. When conditions donot satisfy, O/p type will not trigger.

Regards,

Sivanand

Former Member
0 Kudos

hello again.

sivanand is quite right. with this, if the requirement is not met the output type may not even be triggered in the first place.

but i do recall that in the case of BA00, when the order is not confirmed the output is created but there is a yellow triangle?

thanks as well!

Edited by: jonathan y on Jun 23, 2009 11:48 AM

Former Member
0 Kudos

Thanks all for your suggestions.

Actually i have put a breakpoint in the requirement 002. But it is not being called after my user exit is created.

Basically, i am updating a Z table in the sales order exit and then checking if the table is updated and have to stop the output type creation.

As you are telling that the standard SAP calls the requirement after the SAVE too but i could not see that technically as my program did not stop there despite of the breakpoint. If at all, requirement is called after the Sales order exit is executed then my problem will be solved.

Please advise.

Former Member
0 Kudos

Hi Sivanand,

One more thing, i noticed that the output type BA00 is being determined when you got to EXTRAS>>OUTPUT->>HEADER>>EDIT.

Also when you save the sales document,it is again being called, but before the sales order User exit execution.

I am not sure , how should i proceed.

P.S- In my case functional has created a custom ZBA00 for order acknowledgement. I am not if some customizing can solve this.

Regards,

Saurabh

Answers (1)

Answers (1)

Former Member
0 Kudos

hello, friend.

what are the conditions you are checking for? and what would be your reasons for not creating an output type?

not being an ABAPer, i cannot claim to be an expert. but i think it is possible that instead of the user exit, you could program that the condition check be conducted from within the requirement itself. the standard requirement "2" for output type BA00 checks for order confirmation, for example. of course, the use of the requirement assumes the output type has been created, but will not be printed or be issued if the requirement conditions are not satisfied (the output indicator color will remain red).

regards.