Programme SAP RV56TRGN - Create shipments in collective proc.

Report RV56TRGN
The selection screen of this report represents the initial screen ofcollective shipment processing (transaction VT04).Specifications are made on it which are later taken into account withthe execution of collective processing (also, see Push-button'Functional procedure' on the selcetion screen ofthis report).
The entries made here can be stored as selection variants. Theseselection variants are identified as 'Planning profile' and are used,for example, if collective processing is started in batch (transactionVT07).
The definition of the selection screen is relatively complicated anduses, among other things, Macros. These aredocumented in the coding.
The selection screen of the report can have two different views:

  • Selection screen to execute a simple collective processing run;

  • Selection screen to create a shipment chain.

  • The user decides, via a push-button on the selection screen, what is tobe created. The invisible parameter P_CHAIN gives information in theprogram as to whether a shipment chain is to be created (P_CHAIN = 'X')or not (P_CHAIN = ' ').
    Depending on this, for the PBO of the selection screen (eventAT SELECTION-SCREEN OUTPUT), it is controlles as towhich fields of the selection screen are active (those for 'shipmentchain' or not, see Form prepare_screen).
    For PAI (event AT SELECTION-SCREEN) the entries arechecked (form check_input) and processed (form process_input). Thus,for example, during processing, if one presses the push-button'Maintain' (to the right, next to the variant), branching into thecollection profile is executed.
    When executing the report (event START-OF-SELECTION), the shipment isfinally generated. Beforehand, however, the log is initialized andoutput at the end.
    The generation of shipments (form shipments_create) begins with theselection of the deliveries to be processed based on the assignment ofthe selection profile (form select_deliveries, functional moduleSD_DELIVERY_FOR_TRANSPORT).
    If no shipment chain is to be generated, triggered is the formshipments_create_no_chain. The selected deliveries are first collectedhere for shipments on the basis of the rules in the collection profile(form combine_deliveries, functional moduleSD_SHIPMENT_COMBINE_DELIVERIES
    )
    Form populate_documents reads the assignments of the data profile (withfunctional module SD_SHIPMENT_PRF_DATA_READ) and data is filledshipment by shipment (
    SD_SHIPMENT_POPULATE_DOCUMENT).
    In the case of a shipment chain, deliveries are selected only once, yetprocessing is carried out up to 5 times, run by run.
    The generated shipments are regularly stored (form shipments_save).This can happen at 3 events:
    • Always then when 100 shipments are created (constant
    • G_MAX_CERATED_SHIPMENTS)
      • If, in the framework of the shipment chain a run is ended (when, i.e.,
      • the preliminary shipmes are generated, for example)
        • At the end of all processing in order to save the remaining shipments.

        • This is only to present the functional principle in a rough way. Moredetails are documented in the coding.
          For more detailed information on collective processing, seehere.

801419Performance problems in shipment (cost) processing
100881VT04: number range 01 for SD_VT04 is missing