SAP求指导

幽助 2012-01-04 10:39:16
我们部门的脚本和公司有一些数据通讯,使用SAP传输一些数据,但是有时候传输数据时会丢失,现在要去修改,不管是不是成功都要将数据发给财务,由于第一次接触SAP,所以对SAP一点都不了解,求高人指点,谢谢
public void RFCJAVAR3(String proj, String perso, String detail)
{
JCO.Client client = null;

try {
// Get a function template from the repository
IFunctionTemplate ftemplate = repository.getFunctionTemplate("ZRFC_GET_PERSO");

// if the function definition was found in backend system
if(ftemplate != null) {

// Create a function from the template
JCO.Function function = ftemplate.getFunction();

// Get a client from the pool
client = JCO.getClient(SID);

// Fill in input parameters
JCO.ParameterList input = function.getImportParameterList();

// input.setValue("0000000004", "ZINFO" );
//?????????? input.setValue("0000000003", "INPUT_SO" );
Structure dd =input.getStructure("INFO");
dd.setValue(proj, "PROJ");
dd.setValue(perso, "PERSO");
dd.setValue(detail, "DETAIL");
input.setValue(dd, "INFO" );
// Call the remote system
client.execute(function);




// Print return message
//JCO.Structure ret = function.getExportParameterList().getStructure("WA_VBAK");
JCO.ParameterList ret = function.getExportParameterList();

System.out.println("-----------------------------------------");
System.out.println("ZRFC_JAVA_LINK_R3 Done" );

}
else {
System.out.println("ZRFC_JAVA_LINK_R3 not found in backend system.");
}//if
}
catch (Exception ex) {
System.out.println("Caught an exception: \n" + ex);
}
finally {
// Release the client to the pool
JCO.releaseClient(client);
}
}

传输的应该是这块代码吧,以前做写这个的同事都不在了,麻烦指点
...全文
50 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

2,679

社区成员

发帖
与我相关
我的任务
社区描述
企业开发 ERP/CRM
社区管理员
  • ERP/CRM社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧