cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI for Quotation to Sales order

Former Member
0 Kudos

We use BAPI  (BAPI_SALESORDER_CREATEFROMDAT2) for Web/SAP interface.

When a Sales Order is placed through web, some items will refer to existing quote and some items won't have any quote reference.

For items which have quote reference, we want to copy all condition except one (we are using condition category X for this condition).

For items which don't have any quote reference, we want use current price.

But we found some restriction in BAPI. Here the Pricing Type is at the Header level (unlike Sales Order creation directly in SAP where pricing is determined individually at item level). So we can set either set 'G', 'B', or Customer pricing type. Only one for all items at header level.

1. Is this a standard behavior of SAP BAPI where the pricing type is only at header level?

2. if so, can we in anyway redetermine pricing at item level (for items with quote referred differently than for the items without quote reference)?

3. Or do we have to create separate Sales Order for items which have quote reference and for the items which don't have any quote.

Please let us know if you faced this issue and how you have overcome this.

Thanks a lot!

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

i understand requirement, but still some information needed, you raise quotation, subseqently raise order right? do you want to enter item(non quotated items manually)? if not what is the source document to items in sales order which is already referenced by quotation..

warm regards,

jagadeesh

Former Member
0 Kudos

Hello Rakesh,

I'm sure you can carry the same for Item level too. Use field ITM_NUMBER. Sharing an example, hope it helps. Thanks.

    ls_conditions-itm_number = '000010'.

    ls_conditions-cond_type  = 'ZBAS'.

    ls_conditions-cond_value = '25'.

    ls_conditions-currency   = 'PKR'.

    APPEND ls_conditions to lt_conditions.

moazzam_ali
Active Contributor
0 Kudos

Hi Rakesh

As per my understanding we can assign reference document for whole document not for some specific items. I think you have to create separate order for items having quotation reference because this will have an impact over pricing. Can you please check the pricing type in copy control setting of quotation to sale order? I am not very much clear with your scenario but this is just an idea which you can cross check in your system.

Thank$

Former Member
0 Kudos

Hi Moazza,

Thanks for taking time to reply to my posting.

I am talking about BAPI. Guess Copy Controls won't have any control over pricing type - whether the pricing is copied or re-determined. The logic for this is defined in BAPI itself.

If you create order thru VA01, you can use copy control (when referring) for each item. I tried directly thru VA01. Item which have quote reference took Pricing Type (G, H,etc) based on the copy controls settings and copied prices from quote. For item without reference, it took current prices from Condition records.

But for BAPI.....the pricing type is at the header level logic. It seems to apply same pricing type (B,G,etc based on the program logic) for all items. The issue is here, if we user Pricing Type G in BAPI, it is causing issue for items without reference (as there is nothing to copy). Is this a standard behavior?

Any thoughts?

Thanks,

Rakesh

moazzam_ali
Active Contributor
0 Kudos

Dear

I have shared my idea and knowledge as per standard IMG setting and based on that it looks like a standard behavior. But I wana tell you one thing that I am functional guy and I think a technical ABAPER can give you a better idea but as per my suggestion I think this is standard behavior and BAPI is also copying the standard logic of pricing.

Thank$