on 05-20-2010 9:52 AM
Dear Superman,
I have a question, what the difference of the two way access SAP CRM?
1)
// Calls remote function module
wdContext.currentBapi_XXXX_RegElement().modelObject().execute();
// Synchronise the data in the context with the data in the model
wdContext.nodeOutput().invalidate();
wdContext.currentBapi_XXXX_RegElement().modelObject().modelInstance().disconnectIfAlive();
2)
wdThis.wdGetXXXXCustController().executeXXXXReg(A, B, C, D);
Hi Jie,
You are accessing the CRM through Bapi/RFC Bapi_XXXX_Reg...
As you have mentioned the piont - 1 and point - 2.
Point -1 :- Method Definition for calling CRM RFC
executeXXXXReg()
{
try {
//Once you create the object for RFC
Bapi_XXXX_Reg_Input input = new Bapi_XXXX_Reg_Input(WDModelScopeType.APPLICATION_SCOPE)
wdContext.Bapi_XXXX_Reg_Input ().bind(input);
// For Executing, you can use either
wdContext.currentBapi_XXXX_RegElement().modelObject().execute();
OR
input.execute();
//Then invalidate the output node of the RFC
wdContext.nodeOutput().invalidate();
} catch (Exception ex){
// Catch the Exceptions
} finally {
// Close the RFC Connection
wdContext.currentBapi_XXXX_RegElement().modelObject().modelInstance().disconnectIfAlive();
}
}
Then you can call this executeXXXXReg() method
wdThis.wdGetXXXXCustController().executeXXXXReg();
Hope it will helps
Regards
Arun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.