03-06-2007 2:35 PM
Hi,
I am using fm RFC_READ_TABLE ( cloned copy) to get values from another client. But while accessing T006 table it is giving following dump.
Error Analysis
In the current program "SAPLSDTX", 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 "<WA>" (number in base table:
33836), it was found that the structure s requested a memory alignment of
8.
The calculated offset within the source structure causes an invalid
memory alignment. (The offset must be exactly divisible by 8).
by 8.)
Can anybody give a info how to correct this. I am using the clone copy of RFC_READ_TABLE fm.
Thanks
aRs
null
03-06-2007 2:48 PM
are you trying to execute from SE37??
You have to give a RFC destination
CALL FUNCTION 'RFC_READ_TABLE'
DESTINATION <b>prf_rfcdest</b>
EXPORTING
query_table = 'T006'
TABLES
fields = ldt_fields
data = ldt_data
03-06-2007 2:58 PM
chk this OSS NOTE
Symptom
Function Module does not work in Unicode systems.
Reason and Prerequisites
Change of dynamic assign in new versions and row size limited
Solution
Please Note warning:
This function module is only for internal purpose !
Using this function module is at customers own risk and customer is responsible for adjusting this code to his system.
No warrenty is given on this Functionmodule RFC_READ_TABLE.
Symptons:
Due to Unicode compatibility and no support on the function module RFC_READ_TABLE
the standard RFC_READ_TABLE does not function any more and causes short dumps.
Included in this note there is a program to repair the
function RFC_READ_TABLE and add additional functionality.
What is changed: the row size is now 4000 positions and
will fit for most of the tables.
Additional functionality:
1 Reading and selecting from the tables is now
possible with the DISTICT parameter, which will
prevent double entries.
If the flag is crossed the SELECT DISTICT is used for the
read on the database.
2 Possible to select FIXED row size or compressed
If the flag is crossed no compressing is used and fields are
written in full length.
3 All fields are character fields no other formats are retrieved.
Implementation:
There are two ways to implement this extra functionality:
- 1 Changing of the original function module RFC_READ_TABLE.
Retrieve a change key from the OSS system to be able
to change the function module !
- 2 Implementing the changes into a customer copy of the
RFC_READ_TABLE function.
How to make a copy of a the function module ?
1 First create a function group in the customer name range:
(X or Y) example YSDTX (SDTX = original from RFC_READ_TABLE).
SE37 --> Goto --> Function groups --> Create group
Name function group (example YSDTX) and Short text are
to be supplied.
Save and activate the function group (depending on version
the main program will be activated separate, in the example
SE38 program SAPLYSDTX --> function activate.
2 Copy function module RFC_READ_TABLE to YRFC_READ_TABLE.
SE37 --> function copy
Supply: From function module = RFC_READ_TABLE
To function module = YRFC_READ_TABLE
Function group = YSDTX
Function Copy and activate the function module.
For both the methods the rest of the change is the same !
Implementing and explanation:
Step 1. Create a structure in the Data Dictionary
SE11 --> name YTAB4000 --> function create
Apply a text and field:
Field --> WA component type CHAR4000
Activate the structure.
Step 2. Make sure the setting of your editor are not flagged to 72 pos.
SE38 --> Utilities --> settings --> Tab editor
Don't flag line length 72
Step 3. SE37 --> supply the function module name.
Go into change mode for the function modules (SE37) **
Function --> change and go to the Tab Import (parameters)
Add 2 new parameters:
Name: DISTINCT like SONV-FLAG default SPACE
FIX like SONV-FLAG default 'X'
Flag for both parameters: Optional and Pass Value.
Step 4. Go into the tab Tables
Change into the parameter name DATA the
associated type into the new created structure YTAB4000.
Step 5. Go into the tab Source Code.
Step 6. Check that the top of the source the newly added
parameters are displayed !
Step 7. Delete the existing source.
Step 8. Insert the source from this note (see below) into your program.
Step 9. Save and activate your function module.
When asked, get registration key from SAP
04-20-2015 3:20 PM
Hi aRs,
Did you find the solution for this.
And what is this OSS note number.
Thanks,
Anil