cancel
Showing results for 
Search instead for 
Did you mean: 

Attaching the Invoice Smartforms to Dunning Letter Smartform - Enhancement

SandySingh
Active Contributor

Attaching the Invoice Smartforms to Dunning Letter Smartform

Hello Guys,

Could you please help me with a Enhancement to Dunning Smart form. I am using a Custom Smart form for Dunning and i have a requirement that I need to print all the respective customer invoice smart forms/Sap scripts along with the Dunning Letter smartform.

For this, I tried putting the logic in custom Dunning Smart form for printing all the invoices but some of the invoices have landscape format and I am getting a runtime error. I think it is not a good idea from even maintenance point of view.

So now I am trying to open and customize the standard print program SAPF150D2 and calling my invoice smartforms from print program. I have TWO problems:

1. How the Dunning Statement printed from Transaction - F150 different from what printed from standard print program SAPF150D2 ?

2. How to get a single spool for both print outs. If not, how to create a spool for second form with all the Invoices form attached in single PDF.

Could anyone please help me in this. Does anyone had such requirement of Attaching the Invoice Smartforms to Dunning Letter Smartform.

Much Appreciated.

Regards

Sam

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I guess you are thinking a little too complex here.

you got your dunning driver program and the dunning form. Since the dunning form is according to you a smartform, you now have the choice whether to solve your requirement in the driver program OR the smartform.

Anyway, what you need to do is:

- select all the according invoices you need to print out, you need to know how to select those, i dont have your requirement.

- Loop over those invoices, and fill a structure of type NAST with the neccesary print options like KSCHL ANZAL VSZTP , ...

- process invoice output types, you can make use of FM WFMC_MESSAGE_SINGLE for this.

so while beeing in a form, well better at the end, you are calling the procession of your output types for your invoices which again process driver program and form.

hope you got me and hope it is any helpful.

SandySingh
Active Contributor
0 Kudos

Hi Florian,

Thanks a lot . Its really nice to know how to repeat output. I was really thinking too complex. Your suggestion was really very helpful. But still as per my requirements, I need to print one single spool of Dunning form with all this invoices attached to it. Is there any way i can capture the OTF data of each form while output through FM WFMC_MESSAGE_SINGLE . When calling the smart form in standard way, i can capture OTF data in parameter "JOB_OUTPUT_INFO". Then i can append the OTF of all invoices and lastly print one single spool.

But i think using WFMC_MESSAGE_SINGLE would be easiest way but then user has to click print each time. The user wants a single spool or PDF with Dunning letter at front and all invoices attached to it.

Could you please suggest some way to achieve this?

thanks a lot for previous info.

Regards

Sam

Madhurivs23
Participant
0 Kudos

please refer to follwing link of print several forms in one spool request.

you need to follow the control structure:

NO_OPEN

TDSFFLAG

CHAR(1)

You use these parameters to include several forms into one print request. When calling the generated functions modules, set the parameters as follows:

1st call: NO_OPEN = SPACE.

NO_CLOSE = 'X'.

nth call: NO_OPEN = 'X'.

NO_CLOSE = 'X'.

last call: NO_OPEN = 'X'.

NO_CLOSE = SPACE

http://help.sap.com/saphelp_470/helpdata/en/71/9ccd9c8e0e11d4b608006094192fe3/content.htm

Former Member
0 Kudos

ah ok, well WFMC_MESSAGE_SINGLE just processes the output type, which means output type customizing gets read, and driver program get called with customizied starting routine.

In your driver program you have the usual call function 'OPEN_FORM', which returns you a OTF table.

you could now in driver program(s) try to detect this situation of multiple invoice processing to one dunning letter, maybe have some parameter in interface when calling invoice driver program, and then for this case store the OTF table you get in a own table or move it to SAP-memory.

Now in driver program of your dunning form, IN the loop which prints all your invoices according to dunning form, you can retrieve the OTF table from the invoice and append it to an own internal table.

So you could build yourself step by step ONE BIG OTF table containing all the OTF´s from your single forms.

i hope you get the idea behind it. I dont know if you just can add OTF tables or if you need to add the contents and build a new header or whatever.

Former Member
0 Kudos

Hi FLorian,

Check the below link that I had created,

I am yet to complete it since I am not able to load the pictures.

Let me know If you still have any queries.

http://wiki.sdn.sap.com/wiki/display/Community/DunningusingSmartforms

SandySingh
Active Contributor
0 Kudos

Hi Guys,

Thanks a lot for your suggestions. I managed to resolve this issue with your inputs.

Much appreciated.

Cheers

Sam

SandySingh
Active Contributor
0 Kudos

Hi Florian,

Thanks a lot for help. your suggestion were very helpful.

Cheers

Sam

Answers (0)