cancel
Showing results for 
Search instead for 
Did you mean: 

Add requirement to Output

0 Kudos

Existing process:

Create STO - Create Delivery, - Complete GI - Create Invoice.

The output is executed via batch job (lets say BJ) that uses VF31.

Requirement:

Client wants to check certain condition (lets say condition x), before the output condition (OC01) in the invoice can be executed.

Proposed Solution:

Create a requirement routine to check the Output type(OC01) in the output determination procedure. Also, create a daily batch job to check the condition x and reprocess OC01 when satisfied.

This solution is good, if the the output is manually processed via vf01 screen options (print or otherwise).

Challenge:

1. Since output is triggered via batch job that executes VF31, and hence the requirement routine attached to the Output det. proc. is never checked (unless manually processed via VF01).

2. The batch job BJ cannot be modified. It is used by too many business and company code around the world.

If anyone has dealt with a similar requirement before, kindly share the solution.

Thanks in advance for your time and effort! Much appreciated.

Accepted Solutions (1)

Accepted Solutions (1)

Jelena
Active Contributor
0 Kudos

The proposed solution is correct but understanding of how requirements work is the exact opposite. The requirements are not checked when triggering output manually, you'll get a warning message to that effect when you try. There are tons of messages on SCN about it.

The requirements are checked before the output is proposed, so if the requirement is not fulfilled there will be no output created and nothing to process in VF31.

0 Kudos

"how requirements work is the exact opposite"

Jelena,  Can I request you to elaborate.

Also, you mentioned:

"The requirements are checked before the output is proposed, so if the requirement is not fulfilled there will be no output created and nothing to process in VF31."

As I understand the above this is how VF31 behaves:, Step1. execute requirement routine. if fails no output processed, else, output generated.

Essentially it implies, VF31 checks requirement routine?

prashant_sharma21
Contributor
0 Kudos

Hello Anurag,

The requirement we maintain in Output procedure that is used only when system determine the output type in SO automatically or when system pick the output type using output condition record.

But when we enter the output manually in the sales order then system just skip the requirement or system does not read requirement.

You want even though user enter the output type OC01 manually in sales order system system MUST check your requirement (i.e. GR qty >= IR qty) to achieve this we have to maintain requirement in Output type  program  (t-code: NACE) or (Table: TNAPR) in field " PROGRAM/FORM" then only system MUST read your requirement whether output determine in sales order automatically or manually.

As you told that smart form is already using in other output type as well than I believe you have to copy that smart form and make required changes than assign to OC01, definitely it will work.

I believe this is the smart/sort way to achieve your requirement.

Thanks,

Prashant Sharma

Jelena
Active Contributor
0 Kudos

Anurag, VF31 only processes the output, it does not trigger output determination. If there was no output determined when the document was created then there will be nothing to process in VF31.

Not sure which part of "exact opposite" requires elaboration... Your initial post stated that requirements are checked when output processed manually and not checked when processed by background job. But the exact opposite is true - requirements are not checked when output is added manually.

Based on the information in this post I don't see any issues with the solution you've mentioned - just add the requirement in the routine. It's just your understanding of the output determination was incorrect, I believe.

0 Kudos

Hi Jelena,

Thanks for your inputs.

My scenario: the user creates an invoice via VF01, if at that time the requirement routine fails, there will be no entry in the output screen of the invoice (not even yellow triangle).  Now after a few days, my GR qty = IR qty.  Now the user is trying to process output via VF31. Since, it is not determined in invoice, it will not be processed.

How do I address this situation? user does not want to go in VF02 to redetermine the output.

Kindly suggest, thanks in advance for your help.

Jelena
Active Contributor
0 Kudos

Anurag, in your original post the process was:


Create Delivery, - Complete GI - Create Invoice.

So why are you creating an invoice before PGI was completed? And since there is no "partial PGI", how else could you complete PGI other than for full quantity?

I don't really get what IR quantity is in this process and what's the purpose of the whole thing, but maybe instead of using invoice output you should disallow either PGI or invoice creation if the mystery condition is not met?

Otherwise you will need to trigger the invoice output determination (RSNAST00 essentially) from wherever is that place that fulfills the condition.

I believe you might want to think through the whole design here. Also using output condition as some kind of "protection" is pretty lame since those requirements don't work in VF02. Many times we had users print an invoice and send it to the customer even though it didn't post to accounting. And it's an easy field to check right in the invoice. How do you expect the users to follow the process where conditions are not even obvious to them? They would just think it's a technical error that output was not generated...

0 Kudos

Thanks Jelena for a prompt reply.

This is an inter company process and hence the invoice is generated before the GR happens, but the company want to hold the payment till GR is complete.

Jelena
Active Contributor
0 Kudos

If they are not going to pay then what's the purpose of generating the invoice?

Either way, if you have mind set on this odd process then output determination will have to be triggered whenever the condition is fulfilled. How you do it exactly - up to you.

prashant_sharma21
Contributor
0 Kudos

Hello Anurag,

Why don't you use Dispatch time "3 Send with application own transaction" in your output additionally also mention requirement (GR qty >= IR qty) in your output so system will automatically trigger the output every time when ever GR would be done in the system.

I hope it should work.

Thanks,

Prashant Sharma

Jelena
Active Contributor
0 Kudos

PRASHANT SHARMA wrote:

so system will automatically trigger the output every time when ever GR would be done in the system.

How would this happen exactly? Why would an invoice output determination be triggered when processing a completely unrelated document?

Besides OP was asking how to prevent the output creation, not how to delay its processing. As soon as you allow the output to be created it can no longer be controlled.

Answers (1)

Answers (1)

Lakshmipathi
Active Contributor
0 Kudos
Client wants to check certain condition

May be had you explained what exactly it is, then, it would be easy to propose suitable suggestion.

G. Lakshmipathi

0 Kudos

Client wants to check if GR qty >= IR qty

Lakshmipathi
Active Contributor
0 Kudos

Ask your ABAPer to add this logic in your existing Smartform being used for that output type.

G. Lakshmipathi

0 Kudos

Thanks Lakshmi,

I appreciate your help!

It is a nice and creative solution. I have 2 concerns with it:

1. The same Smartform is used by multiple businesses. Client is reluctant with changing it.

2. What kind of entry will a failed output (from smartform) create in NAST table, as these failed entries are used by batch job to find out which all STO output needs to be reprocessed.