SAP Function Modules

SAMPLE_INTERFACE_00501000 SAP Function module - Schnittstellenbeschreibung zum Event 00501000







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

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


Pattern for FM SAMPLE_INTERFACE_00501000 - SAMPLE INTERFACE 00501000





CALL FUNCTION 'SAMPLE_INTERFACE_00501000' "Schnittstellenbeschreibung zum Event 00501000
  EXPORTING
*   cancel = SPACE              "
    order_header =              " vbak
    order_item =                " vbapvb
    order_business =            " vbkdvb
    order_partner =             " mcpartner
    order_add =                 " order_add_cm
  IMPORTING
    contract_found =            "
    security_type_selected =    " t691k
  TABLES
    order_open_values =         " bezs132       Belegzeilen
    security_types =            " t691k         Belegkopf
    .  "  SAMPLE_INTERFACE_00501000

ABAP code example for Function Module SAMPLE_INTERFACE_00501000





The ABAP code below is a full code listing to execute function module SAMPLE_INTERFACE_00501000 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:
ld_contract_found  TYPE STRING ,
ld_security_type_selected  TYPE T691K ,
it_order_open_values  TYPE STANDARD TABLE OF BEZS132,"TABLES PARAM
wa_order_open_values  LIKE LINE OF it_order_open_values ,
it_security_types  TYPE STANDARD TABLE OF T691K,"TABLES PARAM
wa_security_types  LIKE LINE OF it_security_types .

DATA(ld_cancel) = 'some text here'.
DATA(ld_order_header) = 'Check type of data required'.
DATA(ld_order_item) = 'Check type of data required'.
DATA(ld_order_business) = 'Check type of data required'.
DATA(ld_order_partner) = 'Check type of data required'.
DATA(ld_order_add) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_order_open_values to it_order_open_values.

"populate fields of struture and append to itab
append wa_security_types to it_security_types. . CALL FUNCTION 'SAMPLE_INTERFACE_00501000' EXPORTING * cancel = ld_cancel order_header = ld_order_header order_item = ld_order_item order_business = ld_order_business order_partner = ld_order_partner order_add = ld_order_add IMPORTING contract_found = ld_contract_found security_type_selected = ld_security_type_selected TABLES order_open_values = it_order_open_values security_types = it_security_types . " SAMPLE_INTERFACE_00501000
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_contract_found  TYPE STRING ,
ld_cancel  TYPE STRING ,
it_order_open_values  TYPE STANDARD TABLE OF BEZS132 ,
wa_order_open_values  LIKE LINE OF it_order_open_values,
ld_security_type_selected  TYPE T691K ,
ld_order_header  TYPE VBAK ,
it_security_types  TYPE STANDARD TABLE OF T691K ,
wa_security_types  LIKE LINE OF it_security_types,
ld_order_item  TYPE VBAPVB ,
ld_order_business  TYPE VBKDVB ,
ld_order_partner  TYPE MCPARTNER ,
ld_order_add  TYPE ORDER_ADD_CM .

ld_cancel = 'some text here'.

"populate fields of struture and append to itab
append wa_order_open_values to it_order_open_values.
ld_order_header = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_security_types to it_security_types.
ld_order_item = 'Check type of data required'.
ld_order_business = 'Check type of data required'.
ld_order_partner = 'Check type of data required'.
ld_order_add = 'Check type of data required'.

SAP Documentation for FM SAMPLE_INTERFACE_00501000


The event runs before the document credit check. The function module determines a conract that is saved in separate tables (sales document ...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 SAMPLE_INTERFACE_00501000 or its description.