Ansicht
Dokumentation

EHS_GLM_LABPRI_PR_AU - Set Up Automatic Print Request Generation

EHS_GLM_LABPRI_PR_AU - Set Up Automatic Print Request Generation

Vendor Master (General Section)   CL_GUI_FRONTEND_SERVICES - Frontend Services  
This documentation is copyright by SAP AG.
SAP E-Book

In Global Label Management, you can print labels via automatically generated print requests. The print request is generated from a business process (from shipping, for example).

Processing Print Requests

The print requests are controlled internally using the print request API (function group CBGL_PRINT_REQUEST_API). This means that all Global Label Management print requests are managed in this API. Print requests are created, changed, and deleted using the print request API. The print request API is also used to print the labels and to request the file for the label preview. This enables you to integrate the print request API into different processes in Global Label Management.

In Global Label Management in the standard system, programs and function modules are delivered that enable you to integrate the print request API into the process order, shipping, and handling unit business processes.

Print output with a print request is carried out manually using the labeling workbench or automatically after the print request has been generated. For more information, see Customizing activity Print Print Request Manually and Automatically.

Labeling Workbench

The print request generated, which contains the label generated on the WWI server as well as the header data and parameter values, can be processed in the labeling workbench. This means that print requests that are flagged as New in the worklist can be changed, copied, or deleted here before printing. You can also call a preview of the print request.

If print requests cannot be generated, check the error messages for the object EHPR in the Log Display in the labeling workbench.

You have processed the following Customizing activities:

You have configured the settings for the Via Print Request print output type.
  • You have specified the Via Print Request print output type for the labeling scenarios.

  • If you want to use Label Printing to reprint labels, define the structure of the tab pages for the respective labeling scenarios in the "Label Printing" Transaction view.

You have set up the labeling workbench.

In Customizing for Global Label Management, check the following settings for the automatic generation of print requests:

Specify the print station and printer that are assigned to the print requests during generation. If you do not specify a print destination, print requests cannot be generated automatically.
You can specify that additional labels (in addition to the quantity of labels determined by the system) are printed via the print request.
The system first generates a print request for each label that can be determined from the material master. You can use filters to filter the generation of print requests and define criteria for the generation of print requests.
  • You can specify default header data for print requests and print request bodies.

  • If you select Print Immediately, the print requests are printed immediately after they are generated. This means that printing does not have to be triggered in the labeling workbench.

  • By default, sequential numbers have a start value of 1 and an increment value of 1 and the number of labels with identical sequential numbering is 1. You can override this setting in this Customizing activity.

Generating Print Requests from the "Delivery" and "Handling Unit" Business Processes Using Output Control

Automatic print request generation for the delivery and handling unit business processes is implemented using output control and integrated into Global Label Management using the report RCBGL_TRIGGER_NAST. The report RCBGL_TRIGGER_NAST must be called in the ENTRY FORM routine of the processing routines. As soon as the output is triggered, the print request is generated automatically.

For more information, see the documentation for the report Integrate Output Control into Global Label Management.

Create the required processing routine as follows:

  • In Customizing, select the business process or application from which the print requests are to be generated automatically:
  • For the shipping business process: Customizing activity Maintain Output Types in Customizing for Shipping

  • For the handling unit business process: Customizing activity Maintain Output Types in Customizing for Transportation

  • Use an existing output type or create a new output type.
  • In the Processing Routines view, specify the Special Function transmission medium and assign the following parameters to a processing routine:
  • Program: RCBGL_TRIGGER_NAST

  • FORM routine: ENTRY

All other fields remain empty.

In the Customizing activity Set Up Output Control for Labeling Scenarios, assign the shipping or handling unit application to the labeling scenario for which the print request is to be generated automatically. In this way, the labeling scenarios are linked to the corresponding applications using the report RCBGL_TRIGGER_NAST.

Testing Automatic Print Request Generation for Delivery/Handling Unit

Print requests for a delivery or handling unit are generated automatically if the output for the delivery or handling unit is triggered.

  • Check the generated print requests in the labeling workbench.
  • If no print requests were generated, check the error messages for the object EHPR in the Log Display of the labeling workbench.

Generating Print Requests from the "Process Order" Business Process

Automatic print request generation for process orders is implemented in customer exit PPCO0001 (Application development: PP orders). This customer exit is run when a process order is saved. The print request is generated automatically.

Edit the customer exit in Project Management of SAP Enhancements:

  1. Search for exit PPCO0001 under Utilities -> SAP Enhancements or create a new exit with the name PPCO0001.
  2. Open the EXIT_SAPLCOBT_001 function module under Components in SAP Enhancement.
  3. In the source text of the function module, open the entry INCLUDE ZXCO1U01 and implement the function module CBGL_TG01_TRIGGER_PP in this include. For more information about the implementation, see the Example section.

Define the following rule checks in Customizing:

  • If you want to generate print requests automatically using process orders, print request generation must be based on rules that check the status transition of the process orders. The status switch in the process order determines whether a print request is generated.

  • If you do not set rules for generating print requests from process orders, no print requests are generated.

  • If the print request processing rules defined in the Customizing activity Specify Rules for Print Requests of Process Orders have been checked successfully and the result is executed, the additional rules are then validated. Based on most fields specified for the process order, you can specify which rule is to be filled in order to generate a print request. If no rules are specified, a print request is always generated.

  • These settings are not mandatory. However, we recommend that you define the additional rules for generating print requests from process orders.

In the Customizing activity Work Centers for Print Request Generation Using Process Orders (optional setting), enter the work centers that you want to use to automatically generate print requests. Work centers defined here can also be used as filter criteria in other Customizing activities.

Testing Automatic Print Request Generation for Process Order

The print requests for the process order are generated automatically if the process order is saved. The print requests are generated based on the processing rules defined in Customizing.

  • Check the generated print requests in the labeling workbench.
  • If no print requests were generated, check the error messages for the object EHPR in the Log Display of the labeling workbench.
  • No error messages for the processing rules are displayed in the Log Display. If you want to log the execution of the rules for automatic print request generation, assign the user parameter CCGLPID_LOG_TRIGCHK (Activate Trigger Logging) to the user and specify the value X.

Customer enhancement PPCO0001

* EHS-SAF-GLM: automatic label print trigger

* local data declaration ----------------------------------------------

  DATA: lt_messages                       TYPE bal_t_msg,

        lt_position_old                   TYPE ccgld_aafpo,

        lt_sequence_old                   TYPE ccgld_aaffl,

        lt_component_old                  TYPE ccgld_aresb,

        lt_operation_old_afvc             TYPE ccgld_aafvc,

        lt_operation_old_afvv             TYPE ccgld_aafvv,

        lt_relation_old                   TYPE ccgld_aafab,

        lt_pstext_old                     TYPE ccgld_anptx,

        lt_milestone_old                  TYPE ccgld_amlst,

        lt_operation_relations_old_afv    TYPE ccgld_aafvu.

  DATA: ls_position_old                   TYPE aafpo,

        ls_sequence_old                   TYPE aaffl,

        ls_component_old                  TYPE ccgls_aresb,

        ls_operation_old_afvc             TYPE aafvc,

        ls_operation_old_afvv             TYPE aafvv,

        ls_relation_old                   TYPE aafab,

        ls_pstext_old                     TYPE anptx,

        ls_milestone_old                  TYPE amlst,

        ls_operation_relations_old_afv    TYPE aafvu.

  DATA: lv_flg_warning                    TYPE as4flag,

        lv_flg_error                      TYPE as4flag.

* function body -------------------------------------------------------

* do type conversion of importing parameters

  LOOP AT position_table_old.

    MOVE-CORRESPONDING position_table_old TO ls_position_old.

    APPEND ls_position_old TO lt_position_old.

  ENDLOOP.

  LOOP AT sequence_table_old.

    MOVE-CORRESPONDING sequence_table_old TO ls_sequence_old.

    APPEND ls_sequence_old TO lt_sequence_old.

  ENDLOOP.

  LOOP AT component_table_old.

    MOVE-CORRESPONDING component_table_old TO ls_component_old.

    APPEND ls_component_old TO lt_component_old.

  ENDLOOP.

  LOOP AT operation_table_old_afvc.

    MOVE-CORRESPONDING operation_table_old_afvc TO ls_operation_old_afvc.

    APPEND ls_operation_old_afvc TO lt_operation_old_afvc.

  ENDLOOP.

  LOOP AT operation_table_old_afvv.

    MOVE-CORRESPONDING operation_table_old_afvv TO ls_operation_old_afvv.

    APPEND ls_operation_old_afvv TO lt_operation_old_afvv.

  ENDLOOP.

  LOOP AT relation_table_old.

    MOVE-CORRESPONDING relation_table_old TO ls_relation_old.

    APPEND ls_relation_old to lt_relation_old.

  ENDLOOP.

  LOOP AT pstext_table_old.

    MOVE-CORRESPONDING pstext_table_old TO ls_pstext_old.

    APPEND ls_pstext_old to lt_pstext_old.

  ENDLOOP.

  LOOP AT milestone_table_old.

    MOVE-CORRESPONDING milestone_table_old to ls_milestone_old.

    APPEND ls_milestone_old to lt_milestone_old.

  ENDLOOP.

  LOOP AT operation_table_old_afvu.

    MOVE-CORRESPONDING operation_table_old_afvu TO ls_operation_relations_old_afv.

    APPEND ls_operation_relations_old_afv TO lt_operation_relations_old_afv.

  ENDLOOP.

  CALL FUNCTION 'CBGL_TG01_TRIGGER_PP'

    EXPORTING

      it_header                      = header_table[]

      it_header_old                  = header_table_old[]

      it_position                    = position_table[]

      it_position_old                = lt_position_old[]

      it_sequence                    = sequence_table[]

      it_sequence_old                = lt_sequence_old[]

      it_operation                   = operation_table[]

      it_operation_old_afvc          = lt_operation_old_afvc[]

      it_operation_old_afvv          = lt_operation_old_afvv[]

      it_component                   = component_table[]

      it_component_old               = lt_component_old[]

      it_relation                    = relation_table[]

      it_relation_old                = lt_relation_old[]

      it_pstext                      = pstext_table[]

      it_pstext_old                  = lt_pstext_old[]

      it_milestone                   = milestone_table[]

      it_milestone_old               = lt_milestone_old[]

      it_planned_order               = planned_order_table[]

      it_status                      = status_table[]

      it_status_old                  = status_table_old[]

      it_operation_relations         = operation_relations[]

      it_operation_relations_old     = operation_relations_old[]

      it_operation_relations_old_afv = lt_operation_relations_old_afv[]

      it_doclink                     = doclink_table[]

      it_doclink_old                 = doclink_table_old[]

    IMPORTING

      ev_flg_error                   = lv_flg_error

      ev_flg_warning                 = lv_flg_warning

      et_messages                    = lt_messages.






Addresses (Business Address Services)   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.

Length: 30426 Date: 20240523 Time: 174745     sap01-206 ( 222 ms )