SAP Function Modules

BC430_FKEY_COMP SAP Function module - Comparison of Two Foreign Keys







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

Associated Function Group: BC430
Released Date: 24.01.2001
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM BC430_FKEY_COMP - BC430 FKEY COMP





CALL FUNCTION 'BC430_FKEY_COMP' "Comparison of Two Foreign Keys
  EXPORTING
    t_fs_tab =                  " dd03l-tabname
    t_pt_tab =                  " dd03l-tabname
    m_fs_tab =                  " dd03l-tabname
    m_pt_tab =                  " dd03l-tabname
  TABLES
    errors =                    " bc430_error
  EXCEPTIONS
    T_TAB_NOT_ACTIVE = 1        "               Participant's foreign key is inactive
    M_TAB_NOT_ACTIVE = 2        "               Predefined table inactive; fatal error
    SYSTEM_INCONSISTENT = 3     "               Inconsistency, Dictionary Interfaces Are not Working
    .  "  BC430_FKEY_COMP

ABAP code example for Function Module BC430_FKEY_COMP





The ABAP code below is a full code listing to execute function module BC430_FKEY_COMP 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_errors  TYPE STANDARD TABLE OF BC430_ERROR,"TABLES PARAM
wa_errors  LIKE LINE OF it_errors .


SELECT single TABNAME
FROM DD03L
INTO @DATA(ld_t_fs_tab).


SELECT single TABNAME
FROM DD03L
INTO @DATA(ld_t_pt_tab).


SELECT single TABNAME
FROM DD03L
INTO @DATA(ld_m_fs_tab).


SELECT single TABNAME
FROM DD03L
INTO @DATA(ld_m_pt_tab).


"populate fields of struture and append to itab
append wa_errors to it_errors. . CALL FUNCTION 'BC430_FKEY_COMP' EXPORTING t_fs_tab = ld_t_fs_tab t_pt_tab = ld_t_pt_tab m_fs_tab = ld_m_fs_tab m_pt_tab = ld_m_pt_tab TABLES errors = it_errors EXCEPTIONS T_TAB_NOT_ACTIVE = 1 M_TAB_NOT_ACTIVE = 2 SYSTEM_INCONSISTENT = 3 . " BC430_FKEY_COMP
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_t_fs_tab  TYPE DD03L-TABNAME ,
it_errors  TYPE STANDARD TABLE OF BC430_ERROR ,
wa_errors  LIKE LINE OF it_errors,
ld_t_pt_tab  TYPE DD03L-TABNAME ,
ld_m_fs_tab  TYPE DD03L-TABNAME ,
ld_m_pt_tab  TYPE DD03L-TABNAME .


SELECT single TABNAME
FROM DD03L
INTO ld_t_fs_tab.


"populate fields of struture and append to itab
append wa_errors to it_errors.

SELECT single TABNAME
FROM DD03L
INTO ld_t_pt_tab.


SELECT single TABNAME
FROM DD03L
INTO ld_m_fs_tab.


SELECT single TABNAME
FROM DD03L
INTO ld_m_pt_tab.

SAP Documentation for FM BC430_FKEY_COMP


Compares two foreign keys. The function module is part of the course software for the course BC430 (ABAP Dictionary). ...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 BC430_FKEY_COMP or its description.