SAP Function Modules

FKK_SAMPLE_1840 SAP Function module







FKK_SAMPLE_1840 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 FKK_SAMPLE_1840 into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM FKK_SAMPLE_1840 - FKK SAMPLE 1840





CALL FUNCTION 'FKK_SAMPLE_1840' "
  EXPORTING
    i_low =                     " c             Lower Limit for Contract Accounts
    i_high =                    " c             Upper Limit for Contract Accounts
*   i_fkkcocc =                 " fkkcocc       Obsolete: Run Parameters
*   i_fkk_prot =                " fkkprot       Obsolete: Additional Log: Parameters
*   i_basics =                  " fkk_mad_basics  Basis Parameters of Run
* TABLES
*   t_fimsg =                   " fimsg         Obsolete: FI Message Table
*   t_bukrs =                   " fkkr_bukrs    Obsolete: Company Code Restriction
*   t_gpart =                   " fkkr_gpart    Obsolete: Business Partner Restriction
*   t_vkont =                   " fkkr_vkont    Obsolete: Contract Account Restriction
*   t_fkkcoinfo =               " fkkcoinfo     Obsolete: Required Periods
*   t_prot_gpart =              " fkkr_gpart    Obsolete: Additional Log: Business Partner
*   t_prot_vkont =              " fkkr_vkont    Obsolete: Additional Log: Contract Account
*   t_counter =                 " fkk_mass_act_count  Counter with Number and Content
  CHANGING
    c_test_num =                " i             Tested Attempts
    c_success_num =             " i             Successful Attempts
    .  "  FKK_SAMPLE_1840

ABAP code example for Function Module FKK_SAMPLE_1840





The ABAP code below is a full code listing to execute function module FKK_SAMPLE_1840 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_t_fimsg  TYPE STANDARD TABLE OF FIMSG,"TABLES PARAM
wa_t_fimsg  LIKE LINE OF it_t_fimsg ,
it_t_bukrs  TYPE STANDARD TABLE OF FKKR_BUKRS,"TABLES PARAM
wa_t_bukrs  LIKE LINE OF it_t_bukrs ,
it_t_gpart  TYPE STANDARD TABLE OF FKKR_GPART,"TABLES PARAM
wa_t_gpart  LIKE LINE OF it_t_gpart ,
it_t_vkont  TYPE STANDARD TABLE OF FKKR_VKONT,"TABLES PARAM
wa_t_vkont  LIKE LINE OF it_t_vkont ,
it_t_fkkcoinfo  TYPE STANDARD TABLE OF FKKCOINFO,"TABLES PARAM
wa_t_fkkcoinfo  LIKE LINE OF it_t_fkkcoinfo ,
it_t_prot_gpart  TYPE STANDARD TABLE OF FKKR_GPART,"TABLES PARAM
wa_t_prot_gpart  LIKE LINE OF it_t_prot_gpart ,
it_t_prot_vkont  TYPE STANDARD TABLE OF FKKR_VKONT,"TABLES PARAM
wa_t_prot_vkont  LIKE LINE OF it_t_prot_vkont ,
it_t_counter  TYPE STANDARD TABLE OF FKK_MASS_ACT_COUNT,"TABLES PARAM
wa_t_counter  LIKE LINE OF it_t_counter .

DATA(ld_c_test_num) = 'Check type of data required'.
DATA(ld_c_success_num) = 'Check type of data required'.
DATA(ld_i_low) = 'Check type of data required'.
DATA(ld_i_high) = 'Check type of data required'.
DATA(ld_i_fkkcocc) = 'Check type of data required'.
DATA(ld_i_fkk_prot) = 'Check type of data required'.
DATA(ld_i_basics) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_fimsg to it_t_fimsg.

"populate fields of struture and append to itab
append wa_t_bukrs to it_t_bukrs.

"populate fields of struture and append to itab
append wa_t_gpart to it_t_gpart.

"populate fields of struture and append to itab
append wa_t_vkont to it_t_vkont.

"populate fields of struture and append to itab
append wa_t_fkkcoinfo to it_t_fkkcoinfo.

"populate fields of struture and append to itab
append wa_t_prot_gpart to it_t_prot_gpart.

"populate fields of struture and append to itab
append wa_t_prot_vkont to it_t_prot_vkont.

"populate fields of struture and append to itab
append wa_t_counter to it_t_counter. . CALL FUNCTION 'FKK_SAMPLE_1840' EXPORTING i_low = ld_i_low i_high = ld_i_high * i_fkkcocc = ld_i_fkkcocc * i_fkk_prot = ld_i_fkk_prot * i_basics = ld_i_basics * TABLES * t_fimsg = it_t_fimsg * t_bukrs = it_t_bukrs * t_gpart = it_t_gpart * t_vkont = it_t_vkont * t_fkkcoinfo = it_t_fkkcoinfo * t_prot_gpart = it_t_prot_gpart * t_prot_vkont = it_t_prot_vkont * t_counter = it_t_counter CHANGING c_test_num = ld_c_test_num c_success_num = ld_c_success_num . " FKK_SAMPLE_1840
IF SY-SUBRC EQ 0. "All OK 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_c_test_num  TYPE I ,
ld_i_low  TYPE C ,
it_t_fimsg  TYPE STANDARD TABLE OF FIMSG ,
wa_t_fimsg  LIKE LINE OF it_t_fimsg,
ld_c_success_num  TYPE I ,
ld_i_high  TYPE C ,
it_t_bukrs  TYPE STANDARD TABLE OF FKKR_BUKRS ,
wa_t_bukrs  LIKE LINE OF it_t_bukrs,
ld_i_fkkcocc  TYPE FKKCOCC ,
it_t_gpart  TYPE STANDARD TABLE OF FKKR_GPART ,
wa_t_gpart  LIKE LINE OF it_t_gpart,
ld_i_fkk_prot  TYPE FKKPROT ,
it_t_vkont  TYPE STANDARD TABLE OF FKKR_VKONT ,
wa_t_vkont  LIKE LINE OF it_t_vkont,
ld_i_basics  TYPE FKK_MAD_BASICS ,
it_t_fkkcoinfo  TYPE STANDARD TABLE OF FKKCOINFO ,
wa_t_fkkcoinfo  LIKE LINE OF it_t_fkkcoinfo,
it_t_prot_gpart  TYPE STANDARD TABLE OF FKKR_GPART ,
wa_t_prot_gpart  LIKE LINE OF it_t_prot_gpart,
it_t_prot_vkont  TYPE STANDARD TABLE OF FKKR_VKONT ,
wa_t_prot_vkont  LIKE LINE OF it_t_prot_vkont,
it_t_counter  TYPE STANDARD TABLE OF FKK_MASS_ACT_COUNT ,
wa_t_counter  LIKE LINE OF it_t_counter.

ld_c_test_num = 'Check type of data required'.
ld_i_low = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_fimsg to it_t_fimsg.
ld_c_success_num = 'Check type of data required'.
ld_i_high = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_bukrs to it_t_bukrs.
ld_i_fkkcocc = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_gpart to it_t_gpart.
ld_i_fkk_prot = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_vkont to it_t_vkont.
ld_i_basics = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_fkkcoinfo to it_t_fkkcoinfo.

"populate fields of struture and append to itab
append wa_t_prot_gpart to it_t_prot_gpart.

"populate fields of struture and append to itab
append wa_t_prot_vkont to it_t_prot_vkont.

"populate fields of struture and append to itab
append wa_t_counter to it_t_counter.

SAP Documentation for FM FKK_SAMPLE_1840


The function module processed in event 1700 is triggered by the activities main program to create account statements for a given ...See here for full SAP fm documentation








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 FKK_SAMPLE_1840 or its description.