Calling RFC Function module from JAVA
Hi All,
We have created a RFC Function Module for Billing Plan tab in Sales order (BDC). The function Module contains BDC. When we are running the same function module in SAP it is working fine. But when the FM is called in Java , it is allowing only maximum of 5 entries , when we trying to insert at 6th position in billing plan tab, we are getting an error.
Can any one help on this.
Points will be rewarded for helpful answers.
Thanks & Regards,
Kiran I
I think the problem is because of the number of lines displayed on the screen in the BDC session in the Billing Plan.
You might have to add the page down logic to your BDC program.
Similar Messages
-
CNTL_ERROR while calling a function module from Java webdynpro
I am calling a RFC function module from javawebdynpro app
which inturn calls a function module performing BDC on CAPP transaction. When I run this from SE37 of the same system or a different system everything works fine. But when called from Java webdynpro app, it raises a CNTL_ERROR exception and creates a short dump.
Any help on this is highly appreciatedGood catch, BI Learner. This was exactly it: when assigning the values from SOURCEFIELDS directly to the import/export parameters, you have to make sure that the types are EXACTLY the same, otherwise it will not work (the routine stops with an error when calling the FM, but there is no dump).
Therefore, to solve my problem, I created the declarations precisely as expected by the FM and assigned the values to these fields:
DATA:
SOURCEVAL TYPE /BIC/OIINVQTY,
SOURCEUOM TYPE /BIC/OIUSUOM,
USITM TYPE /BIC/OIUSITM,
TARGETUOM TYPE /BIC/OIUSUOM,
CONVERTED_COST TYPE /BIC/OIINVQTY.
DATA PRODUCTION_UOM TYPE /BIC/OIUSUOM.
" get the Production UOM
SELECT SINGLE I~/BIC/USPRDUOM
FROM /BIC/PUSITM AS I
INTO PRODUCTION_UOM
WHERE I~/BIC/USITM = SOURCE_FIELDS-/BIC/USITM AND I~OBJVERS = 'A'.
IF ( SY-SUBRC = 4 ). " no records found
"RAISE PARTNO_NOT_FOUND.
RAISE EXCEPTION TYPE CX_RSROUT_SKIP_RECORD.
ENDIF.
" load the parameters
SOURCEVAL = SOURCE_FIELDS-/BIC/USFRZMFC.
SOURCEUOM = SOURCE_FIELDS-BASE_UOM.
USITM = SOURCE_FIELDS-/BIC/USITM.
" then you can call the FM
CALL FUNCTION 'Z_CA_CONVERT_US_COST'
EXPORTING
PSOURCEVAL = SOURCEVAL
PSOURCEUOM = SOURCEUOM
PUSITM = USITM
PTARGETUOM = PRODUCTION_UOM
IMPORTING
PTARGETVAL = CONVERTED_COST
EXCEPTIONS
CONVERSION_NOT_MAINTAINED = 1
PARTNO_NOT_FOUND = 2
OTHERS = 3.
" ... [do the rest]
Thanks for your help,
Dennis -
Calling New Function Module from JAVA ISA b2b
I need to call a new function module which accepts some parameters as input and
returns some result parameters back as output.
These returned value needs to be displayed on the JSP pages of ISA B2B applications.
Can someone please guide me and provide code snippet on how to do this?
Thanks in advance.
Points will be awarded for all relevant and helpful answers.Stride,
I did this on CRM ISA 4.0... I used the dev and extension guide as a basis - I think the ISA 5.0 guide has the examples and tutorials in a separate document that can also be downloaded from service.sap.com.
Heres some info on how to do it although I can't guarantee this is the full solution or that it will work the same for ISA 5.0, and I will probably forget a lot of stuff as its been a few years since I did it! I also cant guarantee it is the correct way to do it but it worked! Basically, we built a link into the order overview page to display urls to order tracking websites using an RFC on the backend CRM system. Hope it helps anyway.
1. Create RFC enabled function module in backend.
2. Edit file backendobject-config.xml in folder project_root\b2b_z\WEB-INF\xcm\customer\modification:-
[code] <backendobject
xmlns:isa="com.sapmarkets.isa.core.config"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xml="http://www.w3.org/XML/1998/namespace">
<configs>
<!-- customer changes in backendobject-config should be done here by extending/overwriting the base configuration-->
<xi:include
href="$
Template for backend object in customer projects
Concrete implementation of a backend object
This implemenation demonstrates how a backend object
is used to communicate with the CRM system
@see com.ao.isa.backend.boi.Z_AOFuncBackend#getOrderDeliveryTrackingData(java.lang.String)
Interface used to communicate with a backend object
The purpose of this interface is to hide backend implementation details
from the business objects
Returns a vector of Z_OrderDeliverTracking objects containing data to link
to external delivery tracking websites
@param orderNo The sales order document number
@return A vector of order tracking objects
@return
@return
@return
@return
@return
@param string
@param string
@param string
@param string
@param string
/modification/backendobject-config.xml#xpointer(backendobject/configs/*)"/>
<!-- This is an example customer extension. A new Backend Object is registered in the framework using XCM extension mechanism. -->
<!-- If you write customer extensions you should register your backend objects in the same way. -->
<!-- Please make sure that you use the correct base configuration (e.g. crmdefault for CRM or r3default, r3pidefault for R/3) -->
<config
isa:extends="../config[@id='crmdefault']">
<businessObject
type="Z_AO_Custom"
name="Z_AO_Custom"
className="com.ao.isa.backend.crm.Z_AOFuncCRM"
connectionFactoryName="JCO"
defaultConnectionName="ISAStateless"/>
</config>
</configs>
</backendobject>
[/code]
File com.ao.isa.backend.crm.Z_AOFuncCRM.java looks like this :-
[code] package com.ao.isa.backend.crm;
//jco imports
import java.util.Vector;
import com.ao.isa.backend.boi.Z_AOFuncBackend;
import com.ao.isa.businessobject.order.Z_OrderDeliveryTrackingItem;
import com.sap.mw.jco.JCO;
import com.sap.mw.jco.JCO.ParameterList;
import com.sapmarkets.isa.core.eai.BackendException;
import com.sapmarkets.isa.core.eai.sp.jco.BackendBusinessObjectBaseSAP;
import com.sapmarkets.isa.core.logging.IsaLocation;
public class Z_AOFuncCRM
extends BackendBusinessObjectBaseSAP
implements Z_AOFuncBackend
// initialize logging
private static IsaLocation log =
IsaLocation.getInstance(Z_AOFuncCRM.class.getName());
/* (non-Javadoc)
public Vector getOrderDeliveryTrackingData(String orderNo)
Vector urlData = new Vector();
try
// get Java representation of function module
JCO.Function func =
getDefaultJCoConnection().getJCoFunction(
"Z_BAPI_CRM_ORDER_TRACKING_URLS");
// provide export parameters
ParameterList params = func.getImportParameterList();
params.setValue(orderNo, "ORDER_NO");
func.setExportParameterList(params);
// execute function
getDefaultJCoConnection().execute(func);
// get result table
JCO.Table table =
func.getTableParameterList().getTable("TRACKING_DATA");
int numRows = table.getNumRows();
for (int i = 0; i < numRows; i++)
// get row
table.setRow(i);
// create a new Z_orderdeliverytracking object
Z_OrderDeliveryTrackingItem trackItem =
new Z_OrderDeliveryTrackingItem(
table.getString(0),
table.getString(1),
table.getString(2),
table.getString(3),
table.getString(4));
urlData.addElement(trackItem);
trackItem = new Z_OrderDeliveryTrackingItem();
return urlData;
catch (BackendException bex)
// The following key has to be added to WEB-INF/classes/ISAResources.properties
// in order to see the exception correctly
log.config("ao.b2b.order.error.getOrderTrackingURLs", bex);
return null;
[/code]
And file com.ao.isa.backend.boi.Z_AOFuncBackend.java looks like this:-
[code] package com.ao.isa.backend.boi;
//package java.ao.com.ao.isa.backend.boi;
import java.util.Vector;
import com.sapmarkets.isa.core.eai.sp.jco.JCoConnectionEventListener;
public interface Z_AOFuncBackend
public Vector getOrderDeliveryTrackingData(String orderNo);
[/code]
Whilst file com.ao.isa.businessobject.order.Z_OrderDeliveryTrackingItem.java looks like this:-
[code]
package com.ao.isa.businessobject.order;
// Referenced classes of package com.sapmarkets.isa.businessobject.order:
// PaymentType
public class Z_OrderDeliveryTrackingItem // extends SalesDocument implements OrderData
private String deliveryDocNo;
private String goodsIssuedDate;
private String consignmentNo;
private String status;
private String url;
public Z_OrderDeliveryTrackingItem()
public Z_OrderDeliveryTrackingItem(
String delDocNo,
String GIDate,
String consNo,
String status,
String url)
this.setDeliveryDocNo(delDocNo);
this.setGoodsIssuedDate(GIDate);
this.setConsignmentNo(consNo);
this.setStatus(status);
this.setUrl(url);
public String getConsignmentNo()
return consignmentNo;
public String getDeliveryDocNo()
return deliveryDocNo;
public String getGoodsIssuedDate()
return goodsIssuedDate;
public String getStatus()
return status;
public String getUrl()
return url;
public void setConsignmentNo(String string)
consignmentNo = string;
public void setDeliveryDocNo(String string)
deliveryDocNo = string;
public void setGoodsIssuedDate(String string)
goodsIssuedDate = string;
public void setStatus(String string)
status = string;
public void setUrl(String string)
url = string;
[/code]
3. Edit file bom-config.xml in folder project_root\b2b_z\WEB-INF\xcm\customer\modification :-
[code] <BusinessObjectManagers
xmlns:isa="com.sapmarkets.isa.core.config"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xml="http://www.w3.org/XML/1998/namespace">
<!-- customer changes in bom-config should be done here by extending/overwriting the base configuration-->
<xi:include
href="$/modification/bom-config.xml#xpointer(BusinessObjectManagers/*)"/>
<!-- This is an example Business Object Manager. It can act as template for customer written Business Object Managers -->
<BusinessObjectManager
name="Z_AO-BOM"
className="com.ao.isa.businessobject.Z_AOBusinessObjectManager"
/>
</BusinessObjectManagers>
[/code]
File com.ao.isa.businessobject.Z_AOBusinessObjectManager.java looks like this:-
[code] package com.ao.isa.businessobject;
// Internet Sales imports
import com.sapmarkets.isa.core.businessobject.management.BOManager;
import com.sapmarkets.isa.core.businessobject.management.DefaultBusinessObjectManager;
import com.sapmarkets.isa.core.businessobject.BackendAware;
Template for a custom BusinessObjectManager in customer projects
public class Z_AOBusinessObjectManager
extends DefaultBusinessObjectManager
implements BOManager, BackendAware {
// key used for the backend object in customer version of backendobject-config.xml
public static final String CUSTOM_BOM = "Z_AO-BOM";
// reference to backend object
private Z_AOFunc mCustomBasket;
constructor
public Z_AOBusinessObjectManager() {
Method is called by the framework before the session is invalidated.
The implemenation of this method should free any allocated resources
public void release() {
Returns custom business object
public Z_AOFunc getCustomBasket() {
if (mCustomBasket == null) {
mCustomBasket = new Z_AOFunc();
assignBackendObjectManager(mCustomBasket);
return mCustomBasket;
[/code]
And uses file com.ao.isa.businessobject.Z_AOFunc.java which looks like this:-
[code]
package com.ao.isa.businessobject;
// Internet Sales imports
import com.sapmarkets.isa.core.businessobject.BOBase;
import com.sapmarkets.isa.core.businessobject.BackendAware;
import com.sapmarkets.isa.core.eai.BackendObjectManager;
import com.sapmarkets.isa.core.eai.BackendException;
import com.sapmarkets.isa.core.logging.IsaLocation;
// custom imports
import com.ao.isa.backend.boi.Z_AOFuncBackend;
import java.util.Vector;
Template for business object in customer projects
public class Z_AOFunc extends BOBase implements BackendAware
// initialize logging
private static IsaLocation log =
IsaLocation.getInstance(Z_AOFunc.class.getName());
private BackendObjectManager bem;
private Z_AOFuncBackend backendAOBasket;
Returns a reference to the backend object. The backend object
is instantiated by the framework.
@return a reference to the backend object
private Z_AOFuncBackend getCustomBasketBackend()
if (backendAOBasket == null)
//create new backend object
try
backendAOBasket =
(Z_AOFuncBackend) bem.createBackendBusinessObject(
"Z_AO_Custom");
// the backend object is registered in customer version
// of backendobject-config.xml using the 'Z_AO_Custom' type
catch (BackendException bex)
// The following key has to be added to WEB-INF/classes/ISAResources.properties
// in order to see the exception correctly
log.config("ao.b2b.order.error.getOrderTrackingURLs", bex);
return backendAOBasket;
This method is needed when a business object has a corresponding
backend object.
public void setBackendObjectManager(BackendObjectManager bem)
this.bem = bem;
Returns a vector of url links for tracking
@return vector of urls
public Vector getOrderDeliveryTrackingData(String orderNo)
// the call is delegated to the CRM aware backend object
return getCustomBasketBackend().getOrderDeliveryTrackingData(orderNo);
[/code]
4. Edit file config.xml in folder project_root\b2b_z\WEB-INF to add custom actions (the section below is just the custom stuff added at the end of the file the Z_orderTracking is the relevant one) :-
[code] <!-- Begin of custom AO action definitions -->
<action path="/b2b/Z_orderTracking" type="com.ao.isa.order.actions.Z_OrderTrackingAction">
<forward name="success" path="/b2b/order/Z_orderTracking.jsp"/>
</action>
<action path="/catalog/Z_displaySVGPage" type="com.ao.isa.catalog.actions.Z_SVGPageAction">
<forward name="success" path="/catalog/Z_SVG_fs.jsp"/>
</action> [/code]
Which points at Java file com.ao.isa.order.actions.Z_OrderTrackingAction.java which looks like this :-
[code] package com.ao.isa.order.actions;
// internet sales imports
import com.sapmarkets.isa.core.BaseAction;
import com.sapmarkets.isa.core.UserSessionData;
// struts imports
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForm;
// servlet imports
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.ServletException;
// Internet Sales imports
import com.ao.isa.businessobject.Z_AOBusinessObjectManager;
import java.util.Vector;
This action acts as a template for customer extensions
public class Z_OrderTrackingAction extends BaseAction
This method is called by the ISA Framework when the
action is executed
public ActionForward doPerform(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws ServletException
// get user session data object
UserSessionData userSessionData =
UserSessionData.getUserSessionData(request.getSession());
// gettting custom BOM
Z_AOBusinessObjectManager myBOM =
(Z_AOBusinessObjectManager) userSessionData.getBOM(
Z_AOBusinessObjectManager.CUSTOM_BOM);
// get the order number being processed
String orderDocNumber = request.getParameter("orderNo");
// pass the order number back to the page
request.setAttribute("orderNo", orderDocNumber);
if (orderDocNumber != null)
// Get a vector of delivery tracking objects from lower layers (Business Object layer =>
// Business Logic Service Layer)
Vector trackingTable =
myBOM.getCustomBasket().getOrderDeliveryTrackingData(
orderDocNumber);
String error = "";
if (trackingTable != null)
if (trackingTable.size() == 0)
error = "true";
else
error = "false";
else
error = "true";
request.setAttribute("errorMessage", error);
request.setAttribute("trackingTable", trackingTable);
return mapping.findForward("success");
[/code]
5. I added the call to the function module for page orderstatusdetail.jsp in folder project_root\b2b_z\b2b\order to display a custom page Z_orderTracking.jsp in the same folder. To do this I added a link into the HTML to call a JavaScript function that passed the current order number to the /b2b/Z_orderTracking.do actionhandler mapped in the config.xml file.
So, in summary! Create an RFC; define business managers for it in the XML files; create a new Strut action and supporting Java class; create all the Java class for the managers.
I hope this makes some sense!
Gareth. -
Problem while calling RFC function module in java
Hi all
com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: Connect to SAP gateway failed
Connect_PM GWHOST=<system.ab.ydydy.yyyd.com>, GWSERV=sapgw00, ASHOST=<system.ab.ydydy.yyyd.com>, SYSNR=00
LOCATION CPIC (TCP/IP) on local host
ERROR hostname '<system.ab.ydydy.yyyd.com>' unknown
TIME Mon Jun 06 14:50:25 2005
RELEASE 640
COMPONENT NI (network interface)
VERSION 37
RC -2
MODULE ninti.c
LINE 332
DETAIL NiPGetHostByName2: hostname '<system.ab.ydydy.yyyd.com>' not found
SYSTEM CALL gethostbyname_r
COUNTER 1
at com.sap.mw.jco.rfc.MiddlewareRFC$Client.nativeConnect(Native Method)
at com.sap.mw.jco.rfc.MiddlewareRFC$Client.connect(MiddlewareRFC.java:1098)
at com.sap.mw.jco.JCO$Client.connect(JCO.java:2983)
at MyProject.Bapi2.<init>(Bapi2.java:43)
at MyProject.Bapi2.main(Bapi2.java:231)
Pl help me
pradeepHi
This is my code....
Created on Jun 2, 2005
To change the template for this generated file go to
Window>Preferences>Java>Code Generation>Code and Comments
package MyProject;
@author pradeep
To change the template for this generated type comment go to
Window>Preferences>Java>Code Generation>Code and Comments
import com.sap.mw.jco.*;
public class Bapi2 extends Object {
JCO.Client mConnection;
JCO.Repository mRepository;
public Bapi2() {
try {
// Change the logon information to your own system/user
mConnection =
JCO.createClient("122", // SAP client
"<pradeep>", // userid
"*****", // password
"EN", // language
"<abc11.aa.abc23.company.com>", // application server host name
"<00>");//system no
mConnection.connect();
mRepository = new JCO.Repository("HLL", mConnection);
catch (Exception ex) {
ex.printStackTrace();
System.exit(1);
JCO.Function function = null;
JCO.Table codes = null;
try {
function = this.createFunction("BAPI_COMPANYCODE_GETLIST");
if (function == null) {
System.out.println("BAPI_COMPANYCODE_GETLIST" +
" not found in SAP.");
System.exit(1);
mConnection.execute(function);
JCO.Structure returnStructure =
function.getExportParameterList().getStructure("RETURN");
if (! (returnStructure.getString("TYPE").equals("") ||
returnStructure.getString("TYPE").equals("S")) ) {
System.out.println(returnStructure.getString("MESSAGE"));
System.exit(1);
codes =
function.getTableParameterList().getTable("COMPANYCODE_LIST");
codes.setRow(2);
codes.deleteRow();
codes.deleteRow(5);
codes.appendRow();
codes.setValue("XXXX", "COMP_CODE");
codes.setValue("Does not exist", "COMP_NAME");
codes.appendRows(2);
codes.setValue("YYYY", "COMP_CODE");
codes.setValue("Does not exist either", "COMP_NAME");
codes.nextRow();
codes.setValue("ZZZZ", "COMP_CODE");
codes.setValue("Nor does this", "COMP_NAME");
for (int i = 0; i < codes.getNumRows(); i++) {
codes.setRow(i);
System.out.println(codes.getString("COMP_CODE") + '\t' +
codes.getString("COMP_NAME"));
catch (Exception ex) {
ex.printStackTrace();
System.exit(1);
try {
codes.firstRow();
for (int i = 0; i < codes.getNumRows(); i++, codes.nextRow()) {
function = this.createFunction("BAPI_COMPANYCODE_GETDETAIL");
if (function == null) {
System.out.println("BAPI_COMPANYCODE_GETDETAIL" +
" not found in SAP.");
System.exit(1);
function.getImportParameterList().
setValue(codes.getString("COMP_CODE"), "COMPANYCODEID");
mConnection.execute(function);
JCO.Structure returnStructure =
function.getExportParameterList().getStructure("RETURN");
if (! (returnStructure.getString("TYPE").equals("") ||
returnStructure.getString("TYPE").equals("S") ||
returnStructure.getString("TYPE").equals("W")) ) {
System.out.println(returnStructure.getString("MESSAGE"));
JCO.Structure detail =
function.getExportParameterList().
getStructure("COMPANYCODE_DETAIL");
System.out.println(detail.getString("COMP_CODE") + '\t' +
detail.getString("COUNTRY") + '\t' +
detail.getString("CITY"));
catch (Exception ex) {
ex.printStackTrace();
System.exit(1);
mConnection.disconnect();
public JCO.Function createFunction(String name) throws Exception {
try {
IFunctionTemplate ft =
mRepository.getFunctionTemplate(name.toUpperCase());
if (ft == null)
return null;
return ft.getFunction();
catch (Exception ex) {
throw new Exception("Problem retrieving JCO.Function object.");
public static void main (String args[]) {
Bapi2 app = new Bapi2();
This is the error i'm getting...
com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: Connect to SAP gateway failed
Connect_PM GWHOST=<abc11.aa.abc23.company.com>, GWSERV=sapgw00, ASHOST=<abc11.aa.abc23.company.com>, SYSNR=00
LOCATION CPIC (TCP/IP) on local host
ERROR hostname '<abc11.aa.abc23.company.com>' unknown
TIME Mon Jun 06 17:15:12 2005
RELEASE 640
COMPONENT NI (network interface)
VERSION 37
RC -2
MODULE ninti.c
LINE 332
DETAIL NiPGetHostByName2: hostname
'<abc11.aa.abc23.company.com>' not
at com.sap.mw.jco.rfc.MiddlewareRFC$Client.nativeConnect(Native Method)
at com.sap.mw.jco.rfc.MiddlewareRFC$Client.connect(MiddlewareRFC.java:1098)
at com.sap.mw.jco.JCO$Client.connect(JCO.java:2983)
at MyProject.Bapi2.<init>(Bapi2.java:45)
at MyProject.Bapi2.main(Bapi2.java:233)
Thx
PRadeep -
Standard Component in CRM that will call RFC Function Module
HI all,
Is there any Standard Component in CRM that will call RFC Function Module from ECC and that called RFC FM should Fetch the data from ECC.You can call RFC from different places, like programs, function modules, web dynpros, classes...
So you just have to have appropriate RFC on ERP side and call it from CRM side. To call it you use the following statement...
CALL FUNCTION 'YOUR RFC FUNCTION'
DESTINATION i_dest "name of server
EXPORTING
your export parameters
IMPORTING
your import parameters
Regards. -
How to invoke RFC function module from XI interface
Hi all,
I am having one question, How to invoke RFC function module from XI interface.
Please reply me as soon as possible.
Thanks in advance,
RadhikaHi,
To call the RFC in mapping u need to create the RFC lookups...check these links.
How we have to create the lookups?
Check this weblogs with some screenshots on how to achieve this:
/people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
/people/sravya.talanki2/blog/2005/12/21/use-this-crazy-piece-for-any-rfc-mapping-lookups
/people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
/people/sap.user72/blog/2005/12/06/optimizing-lookups-in-xi
/people/morten.wittrock/blog/2006/03/30/wrapping-your-mapping-lookup-api-code-in-easy-to-use-java-classes
lookups in xi
XI Design Guidelines
Re: RFC Lookup API
/people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a03e7b02-eea4-2910-089f-8214c6d1b439
Regards,
Phani -
Error when call RFC Function module in R/3
Dear All,
We are trying to call RFC function module CBIF_GLM1_PROCESS_ORDER_READ (This is not a BAPI and also not released ) in R/3 from XI system.
we are facing the error "Error while lookup Exception during processing the payload. Error when calling an adapter by using the communication channel CC_PPPI_MES_RFC_Rcvr (Party: , Service: WCD_320, Object ID: 16563889b449328eac76caa6a3bc592e) XI AF API call failed. Module exception: 'error while processing the request to rfc-client: com.sap.aii.adapter.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.adapter.rfc.core.client.RfcClientException: failed to parse BAPI response due to: com.sap.aii.adapter.rfc.util.bapi.BapiException: Parameter with name RETURN not found.'. Cause Exception: 'com.sap.aii.adapter.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.adapter.rfc.core.client.RfcClientException: failed to parse BAPI response due to: com.sap.aii.adapter.rfc.util.bapi.BapiException: Parameter with name RETURN not found.'."
This is the first time we are doing this configuration.
Could you please let me know what woulbe the reason.read the original message
We are trying to call RFC function module CBIF_GLM1_PROCESS_ORDER_READ (This is not a BAPI and also not released ) in R/3 from XI system.
I am talking about the above Receiver RFC channel which you guys are using to call R/3 from XI. That where you need to change the commit parameter -
How to call a function module from the Web Template?
Hi all,
how can I call a function module from a BI 7.x web template and then show the result of the FM on the web template?
Many thanks for your hints.
Regards, NilsHi!
I am too working on a similar issue.
Probably this helps:
Re: Calling a function module from a Web Template
Regards,
Sri -
Can you call a function module from within a smartform?
I was told that yu can not call a function module from a smartform - that does not make sense to me because you can do tons of ABAP within a smartform.
Well - can you?
Thanks.
ScottYes, you can call function modules.
-
How to call a function module from a workflow ? ?
hi all,
i have to call a function module from an workflow, i got a hint from someone that i have to enhance an object and then write and methode, in this methode i can call that function module. I dont know even how to go for it.
Can anyone suggest that how to go for it ?
thanks.
raman khurana.Hi Raman Khurana,
Please go through the links it might be helpful , notsure
http://help.sap.com/saphelp_nw2004s/helpdata/en/c5/e4af8b453d11d189430000e829fbbd/content.htm
http://www.abapcode.info/2007/07/standard-function-module-text.html
http://it.toolbox.com/wiki/index.php/SAP_Workflow
Regards,
Sreekar.Kadiri. -
How to call a function module from debugger?
Hi all,
i just wanted to know whether we can call a function module from a debugger ,
if yes how ?Hi Laxmikanth,
How ur going to call a function module which is not present in program???
In debugging mode u can change the values of variables,put break points and watch points,but i thnk its not possible to call a function module(not present in program) while debugging .
Please share with us if u have any solution...
Regards,
lakshman. -
Calling a function module from a Web Template
Hi,
I need to call a function module from a web template. Any pointers on how i can do this ? Is this even possible ?
Thanks
ShaileshHi Rael,
We were finally able to call a FM module from the Web. The trick as Heike suggested was to create an ABAP class which inherits from CL_RSR_WWW_HELP_WINDOW. Then you should modify the process_cmd method of this new class in order to call the FM. Now use this class to create a help service. In case you need to pass any parameters to the FM, you will need to pass them as additional parameters while calling the help service.
An example is below.
CMD=PROCESS_HELP_WINDOW&HELP_SERVICE=ZBOOKMARKING&TEXT=mytext&URL=myurl
Where mytext and myurl were the parameters i pass to my FM and ZBOOKMARKING is my help service.
Thanks a Lot to Heike for his help on this !!
Shailesh -
Calling a function module from APO Macro
Hi,
Can I call a function module from a macro directly without going through the user exit? If so, how should I pass the parameters to the function module? I don't have to get the results back to macro.
RegardsHi Asokan - you can call a function module directly from a macro providing it is designed to be called from a macro. For example if you are in the Macrobuilder and use the menu path Edit -> Edit User Function then you will get a list of existing function modules that you can call directly by inserting a Operator/function into your macro. If you want to call a function module not listed in the User Function drop down list then you will either need the user exit or create a custom function module as a wrapper and register the wrapper function module in the Edit User Function menu path. Calling a function module will always return a value - but you can choose to ignore that value depending on how you build your macro.
Regards
Andy -
Is it possible to call Normal function Module from WD4A , Not RFCs
Is it possible to call Normal function Module(FM) from WebDynPro for ABAP , Not RFCs
There is no difference, unless you are specifically calling the RFC to connect to another system. If so, then you need to add the DESTINATION keyword to the function call and specify the destination name. This name must be defined in SM59. But, if you are not going to another system, you can call the RFC the same way you call the regular function module.
REgards,
Rich Heilman -
Call RFC Function Module and return 1000 records at a time
I would like to call a Remote Enabled Function Module from a non SAP system. This function module will select data from the database and return it to the calling program.
Suppose there are 100,000 records that need to be returned, but the calling module would like the data in chunks of 1000 records. Therefore the calling program would call the FM 100 times.
How do I code the function module to know on each subsequent call to grab the next chunk of 1000 records?
Let me know if additional information is needed.
Thanks,
AaronHello,
Here is how you can go for this issue:
1. Create one RFC function module with following parameter. These parameters are with respective of chunking logic.
Import: Package Size
Export: Total number of records
Changing: chunk count
Implement following logic:
1. First of you need to know how many chunks you need to fetch for that get the count of total number of records. This is one
time activity so you better maintain one flag import parameter will be set to 'X' only first call.
2. Get the number of chunk using total number of records / chunk size for e.g. 1000 / 100 so chunk count = 10.
3. Define internal chunk counter in function module which will be used to locate the correct chunk depending on the chunk
counter value sent from calling program.
4. Send first call with package size 100 and chunk count = 1, execute select statement and increment internal
chunk count check if chunk count = internal chunk count in current case chunk count = 1 so exit select statement and return
with first chunk.
5. Send second call with package size 100 and chunk count = 2. Execute select statement and check chunk count with internal
chunk counter, in current case it will be 1 so skip that data and go for next chunk of 100 records increment internal chunk
counter. In this case it will match with external chunk count = 2. load output table with that data and return to calling program.
6. Repeat step 4 until you reach last chunk.
You need to use SELECT...ENDSELECT with PACKAGE SIZE addition so for every loop it will return number of records mentioned in package size.
Hope this helps.
Thanks,
Augustin.
Maybe you are looking for
-
Unable to download Camera RAW 8.5 update
I'm using CS6, Photoshop Extended, MAC OS 10.9.3. Can't download Raw update to 8.5 successfully. Download hangs indicating 2 min. remaining. Error log shows success. Back in Photoshop RAW is not updated. Is anyone else having a similar problem? Thank
-
How does one put animations into buttons?
I'm not talking about taking the button and fiddling with the way it is. I have an animated glowing effect in both movie clip and graphic and all I want to do is have it play, overlapping the button's over frame. However, everytime I enable simple bu
-
No warning before deleting account?
We all know the consequences of deleting a POP account in Mail. You're supposed to get a stern warning, which I assume some people misunderstand or click-through. However, in the last week or so, I've gotten two reports from 10.4x users that NO warni
-
Java Bean for Marquee or scrolling text
Can anybody help to make the simple java bean for scrolling a text in ORacle forms 10g? Regards Omama Khurshid
-
Dear Gurus: We perform CTM run based a prioritized demand. For example: Fulfill sales order first then safty stock request. So, after CTM, system will try to fulfill sales order first and generate related SNP PR. If we wanna use deplo