Technology Blog Posts by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
Cihanaygun
Explorer
0 Likes
1,502

Creating Background Jobs for Billing

In the SAP system, billing documents and credit memos related to orders or deliveries are listed under the "VF04" transaction code. Within the "VF04" screen, all documents awaiting billing are displayed. Billing processes are carried out using the options "Individual Billing Document", "Collective Billing Document", or "Collective Billing Document/Online"

  • In sectors like retail, where invoicing cannot be done individually, the "VF06" transaction code is used to execute mass billing processes in the background.In the "Billing Documents to be Processed" tab, criteria such as "Sales Organization", "Distribution Channel", "Billing Type" and "Sold-to Party" can be specified to save a variant. 

    image.png
  • In the "Documents to be Selected" tab, "Sales Orders," "Deliveries," "Request for rebate," and "No docs with billing block" can be selected. 

    image.png
    In the "
    Job Started On," the "Start Date" and "Start Time" are selected. Based on the selection made here, the job setup is performed in the background. The "Start Immediately" option starts the job immediately, while the "Test" option displays the details of the job to be set up. No job setup is performed in this case. If neither option is selected, the job is scheduled for the specified date and time and remains in "Planned" status. The selected job name contains "Date" and "Time" information as shown below. Additionally, the number of steps, customers, and documents within the job is also recorded.

    image.pngimage.png

    The list of scheduled jobs can be viewed using the transaction code "SM37".

    image.png

    In the "Job Distribution" section, there are fields for "Number of Jobs" and "Customers per Step""Number of Jobs" indicates the number of jobs that should run in parallel. "Customers per Step" defines how many customers should be grouped into each step as a batch. In the example shown in the image: 

  • The number of parallel jobs is set to 1.

  • The batch size for processing is 100 customers. 

    If there are 200 customers in the list, only one job will be created in the background, but it will include two steps to process all customers.

    image.png

    In the "Default Data" section, there are fields for "Billing Type", "Billing Date" and "Pricing Date".These fields are also available in the "Documents to be Billed" tab. When the criteria in the "Documents to be Billed" tab are selected, the relevant documents are filtered.
    When the criteria in the "Default data" section are selected, it means that the values within the selected invoices will be adjusted accordingly. For example, if the "Billing Date" field is set to 10.12.2022, when the selected documents are billed, all of them will be adjusted to have the billing date of 10.12.2022.

    image.png

    In the "Update" tab, the processing method for the selected billing documents is determined. The options for "Asynchronous" or "Synchronous" can be selected.

    - Asynchronous is more efficient in terms of performance as the job is executed in the background, allowing the process to complete more quickly.

    - Synchronous means the process is executed immediately, but it takes longer to complete.

    For smaller datasets, Synchronous processing can be used. However, for a large number of documents, Asynchronous processing is recommended due to performance considerations.

    image.png