‎2022 Oct 21 12:03 PM
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
‎2022 Oct 21 12:27 PM
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)
‎2022 Oct 21 12:53 PM
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).
‎2022 Oct 21 1:53 PM
‎2022 Oct 21 1:30 PM
(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.