cancel
Showing results for 
Search instead for 
Did you mean: 

DIFFERENT_OUTPUT_TYPE_TRIGGERED_SAME_PDF

naitikgada
Explorer
0 Kudos

Hello,

I am new on this Forum and on SAP. Please don't mind if the question may be silly but I have a condition here, out of which I am not able to find out the conclusion/root cause.

Problem:Quotation Invoice attached with Billing Document Invoice in same PDF despite both of them having different output types

I have a billing document with say output type ZBILL and sales quotation with output type ZQUO. I have triggered the quotation today with communication method 1(Print Output Immediately and am able to see the output). Post this activity on the next day a batch job runs that picks all the billing documents to be processed out of which my billing document is also picked and processed with the communication method 5(send email).

Now when the email is sent, it is sent with attachment having 2 pages. Page 1 with the quotation having output type ZQUO and page 2 for the billing document picked having output type ZBILL.

Both of these i.e. the quotation and the billing document are not related in any manner. The driver program and smartform of both of them are different. Also, the variant maintained for the job has the output type ZBILL and not ZQUO. The program that runs is the standard program SD70AV3A having header as output for billing.

Now my query here is on why the quotation invoice was attached as an added page to the PDF of Tax Invoice(billing document). The output triggered by the batch job had 2 pages(1 with the quotation invoice and 1 with the billing document)

I suppose it may be some sort of buffer issue but am not sure on it.

Can someone provide any inputs on what shall I check further and what can be the cause for this?

Thanks

Sandra_Rossi
Active Contributor

I don't see any custom ABAP here, only SD stuff. Please change the primary tag.

naitikgada
Explorer
0 Kudos

Hi Sandra,

I have changed the Tag from ABAP to SD but I suspect there maybe some ABAP related to this as the output type is not standard output type. Please check it if possible and let me know if you find any leads on what can be the root cause of this problem

mmcisme1
Active Contributor

For your output types is it a custom Z* program that executes or a standard one?

naitikgada
Explorer
0 Kudos

Yes,it is a custom Z program.

I debugged the program and found that the spool id that gets generated for the quotation is picked for the smartform spool id.

This is the reason why the quotation is getting attached with the billing document. This part is handled by SAP Standard code. Now here, I am unsure on why is this happening. Have you come across any such scenario?

Accepted Solutions (1)

Accepted Solutions (1)

mmcisme1
Active Contributor

Well - I would simply change the smartform. (ABAP solution) Put code in it to separate the documents. The problem would be if you wanted to keep several pages of billing documents and quotations. So in the smartform the option to set is under the interface output options-TDNEWID = 'X'.

In each Smartform.

Yes - send it back to your ABAPer as there are many different ways to do this. I'm only offering the one. And you could be causing more of an issue if you are trying to group several billing documents together in one e-mail. Doing this will create a new spool file for each one.

naitikgada
Explorer
0 Kudos

Hi Michelle,

Thanks for your answer. That worked as expected

naitikgada
Explorer
0 Kudos

Also, each and every billing document needs to be sent in separate emails and hence creating a new spool for each one makes sense. Hence,went forward with the approach

Answers (1)

Answers (1)

Jelena
Active Contributor
0 Kudos
"when the email is sent..."

Assuming that this is done by the output processing program then that's where your answer would be. Most likely the output is processed by a custom program, as Michelle hinted in the comment. Find the program name in NACE and send this to an ABAPer (locally).

If you're a business user then just report such issues to a local SAP Support team. If you're an SAP SD consultant then please make sure to familiarize yourself with how output works. Naturally, you don't have to know how the programs work in detail but at least knowing which part does what (i.e. what is driven by configuration, by program and by form) is very important. If you're an ABAPer then ditto about the output configuration basics.

naitikgada
Explorer
0 Kudos

I debugged the program and found that the spool id that gets generated for the quotation is picked for the smartform spool id.

This is the reason why the quotation is getting attached with the billing document. This part is handled by SAP Standard code. Now here, I am unsure on why is this happening. Have you come across any such scenario?

Jelena
Active Contributor
0 Kudos

I never had any problems with the standard functionality in the output processing. Sorry but it's impossible to comment further unless you share full details and specific code.

naitikgada
Explorer
0 Kudos

Thanks for your efforts and comments. As per the comment by Michelle, I changed the parameter TDNEWID to X so that I it will be ensured that always a new spool will be created and this issue won't come up again.