SAP Function Modules

COND_AGREEMENT_READ SAP Function module







COND_AGREEMENT_READ is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name COND_AGREEMENT_READ into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: V64C
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM COND_AGREEMENT_READ - COND AGREEMENT READ





CALL FUNCTION 'COND_AGREEMENT_READ' "
  EXPORTING
    pi_kona =                   " kona
*   no_konp_konm_konw = ' '     "
* TABLES
*   pe_t_konh =                 " konh
*   pe_t_konp =                 " konp
*   pe_t_konm =                 " konm
*   pe_t_konw =                 " konw
*   pe_t_kondr =                " sdkondarch
  EXCEPTIONS
    NO_AGREEMENT = 1            "
    AGREEMENT_NOT_FOUND = 2     "
    NO_CONDITIONS_FOUND = 3     "
    .  "  COND_AGREEMENT_READ

ABAP code example for Function Module COND_AGREEMENT_READ





The ABAP code below is a full code listing to execute function module COND_AGREEMENT_READ including all data declarations. The code uses the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).

DATA:
it_pe_t_konh  TYPE STANDARD TABLE OF KONH,"TABLES PARAM
wa_pe_t_konh  LIKE LINE OF it_pe_t_konh ,
it_pe_t_konp  TYPE STANDARD TABLE OF KONP,"TABLES PARAM
wa_pe_t_konp  LIKE LINE OF it_pe_t_konp ,
it_pe_t_konm  TYPE STANDARD TABLE OF KONM,"TABLES PARAM
wa_pe_t_konm  LIKE LINE OF it_pe_t_konm ,
it_pe_t_konw  TYPE STANDARD TABLE OF KONW,"TABLES PARAM
wa_pe_t_konw  LIKE LINE OF it_pe_t_konw ,
it_pe_t_kondr  TYPE STANDARD TABLE OF SDKONDARCH,"TABLES PARAM
wa_pe_t_kondr  LIKE LINE OF it_pe_t_kondr .

DATA(ld_pi_kona) = 'Check type of data required'.
DATA(ld_no_konp_konm_konw) = 'some text here'.

"populate fields of struture and append to itab
append wa_pe_t_konh to it_pe_t_konh.

"populate fields of struture and append to itab
append wa_pe_t_konp to it_pe_t_konp.

"populate fields of struture and append to itab
append wa_pe_t_konm to it_pe_t_konm.

"populate fields of struture and append to itab
append wa_pe_t_konw to it_pe_t_konw.

"populate fields of struture and append to itab
append wa_pe_t_kondr to it_pe_t_kondr. . CALL FUNCTION 'COND_AGREEMENT_READ' EXPORTING pi_kona = ld_pi_kona * no_konp_konm_konw = ld_no_konp_konm_konw * TABLES * pe_t_konh = it_pe_t_konh * pe_t_konp = it_pe_t_konp * pe_t_konm = it_pe_t_konm * pe_t_konw = it_pe_t_konw * pe_t_kondr = it_pe_t_kondr EXCEPTIONS NO_AGREEMENT = 1 AGREEMENT_NOT_FOUND = 2 NO_CONDITIONS_FOUND = 3 . " COND_AGREEMENT_READ
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_pi_kona  TYPE KONA ,
it_pe_t_konh  TYPE STANDARD TABLE OF KONH ,
wa_pe_t_konh  LIKE LINE OF it_pe_t_konh,
ld_no_konp_konm_konw  TYPE STRING ,
it_pe_t_konp  TYPE STANDARD TABLE OF KONP ,
wa_pe_t_konp  LIKE LINE OF it_pe_t_konp,
it_pe_t_konm  TYPE STANDARD TABLE OF KONM ,
wa_pe_t_konm  LIKE LINE OF it_pe_t_konm,
it_pe_t_konw  TYPE STANDARD TABLE OF KONW ,
wa_pe_t_konw  LIKE LINE OF it_pe_t_konw,
it_pe_t_kondr  TYPE STANDARD TABLE OF SDKONDARCH ,
wa_pe_t_kondr  LIKE LINE OF it_pe_t_kondr.

ld_pi_kona = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_pe_t_konh to it_pe_t_konh.
ld_no_konp_konm_konw = 'some text here'.

"populate fields of struture and append to itab
append wa_pe_t_konp to it_pe_t_konp.

"populate fields of struture and append to itab
append wa_pe_t_konm to it_pe_t_konm.

"populate fields of struture and append to itab
append wa_pe_t_konw to it_pe_t_konw.

"populate fields of struture and append to itab
append wa_pe_t_kondr to it_pe_t_kondr.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name COND_AGREEMENT_READ or its description.