SAP BAPI_APPREQUEST_CREATE Function Module for Create Appropriation Request
BAPI_APPREQUEST_CREATE is a standard bapi apprequest create SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Create Appropriation Request processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for bapi apprequest create FM, simply by entering the name BAPI_APPREQUEST_CREATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: AIA_BAPI
Program Name: SAPLAIA_BAPI
Main Program: SAPLAIA_BAPI
Appliation area: A
Release date: 30-Nov-1999
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function BAPI_APPREQUEST_CREATE pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'BAPI_APPREQUEST_CREATE'"Create Appropriation Request.
EXPORTING
* APPROPRIATIONREQUEST_IN = "Appropriation Request Number (Formatted for Coding Mask)
* LANGUAGE_ISO = "Language According to ISO 639
* TEST_RUN = ' ' "Test Run
APPREQUEST_TYPE = "Appropriation Request Type
* APPROPRIATIONREQUESTVARIANT_IN = "Variant of Appropriation Request
CONTROLLING_AREA = "Responsible Controlling Area
* MASTER_DATA = "Description of Appropriation Request
* USER_FIELDS = "User Fields
* VARIANT = "Master Data of the Appropriation Request Variant
* PLAN_TOTAL = "Overall Plan Values
* LANGUAGE = "Language in SAP Format
IMPORTING
EXTERNALNUMBER = "Appropriation Request Number (Formatted for Coding Mask)
APPROPRIATIONREQUESTVARIANTOUT = "Appropriation Request Variant (Formatted for Coding Mask)
TABLES
* ORG_UNITS = "Sequence Number - Key for Tables of Approp. Request
* VARIANT_TO_VERSION = "Assignment of Approp. Request Variant to Plan Version
* PLAN_YEAR = "Annual Plan
* ASSIGNMENT_TO_POS = "Assignment to Investment Program Position(s)
* ASSIGNMENT_TO_BUDG_CATEG = "Assignment of Inv. Program Position(s) to Budget Categories
* RETURN = "Return Code
* DIVISION = "Requesting Division
* MATERIAL_GRP = "Requesting Material Group
* INVESTMENT_REASON = "Reason for Investment
* ENVIRONMNT_INVEST = "Reason for Environmental Investment
* ASSETS_EQUIS = "Assets and Equipment to be Replaced
* ORDERS = "Orders
* WBS_ELEMENT = "Work Breakdown Structure Element (WBS Element)
* PARTNER = "Partner
IMPORTING Parameters details for BAPI_APPREQUEST_CREATE
APPROPRIATIONREQUEST_IN - Appropriation Request Number (Formatted for Coding Mask)
Data type: BAPI_APPREQ_ID-APPREQOptional: Yes
Call by Reference: No ( called with pass by value option)
LANGUAGE_ISO - Language According to ISO 639
Data type: BAPI_APPREQ_AUX-LANGU_ISOOptional: Yes
Call by Reference: No ( called with pass by value option)
TEST_RUN - Test Run
Data type: BAPI_APPREQ_AUX-TESTRUNDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
APPREQUEST_TYPE - Appropriation Request Type
Data type: BAPI_APPREQ_ID-APPREQTYPEOptional: No
Call by Reference: No ( called with pass by value option)
APPROPRIATIONREQUESTVARIANT_IN - Variant of Appropriation Request
Data type: BAPI_APPREQ_ID-APPREQVRNTOptional: Yes
Call by Reference: No ( called with pass by value option)
CONTROLLING_AREA - Responsible Controlling Area
Data type: BAPI_APPREQ_ID-CNTRL_AREAOptional: No
Call by Reference: No ( called with pass by value option)
MASTER_DATA - Description of Appropriation Request
Data type: BAPIAPPREQMASTEROptional: Yes
Call by Reference: No ( called with pass by value option)
USER_FIELDS - User Fields
Data type: BAPIAPPREQUSEROptional: Yes
Call by Reference: No ( called with pass by value option)
VARIANT - Master Data of the Appropriation Request Variant
Data type: BAPIAPPREQVARNTOptional: Yes
Call by Reference: No ( called with pass by value option)
PLAN_TOTAL - Overall Plan Values
Data type: BAPIAPPREQPLANTOTALOptional: Yes
Call by Reference: No ( called with pass by value option)
LANGUAGE - Language in SAP Format
Data type: BAPI_APPREQ_AUX-LANGUOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for BAPI_APPREQUEST_CREATE
EXTERNALNUMBER - Appropriation Request Number (Formatted for Coding Mask)
Data type: BAPI_APPREQ_ID-APPREQOptional: No
Call by Reference: No ( called with pass by value option)
APPROPRIATIONREQUESTVARIANTOUT - Appropriation Request Variant (Formatted for Coding Mask)
Data type: BAPI_APPREQ_ID-APPREQVRNTOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for BAPI_APPREQUEST_CREATE
ORG_UNITS - Sequence Number - Key for Tables of Approp. Request
Data type: BAPIAPPREQORGUNITOptional: Yes
Call by Reference: No ( called with pass by value option)
VARIANT_TO_VERSION - Assignment of Approp. Request Variant to Plan Version
Data type: BAPIAPPREQVARNTASSIGNOptional: Yes
Call by Reference: Yes
PLAN_YEAR - Annual Plan
Data type: BAPIAPPREQPLANYEAROptional: Yes
Call by Reference: Yes
ASSIGNMENT_TO_POS - Assignment to Investment Program Position(s)
Data type: BAPIAPPREQEXPPROGASSGNOptional: Yes
Call by Reference: Yes
ASSIGNMENT_TO_BUDG_CATEG - Assignment of Inv. Program Position(s) to Budget Categories
Data type: BAPIAPPREQEXPPROGASSGNBUDGCATGOptional: Yes
Call by Reference: Yes
RETURN - Return Code
Data type: BAPIRET2Optional: Yes
Call by Reference: No ( called with pass by value option)
DIVISION - Requesting Division
Data type: BAPIAPPREQDIVISIONOptional: Yes
Call by Reference: No ( called with pass by value option)
MATERIAL_GRP - Requesting Material Group
Data type: BAPIAPPREQMATGROUPOptional: Yes
Call by Reference: No ( called with pass by value option)
INVESTMENT_REASON - Reason for Investment
Data type: BAPIAPPREQINVREASONOptional: Yes
Call by Reference: No ( called with pass by value option)
ENVIRONMNT_INVEST - Reason for Environmental Investment
Data type: BAPIAPPREQENVINVESTOptional: Yes
Call by Reference: No ( called with pass by value option)
ASSETS_EQUIS - Assets and Equipment to be Replaced
Data type: BAPIAPPREQASSETOptional: Yes
Call by Reference: No ( called with pass by value option)
ORDERS - Orders
Data type: BAPIAPPREQORDERSOptional: Yes
Call by Reference: Yes
WBS_ELEMENT - Work Breakdown Structure Element (WBS Element)
Data type: BAPIAPPREQWBSELEMOptional: Yes
Call by Reference: No ( called with pass by value option)
PARTNER - Partner
Data type: BAPIAPPREQPARTNEROptional: Yes
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for BAPI_APPREQUEST_CREATE Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.| DATA: | ||||
| lt_org_units | TYPE STANDARD TABLE OF BAPIAPPREQORGUNIT, " | |||
| lv_externalnumber | TYPE BAPI_APPREQ_ID-APPREQ, " | |||
| lv_appropriationrequest_in | TYPE BAPI_APPREQ_ID-APPREQ, " | |||
| lv_language_iso | TYPE BAPI_APPREQ_AUX-LANGU_ISO, " | |||
| lt_variant_to_version | TYPE STANDARD TABLE OF BAPIAPPREQVARNTASSIGN, " | |||
| lv_test_run | TYPE BAPI_APPREQ_AUX-TESTRUN, " ' ' | |||
| lt_plan_year | TYPE STANDARD TABLE OF BAPIAPPREQPLANYEAR, " | |||
| lt_assignment_to_pos | TYPE STANDARD TABLE OF BAPIAPPREQEXPPROGASSGN, " | |||
| lt_assignment_to_budg_categ | TYPE STANDARD TABLE OF BAPIAPPREQEXPPROGASSGNBUDGCATG, " | |||
| lt_return | TYPE STANDARD TABLE OF BAPIRET2, " | |||
| lt_division | TYPE STANDARD TABLE OF BAPIAPPREQDIVISION, " | |||
| lv_apprequest_type | TYPE BAPI_APPREQ_ID-APPREQTYPE, " | |||
| lv_appropriationrequestvariantout | TYPE BAPI_APPREQ_ID-APPREQVRNT, " | |||
| lt_material_grp | TYPE STANDARD TABLE OF BAPIAPPREQMATGROUP, " | |||
| lv_appropriationrequestvariant_in | TYPE BAPI_APPREQ_ID-APPREQVRNT, " | |||
| lv_controlling_area | TYPE BAPI_APPREQ_ID-CNTRL_AREA, " | |||
| lt_investment_reason | TYPE STANDARD TABLE OF BAPIAPPREQINVREASON, " | |||
| lv_master_data | TYPE BAPIAPPREQMASTER, " | |||
| lt_environmnt_invest | TYPE STANDARD TABLE OF BAPIAPPREQENVINVEST, " | |||
| lv_user_fields | TYPE BAPIAPPREQUSER, " | |||
| lt_assets_equis | TYPE STANDARD TABLE OF BAPIAPPREQASSET, " | |||
| lt_orders | TYPE STANDARD TABLE OF BAPIAPPREQORDERS, " | |||
| lv_variant | TYPE BAPIAPPREQVARNT, " | |||
| lv_plan_total | TYPE BAPIAPPREQPLANTOTAL, " | |||
| lt_wbs_element | TYPE STANDARD TABLE OF BAPIAPPREQWBSELEM, " | |||
| lt_partner | TYPE STANDARD TABLE OF BAPIAPPREQPARTNER, " | |||
| lv_language | TYPE BAPI_APPREQ_AUX-LANGU. " |
|   CALL FUNCTION 'BAPI_APPREQUEST_CREATE' "Create Appropriation Request |
| EXPORTING | ||
| APPROPRIATIONREQUEST_IN | = lv_appropriationrequest_in | |
| LANGUAGE_ISO | = lv_language_iso | |
| TEST_RUN | = lv_test_run | |
| APPREQUEST_TYPE | = lv_apprequest_type | |
| APPROPRIATIONREQUESTVARIANT_IN | = lv_appropriationrequestvariant_in | |
| CONTROLLING_AREA | = lv_controlling_area | |
| MASTER_DATA | = lv_master_data | |
| USER_FIELDS | = lv_user_fields | |
| VARIANT | = lv_variant | |
| PLAN_TOTAL | = lv_plan_total | |
| LANGUAGE | = lv_language | |
| IMPORTING | ||
| EXTERNALNUMBER | = lv_externalnumber | |
| APPROPRIATIONREQUESTVARIANTOUT | = lv_appropriationrequestvariantout | |
| TABLES | ||
| ORG_UNITS | = lt_org_units | |
| VARIANT_TO_VERSION | = lt_variant_to_version | |
| PLAN_YEAR | = lt_plan_year | |
| ASSIGNMENT_TO_POS | = lt_assignment_to_pos | |
| ASSIGNMENT_TO_BUDG_CATEG | = lt_assignment_to_budg_categ | |
| RETURN | = lt_return | |
| DIVISION | = lt_division | |
| MATERIAL_GRP | = lt_material_grp | |
| INVESTMENT_REASON | = lt_investment_reason | |
| ENVIRONMNT_INVEST | = lt_environmnt_invest | |
| ASSETS_EQUIS | = lt_assets_equis | |
| ORDERS | = lt_orders | |
| WBS_ELEMENT | = lt_wbs_element | |
| PARTNER | = lt_partner | |
| . " BAPI_APPREQUEST_CREATE | ||
ABAP code using 7.40 inline data declarations to call FM BAPI_APPREQUEST_CREATE
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.| "SELECT single APPREQ FROM BAPI_APPREQ_ID INTO @DATA(ld_externalnumber). | ||||
| "SELECT single APPREQ FROM BAPI_APPREQ_ID INTO @DATA(ld_appropriationrequest_in). | ||||
| "SELECT single LANGU_ISO FROM BAPI_APPREQ_AUX INTO @DATA(ld_language_iso). | ||||
| "SELECT single TESTRUN FROM BAPI_APPREQ_AUX INTO @DATA(ld_test_run). | ||||
| DATA(ld_test_run) | = ' '. | |||
| "SELECT single APPREQTYPE FROM BAPI_APPREQ_ID INTO @DATA(ld_apprequest_type). | ||||
| "SELECT single APPREQVRNT FROM BAPI_APPREQ_ID INTO @DATA(ld_appropriationrequestvariantout). | ||||
| "SELECT single APPREQVRNT FROM BAPI_APPREQ_ID INTO @DATA(ld_appropriationrequestvariant_in). | ||||
| "SELECT single CNTRL_AREA FROM BAPI_APPREQ_ID INTO @DATA(ld_controlling_area). | ||||
| "SELECT single LANGU FROM BAPI_APPREQ_AUX INTO @DATA(ld_language). | ||||
Search for further information about these or an SAP related objects