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 Loan creation

Former Member
0 Likes
1,336

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

3 REPLIES 3
Read only

Former Member
0 Likes
874

Problem solved: I had to call additional function module that is bapi transaction commit.

Cheers,

JG

Read only

0 Likes
874

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

Read only

0 Likes
874

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