SD Function module Used the same way in S/4HANA

SD_COND_ACCESS Select Condition Records for Determination

This is the access module of the condition technique: for a given application, condition type and access (T682I) it reads the valid condition records from the relevant condition table based on the values in the header/item communication areas. It is used in custom developments that simulate pricing, output or account determination with the standard access sequence. Fill the communication areas (KOMK/KOMP or the application's equivalent) completely; READ_BUT_NOT_FOUND is raised when no record exists and FIELD_IS_INITIAL when a key field is empty.

Function group
V61Z
Remote-enabled (RFC)
No
Type
Function module

Importing parameters

ParameterTypeDescriptionRequired
APPLICATIONT685-KAPPLApplicationYes
CONDITION_TYPET685-KSCHLCondition typeYes
HEADER_COMM_AREAANYHeader communication areaYes
POSITION_COMM_AREAANYItem communication areaYes
T682I_IT682IAccess definitionYes
KOPRT_IKOPRTCondition analysis log dataYes

Exporting parameters

ParameterTypeDescription
CONDITION_IS_PURELY_HEADER—Condition is purely header level
CONDITION_IS_IN_MEMORYV61Z_HEX13Condition is in memory

Changing parameters

ParameterTypeDescriptionRequired
POSITION_COMM_AREA_DYNAMICANYDynamic item communication area—

Tables parameters

ParameterTypeDescriptionRequired
CONDITION_RECORDS—Condition records foundYes

Exceptions

  • FIELD_IS_INITIAL — Key field is initial
  • NOT_READ_UNQUALIFIED — Unqualified access not read
  • READ_BUT_NOT_FOUND — Read but not found
  • READ_BUT_BLOCKED — Read but blocked
  • T681Z_MISSING — T681Z entry missing
  • T681V_MISSING — T681V entry missing
  • T682Z_MISSING — T682Z entry missing
  • MVA_ERROR — Multi-value attribute error

Call template (ABAP)

A skeleton generated from the interface. It lists mandatory importing parameters, exporting parameters and tables; declare the variables with suitable types in your own program.

CALL FUNCTION 'SD_COND_ACCESS'
  EXPORTING
    application = lv_application
    condition_type = lv_condition_type
    header_comm_area = lv_header_comm_area
    position_comm_area = lv_position_comm_area
    t682i_i = lv_t682i_i
    koprt_i = lv_koprt_i
  IMPORTING
    condition_is_purely_header = lv_condition_is_purely_header
    condition_is_in_memory = lv_condition_is_in_memory
  CHANGING
    position_comm_area_dynamic = lv_position_comm_area_dynamic
  TABLES
    condition_records = lt_condition_records
  EXCEPTIONS
    field_is_initial = 1
    not_read_unqualified = 2
    read_but_not_found = 3
    read_but_blocked = 4
    t681z_missing = 5
    t681v_missing = 6
    t682z_missing = 7
    mva_error = 8
    OTHERS = 9.

Related tables

Can't find the report you need?

We also build anything that is not in the catalog. Describe it briefly and we will suggest the right solution.

Request a custom report