‎2007 Jun 20 9:03 PM
Hi All,
When I am executing ABAP function module RFC_READ_TABLE, I am geting following error:
ASSIGN_BASE_WRONG_ALIGNMENT
____________________________________________________
Caused by: com.sap.mw.jco.JCO$Exception: (104) RFC_ERROR_SYSTEM_FAILURE: Error in ASSIGN statement in the program SAPLSDTX .
at com.sap.mw.jco.rfc.MiddlewareRFC$Client.nativeExecute(Native Method)
at com.sap.mw.jco.rfc.MiddlewareRFC$Client.execute(MiddlewareRFC.java:1244)
at com.sap.mw.jco.JCO$Client.execute(JCO.java:3842)
at com.sap.mw.jco.JCO$Client.execute(JCO.java:3287)
__________________________________________
This error occurs with SAP System SAP47.
But, when I try with same input values and execute this function module RFC_READ_TABLE with SAP System SAPERP04, it executes successfully.
So, Is there any version upgrade for thsi function module implemention in SAP Systems.
What can we do to avoid this error.
Below is the comlpete stack trace of error:
_________________________________
Error in ASSIGN statement in the program &AP.
In the current program &AP, an ASSIGN statement is supposed to
assign a field or structure to a field symbol (using either
FIELD-SYMBOLS ... STRUCTURE s ... or ASSIGN...CASTING....). When
converting the base entry of the field symbol &N1 (number in base table:
&P1), it was found that the structure s requested a memory alignment of
&P3.
The calculated offset within the source structure causes an invalid
memory alignment. (The offset must be exactly divisible by &P3).
by &P3.)
__________________________________
Thanks in advance.
Ankit
‎2007 Jun 20 9:15 PM
Haven't work with JCO yet....But I have use RFC_READ_TABLE many times with PHP and Ruby....Never got that exception...Can you post your code? The part when you call the FM....
Greetings,
Blag.
‎2007 Jun 20 9:22 PM
Hi Blag,
I am passing following input values:
Query_Table : VBAP
Delimiter: |
Options:
MATWA
ARKTX
POSNR
MATNR
PMATN
MATKL
CHARG
VBELN
I am not passing any other input value.
Thanks Blag
‎2007 Jun 20 9:54 PM
Not sure about this.....But VBAP is really big...Have you tried with a simple table like SPFLI? I think that the problem is the number of fields....That might be causing a DATA BUFFER Overflow....So the RFC connections gets bumped...
Greetings,
Blag.
‎2007 Jun 20 10:00 PM
You can also try to assign the field to the FIELDS parameters.....If you only need a few fields.....
Greetings,
Blag.
‎2007 Jun 20 10:20 PM
Thanks for yours input Blag.
Actually, I am not understanding that why teh same function moduel with same input daat works with different SAP system.. SAP erp04, and why it does not work with SAP 46C
‎2007 Jun 20 10:21 PM
Is there any significance of field No_Data, if I say No_data = 'X', it works in old SAP system, but does not give any output.
‎2007 Jun 20 10:24 PM
If I use No-Data as 'x" it is not going to return any output.
‎2007 Jun 20 10:29 PM
If you use the NO_DATA option....Not data will be gathered and so, the buffer is going to be cleaner....As I told you, VBAP is a pretty big table, RFC_READ_TABLE must get all fields, and then get all data....23K record on my system....
Using FIELDS and passing the needed fields helps to reduce the work and keeps the buffer clean....
Blogs are down right now....But I'm going to get your mail for business card to send you a blog from Piers Harding....He talks about his old faithfull RFC_READ_TABLE....I'm sure your going to find it interesting -;)
You can also, create your own custom version on the FM....And try to fix some of the limitations....
Greetings,
Blag.
‎2007 Jun 20 10:32 PM
Well...It seems that don't have your email on your business card LOL...Here's a link to mine, please send me a mail so I can send you the blog....I'm doing it this way, just because blogs are down -:(
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=eqxfqtptf%2fc%3d">blag's Business Card</a>
Greetings,
Blag.
‎2007 Jun 20 10:37 PM
Hi Blag, Thanks a lot,
Can you please send it to me at:
_______________________
In Function Module source code RFC_READ_TABLE:
It fails at following line:
FIELD-SYMBOLS: <WA> TYPE ANY, <COMP> TYPE ANY.
ASSIGN WORK TO <WA> CASTING TYPE (QUERY_TABLE).
________________________
Thanks
Message was edited by:
Ankit
‎2007 Jun 20 10:45 PM
Ankit:
Please don't write down your email....That's why I post a link to my business card...Delete, otherwise one of the moderators are going to delete it for you -;)
Again....Any error with this FM is related to either number of FIELDS and number of RECORDS....
As Rob said...It's not a recommended function and shouldn't be use on a productive environment....Just for testing....
I don't know if SAP has any plans to release a better version of this FM or not....So we must use it with caution....
Greetings,
Blag.
‎2007 Jun 20 11:09 PM
Thanks Blag,
I don't understand one thing that why the same function module works for same inputs in different ,In newer SAP system version , I don't see any source code difference in the function module source code of two different systems.
If we should not use this function module, then do we have any other function module which solves the same purpose?
Thanks for yours help!
Ankit
‎2007 Jun 20 11:17 PM
Not sure about that....It's supposed to work the same in one system or another, if no source code had been done....Maybe the way the data is managed have changed....
At this time, there's not other FM avaliable....As I told you, best thing is to create your own version of the FM....As long as your not planning to use it beyond a testing environment....
Greetings,
Blag.
‎2007 Jun 21 12:15 AM
Hi Blag,
Thanks for the explanation and providing alternative ways, but I can try providing data inputs in different ways, but as per the limitations, need to use this function module only. As I am writing program which can access any different SAP systems, so, again, I can not restrict to use modified Function Module.
Thanks,
Ankit
‎2007 Jun 21 12:18 AM
Ok...I see -:) But you need all fields? As I told you, using the FIELDS parameters and using just the need fields, the problem is going to gone....
Anyway....Best of luck -:D
Greetings,
Blag.
‎2007 Jun 21 12:31 AM
Hi Blag,
No problem still exists, even if I use a single field only.
as I said, this problem does not exist with newer version SAP system, but exists in older version, I am not understanding what solution should I find for the same.
‎2007 Jun 21 8:16 AM
‎2007 Jun 20 10:28 PM
According to note 382318:
Symptom
A problem occurs in function module RFC_READ_TABLE.
Reason and Prerequisites
The scope of function module RFC_READ_TABLE is very restricted. E.g., due to the fixed maximum row size only smaller tables can be accessed. There are several data types that cannot be handled, and also there are doubts regarding the Unicode compatibility of the function module.
However, all this is quite immaterial, because the function is not meant to be publicly used anyway. It was only created to be used as a sample in various training courses, and is clearly flagged as "not released for customer".
Solution
Do not use function module RFC_READ_TABLE in the first place!
Rob
Message was edited by:
Rob Burbank
‎2007 Jun 21 12:10 AM
Thanks Rob, for the detailed explanation.There is really some different kind of output with two different systems using this FM.Thanks!
‎2007 Jun 21 9:09 AM
Hi Ankit,
I remember something like that: If the table contains floating point fields and/or one or more of the systems involved is running on unicode, this happens.
No solution provided.
Regards,
Clemens
‎2011 Aug 11 6:20 PM
I had the same problem, so I used the function BBP_RFC_READ_TABLE and functioned normally. My version is SAP ECC 6.0.
‎2016 Sep 02 4:14 AM
This worked perfectly for me. Just use BBP_RFC_READ_TABLE instead of RFC_READ_TABLE.
‎2015 Apr 22 10:41 AM