SAP Function Modules

K_BP_BATCHINPUT SAP Function module - Create business process (batch input)







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

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


Pattern for FM K_BP_BATCHINPUT - K BP BATCHINPUT





CALL FUNCTION 'K_BP_BATCHINPUT' "Create business process (batch input)
* EXPORTING
*   client = SY-MANDT           " apqi-mandant  Client
*   holddate = SPACE            " apqi-startdate  Date Format Folder Locked Until:
*   keep = SPACE                " apqi-qerase   Save or delete folder?
*   mapn_e = 'ERRORMAP'         " apqi-groupid  Default 'errormap'
*   map_nr = 'BATCHMAP'         " apqi-groupid  Folder Name
*   online = ' '                "               Online indicator: X
*   user = SY-UNAME             " apqi-userid   BENUTZER KENNZEICHEN DEFAULT SY-UNAME
  TABLES
    i_list =                    " cbprz         CBPRZ STRUKTUR
  EXCEPTIONS
    ERROR_IN_CALL_TRANSACTION = 1  "            ??
    NO_ENTRIES_IN_TABLE = 2     "               Empty Transfer Table
    WRONG_KOKRS = 3             "               Incorrect controlling area?
    WRONG_ONLINE_PARAMETER = 4  "
    .  "  K_BP_BATCHINPUT

ABAP code example for Function Module K_BP_BATCHINPUT





The ABAP code below is a full code listing to execute function module K_BP_BATCHINPUT 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_i_list  TYPE STANDARD TABLE OF CBPRZ,"TABLES PARAM
wa_i_list  LIKE LINE OF it_i_list .


SELECT single MANDANT
FROM APQI
INTO @DATA(ld_client).


SELECT single STARTDATE
FROM APQI
INTO @DATA(ld_holddate).


SELECT single QERASE
FROM APQI
INTO @DATA(ld_keep).


SELECT single GROUPID
FROM APQI
INTO @DATA(ld_mapn_e).


SELECT single GROUPID
FROM APQI
INTO @DATA(ld_map_nr).

DATA(ld_online) = 'some text here'.

SELECT single USERID
FROM APQI
INTO @DATA(ld_user).


"populate fields of struture and append to itab
append wa_i_list to it_i_list. . CALL FUNCTION 'K_BP_BATCHINPUT' * EXPORTING * client = ld_client * holddate = ld_holddate * keep = ld_keep * mapn_e = ld_mapn_e * map_nr = ld_map_nr * online = ld_online * user = ld_user TABLES i_list = it_i_list EXCEPTIONS ERROR_IN_CALL_TRANSACTION = 1 NO_ENTRIES_IN_TABLE = 2 WRONG_KOKRS = 3 WRONG_ONLINE_PARAMETER = 4 . " K_BP_BATCHINPUT
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 ELSEIF SY-SUBRC EQ 4. "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_client  TYPE APQI-MANDANT ,
it_i_list  TYPE STANDARD TABLE OF CBPRZ ,
wa_i_list  LIKE LINE OF it_i_list,
ld_holddate  TYPE APQI-STARTDATE ,
ld_keep  TYPE APQI-QERASE ,
ld_mapn_e  TYPE APQI-GROUPID ,
ld_map_nr  TYPE APQI-GROUPID ,
ld_online  TYPE STRING ,
ld_user  TYPE APQI-USERID .


SELECT single MANDANT
FROM APQI
INTO ld_client.


"populate fields of struture and append to itab
append wa_i_list to it_i_list.

SELECT single STARTDATE
FROM APQI
INTO ld_holddate.


SELECT single QERASE
FROM APQI
INTO ld_keep.


SELECT single GROUPID
FROM APQI
INTO ld_mapn_e.


SELECT single GROUPID
FROM APQI
INTO ld_map_nr.

ld_online = 'some text here'.

SELECT single USERID
FROM APQI
INTO ld_user.

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