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

problem with BAPI_QUOTATION_CREATEFROMDATA2

Former Member
0 Likes
1,325

Hi All,

I am uploading an excel file into an internal table and then calling the bapi BAPI_QUOTATION_CREATEFROMDATA2 to create a quotation. The bapi is working fine when the excel contains one line item. But when it has two or more line items it is giving the error 'No status object is available for SDI 0'

The parameters i am passing to the bapi are:

call function 'BAPI_QUOTATION_CREATEFROMDATA2'

exporting

quotation_header_in = wa_headerq

quotation_header_inx = wa_headerq_inx

behave_when_error = 'P'

importing

salesdocument = lv_vbeln

tables

return = it_return[]

quotation_items_in = it_quotation_items_in

quotation_items_inx = it_quotation_items_inx[]

quotation_partners = it_quotation_partners[]

quotation_conditions_in = it_quotation_conditions_in[]

quotation_schedules_in = it_quotation_schedules_in[]

quotation_schedules_inx = it_quotation_schedules_inx[].

Please suggest the way in which i can solve my problem

Thanks,

Vivek

5 REPLIES 5
Read only

Former Member
0 Likes
901

Hi.

Try this link

[;

Cheers,

Surinder

Read only

0 Likes
901

Hi ,

This link was very helpful but it dosent help my cause.

I am able to create the quotation for one line item ann not for more than one line item.

Is there a dofferent apporach to this problem?

Thanks,

Vivek

Read only

0 Likes
901

In the tables parameter why you put [] for some of them, either you put it for all or remove it for all

(just try)

Regards

sasi

Read only

0 Likes
901

Hi,

for both the case it is not working i have tried putting the braces in all the parameters and removing the braces in all the parameters.

Thanks,

Vivek

Read only

vinod_vemuru2
Active Contributor
0 Likes
901

Hi Vivek,

Are u getting any error in return parameter? Problem might be because of data also.

Try to create manually in VA21 for the same data and see if it creates or not.

Also are u correctly populating the data in itemx table. Number of records in itam and itemx must be same. Else it will ignore other records which are not there in itemx.

Thanks,

Vinod.