Application Development 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: 

How to generate an invoice output programmatically?

Former Member
0 Kudos

I need to generate an invoice output(Sapscript or smartform output) pragrammatically by input an invoice number and then I can obtain its spool number.I have known how to get its spool number already. Now my concern is how to generate an invoice output programmatically. Who can give me some hints here? Thank you very much.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Submit the VF31 program only. The program name is

SD70AV3A.

15 REPLIES 15

Former Member
0 Kudos

Do a SUBMIT AND RETURN on the program RSNAST00 with the invoice number and the output type. This will generate a spool.

0 Kudos

Thanks. I am trying it now. I would respond it again as I get any results

0 Kudos

Hi Sudhir, in program RSNAST00, which field is corresponding to invoice number? Is it Object key (NAST-OBJKY)?

Thanks.

Jack

Former Member
0 Kudos

Check the transaction FPCOPARA.

Regards,

Prakash.

Former Member
0 Kudos

Yes. The invoice number will be stored in NAST-OBJKY..

Thanks,

Naren

0 Kudos

Thanks all. I still meet a problem that is when I try to run RSNAST00 with input an existed object number and output type, I always get "0 output were processed in total." So I couldn't see the proper results. ( I can see the invoice output with this object number and output type by using VF31).

Could you please tell me what the problem is when I run RSNAST00? Thanks a lot.

0 Kudos

For you to be able to reprocess an already processed output, your output type should be configured to allow repeat output. Otherwise, you cannot do it.

Former Member
0 Kudos

Your output type should be configured to repeat output and you should select the check box Send again in the selection screen of program RSNAST00.

0 Kudos

Thanks a lot, Sudhir. I am still new in SAP.

I just updated the output type which is set to "multiple issuing" (does it mean "repeat output you mentioned?), and selected "Send again" in the selection screen of RSNAST00, but I still got "0 output were processed in total". Need I do anything else?

Former Member
0 Kudos

In the condition records for the output type change the Dispatch Time to 1.

0 Kudos

Hi Sudhir, I am still struggling to this issue. Well, your very helpful information make me approach the goal...however I haven't found where to modify dispatch time (NAST-VSZTP) to 1 or 2 so that I can see the result as running RSNAST00. Please give me information in detail as much as possible.

Thanks a lot.

Former Member
0 Kudos

In the condition records for the output type there are

fields like Medium, Dispatch Time, Language in the end.

Change the dispatch time to 1.

0 Kudos

Hi Sudhir, Thanks for your helps. But I think I may in a wrong way for my issue. Though RSNAST00 cannot process those existed invoices due to their dispatch time (NAST-VSZTP) or status (NAST-VSTAT), while those invoices could still be printout by using VF31, I may NOT SUBMIT RSNAST00 in my function module, instead I should look for other proper print program to be submit. My function module should process those existed invoices as well without changing their NAST date.

So if you have any suggestion to other print program (maybe some program above RSNAST00), please advice.

Thanks and have a great long weekend.

Jack

Former Member
0 Kudos

Submit the VF31 program only. The program name is

SD70AV3A.

0 Kudos

Yes, this SD70AV3A is the right one for my issue. I've got the right results. Thanks!