on 11-21-2011 11:48 AM
We have a customer where we deliver goods to 5 central warehouses. The customer send us 5 order files. Due to performance we split these 5 files into one order per shop. This means we have app. 500 orders. When we do the invoicing the customer want 5 invoices so we collect the orders connected to each warehouse. The problem is that we can't use transaction VF04 since this will time out. We use transaction VF06 for background processing (program RV60SBAT). This transaction has a limit for 100 orders pr. run (field MAX_CUST). So if there is more than 100 orders for one warehouse VF06 will create 2 invoices.
I can see that the program RV60SBT1 does not have this limit. But as I read this program is outdated. We run ERP ECC600.
Any ideas how to create a single invoice for more that 100 orders ?
Kind Regards,
Torben
Thanks for all replies. I still do not think it quits solve my problem.
In program RV60SBAT the program SDBILLDL is called in form SUBMIT_STEP. This form is called more times in form CREATE_JOBS.
+ 1 customer
add 1 to cust_count.
if cust_count = no_cust.
perform submit_step.
add 1 to created_steps.
cust_count = 0.
refresh kunnr_sel.
endif.
Where NO_CUST = 100 from the field on the selection screen. The form SUBMIT_STEP is called again later in the program.
check number of CUSTOMERS in internal table
if cust_count <> 0.
perform submit_step.
add 1 to created_steps.
endif.
So before the system reach the exits in SDBILLDL it has divided the orders in more steps.
Kind Regards,
Torben
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Other than suggestions above, you might want to consider invoice list function.
Posting of a invoice with more than 100 you may run into a risk of hitting FI 999 lines limit if your system is not configured
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Torben
Run VF04 and in the program RV60SBAT you can include the logic and then it is possible.
Regards
Srinath
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Torben
As you have the time limit you can run VF06,. By doing the following things. In VF06, just select Sales Orders (in documents to be selected) and then run the report.So create the variant.In the same way just select Deliveries and create a variant. When you run VF06 select those variants so that you can run this VF06 in two screens.Then it is possible
Regards
Srinath
Hi torben
If you run RV60SBAT or SDBILLDL as a collective biling job in both case the
function module 'SD_COLLECTIVE_RUN_EXECUTE' is called. In here you can see
how the system executes the colective billing.
The max_documents in the standard system is actually 1000 which
is hard coded here (can be changed)
MAX_DOCUMENTS = 1000.
CALL CUSTOMER-FUNCTION '009'
TABLES
CT_VKDFIF = V60P_INPUT_VKDFIF
CHANGING
CD_MAX_DOCUMENTS = MAX_DOCUMENTS
EXCEPTIONS
OTHERS = 1.
You also have the user exit above to set the field per your requirement.
If you needed more than 1000 for large combined billngs you can set it here.
After it is set you can see here that it will combine all documents for the same
customer, sales order and billing type up to the max_document amount
LOOP AT V60P_INPUT_VKDFIF WHERE SELKZ NE SPACE.
ON CHANGE OF V60P_INPUT_VKDFIF-KUNNR OR
V60P_INPUT_VKDFIF-VKORG OR
V60P_INPUT_VKDFIF-V_FKART.
....
PERFORM RV_INVOICE_CREATE
So if you are running the job with a variant for each case it will combine
everything up to the max_documents you set in the user exit
I hope this helps you further
Kind regards
Brian
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.