Application Development 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: 

Question on 'BAPI_QUOTATION_CREATEFROMDATA2'

Former Member
0 Kudos

Hello Friends

I am trying to create a quote using 'BAPI_QUOTATION_CREATEFROMDATA2' in the test mode.

I am entering the bear minimum required (without opening any parameters other than the default

which are QUOTATION_HEADER_IN and QUOTATION_PARTNERS.

The problem that I am seeing is with QUOTATION_PARTNERS-ITM_NUMBER.

When I give QUOTATION_PARTNERS-ITM_NUMBER = '0000000' and run, I get a bogus

message that the quote (with a number assigned) is created. But when I try to open using VA23

it is not and even the table 'VBAK' doesn't have an entry for this.

However when I change QUOTATION_PARTNERS-ITM_NUMBER = '0000020' where 000020 is a valid value, I get a message that says "112 Please enter sold-to party or ship-to party".

What I don't understand is how this ITM_NUMBER "item number of SD document" is connected

to ship-to variable. How can I make sure that these two have proper relationship in the database.

Any suggestions or comments will be highly appreciated.

Thanks

Ram

3 REPLIES 3

Former Member
0 Kudos

when using bapi's you have to generate the commit statement using : function module BAPI_TRANSACTION_COMMIT...

is this done ?

Jelena
Active Contributor
0 Kudos

1) As correctly pointed out, COMMIT is necessary after the BAPI

2) Check with your SD consultant on the partner configuration in your system. Some partners are maintained at header level and some at the item level. Look at VBPA table for an existing document - you may find some entries with POSNR = 0, those are header level.

3) You also need to specify at least the partner type (AG, WE, etc.)

Former Member
0 Kudos

Hi Ansberry Kevin,

Pass QUOTATION_PARTNERS-ITM_NUMBER = '0000000'.

And pass customers like this.


QUOTATION_PARTNERS-PARTN_NUMB = '1000000'.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

   EXPORTING

     INPUT         = QUOTATION_PARTNERS-PARTN_NUMB

  IMPORTING

    OUTPUT        = QUOTATION_PARTNERS-PARTN_NUMB