I'm new to SAP and studying calling some predefined BAPI function using JAVA. I have a question. I open the function BAPI_QUOTATION_CREATEFROMDATA2 in SE37. In it, I found import and tables. The import is the parameters I need when calling this function, but in tables, there are about 12 tables and structures, how do I know which is the minimum requirement to call the function? Can anyone help? Thanks.
-
The minimum requirement to call the function is not only technical: some "technically-optional" parameters may be required. Do you mean "required tables" or "required parameters"? (cf Optional column for parameters in Import, Changing and Tables tabs). The parameters of type "Tables" are more or less obsolete nowadays (by using xrfc). Note that nothing prevents the Import or Changing parameters from being tables too, although it's extremely rare for BAPIs. – Sandra Rossi Jul 02 '19 at 12:12
2 Answers
Please see the optional column, highlighted in the image below. The tables that are optional are checked. Tables that do not have 'Optional' checked are required. You can see from the image that 'QUOTATION_PARTNERS' is the required table.

- 376
- 2
- 6
- 21
-
Thanks. one more question. i want to create a vendor using function BAPI_VENDOR_CREATE,but in function viewer both the import and tables are empty, do u know why? – kk luo Jul 02 '19 at 09:33
-
1@kkluo Have you populated the tables? When you click execute, it takes you to "test function module: initial screen" - there you can edit the tables and import parameters. – L.P. Blake Jul 02 '19 at 09:36
Since this is a BAPI, it is a generally released function module by SAP and therefore better documented than just any other function module. Most BAPI's have good documentation that you can access in SE37 by clicking on Function Module Documentation.
Unfortunately for BAPI_QUOTATION_CREATEFROMDATA2 is looks like the developer was lazy and copy pasted it from an order creation BAPI since it mentions:
Notes
1. Required entries: ORDER_HEADER_IN : DOC_TYPE Sales document type
SALES_ORG Sales organization
DISTR_CHAN Distribution channel
DIVISION Division ORDER_PARTNERS..: PARTN_ROLE Partner role, Sold.to party
PARTN_NUMB Customer number ORDER_ITEMS_IN..: MATERIAL Material number
Luckily the documentation for the parameter itself is a bit betterL
The minimum requirement is that the sold-to party is entered at header level. Additional partner functions can then be automatically determined.

- 2,510
- 1
- 17
- 18