Select language:

Defining the Procedure 

  1. You can select one of the two following alternatives:
  2. ·

    Select the appropriate activity from Customizing in the relevant application

    ·

    Use transaction NACE in expert mode. The following describes this alternative.
  3. Select your application and select Edit ® Procedures.
  4. In change mode select Edit ® New entries. In Control assign your procedure output types.
  5. You can use an ABAP condition as an exit criterion for an output type. You define new conditions with transaction V/27.
  6. If the condition is met, then the system does not search for messages of this output type. You can also define conditions in

    define access sequences.
  7. Save your entries.
  8. The following illustration shows that procedure V10000 is declared for order messages. The application’s Customizing defines when this procedure should be applied.

     

    The following illustration shows the output types that are declared in procedure V10000. Subsequent explanations will concern output type BA00 (order confirmation). The counters defined in the procedure do not affect message determination because the procedure is always processed as a whole.

     

    In the example above, condition 2 means that the sales document must be checked for completeness. A message is only generated if the document is complete.

    The code is:

    1 form_kobed_002.
    2 * Falls Verkaufsbeleg vollständig ist, soll Nachricht erzeugt werden
    3 sy-subrc = 0.
    4 if komkbv1-uvall ne 'C'.
    5 sy-subrc = 4.
    6 exit.
    7 endif.
    8 if komkbv1-costa ne space and
    9 komkbv1-costa ne 'C'.
    10 sy-subrc = 4.
    11 exit.
    12 endif.
    13 if not komkbv1-lifsk is initial.
    14 if komkbv1-lifsk ne tvls-lifsp.
    15 select single * from tvls where lifsp = komkbv1-lifsk.
    16 endif.
    17 if sy-subrc = 0 and
    18 tvls-spedr ne space.
    19 sy-subrc = 4.
    20 exit.
    21 endif.
    23 * Kein Druck, wenn Kreditsperre sitzt
    24 if komkbv1-cmgst ca 'BC'.
    25 sy-subrc = 4.
    26 exit.
    27 endif.
    28 endform.