on 04-09-2010 9:04 AM
Dear Experts,
小弟目前使用一支ABAP工程師寫好的RFC,這支RFC會去修改到我們所建立的add-on Table,以下敘述是RFC的結構和程式。
Import:STATUS
Table :LIST & RETURN
Zep1_M_Purchase_Order_Input MNode = new Zep1_M_Purchase_Order_Input();
Zpolist1 node = new Zpolist1();
MNode.setStatus("1");
node.setEbeln("1234567890");
node.setEbelp("00010");
MNode.addList(node);
wdContext.nodeZep1_M_Purchase_Order_Input().bind(MNode);
wdThis.wdGetPOController().executeZep1_M_Purchase_Order_Input();
執行後發現Import的STATUS有值,不過LIST中的Ebeln與Ebelp都沒有值,正確來說整個LIST沒有被抓取,不過以這些值到se37去執行,是可以正常運作。請問有人遇過這樣的問題嗎?該怎麼解決呢?謝謝
解决如下:
1. 先在SE37看一下, 你的FM的Remote-Enable module是否被选中 (在attribue tab 中), 否则不能通过jco做rfc
2. 如果满足1的条件, 可以写一段java 代码, 直接建立jco连接, 直接调用FM. (连接参数, 可以查询netweaver administrator中的jco destination的配置), java代码可以参照如下
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/d2/561106b8b3bc449f890cddfdc8d3e2/content.htm
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
这个jco是由你的管理员在sap j2ee engine上配置好的, 如果想你想看的话, 可以去NW Administrator -> Webdynpro -> Content Administrator查看
你要获得jco client可以如下, 不一定要知道具体的配置参数 (你本地gui要用saprouter, 不代表你的j2ee engine也需要用saprouter)
IWDDynamiRFCModel myModel =
(IWDDynamicRFCModel)WDModelFactory.getModelInstance(YourRfcModel.class);
IWDJCOClientConnection cliConnection =
WDSystemLandscape.getJCOClientConnection("MyDataConn");
myModel.setJcoClient( cliConnection.getClient() );
"MyDataConn"是jco destination name, 如果你没有权限看, 可以问一下你的管理员
检查你的的jco connection如下:
Creating the JCO connections in the Content Administrator
The logical system names used in the model declaration must be associated with an actual SAP system defined in the SLD before this application can be executed. For this reason you need to create JCO connections in the Web Dynpro Content Administrator. To use an adaptive RFC model in your Web Dynpro application you will define two connections:
u2022 A connection to get the needed (dictionary) meta data information
u2022 A connection to get the read the application data
To create the new JCO connections proceed as follows:
...
1. Open the Web Dynpro Content Administrator on your J2EE Engine using the URL: http://<host>:<port>/webdynpro/welcome.
2. If you are using the Content Administrator for the first time, you need to perform the self registration.
3. Select the Browse tab and navigate to the application node localu2192 TutWD_YouApp_Initu2192 Applicationsu2192 YourApp.
4. Choose the JCO Connections tab.
Two destinations named Your_MODELDATA_DEST and Your_RFC_METADATA_DEST are shown in this view and both of them have the status red. This means that the JCO connection is not yet maintained in assigned SLD.
5. Select Your_MODELDATA_DEST and choose Create to configure a new JCO connection.
a. Go though the steps of the JCO connection creation wizard and specify the connection data.
b. After making the required entries, press Finish.
c. Test your configuration data by pressing the Test button.
6. Do the same for Your_RFC_METADATA_DEST.
The both destinations are ready to use and the status id green
7. If the tests were successful, you can close the Content Adminstrator. Otherwise correct your connection entries.
Edited by: Frank Zhou on Apr 12, 2010 6:01 AM
设个外部断点debug一下不就知道了吗
可以从java那边一直debug到abap
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 | |
9 | |
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.