Problem passing a table in an RFC wrapper in ECC to a FM in SRM?
I am creating a wrapper around FM 'TEXT_CONVERT_XLS_TO_SAP' in ECC, because I cant find a FM in SRM to convers an excel file into an itab. I pass an excel sheet from SRM to this wrapper to convert the values into an Itab and pass then back to SRM. The problem is the parameter "i_tab_converted_data = i_converted" from 'TEXT_CONVERT_XLS_TO_SAP' is of type STANDARD TABLE. So when I created the Itab = i_itab_converted_data in my program using a type I declared in my program, I can't use the type to create the exporting parameter in the FM to pass the itab back to SRM.
>
DEMVIL wrote:
> What I was saying was tthe I_TAB_CONVERTED_DATA is of type "STANDARD TABLE" therefore if I create type and create a table of that type, in this case table I_CONVERTED, it works, but can't use the type to create an export parameter.
>
> CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
> EXPORTING
> * I_FIELD_SEPERATOR =
> * i_line_header = 'X'
> i_tab_raw_data = i_raw
> i_filename = l_filename
> TABLES
> i_tab_converted_data = i_converted
> EXCEPTIONS
> conversion_failed = 1
> OTHERS = 2.
It should work. how have you defined i_converted? Below is what I have used and it works fine for me.
TYPES: BEGIN OF ty_datatab,
matnr TYPE char18, "Material Number
short_text TYPE char40, "Short Text
quantity TYPE char13, "Purchase Order Quantity
unit TYPE char3, "Purchase Order Unit of Measure
delivery_date TYPE eeind, "Delivery Date
ekgrp TYPE char3, "Purchasing Group
stge_loc TYPE char4, "Storage Location,
matl_group TYPE char9, "Material Group
agreement TYPE char10, "Agreement Number
ag_item_num TYPE char5, "Agreement Item Number
vendor_mat_no TYPE char35, "Vendor Material Number
gl_account TYPE char10, "G/L Account Number
costcenter TYPE char10, "Cost Center
fund TYPE char10, "Fund
func_area TYPE char16, "Functional Area
item_txt TYPE char70, "Item Text
created_by TYPE char12, "Created By
END OF ty_datatab.
it_record TYPE STANDARD TABLE OF ty_datatab INITIAL SIZE 0,
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
i_tab_raw_data = it_raw
i_filename = p_pfile
TABLES
i_tab_converted_data = it_record
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
Similar Messages
-
Problem passing a table in an RFC wrapper?
I am creating a wrapper around FM 'TEXT_CONVERT_XLS_TO_SAP' in ECC, because I cant find a FM in SRM to convers an excel file into an itab. I pass an excel sheet from SRM to this wrapper to convert the values into an Itab and pass then back to SRM. The problem is the parameter "i_tab_converted_data = i_converted" from 'TEXT_CONVERT_XLS_TO_SAP' is of type STANDARD TABLE. So when I created the Itab = i_itab_converted_data in my program using a type I declared in my program, I can't use the type to create the exporting parameter in the FM to pass the itab back to SRM.
Hi,
Well if thats your requirement, then you will have to copy the FM to a Z FM & then tweak it as per your requirement.
Thanks,
Best regards,
Prashant -
Problem passing a table parameter in rfc call using the function control
I try to pass a Table as parameter to a Function Module using the SAP.Functions library (part of SAP frontend controls) from a Visual Basic (VBA) program.
The function module has been verified to work when invoked from SAP FrontEnd Function Builder.
The SAP RFC Control is created with
Set sapFunctions=CreateObject("SAP.Functions")
Following code snippet shows how I attempt to set exports and add a table row before calling the function module:
sapFunctions.Connection = sapConnection
Set sapMaterialUpd = sapFunctions.Add("Z_SD_BAPI_SALES_DATA_UPD")
With sapMaterialUpd
<i>'set exports</i>
.Exports("PA_GLPUPDLEVEL") = "S"
.Exports("PA_VKORG") = "FI14"
<i>'append table row</i>
.Tables("IT_SALES_DATA_UPD").AppendRow
.Tables("IT_SALES_DATA_UPD")(1, "VKORG") = "FI14"
.Tables("IT_SALES_DATA_UPD")(1, "MATNR") = "W_3100"
.Tables("IT_SALES_DATA_UPD")(1, "DATBI") = "99991231"
.Tables("IT_SALES_DATA_UPD")(1, "DATAB") = "20041231"
.Tables("IT_SALES_DATA_UPD")(1, "KBETR") = "2222"
.Tables("IT_SALES_DATA_UPD")(1, "KONWA") = "EUR"
End With
<i>'call the function module</i>
If sapMaterialUpd.Call() = True Then
<i>'do something with the return tables here...</i>Else
Debug.Print sapMaterialUpd.Exception
End If
The Call() returns <b>FALSE</b> and the exception is <b>"SYSTEM_FAILURE"</b>. The connection also resets.
The local logfile that the control generates shows that an exception occurs at the point of the call:
<i>10.02.2005 17:54:20.766 Packing Parameters for Z_SD_BAPI_SALES_DATA_UPD
Packing Parameter PA_GLPUPDLEVEL.
Packing Parameter PA_VKORG.
Packing Table 0.
Packing Table 1.
10.02.2005 17:54:20.766 *** Calling RFC Function 'Z_SD_BAPI_SALES_DATA_UPD'
10.02.2005 17:54:20.986 RFC CALL status = RFC_SYS_EXCEPTION
10.02.2005 17:54:20.986 RFC Error: RFC_IO27
-Status:CODE=CM_DEALLOCATED_NORMAL STATUS=CM_NO_STATUS_RECEIVED DATA=CM_COMPLETE_DATA_RECEIVED ID=69415076
-Message:connection closed
-Internal Status:IO HANDLE=23 DRV=EXT LINE=1420 CODE=27 : GET ID=ffff LINE=861 CODE=7
10.02.2005 17:54:20.986 Function call finished.</i>
Seen next code snippet. If the Table object is not touched, the function call goes through without any problems:
sapFunctions.Connection = sapConnection
Set sapMaterialUpd = sapFunctions.Add("Z_SD_BAPI_SALES_DATA_UPD")
With sapMaterialUpd
'set exports
.Exports("PA_GLPUPDLEVEL") = "S"
.Exports("PA_VKORG") = "FI14"
'do <b>not</b> append a table row, for testing only ;-)</b>
End With
<i>'call the function module</i>
If sapMaterialUpd.Call() = True Then
<i> 'do something with the return tables here...</i>
Else
Debug.Print sapMaterialUpd.Exception
End If
This code works perfectly when calling the function. It returns TRUE and behaves normally. The function module returns descriptive response text in a table telling that the table was empty, according to the BAPI implementation.
So is there something special needed here <i>after</i> appending the table row and <i>before</i> making the Call to properly attach the table as a parameter for the function module?
Can this be a bug in the SAP RFC Control? The version of the wdtfuncs.ocx is 6206.6.45.54.
Any hints are welcome!hi All partner,
who solved this problem , I meet it too and
can't clear it.
SAPfunc := sapfunctions1.Add('z_get_sfcs_dn_mo');
SAPitab := sapfunc.tables.item ('I_DNMO');
SAPitab.appendrow; SAPitab.value(1,'MANDT') := '220';
SAPitab.Value(1,'VBELN') := '2150000001';
SAPitab.Value(1,'POSNR') := '50';
SAPitab.value(1,'MATNR') := '19-99999-00';
SAPitab.value(1,'AUFNR') := '921241512001';
SAPitab.value(1,'DEDAT') := '2005/09/09';
SAPitab.value(1,'LFIMG') := '100';
IF SAPfunc.call = true then
begin
end
else
begin
showmessage('call fail!!') ;
end;
end;
RFC source code as below
FUNCTION z_get_sfcs_dn_mo.
""Local interface:
*" TABLES
*" I_DNMO STRUCTURE ZDN_MO
data: wa type zdn_mo.
LOOP AT i_dnmo.
wa-mandt = i_dnmo-mandt.
wa-vbeln = i_dnmo-vbeln.
wa-posnr = i_dnmo-posnr.
wa-matnr = i_dnmo-matnr.
wa-aufnr = i_dnmo-aufnr.
wa-dedat = i_dnmo-dedat.
wa-lfimg = i_dnmo-lfimg.
modify zdn_mo from wa.
insert into zdn_mo values wa. --dump at here
commit work.
ENDLOOP.
T/C: ST22 error message say at
insert into zdn_mo values wa. ---dump at here
the sapfunc.call returns fail.
Message was edited by: jorry wang -
Hi All,
I am using an RFc as a WebService in my application in Visual Studio.NET 2003(ASP.NET/VB.NET). The RFC returns the result in the form of a table which contains Material no and Material Description as two columns. When I am making a call to this RFC then it expects a import parameter in the form of a table.
"ByRef MATLIST()as GetMaterial.WebReference.ZMAT_LIST".
Any ideas how to pass this parameter to this RFC.
Thanks and Regards,
Sameernot a direct answer to your query, but check out the following link , this would give an idea.
http://www.sap-img.com/abap/vb-codes-or-vba-macro-code-for-access-sap-and-run-one-rfc.htm
Regards
Raja -
Problem with a Table of a RFC-Function
Hi,
I wrote a function where I get a picture (in a byte-Array). But I get a defekt Stream from the JCO.
Several time the JCO give not the result but a ?.
Here the ASCII-Code of the orig File:
ÿØÿà JFIF ` ` ÿþ Created by AccuSoft Corp. ÿÀ ° C ! ÿÛ
ÿÄ
ÿÄ µ } !1A Qa "q 2¡ #B±Á RÑð$3br
%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ¢£¤¥¦[/code]
And here the result of the JCO:
ÿØÿà JFIF ` ` ÿþ Created by AccuSoft Corp. ÿÀ ° C ! ÿÛ ?
ÿÄ
ÿÄ µ } !1A Qa "q 2??¡ #B±Á RÑð$3br?
%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz?????????????????¢£¤¥¦[/code]
Here the code.
public byte[] getUserPicture(String arg0) throws ResourceException, IOException{
ByteArrayOutputStream out = new ByteArrayOutputStream();
if(getConnectionStatus()){
JCO.Function function = i.getFunction("HR_ESS_WHO_PROG_GET_PICTURE");
JCO.ParameterList importPara = function.getImportParameterList();
importPara.setValue(arg0, "PER_NR");
i.execute(function);
JCO.ParameterList epl = function.getTableParameterList();
JCO.Table exportData1 = epl.getTable("IMAGE_TAB");
for(int i = 0; i < exportData1.getNumRows(); i++){
exportData1.setRow(i);
byte[] bArray = exportData1.getByteArray(0);
if(bArray.length == 1023){
out.write(bArray);
byte[] temp = new byte[1];
temp[0] = 100;
out.write(temp);
}else{
out.write(bArray);
return out.toByteArray();
return null;
}[/code]The size of one line is 1024.
if(bArray.length == 1023){
out.write(bArray);
byte[] temp = new byte[1];
temp[0] = 100;
out.write(temp);
}else{
out.write(bArray);
In the 27 row the JCO trim the length of the line to 1023 bytes. The last byte is 100.
And for this Problem I add the byte.
Regards
Thomas -
Problem passing an export parameters in rfc call using the function control
Hello,
I use SAP Remoute Function Control (wdtfuncs.ocx) in my C++ application. I can execute remote functions, if they don´t need any export parameters:
CSAPFunctions m_Functions;
CFunction f;
f.m_lpDispatch = m_Functions.Add("RFC_CREATE_DOCUMENT_MASTER");
f.Call();
How can I set the export parameters?
Any help appreciated.
regards,
Vladimircheck out this thread
Re: Sample code in ASP to connect SAP?
Regards
Raja -
Problem with passing table values to RFC
Hi all,
I am passing values in table in RFC. There are no import/export parameters in RFC. We are passing only tables.
There are two tables in the RFC I_Dept and I_Subdept. Initially RFC is executed for getting the Dept which works fine as for this there is no need to set in input table value. But to get sub department I need to set the dept in I_Dept and after executing RFC I should get values in table I_Subdept. The code is as below:
wdContext.nodeOutput_I_Dept().invalidate();
wdContext.nodeOutput_I_Subdept().invalidate();
Z_Bapi_Dept_Values_Input d_Input = new Z_Bapi_Dept_Values_Input();
wdContext.nodeZ_Bapi_Dept_Values_Input().bind(d_Input);
Zdept dept = new Zdept();
dept.setZname("Sales");
d_Input.addI_Dept(dept);
try
wdContext.nodeZ_Bapi_Dept_Values_Input().currentZ_Bapi_Dept_Values_InputElement().modelObject().execute();
wdContext.nodeZ_Bapi_Dept_Values_Input().nodeOutput().invalidate();
catch (WDDynamicRFCExecuteException e)
msgManager.reportException(e.toString(), true);
Is anything wrong in this code because even after executing the RFC the size of node I_Subdept() is zero. But the RFC works fine in the backend.
Regards,
JaydeepA typical misunderstanding when populating structured input data
via code is the following:
- You have bound a WD context node hierarchy to the model say
N1 > M1
->N2 > ->M2
where N1, N2 are WD Context nodes (N2 is child of N1) and M1, M2 are
model classes bound to the context nodes. Important: M1 has a relation
to M2 on the model side, means there is some method M1.setMyM2(M2)
(assuming the target role of the relation is called "MyM2").
- You create context elements for N1 and N2 which are bound to a model
class instances of M1 and M2 respectively.
Assuming that M1 is the "executable" model class (*_Input) and M2
represents an input structure needed, the M2-input will - using the
above approach - not be available on execution. Why? The relation on the
model side (MyM2) is not available if just maintaining it via the
context, i.e. context and model are not "in sync". As RFC execution is
done via the model the M2 input will not be available.
You best create complex/nested input structures on the model
side and then bind the top-level model object to the resp context node.
In the above sample this would be:
M1 m1ModelObject = new M1();
M2 m2ModelObject = new M2();
m1ModelObject.setMyM2(m2ModelObject);
Hope it helps!
Regards,
Sangeeta -
RFC function : passing a table as input
Hi,
I have no trouble passing input values to an RFC model in web dynpro, but I have difficulties to pass an input table.
By default, the input "it_table" node of the model I use, is defined like this : card 0..n, selec 0..1 Singleton True.
Do I have to change something?
Then, what is the correct code for creating the node (because card is 0..n) and then add items (for each line of my table)?
For the moment, I get this error : value node is created without a reference.
ThanksI finally managed to get it work.
Here is the COMPLETE solution.
Note that in my solution, it was easier for me to put data in a value Node FIRST and THEN to copy it to the model Node.
--> In the RFC function, declare the table "TYPE TLINE_T", and not "LIKE TLINE".
GestionAvisComp - Context
- Z2_I_Gestion_Simplifiee_Avis_Input (Model Node, card 0..1, sel 0..1, singleton true)
+ It_Ajout_Texte_Avis (card 0..n, sel 0..1, singleton true) Class Tline
- Tdformat
- Tdline
- Qmart
- It_Texte_Avis (Value node, card 0..n, sel 0..1, singleton true)
public void wdDoInit()
//@@begin wdDoInit()
//$$begin Service Controller(1353609186)
Z2_I_Gestion_Simplifiee_Avis_Input input = new Z2_I_Gestion_Simplifiee_Avis_Input();
wdContext.nodeZ2_I_Gestion_Simplifiee_Avis_Input().bind(input);
//$$end
//@@end
WhateverView
public void onActionSauvegarderAvis(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
// Add two elements to the value node
IIt_Texte_Avis_InputElement firstTexte_AvisEl = wdContext.nodeIt_Texte_Avis_Input().createIt_Texte_Avis_InputElement();
IIt_Texte_Avis_InputElement secondTexte_AvisEl = wdContext.nodeIt_Texte_Avis_Input().createIt_Texte_Avis_InputElement();
firstTexte_AvisEl.setTdformat("/*");
firstTexte_AvisEl.setTdline("Line 1");
secondTexte_AvisEl.setTdformat("/*");
secondTexte_AvisEl.setTdline("Line 2");
wdContext.nodeIt_Texte_Avis_Input().addElement(firstTexte_AvisEl);
wdContext.nodeIt_Texte_Avis_Input().addElement(secondTexte_AvisEl);
// Moving the elements of the value node into the model node
int size = wdContext.nodeIt_Texte_Avis_Input().size();
for (int i = 0; i < size; i++) {
wdContext.nodeIt_Texte_Avis_Input().setLeadSelection(i);
Tline x = new Tline();
x.setTdformat(wdContext.currentIt_Texte_Avis_InputElement().getTdformat());
x.setTdline(wdContext.currentIt_Texte_Avis_InputElement().getTdline());
wdContext.currentZ2_I_Gestion_Simplifiee_Avis_InputElement().modelObject().addIt_Ajout_Texte_Avis(x);
wdContext.currentZ2_I_Gestion_Simplifiee_Avis_InputElement().setQmart("ZE");
// Execute the RFC model
// Clear the Value Node
while ( wdContext.nodeIt_Texte_Avis_Input().size() > 0 )
wdContext.nodeIt_Texte_Avis_Input().removeElement(
wdContext.nodeIt_Texte_Avis_Input().getElementAt(0)
// Clear the Model Node
if (wdContext.currentZ2_I_Gestion_Simplifiee_Avis_InputElement().modelObject().getIt_Ajout_Texte_Avis() != null) {
while(wdContext.currentZ2_I_Gestion_Simplifiee_Avis_InputElement().modelObject().getIt_Ajout_Texte_Avis().size() > 0)
wdContext.currentZ2_I_Gestion_Simplifiee_Avis_InputElement().modelObject().getIt_Ajout_Texte_Avis().remove(0)
Edited by: Emanuel Champagne on Jan 17, 2008 9:32 PM
Edited by: Emanuel Champagne on Jan 18, 2008 10:20 PM -
Pass a table from my webdynpro JAVA application to an RFC in R/3
Hi All,
I need to Pass a table from my webdynpro JAVA application to an RFC in R/3. How can I do that?
Regards
SarathHi,
Please have a look at this thread,
Pass Table as Input to Adaptive RFC
Regards,
Saravanan K -
Passing table to the RFC from BSP!
Dear friends,
I am trying to call a RFC (on 4.6c) from a BSP page( on a 6.20 System). i am trying to pass a table from the BSP to the RFC and get the result back. This is not working as expected.
The Function module at R3 (4.6c) which takes a table as an input and gives string as an output.
The code is for Function module is given below.
<b>FUNCTION ZBHAVIN1.
""Local interface:
*" EXPORTING
*" VALUE(TEMP) TYPE STRING
*" VALUE(TEMP1) TYPE STRING
*" TABLES
*" ITAB STRUCTURE ZITAB
TEMP = ITAB-MESSAGE.
TEMP1 = ITAB-MESSAGE1.
ENDFUNCTION.</b>
To call this function module the code for the bsp page (created on a 6.20 System) is :
<b>
<%@page language="abap"%>
<% TYPE-POOLS ZBSP1. %>
<html>
<head>
<link rel="stylesheet" href="../../sap/public/bc/bsp/styles/sapbsp.css">
<title> Display Page </title>
</head>
<body class="bspBody1">
<%
DATA TEMP2 TYPE STRING.
DATA TEMP3 TYPE STRING.
DATA ITAB1 TYPE TABLE OF ZBSP1_ITAB11.
DATA WA LIKE LINE OF ITAB1.
WA-MESSAGE = 'THIS IS FIRST ELEMENT'.
WA-MESSAGE1 = 'THIS IS SECOND ELEMENT'.
APPEND WA TO ITAB1.
CALL FUNCTION 'ZBHAVIN1'
DESTINATION 'TCLCLNT200'
IMPORTING
TEMP = TEMP2
TEMP1 = TEMP3
TABLES
ITAB = ITAB1
EXCEPTIONS
OTHERS = 1.
%>
<P><%= TEMP2 %>
<P><%= TEMP3 %>
</body>
</html></b>
This code is not working for me as it is.
If i remove the comments, then it works, which means that the table passed from the BSP has no Header Line.
So , do i need to always chnage my Receving RFC to take care of this issue? or is there a way to pass the Tabkle with Header line to the RFC from BSP?You'll have to define a table type either in the Types tab of the BSP application or as a Dictionary object.
Then you can define a page attribute for the table and call the code from your OnCreate event handler (just to clean up your page layout)
You have to remember that you are working with the whole OO context and so working with the tables inside the BSP are quite different.
Have a look at this article for some examples: https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/unkown/exploring bsp development and the miniwas.htm -
Passing values for Table in Adaptive RFC model
Hi ,
I am new to WebDynpro ,I have a requirement I need to pass a table for the back end BAPI, the table has two columns say (column1 and column2), before calling the BAPI I need to fill values in the column1 and the when the BAPI returns it should fill the column2 values, Is this possible to do, If so do I need to call invalidate for the values to get reflected after the BAPI returns??
Can some one send me the sample code as to how to do this??
Regards,
emrin.Hi,
After creating model and context mapping to table,
u write the following code in component controller,
WD Doinit();
Bapi_Flight_Getlist_Input bap=new Bapi_Flight_Getlist_Input();
wdContext.nodeBapi_Flight_Getlist_Input().bind(bap);
try{
wdContext.nodeBapi_Flight_Getlist_Input).currentBapi_Flight_Getlist_InputElement().modelObject().execute();
wdContext.nodeOutput().invalidate();
catch(Exception e)
e.getStackTrace(); -
Sending a table to remote RFC in Java UDF
Hello,
<br><br>
We use the API "com.sap.aii.mapping.lookup" often to make RFC calls from a UDF and return data. We typically create an import parameter in the Function Module and pass the value into the RFC. We now need to send in an unlimited number of values so we understand that instead of the import paramter we need to use a table. The problem is we get an error when we build the XML in our UDF and try to call the RFC. We tried wrapping the values in item nodes and several other approaches but we are not sure if we can populate a table via XML and make the RFC call.
<br><br>
Example of what we tried:
<br><br>
String sRfcxml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><ns0:ZCAE_MX_CONTRACT_ROUTING xmlns:ns0=\"urn:sap-com:document:sap:rfc:functions\"><E_ZCAE_COCODE><item>0445</item></E_ZCAE_COCODE></ns0:ZCAE_MX_CONTRACT_ROUTING>";
<br><br>
Regardless of what we try we get the following error during the call:
<br><br>
error of "RuntimeException in Message-Mapping transformation: Exception:[java.lang.RuntimeException: com.sap.aii.mapping.lookup.LookupException: Exception during processing the payload.Problem when calling an adapter by using communication channel RFC_RCV_ORGDATA (Party: , Service: ValidateXIData_BusiServ, Object ID: d5401e52ad1039df96f02bde53b23c06) XI AF API call failed. Module exception: 'error while processing the request to rfc-client: com.sap.aii.af.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not convert request from XML to RFC:com.sap.mw.jco.JCO$Exception: (130) JCO_ERROR_XML_PARSER: Expecting a tag to begin with '<' instead of '0', in "ODE><item>0965</item"'. Cause Exception: 'error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not convert request from XML to RFC:com.sap.mw.jco.JCO$Exception: (130) JCO_ERROR_XML_PARSER: Expecting a tag to begin with '<' instead of '0', in "ODE><item>0965</item"'. com.sap.aii.mapping.lookup.LookupException: Problem when calling an adapter by using communication channel RFC_RCV_ORGDATA (Party: , Service: ValidateXIData_BusiServ, Object ID: d5401e52ad1039df96f02bde53b23c06) XI AF API call failed. Module exception: 'error while processing the request to rfc-client: com.sap.aii.af.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not convert request from XML to RFC:com.sap.mw.jco.JCO$Exception: (130) JCO_ERROR_XML_PARSER: Expecting a tag to begin with '<' instead of '0', in "ODE><item>0444</item"'. Cause Exception: 'error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not convert request from XML to RFC:com.sap.mw.jco.JCO$Exception: (130) JCO_ERROR_XML_PARSER: Expecting a tag to begin with '<' instead of '0', in "ODE><item>0444</item"'."
<br><br>
Now if we do not pass any data or use an import versus table parameter in the function module it works just fine.
<br><br>
We know we can work around this by using an import parameter and stringing the values together with a delimiter and then breaking this apart in ABAP but we are looking for a cleaner solution.
<br><br>
Any thoughts?
<br><br>
Joe
Edited by: Joe Wright on Nov 16, 2009 10:45 PMNot sure what's wrong, but are you sure your "stringed" XML document matches the expected RFC structure ? Btw, I'd replace (though it could be considered as a cosmetic change) to replace "ns0" with "rfc" in your namespaces declaration, it's what you'll see in all imported RFC objects in XI/PI
Rgds
Chris -
Passing request table to Jco function
Hello Experts,
We have one requirement where we need to pass the table data from the BLS to SAP Jco Function Module call. For example we are reading the material numbers from the oracle database and then we need to pass these material numbers to SAP Function Module as a table to read the further details from SAP for the given material numbers.
We wrote a custom function module in SAP which accepts the material number as table. Is it possible to pass the table request parameter to Function Module? If possible how can we do this? I tried to pass the XML document to Function Module table, but no luck.
Thanks
MohanMohan,
in the BLT, configure the JCO action to use you custom function. After pressing enter, MII reads the xml structure of the function (if the connection MII to SAP is working). In the further processing of the BLT, you can fill the RFC table which you can see in the link editor using your query results and the link editor types "AppendXML" or "AppendAfter".
The following thread might help: [RFC call with multiple input|http://forums.sdn.sap.com/click.jspa?searchID=34070350&messageID=8134561].
Michael -
Character conversion problems when calling FM via RFC from Unicode ECC 6.0?
Hi all,
I faced a Cyrillic character convertion problem while calling an RFC function from R/3 ECC 6.0 (initialized as Unicode system - c.p. 4103). My target system is R/3 4.6C with default c.p. 1500.
The parameter I used in my FM interface in target system is of type CHAR10 (single-byte, obviously).
I have defined rfc-connection (SM59) as an ABAP connection and further client/logon language/user/password are supplied.
The problem I faced is, that Cyrillic symbols are transferred as '#' in the target system ('#' is set as default symbol in RFC-destination definition in case character convertion error is met).
Checking convertions between c.p. 4103 and target c.p. 1500 in my source system using tools of transaction i18n shows no errors - means conversion passed O.K. It seems default character conversion executed by source system whithin the scope of RFC-destination definition is doing something wrong.
Further, I played with MDMP & Unicode settings whithin the RFC-destination definition with no successful result - perhaps due to lack of documentation for how to set and manage these parameters.
The question is: have someone any experience with any conversion between Unicode and non-Unicide systems via RFC-call (non-English target obligatory !!!), or can anyone share valuable information regarding this issue - what should be managed in the RFC-destination in order to get character conversion working? Is it acceptable to use any character parameter in the target function module interface at all?
Many thanks in advance.
Regards,
Ivaylo Mutafchiev
Senior SAP ABAP Consultanthey,
I had a similar experience. I was interfacing between 4.6 (RFC), PI and ECC 6.0 (ABAP Proxy). When data was passed from ECC to 4.6, RFC received them incorrectly. So i had to send trimmed strings from ECC and receive them as strings in RFC (esp for CURR and QUAN fields). Also the receiver communication channel in PI (between PI and RFC) had to be set as Non unicode. This helped a bit. But still I am getting 2 issues, truncation of values and some additional digits !! But the above changes resolved unwanted characters problem like "<" and "#". You can find a related post in my id. Hope this info helps.. -
Dear Experts.
I have the following problem.
I am using a User-Exit for Travel that is called from a program standard with use the T.Code TRIP. The program standard use a structure that when entry in the user exit not is. I need use this structure in the user exit. (p_t_req_head).
I had read abour SAP and ABAP Memory but from the program standar How can Pass Internal Table to Memory SAP or ABAP from the program standard to user-exit?
When I am doing debugging in the program Standard and this call to the user exit, I use ()namestructure for example ()p_t_req_head and I get the datas of the structure, But In the Source Code ABAP, How can do this with instructions?
RegardsHi,
You try with Import & Export Statements as follows ---
DATA : t_itab LIKE TABLE OF spfli.
EXPORT t_itab TO MEMORY ID 'ABCD'.
After sending the internal table to ABAP memory you need to get that by IMPORT in the called session.
IMPORT t_itab FROM MEMORY ID 'ABCD'.
Maybe you are looking for
-
I am running windows 7 and having installation problems with Adobe 9..It comes up with and error box and at the top of the box it says "get+(r) ;error
-
How to deal Inhouse files using Seeburger AS2 adapter...!!!
Hi all, Has anyone managed to configure the Seeburger AS2 adapter for XI successfully to process multiple inbound message types. We have an issue here with inbound messages being received by the AS2 adapter. We currently have it configured for inboun
-
This is a new issue, which popped up randomly today, and I can't seem to find any posts that fit the description of what's going on, so here goes: Earlier today, while working on homework, I looked up at my monitor from my textbook and there were sud
-
Hi, I am adding some condition to return the query dynamically but oracle apex is not allowing. Please suggest me what is the error in this query and how to use the function returning query in list of values --BEGIN -- IF :P60_TYPE_OF_SERVICE_NEEDED
-
Hello, Has anyone worked on mulitenancy in OBIEE. We are implementing a project where we have to allow SaaS and we need to segregate the webcat based on the user group so the users of the group view the same dashboards with data as per their organisa