Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Quotation configuration update using BAPI

sagar-acharya
Participant
0 Likes
2,791

Hi Folks,

We are developing a FM for inbound processing of SD quotations.

The main purpose is to update quotation configuration (VC).

These are the steps we are following:

1) Fetch quotation details using BAPI_QUOTATION_GETDETAILBOS.

2) Change characteristic values in table parameter QUOTATIONCFGSCUVALS.

3) Use BAPI_CUSTOMERQUOTATION_CHANGE to change VC.

In 3rd step, we are passing all configuration related tables. But still the quotation VC does not get updated. Also note that I do not get any error message in RETURN table. We would like to avoid using BDC on VA22.

CALL FUNCTION 'BAPI_CUSTOMERQUOTATION_CHANGE'

EXPORTING

salesdocument = bapivbeln-vbeln

QUOTATION_HEADER_IN = bapisdh1

quotation_header_inx = bapisdh1x

  • SIMULATION =

  • BEHAVE_WHEN_ERROR =

  • INT_NUMBER_ASSIGNMENT =

  • LOGIC_SWITCH =

tables

return = i_return

QUOTATION_ITEM_IN = i_item

QUOTATION_ITEM_INX = i_itemx

  • PARTNERS =

  • PARTNERCHANGES =

  • PARTNERADDRESSES =

  • CONDITIONS_IN =

  • CONDITIONS_INX =

QUOTATION_CFGS_REF = i_curefm

QUOTATION_CFGS_INST = i_cuinsm

QUOTATION_CFGS_PART_OF = i_cuprtm

QUOTATION_CFGS_VALUE = i_cuvalm

QUOTATION_CFGS_BLOB = i_cublbm

QUOTATION_CFGS_VK = i_cuvkm

  • QUOTATION_CFGS_REFINST =

  • SCHEDULE_LINES =

  • SCHEDULE_LINESX =

  • QUOTATION_TEXT =

  • QUOTATION_KEYS =

  • EXTENSIONIN =

  • NFMETALLITMS =

.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

wait = 'X'

  • IMPORTING

  • return =

.

Can anyone please help here?

Regards

Sagar

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,735

Hi

For Return table

IF syst-subrc IS INITIAL.

READ TABLE i_return INTO wa_return

WITH KEY type = 'E'.

IF NOT syst-subrc IS INITIAL.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

ENDIF.

ENDIF.

and make sure the parameters you are passing is correct...

Before you are calling the FM ,you shud append data to the tables and pass to the FM.

Hope it will be useful

5 REPLIES 5
Read only

Former Member
0 Likes
1,736

Hi

For Return table

IF syst-subrc IS INITIAL.

READ TABLE i_return INTO wa_return

WITH KEY type = 'E'.

IF NOT syst-subrc IS INITIAL.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

ENDIF.

ENDIF.

and make sure the parameters you are passing is correct...

Before you are calling the FM ,you shud append data to the tables and pass to the FM.

Hope it will be useful

Read only

Former Member
0 Likes
1,735

Hi Sagar,

Please confirm if you are passing an IMP value :

bapisdh1x-UPDATEFLAG = 'U'.

Thanks.

Read only

0 Likes
1,735

Hi Rahul,

Yes I am passing bapisdh1x-UPDATEFLAG = 'U'.

Thanks

Sagar

Read only

Former Member
0 Likes
1,735

Sagar,

Please update where is this Quotation Configuration field is maintained?

Is it on Item level and is the field 'CONFIG_ID'?

If so please confirm if you are maintianing

i_itemx-CONFIG_ID = 'X'.

Thanks.

Read only

sagar-acharya
Participant
0 Likes
1,735

I recall that we wrote a BDC on VA22 for that.