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: 

bapi problem??

Former Member
0 Kudos

creating bapi for purchase order...

getting this error ???

No instance of object type PurchaseOrder has been created. External reference:

why this error is coming

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Please make sure that you are passing -

Company Code

Purchasing Document Type

Account Number of the Vendor

Purchasing Organization

Purchasing group

Short text

Material Group

Plant Table for National (Centrally Agreed) Contracts

G/L Account Number

Cost Center

Controlling Area

Along with servies of PO.

Once I faced the same problm beacause I passed wrong data to BAPI. Check if all values are correct.

Regards,

Aparna Gaikwad

7 REPLIES 7

Former Member
0 Kudos

Please make sure that you are passing -

Company Code

Purchasing Document Type

Account Number of the Vendor

Purchasing Organization

Purchasing group

Short text

Material Group

Plant Table for National (Centrally Agreed) Contracts

G/L Account Number

Cost Center

Controlling Area

Along with servies of PO.

Once I faced the same problm beacause I passed wrong data to BAPI. Check if all values are correct.

Regards,

Aparna Gaikwad

bpawanchand
Active Contributor
0 Kudos

Hi

Can you let us know which BAPI you are using

if you are using BAPI_PO_CREATE1 then in this TAX field is mandatory so make sure that you have filled this field

Regards

Pavan

0 Kudos

YA I HVE FILLED TAX FIELD ALREADY

Former Member
0 Kudos

Hi Ankesh ,

This error normally occurs when you dont pass all the mandatory fields to the BAPI or else the mapping you have done is not proper.....

so the po is not created...

hence this error is returned...

just check it again

Former Member
0 Kudos

Hi Ankesh,

While filling the values in the fields of the structure make sure that you use conversion_routines for the fields required or atleast match the field length by using UNPACK statement.

Thanks

Sudharshan

0 Kudos

I didnt get u wil u send me some sample code for the same

0 Kudos

Hi Ankesh,

For e.g some field length in the structure of BAPI is say 10 and the data you are inserting is only of length 6 then pad 4 zeroes and then pass the value.

e.g abcd(10)

abcd='123456'.

unpack abcd to abcd

will result to 0000123456.

Thanks

Sudharshan