SAP Function Modules

BAPI_CUSTOMERQUOTATION_CHANGE SAP Function module - Change Customer Quotation







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

Associated Function Group: 2031
Released Date: 22.02.2005
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM BAPI_CUSTOMERQUOTATION_CHANGE - BAPI CUSTOMERQUOTATION CHANGE





CALL FUNCTION 'BAPI_CUSTOMERQUOTATION_CHANGE' "Change Customer Quotation
  EXPORTING
    salesdocument =             " bapivbeln-vbeln  Sales and Distribution Document Number
*   quotation_header_in =       " bapisdh1      Inquiry Header
    quotation_header_inx =      " bapisdh1x     Quotation Header Checkbox
*   simulation =                " bapiflag-bapiflag  Simulation Mode
*   behave_when_error =         " bapiflag-bapiflag  Error Handling
*   int_number_assignment =     " bapiflag-bapiflag  Internal Item Number Assignment
*   logic_switch =              " bapisdls      SD Checkbox for the Logic Switch
*   no_status_buf_init = SPACE  " bapiflag-bapiflag  No Refresh of Status Buffer
  TABLES
    return =                    " bapiret2      Return Code
*   quotation_item_in =         " bapisditm     Quotation Items
*   quotation_item_inx =        " bapisditmx    Quotation Items Checkbox
*   partners =                  " bapiparnr     Communications Fields: SD Document Partner: WWW
*   partnerchanges =            " bapiparnrc    Partner changes
*   partneraddresses =          " bapiaddr1     BAPI Reference Structure for Addresses (Org./Company)
*   conditions_in =             " bapicond      Conditions
*   conditions_inx =            " bapicondx     Conditions Checkbox
*   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
*   schedule_lines =            " bapischdl     Schedule Lines
*   schedule_linesx =           " bapischdlx    Check Table for Schedule Lines
*   quotation_text =            " bapisdtext    Texts
*   quotation_keys =            " bapisdkey     Output Table of Reference Keys
*   extensionin =               " bapiparex     Customer Enhancement for VBAK, VBAP, VBEP
    .  "  BAPI_CUSTOMERQUOTATION_CHANGE

ABAP code example for Function Module BAPI_CUSTOMERQUOTATION_CHANGE





The ABAP code below is a full code listing to execute function module BAPI_CUSTOMERQUOTATION_CHANGE 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_return  TYPE STANDARD TABLE OF BAPIRET2,"TABLES PARAM
wa_return  LIKE LINE OF it_return ,
it_quotation_item_in  TYPE STANDARD TABLE OF BAPISDITM,"TABLES PARAM
wa_quotation_item_in  LIKE LINE OF it_quotation_item_in ,
it_quotation_item_inx  TYPE STANDARD TABLE OF BAPISDITMX,"TABLES PARAM
wa_quotation_item_inx  LIKE LINE OF it_quotation_item_inx ,
it_partners  TYPE STANDARD TABLE OF BAPIPARNR,"TABLES PARAM
wa_partners  LIKE LINE OF it_partners ,
it_partnerchanges  TYPE STANDARD TABLE OF BAPIPARNRC,"TABLES PARAM
wa_partnerchanges  LIKE LINE OF it_partnerchanges ,
it_partneraddresses  TYPE STANDARD TABLE OF BAPIADDR1,"TABLES PARAM
wa_partneraddresses  LIKE LINE OF it_partneraddresses ,
it_conditions_in  TYPE STANDARD TABLE OF BAPICOND,"TABLES PARAM
wa_conditions_in  LIKE LINE OF it_conditions_in ,
it_conditions_inx  TYPE STANDARD TABLE OF BAPICONDX,"TABLES PARAM
wa_conditions_inx  LIKE LINE OF it_conditions_inx ,
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_schedule_lines  TYPE STANDARD TABLE OF BAPISCHDL,"TABLES PARAM
wa_schedule_lines  LIKE LINE OF it_schedule_lines ,
it_schedule_linesx  TYPE STANDARD TABLE OF BAPISCHDLX,"TABLES PARAM
wa_schedule_linesx  LIKE LINE OF it_schedule_linesx ,
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 .


DATA(ld_salesdocument) = some text here
DATA(ld_quotation_header_in) = 'Check type of data required'.
DATA(ld_quotation_header_inx) = 'Check type of data required'.

DATA(ld_simulation) = some text here

DATA(ld_behave_when_error) = some text here

DATA(ld_int_number_assignment) = some text here
DATA(ld_logic_switch) = 'Check type of data required'.

DATA(ld_no_status_buf_init) = some text here

"populate fields of struture and append to itab
append wa_return to it_return.

"populate fields of struture and append to itab
append wa_quotation_item_in to it_quotation_item_in.

"populate fields of struture and append to itab
append wa_quotation_item_inx to it_quotation_item_inx.

"populate fields of struture and append to itab
append wa_partners to it_partners.

"populate fields of struture and append to itab
append wa_partnerchanges to it_partnerchanges.

"populate fields of struture and append to itab
append wa_partneraddresses to it_partneraddresses.

"populate fields of struture and append to itab
append wa_conditions_in to it_conditions_in.

"populate fields of struture and append to itab
append wa_conditions_inx to it_conditions_inx.

"populate fields of struture and append to itab
append wa_quotation_cfgs_ref to it_quotation_cfgs_ref.

"populate fields of struture and append to itab
append wa_quotation_cfgs_inst to it_quotation_cfgs_inst.

"populate fields of struture and append to itab
append wa_quotation_cfgs_part_of to it_quotation_cfgs_part_of.

"populate fields of struture and append to itab
append wa_quotation_cfgs_value to it_quotation_cfgs_value.

"populate fields of struture and append to itab
append wa_quotation_cfgs_blob to it_quotation_cfgs_blob.

"populate fields of struture and append to itab
append wa_quotation_cfgs_vk to it_quotation_cfgs_vk.

"populate fields of struture and append to itab
append wa_quotation_cfgs_refinst to it_quotation_cfgs_refinst.

"populate fields of struture and append to itab
append wa_schedule_lines to it_schedule_lines.

"populate fields of struture and append to itab
append wa_schedule_linesx to it_schedule_linesx.

"populate fields of struture and append to itab
append wa_quotation_text to it_quotation_text.

"populate fields of struture and append to itab
append wa_quotation_keys to it_quotation_keys.

"populate fields of struture and append to itab
append wa_extensionin to it_extensionin. . CALL FUNCTION 'BAPI_CUSTOMERQUOTATION_CHANGE' EXPORTING salesdocument = ld_salesdocument * quotation_header_in = ld_quotation_header_in quotation_header_inx = ld_quotation_header_inx * simulation = ld_simulation * behave_when_error = ld_behave_when_error * int_number_assignment = ld_int_number_assignment * logic_switch = ld_logic_switch * no_status_buf_init = ld_no_status_buf_init TABLES return = it_return * quotation_item_in = it_quotation_item_in * quotation_item_inx = it_quotation_item_inx * partners = it_partners * partnerchanges = it_partnerchanges * partneraddresses = it_partneraddresses * conditions_in = it_conditions_in * conditions_inx = it_conditions_inx * quotation_cfgs_ref = it_quotation_cfgs_ref * quotation_cfgs_inst = it_quotation_cfgs_inst * quotation_cfgs_part_of = it_quotation_cfgs_part_of * quotation_cfgs_value = it_quotation_cfgs_value * quotation_cfgs_blob = it_quotation_cfgs_blob * quotation_cfgs_vk = it_quotation_cfgs_vk * quotation_cfgs_refinst = it_quotation_cfgs_refinst * schedule_lines = it_schedule_lines * schedule_linesx = it_schedule_linesx * quotation_text = it_quotation_text * quotation_keys = it_quotation_keys * extensionin = it_extensionin . " BAPI_CUSTOMERQUOTATION_CHANGE
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_salesdocument  TYPE BAPIVBELN-VBELN ,
it_return  TYPE STANDARD TABLE OF BAPIRET2 ,
wa_return  LIKE LINE OF it_return,
ld_quotation_header_in  TYPE BAPISDH1 ,
it_quotation_item_in  TYPE STANDARD TABLE OF BAPISDITM ,
wa_quotation_item_in  LIKE LINE OF it_quotation_item_in,
ld_quotation_header_inx  TYPE BAPISDH1X ,
it_quotation_item_inx  TYPE STANDARD TABLE OF BAPISDITMX ,
wa_quotation_item_inx  LIKE LINE OF it_quotation_item_inx,
ld_simulation  TYPE BAPIFLAG-BAPIFLAG ,
it_partners  TYPE STANDARD TABLE OF BAPIPARNR ,
wa_partners  LIKE LINE OF it_partners,
ld_behave_when_error  TYPE BAPIFLAG-BAPIFLAG ,
it_partnerchanges  TYPE STANDARD TABLE OF BAPIPARNRC ,
wa_partnerchanges  LIKE LINE OF it_partnerchanges,
it_partneraddresses  TYPE STANDARD TABLE OF BAPIADDR1 ,
wa_partneraddresses  LIKE LINE OF it_partneraddresses,
ld_int_number_assignment  TYPE BAPIFLAG-BAPIFLAG ,
ld_logic_switch  TYPE BAPISDLS ,
it_conditions_in  TYPE STANDARD TABLE OF BAPICOND ,
wa_conditions_in  LIKE LINE OF it_conditions_in,
ld_no_status_buf_init  TYPE BAPIFLAG-BAPIFLAG ,
it_conditions_inx  TYPE STANDARD TABLE OF BAPICONDX ,
wa_conditions_inx  LIKE LINE OF it_conditions_inx,
it_quotation_cfgs_ref  TYPE STANDARD TABLE OF BAPICUCFG ,
wa_quotation_cfgs_ref  LIKE LINE OF it_quotation_cfgs_ref,
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_schedule_lines  TYPE STANDARD TABLE OF BAPISCHDL ,
wa_schedule_lines  LIKE LINE OF it_schedule_lines,
it_schedule_linesx  TYPE STANDARD TABLE OF BAPISCHDLX ,
wa_schedule_linesx  LIKE LINE OF it_schedule_linesx,
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.


ld_salesdocument = some text here

"populate fields of struture and append to itab
append wa_return to it_return.
ld_quotation_header_in = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_quotation_item_in to it_quotation_item_in.
ld_quotation_header_inx = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_quotation_item_inx to it_quotation_item_inx.

ld_simulation = some text here

"populate fields of struture and append to itab
append wa_partners to it_partners.

ld_behave_when_error = some text here

"populate fields of struture and append to itab
append wa_partnerchanges to it_partnerchanges.

"populate fields of struture and append to itab
append wa_partneraddresses to it_partneraddresses.

ld_int_number_assignment = some text here
ld_logic_switch = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_conditions_in to it_conditions_in.

ld_no_status_buf_init = some text here

"populate fields of struture and append to itab
append wa_conditions_inx to it_conditions_inx.

"populate fields of struture and append to itab
append wa_quotation_cfgs_ref to it_quotation_cfgs_ref.

"populate fields of struture and append to itab
append wa_quotation_cfgs_inst to it_quotation_cfgs_inst.

"populate fields of struture and append to itab
append wa_quotation_cfgs_part_of to it_quotation_cfgs_part_of.

"populate fields of struture and append to itab
append wa_quotation_cfgs_value to it_quotation_cfgs_value.

"populate fields of struture and append to itab
append wa_quotation_cfgs_blob to it_quotation_cfgs_blob.

"populate fields of struture and append to itab
append wa_quotation_cfgs_vk to it_quotation_cfgs_vk.

"populate fields of struture and append to itab
append wa_quotation_cfgs_refinst to it_quotation_cfgs_refinst.

"populate fields of struture and append to itab
append wa_schedule_lines to it_schedule_lines.

"populate fields of struture and append to itab
append wa_schedule_linesx to it_schedule_linesx.

"populate fields of struture and append to itab
append wa_quotation_text to it_quotation_text.

"populate fields of struture and append to itab
append wa_quotation_keys to it_quotation_keys.

"populate fields of struture and append to itab
append wa_extensionin to it_extensionin.

SAP Documentation for FM BAPI_CUSTOMERQUOTATION_CHANGE


Using this method, you can change or delete customer quotations.
Header, item, schedule line and configuration data can be changed. ...See here for full SAP fm documentation

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