如果安装了像SAP Logon这样的胖客户端,用户就可以连接到所需的SAP服务器并通过事务访问数据。
我要做什么?-调用安装在用户机器上的SAP胖客户端,并将用户直接从服务重定向到所需的事务(反过来是Java代码)。
什么是可能的?-基于生成的It,可以在SAP中执行相同的操作。以下链接将提供帮助-
http://wiki.sdn.sap.com/wiki/display/Snippets/Creating+a+SAP+shortcut+for+any+transaction+and+sending+it+by+mail
有没有可能通过Java代码做同样的事情?
发布于 2012-11-20 18:05:02
您可以在桌面上创建包含以下内容的.SAP文件:
示例:
conn=/H/192.168.90.5/S/3210&clnt=300&lang=RO&tran=*ZME29N SO_EBELN-LOW=4500028729;
where 192.168.90.5 is the local sap server ip
3210 is the server port
300 is the client
RO - language
*ZME29N is the transaction followed by the select options.发布于 2009-11-19 17:22:33
如果你可以将你的程序连接到SAP,你就可以随时从wiki中将功能设置为RFC,并从SAP获得链接。否则,您始终可以测试函数以检查返回的字符串。
此字符串可用于创建SAP GUI快捷方式。这些短and具有.sap扩展名,并包含前面的字符串。例如,以下是一个测试SAP GUI快捷方式的内容:
[System]
Name=IFR
Description=IFR ECC 6.0
Client=300
[User]
Name=gpatry
Language=FR
[Function]
Title=Connexion SAP IFR
Command=PA20
[Configuration]
WorkDir=D:\Documents and Settings\gpatry\SapWorkDir
[Options]
Reuse=0 在您给出的例子中,这样的字符串被用来创建一个名为"DisplayAddress.SAP“的附件。单击该附件即可启动GUI。
如果无法创建快捷方式,则可以尝试执行打开快捷方式文件,方法与打开.doc启动word的方式相同。我必须承认在这一点上我一无所知。
希望这能帮上忙
致以敬意,
纪劳姆
发布于 2009-12-14 15:42:27
Guillaume (PATRY)在生成.SAP快捷方式内容的一般方法上是正确的。如果您总是启动特定事务,另一种方法是使用硬编码(或资源检索)模板。
然后,您需要将其保存为文件并启动该文件。这可以按如下方式完成:
// Generate your .SAP shortcut content by calling an RFC, or manually filling a template.
String shortcutContent = ...;
File file = new File(...some path, probably inside temp dir...);
OutputStream os = new FileOutputStream(file);
os.write(shortcutContent.getBytes());
os.close();
String url = "file://" + file.getAbsolutePath();
// Ask OS to launch the file
Runtime runtime = Runtime.getRuntime();
String cmd = "rundll32 url.dll,FileProtocolHandler " + url;
runtime.exec(cmd);
// Remove file
file.deleteOnExit();当然,您需要围绕这段代码添加适合于周围体系结构的异常处理。
https://stackoverflow.com/questions/1761515
复制相似问题