Hi All,
I am having a bapi which fetches table values from R/3.
with this bapi I could get table values and display in the UITable.
I could Edit the table values,
But when I try to save them back into R/3, it is not getting updated. In fact when I try to execute the bapi in se37 it works fine.
actually the bapi takes 2 import parametrs and a table to process
param 1 -- action values (fetch/save)
param 2 -- Form_type values (INCIDENT/HAZARD)
If the action is fetch then it fetches the values from R/3 depending on Form_type
If the action is save then it saves the values into R/3 depending on Form_type
To perform save action I have a method name SAVE in custom controller
Here is the code, please look a it and help me in resolving that,
IPrivateConfig_Fields_View.IForm_ConfigElement ele;
Zbapi_Config_Flds_Input input = new Zbapi_Config_Flds_Input();
Zbapi_Form_Config tab = new Zbapi_Form_Config();
String opt = wdContext.currentContextElement().getConfig_To_Option();
int size = wdContext.nodeForm_Config().size();
input.setForm_Type("INCIDENT");
input.setForm_Act(action);
tab = new Zbapi_Form_Config();
for(int i=0;i<size;i++)
{
tab.setFld_Check(wdContext.nodeForm_Config().getElementAt(i).getAttributeAsText("Fld_Check"));
input.addForm_Config(tab);
}
opt = tab.getFld_Check();
wdContext.nodeZbapi_Config_Flds_Input().bind(input);
try
{
wdContext.currentZbapi_Config_Flds_InputElement().modelObject().execute();
}
catch(Exception ex)
{
ex.printStackTrace();
}
wdContext.nodeOutput().invalidate();
return wdContext.currentReturnElement().getMessage();
on exeuting this, the bapi is returning a error msg handled by us.
Please help me if resolving this, If u need more clarification please post the requirements.
Thanks & Regards,
Sai krishna.