on 05-06-2009 9:04 AM
wdThis
.wdGetZztest_test002CompController()
.executeZbapi_Hriq_Out_Tab_Input();
int n = wdContext.nodeOutput_Out().nodeEt_Hrp1000().size();
if (n > 0) {
IPrivateMainView.IIt_Hrp1000Node nodeIn =
wdContext.nodeZbapi_Hriq_In_Tab_Input().nodeIt_Hrp1000();
IPrivateMainView.IEt_Hrp1000Node nodeOut =
wdContext.nodeOutput_Out().nodeEt_Hrp1000();
Zbapi_Hriq_In_Tab_Input nodeBapi = new Zbapi_Hriq_In_Tab_Input();
Hrp1000 model = new Hrp1000();
for (int i = 0; i < n; i++) {
IPrivateMainView.IEt_Hrp1000Element dataElem =
nodeOut.getEt_Hrp1000ElementAt(i);
IPrivateMainView.IIt_Hrp1000Element inElem =
wdContext.nodeIt_Hrp1000().createIt_Hrp1000Element(model);
inElem.setBegda(dataElem.getBegda());
inElem.setEndda(dataElem.getEndda());
inElem.setLangu(dataElem.getLangu());
inElem.setObjid(dataElem.getObjid());
inElem.setOtype(dataElem.getOtype());
inElem.setPlvar(dataElem.getPlvar());
inElem.setStext(dataElem.getStext());
inElem.setShort(dataElem.getShort());
wdContext
.nodeZbapi_Hriq_In_Tab_Input()
.nodeIt_Hrp1000()
.addElement(
inElem);
}
}
try {
wdThis
.wdGetZztest_test002CompController()
.executeZbapi_Hriq_In_Tab_Input();
} catch (Exception e) {
msgMgr.reportWarning("Error occurs");
}
hi all,
Above is a part of code in a program. I'm trying to make a table input and parse the table to Bapi. Before I execute a Bapi (wdThis.wdGetZztest_test002CompController().executeZbapi_Hriq_In_Tab_Input();), the table has the data inside (i map a node with a display table on web).
After the Bapi is called, it returns Mandatory parameter IT_HRP1000 of method ZBAPI_HRIQ_IN_TAB missing. That means the table input is blank.
Please help me on this. Thanks in advance for your effort.
Regards,
Peerasit
Firstly, the global node variable has been declared as the following:
Zbapi_Hriq_Get_Recpt_Det_Input detBapi = new Zbapi_Hriq_Get_Recpt_Det_Input();
Then, I loop the data and insert in each subnode
detBapi.addIt_Clrdoc(model);
Lastly, I bind a node
wdContext.nodeZbapi_Hriq_Get_Recpt_Det_Input().bind(detBapi);
====
The solution is binding all the things at the end before execute Bapi. That's it.
: D
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you first check all the .getXXX? Are they returning any values?
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 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.