on 04-26-2009 4:37 AM
Greetings Experts,
I'm having trouble with calling an RFC with table input.
Here is my code so far:
public void executeZps_Fm_War_Mat_Update_Input( )
{
//@@begin executeZps_Fm_War_Mat_Update_Input()
//$$begin Service Controller(344531631)
IWDMessageManager manager = wdComponentAPI.getMessageManager();
try {
int size =
wdContext
.nodeZps_Fm_War_Mat_Prefill_Input()
.nodeWarOut()
.nodeEx_Warout()
.size();
for (int i = 0; i < size; i++) {
IPublicWARComp.IEx_WaroutElement srcElement =
wdContext
.nodeZps_Fm_War_Mat_Prefill_Input()
.nodeWarOut()
.nodeEx_Warout()
.getEx_WaroutElementAt(i);
IPublicWARComp.IIm_WarmatinElement trgElement =
wdContext.createIm_WarmatinElement(
new com.kaisa.mwci.models.updatezpsmur.Zps_War());
WDCopyService.copyCorresponding(srcElement, trgElement);
wdContext
.nodeZps_Fm_War_Mat_Update_Input()
.nodeIm_Warmatin()
.addElement(
trgElement);
}
wdContext
.currentZps_Fm_War_Mat_Update_InputElement()
.modelObject()
.execute();
wdContext.nodeOutWarMatIn().invalidate();
} catch (WDDynamicRFCExecuteException e) {
manager.reportException(e.getMessage(), false);
}
//$$end
//@@end
}
I can call the RFC, it actually returns a value, but not one that I expect. I think the table data is not being passed at all?
Ideas will be greatly appreciated. Thanks!
Cheers,
Alfonso
problem solved. it was all a matter of defining an arbitrary input data instance and binding it as a collection rather than adding one element at a time.
cheers,
alfonso
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI
try for external debugging of you RFC , and whether you are able to pass you data to the RFC ,
public void executeZps_Fm_War_Mat_Update_Input( )
{
//@@begin executeZps_Fm_War_Mat_Update_Input()
//$$begin Service Controller(344531631)
IWDMessageManager manager = wdComponentAPI.getMessageManager();
try {
int size =
wdContext
.nodeZps_Fm_War_Mat_Prefill_Input()
.nodeWarOut()
.nodeEx_Warout()
.size();
for (int i = 0; i < size; i++) {
IPublicWARComp.IEx_WaroutElement srcElement =
wdContext
.nodeZps_Fm_War_Mat_Prefill_Input()
.nodeWarOut()
.nodeEx_Warout()
.getEx_WaroutElementAt(i);
IPublicWARComp.IIm_WarmatinElement trgElement =
wdContext.createIm_WarmatinElement(
new com.kaisa.mwci.models.updatezpsmur.Zps_War());
// here instead of creating a element , there would be some Class
created for IIm_Warmatin , so you can create a instance for this class and set the
source data element to the target .
ZIIm_Warmatin target = new IIm_WarmatinElement();
target.set(...);
........
wdcontext.nodeIIm_Warmatin.bind(target);
try this . or you can set the source data to the element created for the target .
hopefully should work
}
wdContext
.currentZps_Fm_War_Mat_Update_InputElement()
.modelObject()
.execute();
wdContext.nodeOutWarMatIn().invalidate();
} catch (WDDynamicRFCExecuteException e) {
manager.reportException(e.getMessage(), false);
}
//$$end
//@@end
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alfonso,
Did you try like this?
public void executeZps_Fm_War_Mat_Update_Input( )
{
//@@begin executeZps_Fm_War_Mat_Update_Input()
//$$begin Service Controller(344531631)
IWDMessageManager manager = wdComponentAPI.getMessageManager();
try {
WDCopyService.copyCorresponding(wdContext
.nodeZps_Fm_War_Mat_Prefill_Input()
.nodeWarOut()
.nodeEx_Warout(), wdContext
.nodeZps_Fm_War_Mat_Update_Input()
.nodeIm_Warmatin());
wdContext .currentZps_Fm_War_Mat_Update_InputElement()
.modelObject().execute();
wdContext.nodeOutWarMatIn().invalidate();
} catch (WDDynamicRFCExecuteException e) {
manager.reportException(e.getMessage(), false);
}
//$$end
//@@end
}
Regards,
Siva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.