on 07-27-2007 9:14 AM
I am sending table parameter from WebDynpro to sap r/3,but the table is not populating.
can you post the exact code?
kk
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i am using functional module and i am passing one table parameter ,but it is not populated from dynpro to function module's table parameter.
public void executeZwsacs_Sod_Alert1_Input( ltti.mod.com.Zwsacs_Alert sod_alert )
{
//@@begin executeZwsacs_Sod_Alert1_Input()
//$$begin Service Controller(1932542337)
IWDMessageManager manager = wdComponentAPI.getMessageManager();
try{
wdContext.currentSod_Tab_Itab_1Element().modelObject().setId(sod_alert.getId());
wdContext.currentSod_Tab_Itab_1Element().modelObject().setSend_Mail(sod_alert.getSend_Mail());
wdContext.currentSod_Tab_Itab_1Element().modelObject().setInd(sod_alert.getInd());
wdContext.currentZwsacs_Sod_Alert1_InputElement().modelObject().execute();
wdContext.nodeOutput().invalidate();
} catch(WDDynamicRFCExecuteException ce) {
manager.reportException(ce.getMessage(), false);
}
//$$end
//@@end
}
Hi,
Write the below code:
Zwsacs_Sod_Alert1_Input input = new Zwsacs_Sod_Alert1_Input();
wdContext.nodeZwsacs_Sod_Alert1_Input.bind(input);
// passing params to the table, considering table name as ZTable.
ZTable tableInput;
//if there is only one record to be inserted in the table then no need of for loop.
for(int i=0; i<3; i++)
{
tableInput = new ZTable();
tableInput.setId(sod_alert.getId());
tableInput.setSend_Mail(sod_alert.getSend_Mail());
tableInput.setInd(sod_alert.getInd());
//add the table input to function module input
input.addZTable(tableInput);
}
wdContext.currentZwsacs_Sod_Alert1_InputElement().modelObject().execute();
wdContext.nodeOutput().invalidate();
Refer to this thread for passing parameters to R/3 function module from Webdynpro
Regards
Srikanth
Hi,
In 7.3:
// models
RFCModel1 modeloGral = new RFCModel1();
Zfmfi_Certificado_Ret_Pdf_Input modeloRfc = wdContext.currentZfmfi_Certificado_Ret_Pdf_InputElement().modelObject();
// clean
if(modeloRfc.getIt_Tipo_Ret_Pobl()!=null && modeloRfc.getIt_Tipo_Ret_Pobl().size()>0){
modeloRfc.getIt_Tipo_Ret_Pobl().removeAll(modeloRfc.getIt_Tipo_Ret_Pobl());
}
//fill
IEt_RetencionesElement retElem;
int cant = wdContext.nodeEt_Retenciones().size();
for(int i=0; i<cant; i++){
retElem = wdContext.nodeEt_Retenciones().getEt_RetencionesElementAt(i);
Zfie_Tipo_Retencion_Poblacion retencion = new Zfie_Tipo_Retencion_Poblacion(modeloGral);
retencion.setTipo_Ret(retElem.getTipo_Ret());
modeloRfc.addIt_Tipo_Ret_Pobl(retencion);
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanx,
it's working.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
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.