Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Issue while retrieving data from BAPI


The initial exception that caused the request to fail, was: Wrong amount type (not decimal): Unit service cannot be instantiated






... 30 more

I have a BAPI - ZPM_CREATE_ORDER. I am trying to write a record to that BAPI. Did the Model Import from R/3[including the Commit ].

The structures of BAPI are like this:


Order - Zpm_Hdr

Operations - [ Line Items structure ]

I have created the mapping between Model & Custom Controller with Order & Operations. Did the mapping between the Custom Controller & the View Controller. Binded them to the UI elements from View Controller with an input form.

But there are ABAP - decimal fields under Operations - price & Amount which are a Currency field and Quantity . So when I just try to run the application, I get the amount mismatch error. When I say run, I could n’t even see the GUI even. I get the 500 error with the above problem.

I read in the forums that I need to declare as a Simple type and re cast the fields to right type and bind that structure back. How ever, I could n’t get the complete understanding of it.

For a Retrieval Bapi with the exact same structure, the same issue if I map the Operations. How ever, if I skip the Operations and just map the Order i.e., header, then I could retrieve the records.

Interestingly even if I just map a String(char) field under Operations structure I am getting teh same error.

Any help is appreciated. Thanks in advance...

Not what you were looking for? View more on this topic or Ask a question