‎2008 Jan 01 8:53 AM
Hello guys,
I am using BAPI 'BAPI_LOAN_CONTRACT_CREATE' to create a loan. After passing all parameters when I execute BAPI, I get a loan number and it says loan created.
But when I use t.code FNV3 or so to view that loan, I get message loan does not exist.
I am able to create loan manually (TCode FNV1) but thru BAPI, loan number is generated but using TCode FNV2/FNV3 I cannot find that loan.
Module FI-CML.
Would be grateful if anyone can help me out.
Thank you,
Cheers,
JG
‎2008 Jan 01 9:16 AM
Problem solved: I had to call additional function module that is bapi transaction commit.
Cheers,
JG
‎2008 Feb 21 7:27 PM
Hi Jack,
I have to use the BAPI 'BAPI_LOAN_CONTRACT_CREATE' to create loan. Can you please let me know how to use this BAPI to create a loan?
Thanks,
Naga
‎2008 Feb 25 3:55 PM
Hi Naga,
I will explain how to use the BAPI.
When you expand the function module BAPI_LOAN_CONTRACT_CREATE you will see the following-
CALL FUNCTION 'BAPI_LOAN_CONTRACT_CREATE'
EXPORTING
loan = wa_loan_header
conditionheader = wa_conditionheader
CORRESPONDENCE =
USERFIELDS =
TESTRUN = ' '
REFRESH = ' '
PROCESSEXTENSION = ' '
STEERING =
IMPORTING
loannumber = l_loanno
error =
TABLES
partner = it_partner
conditions = it_conditions
FORMULA =
OBJECTS =
COLLATERALS =
ENCUMBRANCES =
CLERKS =
EXTENSION_IN =
return = it_return .
The above is how I used it. You need to create work areas for loan header, condition header and internal table for partner and conditons.
Check what field are present in these work areas and fill those required by you.
Then you will be able to run the BAPI.
Remember to use CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' to finalize if bapi has run successfully.
When bapi runs properly you will get a loan number , if you do not get it then there is an error in your input parameters.
Hope this helps,
Cheers,
Jack