on 07-31-2006 2:23 PM
Hi,
I have written the following code for stroing the data in SAP directly which i have taken from R/3.....
But data is not storing in SAP.....
public void execute_Create( )
{
//@@begin execute_Create()
Y_Ep_Demo_Material_Create_Input input = new Y_Ep_Demo_Material_Create_Input();
IWDMessageManager msg = wdThis.wdGetAPI().getComponent().getMessageManager();
msg.reportSuccess(" Brgew "+wdContext.currentOutputDataElement().getBrgew());
input.setMatnr("MAT3006");
input.setBrgew(wdContext.currentOutputDataElement().getBrgew());
input.setAumng(wdContext.currentOutputDataElement().getAumng());
input.setDwerk(wdContext.currentOutputDataElement().getDwerk());
input.setGewei(wdContext.currentOutputDataElement().getGewei());
input.setKosch(wdContext.currentOutputDataElement().getKosch());
input.setLfmng(wdContext.currentOutputDataElement().getLfmng());
input.setMaktx(wdContext.currentOutputDataElement().getMaktx());
input.setMatkl(wdContext.currentOutputDataElement().getMatkl());
input.setMbrsh(wdContext.currentOutputDataElement().getMbrsh());
input.setMeins(wdContext.currentOutputDataElement().getMeins());
input.setMtart(wdContext.currentOutputDataElement().getMtart());
input.setNtgew(wdContext.currentOutputDataElement().getNtgew());
input.setPrdha(wdContext.currentOutputDataElement().getPrdha());
input.setSktof(wdContext.currentOutputDataElement().getSktof());
input.setSpart(wdContext.currentOutputDataElement().getSpart());
input.setVkorg(wdContext.currentOutputDataElement().getVkorg());
input.setVrkme(wdContext.currentOutputDataElement().getVrkme());
input.setVtweg(wdContext.currentOutputDataElement().getVtweg());
input.setWerks(wdContext.currentOutputDataElement().getWerks());
wdContext.nodeMaterial_Create().bind(input);
try{
wdContext.currentMaterial_CreateElement().modelObject().execute();
msg.reportSuccess("successfully stored in SAP");
}catch(Exception e){
msg.reportSuccess("exception "+e.getCause());
}
//@@end
}
Thanks & Regards
Ravi Shankar B
Hi
Check if you are supposed to commit the transaction by calling the Commit BAPI.
Regards,
Ajay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi..
Please tell me the code which i have written is correct or not...
I am not getting any exception... in this block of code
try{
wdContext.currentMaterial_CreateElement().modelObject().execute();
msg.reportSuccess("successfully stored in SAP");
}catch(Exception e){
msg.reportSuccess("exception "+e.getCause());
}
Thanks & Regards
Ravi Shankar B
Message was edited by: RaviShankar B
Hi
1. Check all the non optional values(Bapi Import Parameters) are bind with the value(without the null and empty).
2.Are you got any error message from the Bapi?(try to get the message from the return node)
Kind Regards
Mukesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
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.