BS01_QUOTATION_CREATE 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 BS01_QUOTATION_CREATE into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
BOS01
Released Date:
25.06.2001
Processing type: Remote-Enabled
CALL FUNCTION 'BS01_QUOTATION_CREATE' "Quoation: Create with BOS
EXPORTING
* salesdocument = " bapivbeln-vbeln Quotation Number
quotation_header_in = " bapisdhd1 Document Header Data
* quotation_header_inx = " bapisdhd1x Checkbox for header data
* sender = " bapi_sender Logical system - Sender
* binary_relationshiptype = SPACE " breltyp-reltype Binary Relationship Type (Private)
* int_number_assignment = SPACE " bapiflag-bapiflag Internal item number assignment
* behave_when_error = SPACE " bapiflag-bapiflag Error Handling
* logic_switch = SPACE " bapisdls Internal control parameter
* testrun = " bapiflag-bapiflag Test run
IMPORTING
salesdocument_ex = " bapivbeln-vbeln Number of Generated Document
TABLES
return = " bapiret2 Return Messages
* quotation_items_in = " bapisditmbos Item Data
* quotation_items_inx = " bapisditmxbos Checkbox Item Data
* quotation_partners = " bapiparnr Document partner
* quotation_schedules_in = " bapischdl Schedule line data
* quotation_schedules_inx = " bapischdlx Checkbox Schedule Line Data
* quotation_conditions_in = " bapicond Conditions
* quotation_cfgs_ref = " bapicucfg Configuration: Reference data
* quotation_cfgs_inst = " bapicuins Configuration: Instances
* quotation_cfgs_part_of = " bapicuprt Configuration: Part-of specifications
* quotation_cfgs_value = " bapicuval Configuration: Characteristic values
* quotation_cfgs_blob = " bapicublb Configuration: BLOB internal data (SCE)
* quotation_cfgs_vk = " bapicuvk Configuration: Variant condition key
* quotation_cfgs_refinst = " bapicuref Configuration: Reference item / instance
* quotation_text = " bapisdtext Texts
* quotation_keys = " bapisdkey Output Table of Reference Keys
* extensionin = " bapiparex Customer Enhancment Import
* quotation_services = " bapisdesllcbos Services
* quotation_services_text = " bapieslltx Service Line Text
* quotation_services_cond = " bapiboscd Service Line Conditions
. " BS01_QUOTATION_CREATE
The ABAP code below is a full code listing to execute function module BS01_QUOTATION_CREATE 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).
| ld_salesdocument_ex | TYPE BAPIVBELN-VBELN , |
| it_return | TYPE STANDARD TABLE OF BAPIRET2,"TABLES PARAM |
| wa_return | LIKE LINE OF it_return , |
| it_quotation_items_in | TYPE STANDARD TABLE OF BAPISDITMBOS,"TABLES PARAM |
| wa_quotation_items_in | LIKE LINE OF it_quotation_items_in , |
| it_quotation_items_inx | TYPE STANDARD TABLE OF BAPISDITMXBOS,"TABLES PARAM |
| wa_quotation_items_inx | LIKE LINE OF it_quotation_items_inx , |
| it_quotation_partners | TYPE STANDARD TABLE OF BAPIPARNR,"TABLES PARAM |
| wa_quotation_partners | LIKE LINE OF it_quotation_partners , |
| it_quotation_schedules_in | TYPE STANDARD TABLE OF BAPISCHDL,"TABLES PARAM |
| wa_quotation_schedules_in | LIKE LINE OF it_quotation_schedules_in , |
| it_quotation_schedules_inx | TYPE STANDARD TABLE OF BAPISCHDLX,"TABLES PARAM |
| wa_quotation_schedules_inx | LIKE LINE OF it_quotation_schedules_inx , |
| it_quotation_conditions_in | TYPE STANDARD TABLE OF BAPICOND,"TABLES PARAM |
| wa_quotation_conditions_in | LIKE LINE OF it_quotation_conditions_in , |
| it_quotation_cfgs_ref | TYPE STANDARD TABLE OF BAPICUCFG,"TABLES PARAM |
| wa_quotation_cfgs_ref | LIKE LINE OF it_quotation_cfgs_ref , |
| it_quotation_cfgs_inst | TYPE STANDARD TABLE OF BAPICUINS,"TABLES PARAM |
| wa_quotation_cfgs_inst | LIKE LINE OF it_quotation_cfgs_inst , |
| it_quotation_cfgs_part_of | TYPE STANDARD TABLE OF BAPICUPRT,"TABLES PARAM |
| wa_quotation_cfgs_part_of | LIKE LINE OF it_quotation_cfgs_part_of , |
| it_quotation_cfgs_value | TYPE STANDARD TABLE OF BAPICUVAL,"TABLES PARAM |
| wa_quotation_cfgs_value | LIKE LINE OF it_quotation_cfgs_value , |
| it_quotation_cfgs_blob | TYPE STANDARD TABLE OF BAPICUBLB,"TABLES PARAM |
| wa_quotation_cfgs_blob | LIKE LINE OF it_quotation_cfgs_blob , |
| it_quotation_cfgs_vk | TYPE STANDARD TABLE OF BAPICUVK,"TABLES PARAM |
| wa_quotation_cfgs_vk | LIKE LINE OF it_quotation_cfgs_vk , |
| it_quotation_cfgs_refinst | TYPE STANDARD TABLE OF BAPICUREF,"TABLES PARAM |
| wa_quotation_cfgs_refinst | LIKE LINE OF it_quotation_cfgs_refinst , |
| it_quotation_text | TYPE STANDARD TABLE OF BAPISDTEXT,"TABLES PARAM |
| wa_quotation_text | LIKE LINE OF it_quotation_text , |
| it_quotation_keys | TYPE STANDARD TABLE OF BAPISDKEY,"TABLES PARAM |
| wa_quotation_keys | LIKE LINE OF it_quotation_keys , |
| it_extensionin | TYPE STANDARD TABLE OF BAPIPAREX,"TABLES PARAM |
| wa_extensionin | LIKE LINE OF it_extensionin , |
| it_quotation_services | TYPE STANDARD TABLE OF BAPISDESLLCBOS,"TABLES PARAM |
| wa_quotation_services | LIKE LINE OF it_quotation_services , |
| it_quotation_services_text | TYPE STANDARD TABLE OF BAPIESLLTX,"TABLES PARAM |
| wa_quotation_services_text | LIKE LINE OF it_quotation_services_text , |
| it_quotation_services_cond | TYPE STANDARD TABLE OF BAPIBOSCD,"TABLES PARAM |
| wa_quotation_services_cond | LIKE LINE OF it_quotation_services_cond . |
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_salesdocument_ex | TYPE BAPIVBELN-VBELN , |
| ld_salesdocument | TYPE BAPIVBELN-VBELN , |
| it_return | TYPE STANDARD TABLE OF BAPIRET2 , |
| wa_return | LIKE LINE OF it_return, |
| ld_quotation_header_in | TYPE BAPISDHD1 , |
| it_quotation_items_in | TYPE STANDARD TABLE OF BAPISDITMBOS , |
| wa_quotation_items_in | LIKE LINE OF it_quotation_items_in, |
| ld_quotation_header_inx | TYPE BAPISDHD1X , |
| it_quotation_items_inx | TYPE STANDARD TABLE OF BAPISDITMXBOS , |
| wa_quotation_items_inx | LIKE LINE OF it_quotation_items_inx, |
| ld_sender | TYPE BAPI_SENDER , |
| it_quotation_partners | TYPE STANDARD TABLE OF BAPIPARNR , |
| wa_quotation_partners | LIKE LINE OF it_quotation_partners, |
| it_quotation_schedules_in | TYPE STANDARD TABLE OF BAPISCHDL , |
| wa_quotation_schedules_in | LIKE LINE OF it_quotation_schedules_in, |
| ld_binary_relationshiptype | TYPE BRELTYP-RELTYPE , |
| ld_int_number_assignment | TYPE BAPIFLAG-BAPIFLAG , |
| it_quotation_schedules_inx | TYPE STANDARD TABLE OF BAPISCHDLX , |
| wa_quotation_schedules_inx | LIKE LINE OF it_quotation_schedules_inx, |
| ld_behave_when_error | TYPE BAPIFLAG-BAPIFLAG , |
| it_quotation_conditions_in | TYPE STANDARD TABLE OF BAPICOND , |
| wa_quotation_conditions_in | LIKE LINE OF it_quotation_conditions_in, |
| ld_logic_switch | TYPE BAPISDLS , |
| it_quotation_cfgs_ref | TYPE STANDARD TABLE OF BAPICUCFG , |
| wa_quotation_cfgs_ref | LIKE LINE OF it_quotation_cfgs_ref, |
| ld_testrun | TYPE BAPIFLAG-BAPIFLAG , |
| it_quotation_cfgs_inst | TYPE STANDARD TABLE OF BAPICUINS , |
| wa_quotation_cfgs_inst | LIKE LINE OF it_quotation_cfgs_inst, |
| it_quotation_cfgs_part_of | TYPE STANDARD TABLE OF BAPICUPRT , |
| wa_quotation_cfgs_part_of | LIKE LINE OF it_quotation_cfgs_part_of, |
| it_quotation_cfgs_value | TYPE STANDARD TABLE OF BAPICUVAL , |
| wa_quotation_cfgs_value | LIKE LINE OF it_quotation_cfgs_value, |
| it_quotation_cfgs_blob | TYPE STANDARD TABLE OF BAPICUBLB , |
| wa_quotation_cfgs_blob | LIKE LINE OF it_quotation_cfgs_blob, |
| it_quotation_cfgs_vk | TYPE STANDARD TABLE OF BAPICUVK , |
| wa_quotation_cfgs_vk | LIKE LINE OF it_quotation_cfgs_vk, |
| it_quotation_cfgs_refinst | TYPE STANDARD TABLE OF BAPICUREF , |
| wa_quotation_cfgs_refinst | LIKE LINE OF it_quotation_cfgs_refinst, |
| it_quotation_text | TYPE STANDARD TABLE OF BAPISDTEXT , |
| wa_quotation_text | LIKE LINE OF it_quotation_text, |
| it_quotation_keys | TYPE STANDARD TABLE OF BAPISDKEY , |
| wa_quotation_keys | LIKE LINE OF it_quotation_keys, |
| it_extensionin | TYPE STANDARD TABLE OF BAPIPAREX , |
| wa_extensionin | LIKE LINE OF it_extensionin, |
| it_quotation_services | TYPE STANDARD TABLE OF BAPISDESLLCBOS , |
| wa_quotation_services | LIKE LINE OF it_quotation_services, |
| it_quotation_services_text | TYPE STANDARD TABLE OF BAPIESLLTX , |
| wa_quotation_services_text | LIKE LINE OF it_quotation_services_text, |
| it_quotation_services_cond | TYPE STANDARD TABLE OF BAPIBOSCD , |
| wa_quotation_services_cond | LIKE LINE OF it_quotation_services_cond. |
You can use this function module to create customer quotations that
contain a BOS.
...See here for full SAP fm documentation
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 BS01_QUOTATION_CREATE or its description.