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

BAPI_CONTRACT_GETDETAIL

noahzemljic
Explorer
0 Likes
3,891

Hello ABAP specialists

I am currently trying to get the contract details from a contract using BAPI_CONTRACT_GETDETAIL, however, I always get a message saying that the contract does not exists in the return table. I tried this in se37.

Thank you.
Best regards

Noah

4 REPLIES 4
Read only

FredericGirod
Active Contributor
0 Likes
3,576

Apparently you made something wrong, but if you don't provide the data you fill and the data present in the database, you will stay alone with your problem

Otherwise you could put a SQL trace an anlyse yourself (trans ST05)

Read only

thkolz
Contributor
0 Likes
3,576

I guess that in SE37 you need to add leading 0 at the beginning of the contract number (e.g. '0000123456' instead of '123456').

I guess that the length should be 10.

You can also see entries of table EKKO in SE16N for contracts with the following search criteria:

BSTYP (Purchasing document category) as 'K' indicating contract and BSART (Purchasing Document Type) as WK (value contract) or MK (quantity contract).

Read only

0 Likes
3,576

Here you see SE16N and SE37:

Read only

RaymondGiuseppi
Active Contributor
0 Likes
3,576

(FAQ) BAPIs require internal format of data, so check for any conversion exit, in your case look at the parameter definition and navigate to domain, you will see conversion-exit ALPHA, so if it contains only numbersn you have to add trailing zeroes. (check online help)

General Guidelines

Fields in BAPI parameters must be presented in the internal form used in the database and not in a form formatted in the BAPI interface.