SAP Function Modules

SAMPLE_INTERFACE_01000010 SAP Function module - Interface for ND Plug-In BTE: Stock







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

Associated Function Group: BTSI
Released Date: 10.03.1999
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM SAMPLE_INTERFACE_01000010 - SAMPLE INTERFACE 01000010





CALL FUNCTION 'SAMPLE_INTERFACE_01000010' "Interface for ND Plug-In BTE: Stock
* EXPORTING
*   budat = SY-DATLO            " mkpf-budat
*   usnam = SY-UNAME            " mkpf-usnam
  TABLES
    xmarc =                     " smarc
    xmard =                     " smard
    xmch1 =                     " smch1
    xmcha =                     " smcha
    xmchb =                     " smchb
    xmkol =                     " smkol
    xmska =                     " smska
    xmsku =                     " smsku
    xmslb =                     " smslb
    xmspr =                     " smspr
    xmssa =                     " smssa
    xmssl =                     " smssl
    xmssq =                     " smssq
    .  "  SAMPLE_INTERFACE_01000010

ABAP code example for Function Module SAMPLE_INTERFACE_01000010





The ABAP code below is a full code listing to execute function module SAMPLE_INTERFACE_01000010 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_xmarc  TYPE STANDARD TABLE OF SMARC,"TABLES PARAM
wa_xmarc  LIKE LINE OF it_xmarc ,
it_xmard  TYPE STANDARD TABLE OF SMARD,"TABLES PARAM
wa_xmard  LIKE LINE OF it_xmard ,
it_xmch1  TYPE STANDARD TABLE OF SMCH1,"TABLES PARAM
wa_xmch1  LIKE LINE OF it_xmch1 ,
it_xmcha  TYPE STANDARD TABLE OF SMCHA,"TABLES PARAM
wa_xmcha  LIKE LINE OF it_xmcha ,
it_xmchb  TYPE STANDARD TABLE OF SMCHB,"TABLES PARAM
wa_xmchb  LIKE LINE OF it_xmchb ,
it_xmkol  TYPE STANDARD TABLE OF SMKOL,"TABLES PARAM
wa_xmkol  LIKE LINE OF it_xmkol ,
it_xmska  TYPE STANDARD TABLE OF SMSKA,"TABLES PARAM
wa_xmska  LIKE LINE OF it_xmska ,
it_xmsku  TYPE STANDARD TABLE OF SMSKU,"TABLES PARAM
wa_xmsku  LIKE LINE OF it_xmsku ,
it_xmslb  TYPE STANDARD TABLE OF SMSLB,"TABLES PARAM
wa_xmslb  LIKE LINE OF it_xmslb ,
it_xmspr  TYPE STANDARD TABLE OF SMSPR,"TABLES PARAM
wa_xmspr  LIKE LINE OF it_xmspr ,
it_xmssa  TYPE STANDARD TABLE OF SMSSA,"TABLES PARAM
wa_xmssa  LIKE LINE OF it_xmssa ,
it_xmssl  TYPE STANDARD TABLE OF SMSSL,"TABLES PARAM
wa_xmssl  LIKE LINE OF it_xmssl ,
it_xmssq  TYPE STANDARD TABLE OF SMSSQ,"TABLES PARAM
wa_xmssq  LIKE LINE OF it_xmssq .


SELECT single BUDAT
FROM MKPF
INTO @DATA(ld_budat).


SELECT single USNAM
FROM MKPF
INTO @DATA(ld_usnam).


"populate fields of struture and append to itab
append wa_xmarc to it_xmarc.

"populate fields of struture and append to itab
append wa_xmard to it_xmard.

"populate fields of struture and append to itab
append wa_xmch1 to it_xmch1.

"populate fields of struture and append to itab
append wa_xmcha to it_xmcha.

"populate fields of struture and append to itab
append wa_xmchb to it_xmchb.

"populate fields of struture and append to itab
append wa_xmkol to it_xmkol.

"populate fields of struture and append to itab
append wa_xmska to it_xmska.

"populate fields of struture and append to itab
append wa_xmsku to it_xmsku.

"populate fields of struture and append to itab
append wa_xmslb to it_xmslb.

"populate fields of struture and append to itab
append wa_xmspr to it_xmspr.

"populate fields of struture and append to itab
append wa_xmssa to it_xmssa.

"populate fields of struture and append to itab
append wa_xmssl to it_xmssl.

"populate fields of struture and append to itab
append wa_xmssq to it_xmssq. . CALL FUNCTION 'SAMPLE_INTERFACE_01000010' * EXPORTING * budat = ld_budat * usnam = ld_usnam TABLES xmarc = it_xmarc xmard = it_xmard xmch1 = it_xmch1 xmcha = it_xmcha xmchb = it_xmchb xmkol = it_xmkol xmska = it_xmska xmsku = it_xmsku xmslb = it_xmslb xmspr = it_xmspr xmssa = it_xmssa xmssl = it_xmssl xmssq = it_xmssq . " SAMPLE_INTERFACE_01000010
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_budat  TYPE MKPF-BUDAT ,
it_xmarc  TYPE STANDARD TABLE OF SMARC ,
wa_xmarc  LIKE LINE OF it_xmarc,
ld_usnam  TYPE MKPF-USNAM ,
it_xmard  TYPE STANDARD TABLE OF SMARD ,
wa_xmard  LIKE LINE OF it_xmard,
it_xmch1  TYPE STANDARD TABLE OF SMCH1 ,
wa_xmch1  LIKE LINE OF it_xmch1,
it_xmcha  TYPE STANDARD TABLE OF SMCHA ,
wa_xmcha  LIKE LINE OF it_xmcha,
it_xmchb  TYPE STANDARD TABLE OF SMCHB ,
wa_xmchb  LIKE LINE OF it_xmchb,
it_xmkol  TYPE STANDARD TABLE OF SMKOL ,
wa_xmkol  LIKE LINE OF it_xmkol,
it_xmska  TYPE STANDARD TABLE OF SMSKA ,
wa_xmska  LIKE LINE OF it_xmska,
it_xmsku  TYPE STANDARD TABLE OF SMSKU ,
wa_xmsku  LIKE LINE OF it_xmsku,
it_xmslb  TYPE STANDARD TABLE OF SMSLB ,
wa_xmslb  LIKE LINE OF it_xmslb,
it_xmspr  TYPE STANDARD TABLE OF SMSPR ,
wa_xmspr  LIKE LINE OF it_xmspr,
it_xmssa  TYPE STANDARD TABLE OF SMSSA ,
wa_xmssa  LIKE LINE OF it_xmssa,
it_xmssl  TYPE STANDARD TABLE OF SMSSL ,
wa_xmssl  LIKE LINE OF it_xmssl,
it_xmssq  TYPE STANDARD TABLE OF SMSSQ ,
wa_xmssq  LIKE LINE OF it_xmssq.


SELECT single BUDAT
FROM MKPF
INTO ld_budat.


"populate fields of struture and append to itab
append wa_xmarc to it_xmarc.

SELECT single USNAM
FROM MKPF
INTO ld_usnam.


"populate fields of struture and append to itab
append wa_xmard to it_xmard.

"populate fields of struture and append to itab
append wa_xmch1 to it_xmch1.

"populate fields of struture and append to itab
append wa_xmcha to it_xmcha.

"populate fields of struture and append to itab
append wa_xmchb to it_xmchb.

"populate fields of struture and append to itab
append wa_xmkol to it_xmkol.

"populate fields of struture and append to itab
append wa_xmska to it_xmska.

"populate fields of struture and append to itab
append wa_xmsku to it_xmsku.

"populate fields of struture and append to itab
append wa_xmslb to it_xmslb.

"populate fields of struture and append to itab
append wa_xmspr to it_xmspr.

"populate fields of struture and append to itab
append wa_xmssa to it_xmssa.

"populate fields of struture and append to itab
append wa_xmssl to it_xmssl.

"populate fields of struture and append to itab
append wa_xmssq to it_xmssq.

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