Ansicht
Dokumentation

SAMPLE_INTERFACE_00503305 - NOTRANSL: Event: Pflege Konditionen: Feldprüfung

SAMPLE_INTERFACE_00503305 - NOTRANSL: Event: Pflege Konditionen: Feldprüfung

BAL Application Log Documentation   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

In condition maintenance for pricing, prices, surcharges or discounts are created depending on characteristics, such as the material number. A check is made for characteristics on the eligibility of the value. Using this function module (user exit), you can influence the check, and also carry out your own check.

The following parameters are available:

  • FIELDNAME
    Name of characteristic field for which a check is carried out. The field is contained in structure KOMG
  • VALUE
    Contents of character field.
  • KOMG_I
    Contents of communication structure KOMG. It contains the values of individual characteristics for the condition record being processed.
  • KONP_I
    Condition information (item) KONP. Contents of this structure can be used for the selection.
  • T681E_I
    Structure with information for condition record. This information (for example, the number of the condition table) can be used for the selection.
  • CHECK_FIELD
    (Changeable) By deleting this field, the standard check for the characteristic can be switched off.
  • RETURNCODE
    (Changeable) Return value to transfer the result of an own field check to the calling program.
    Return code 0: value correct, 1: errors

Note: If you implement your own check, you should not issue an own error message. The function module is also called during background runs, these are interrupted abruptly by error messages. The calling program treats the RETURNCODE correspondingly, and creates either an error message, or transfers an error code to the calling program. If several USER-Exits are being used, the output of a RETURNCODE not equal to 0 surpresses the processing of subsequently assigned USER-Exits.

Summary of standard functions:

  • Switch off standard field check for a specific characteristic (delete CHECK_FIELD)
  • Carry out own check. When an own check is carried out, the standard check is not switched off. If you want to surpress this, CHECK_FIELD must be deleted.

Example

You wish to permit condition type ZPR0 in VKORG 0003 to create condition records for materials. The materials do not yet exist in the material master.

FUNCTION BTE_INTERFACE_00503305.

*"-----------------------------------------------------

*"*"Local interface:

*" IMPORTING

*" VALUE(FIELDNAME) TYPE SEFELD

*" VALUE(VALUE)

*" VALUE(KOMG_I) TYPE KOMG

*" VALUE(KONP_I) TYPE KONP

*" VALUE(T681E_I) TYPE T681E

*" CHANGING

*" REFERENCE(CHECK_FIELD) TYPE CHAR1

*" REFERENCE(RETURNCODE) TYPE SUBRC

*"-----------------------------------------------------

IF KONP_I-KSCHL = 'ZPR0' AND KOMG_I-VKORG = '0003'.

IF FIELDNAME = 'MATNR'.

CLEAR CHECK_FIELD.

ENDIF.

ENDIF.

ENDFUNCTION. ,,





Parameters

CHECK_FIELD
FIELDNAME
KOMG_I
KONP_I
RETURNCODE
T681E_I
VALUE

Exceptions

Function Group

V13A

ABAP Short Reference   CPI1466 during Backup  
This documentation is copyright by SAP AG.

Length: 3763 Date: 20240523 Time: 074521     sap01-206 ( 59 ms )