on 07-03-2007 2:08 PM
hi all,
i have a problem in a WD application, when i execute a certain RFC, the model node in the controller mapped to that RFC (model), does not fill itself with the data that the RFC suppose to bring as a result. it seems to get lost in some point (the data). i check and all seems to be fine. I bind the node, then i execute it and later i invalidate it. It's not a role problem i've checked already, and the RFC in the backend when i run it, shows me data. Anyone knows what could this be?...
Regards,
Mariana
Hi Mariana,
Check the JCo to which instance of the server is Mapped(In the server where JCo is Created).
if the JCo is connected to a server instance in which the RFC has no value, the you will not get any records.
Regards
Satish Kumar SV
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mariana,
recheck to see if you are invalidating the correct output node. Recheck the following line:
wdContext.nodeZbapi_Sd_Consulta_Doc_Serial_Input().invalidate();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ..
U have to excute the RFC..
For this..
Consider this example ..Write like this in init()..
Bapi_Flight_Getlist_Input bapin = new Bapi_Flight_Getlist_Input();
wdContext.nodeBapi_Flight_Getlist_Input().bind(bapin);
try
{
wdContext.currentBapi_Flight_Getlist_InputElement().modelObject().execute();
wdContext.nodeOutput().invalidate();
}
catch(Exception e)
{
}
URs GS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check the size of the Output Node, just after executing the Bapi.
If the size is not zero then we can conclude that their is a problem in the code.
If the size is zero then the Output node is empty.
And also dont invalidate the Main node.
try invalidating the sub node of the Output
eg.
RequestNode
--Input(Sub node)
---Attri_1
.
.
.
---Atter_n
--Output (Sub node)
---SubNodeA
-
SubNodeB
-
Attr_1
.
.
-
Attr_n
wdContext.nodeSubNodeA.invalidate();
Hi,
Give your context structure and the code for executing the RFC.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well my context structure its like this
+ Zbapi_XYZ
+ OutputY
+ ReturnY
+ Table_XYZ (custom structure)
-attribute_1
.
.
-attribute_n
+ Return_IN ( bapireturn structure)
-attribute_1
.
.
-attribute_n
+Table_XYZ_IN (custom structure)
-attribute_1
.
.
-attribute_n
- attribute1
This is a model node, all the attribute are model attribute and both Table_XYZ_IN and Table_XYZ are from the same type of structure.
The binding is implemented in WdDoInit Method as follow:
Zbapi_Sd_Consulta_Doc_Serial_Input bapiSdConsultaDocSerial =
new Zbapi_Sd_Consulta_Doc_Serial_Input();
wdContext.nodeZbapi_Sd_Consulta_Doc_Serial_Input().bind(
bapiSdConsultaDocSerial);
and the execution of the RFC is in a custom method call
public void ejecutarSdConsultaDocSerial( java.lang.String serial )
inside it has the follow code:
String nombreFuncion = "ejecutarSdConsultaDocSerial: ";
String mensaje = "";
boolean error = false;
wdContext.currentZbapi_Sd_Consulta_Doc_Serial_InputElement().setPsernr(
serial);
try {
wdContext
.currentZbapi_Sd_Consulta_Doc_Serial_InputElement()
.modelObject()
.execute();
//Invalidates the output context node
//wdContext.nodeOutputSD().invalidate();
wdContext.nodeZbapi_Sd_Consulta_Doc_Serial_Input().invalidate();
//En la variable "mensaje" se almacena todos los mensajes de error concatenados
for (int i = 0; i < wdContext.nodeReturnSD().size(); i = i + 1) {
IReturnSDElement retorno =
wdContext.nodeReturnSD().getReturnSDElementAt(i);
if (retorno.getType().equals("E")) {
error = true;
mensaje = mensaje + " " + retorno.getMessage();
}
}
if (error) {
wdContext
.currentEstatusBAPIElement()
.setEstatusSdConsultaDocSerial(
0);
wdContext.currentEstatusBAPIElement().setMensajeError(
nombreFuncion + mensaje);
} else {
wdContext
.currentEstatusBAPIElement()
.setEstatusSdConsultaDocSerial(
1);
}
} catch (Exception ex) {
wdContext
.currentEstatusBAPIElement()
.setEstatusSdConsultaDocSerial(
0);
wdContext.currentEstatusBAPIElement().setMensajeError(
nombreFuncion + ex.getMessage());
}
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.