cancel
Showing results for 
Search instead for 
Did you mean: 

Print Invoices by alphabetical order of sold to party/payer

former_member182805
Active Participant
0 Kudos

Hi,

My requirement is this:

I have created a variant in VF04 to run the billing due list. I have created a background job that runs everyday and creates the invoices. The output condition record (RD00) has been set to date and time = 4(print immediately). The result is that invoices are printed automatically after they are created. I want the invoices to be printed in the alphabetical order of the name of the sold to party/payer (meaning if there are 20 invoices to be printed, forst print 5 invoices of customer A, then 5 of customer B, then 5 of customer C and 5 of customer D). Currently they are printed as VF04 selects them in a random manner.

I have tried the following 2 solutions:

1. Through VF31

a) In the condition records for RD00, set date and time to 3 (set to application own transaction).

b) In the definition of RD00, in the tab sort order, select field Sold to Party

c) Create a variant for VF31 with sort order as 04 (sort fields 1-3) to select the invoices created by VF04

d) Create a background job to run immediately after the job to create invoices has finished.

The above method creates invoices in the ascending order of the sold to party number, not name.

How can you add the field Name of sold to party to the field catalog?

2. Create a display variant for VF04

a) I ran VF04 and sorted the name of the sold to party. I couldn't save it as a display variant.

b) I went to transaction VOF1, but I saw that this is to add/remove fields to the standard display variant. I cannot add a sort to the name of the sold to party

So, again, is there a way to create a display variant for VF04 with the field "Name of sold to party" sorted in ascending order?

Accepted Solutions (0)

Answers (1)

Answers (1)

Lakshmipathi
Active Contributor
0 Kudos
I have created a variant in VF04 to run the billing due list. I have created a background job that runs everyday and creates the invoices

Can you reconfirm your above statement is correct?  For information, you cannot execute VF04 in background.

G. Lakshmipathi

former_member182805
Active Participant
0 Kudos

Hi Lakshmi,

I have created a variant for VF04. Then I went to SM36, created a background job, specified the program name as SDBILLDL and variant name as saved above. I have already run this background job several times iand this has created invoices without any errors.

Lakshmipathi
Active Contributor
0 Kudos

Based on your initial post, I thought, you were executing the transaction code VF04 instead of executing via program.  Nevertheless, coming to your comment on

I couldn't save it as a display variant

you can't save any variant in VF04.  However, do the following:-

Go to SU3, select "Parameters" tab where you set Parameter ID as

  • SD_VARIANT_MAINTAIN and Parameter value as "X", so that you can only save with standard variants or
  • SD_VARIANT_MAINTAIN and Parameter value as "U", so that you can only save user specific variants or
  • SD_VARIANT_MAINTAIN and Parameter value as "A", so that you can save both the above variants

G. Lakshmipathi

ravi_kumar100
Active Contributor
0 Kudos

Hi,

If VF06 is available for scheduling invoice creation in Background , is there any specific reason that you are scheduling it through SM36?

Kindly do clarify.

Regards,

SRK

former_member182805
Active Participant
0 Kudos

I want to run them on a daily and monthly basis. Since I do not want to keep creating a background job every time, in SM36, it allows the user to run the job periodically

former_member182805
Active Participant
0 Kudos

I have sorted the VF04 results by the name of the sold to party and have saved it as a display variant. I have set it as the default display variant. However, when creating invoices and printing them, it is not doing it in the order in which VF04 is displayed.

I am able to save selection screen variants by default i.e the standard behavior of SAP allows the user to save a selection screen variant

I think option 1 of using VF31 is the right approach. I have to find a way to include the name of the sold to party in the field catalog for sort order and assign it to RD00.