Showing results for 
Search instead for 
Did you mean: 

執行RFC的問題(Web Dynpro for Java)

Former Member
0 Kudos

Dear Experts,

小弟目前使用一支ABAP工程師寫好的RFC,這支RFC會去修改到我們所建立的add-on Table,以下敘述是RFC的結構和程式。



Zep1_M_Purchase_Order_Input MNode = new Zep1_M_Purchase_Order_Input();
Zpolist1 node = new Zpolist1();


Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos


1. 先在SE37看一下, 你的FM的Remote-Enable module是否被选中 (在attribue tab 中), 否则不能通过jco做rfc

2. 如果满足1的条件, 可以写一段java 代码, 直接建立jco连接, 直接调用FM. (连接参数, 可以查询netweaver administrator中的jco destination的配置), java代码可以参照如下

Former Member
0 Kudos


我去看了SE37,這個FM是選擇Remote-Enable module的。關於第二個方法我在用它前發現了一個問題,因為我用GUI會輸入SAProuter,我並曉得該將/H/放在哪個位置上?

還有一個問題,就是我之後再繼續建立第三個RFC,將表格LIST LIKE一個另外Add-on Table(之前有支RFC用過此Add-on Table是可以運作的),結果還是發現LIST裡欄位的值沒有抓到,是否當RFC建立完還要做什麼事情才能讓Web Dynpro for Java此類的工具使用呢?

Former Member
0 Kudos

这个jco是由你的管理员在sap j2ee engine上配置好的, 如果想你想看的话, 可以去NW Administrator -> Webdynpro -> Content Administrator查看

你要获得jco client可以如下, 不一定要知道具体的配置参数 (你本地gui要用saprouter, 不代表你的j2ee engine也需要用saprouter)

IWDDynamiRFCModel myModel =


IWDJCOClientConnection cliConnection =


myModel.setJcoClient( cliConnection.getClient() );

"MyDataConn"是jco destination name, 如果你没有权限看, 可以问一下你的管理员

Former Member
0 Kudos

检查你的的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

Answers (1)

Answers (1)

Active Contributor
0 Kudos