2007 Jan 05 11:19 AM
Hi All,
Can any one send me the code for to retrieve specific field(EBELN) from EKKO table by using RFC_READ_TABLE. When I tried with RFC_READ_TABLE i got DATA_BUFFER_EXCEPTION.
Please suggest the correct code.
Regards,
Rajesh.
Hi All,
Can any one send me the code for to retrieve specific field(EBELN) from EKKO table by using RFC_READ_TABLE. When I tried with RFC_READ_TABLE i got DATA_BUFFER_EXCEPTION.
Please suggest the correct code.
Regards,
Rajesh.
2007 Jan 05 11:28 AM
Hi
That fm store the data in an internal table with a string field long 512 char, if the table you need to read has a structure longer than 512 char that error message is raised.
So if you don't need to read whole EKKO, you should specify which field you need to read. If you need to read all EKKO you can apply the note 758278, here it's explained how to create a new fm using a buffer long 4000 char
Max
2007 Jan 05 11:47 AM
Hi,
use fm TABLE_ENTRIES_GET_VIA_RFC
*
fil wheretab
refresh wtab.
name = 'EKKO'.
concatenate 'EBELN = ' key-ebeln into wtab-zeile
separated by space.
append wtab.
CALL FUNCTION 'TABLE_ENTRIES_GET_VIA_RFC'
destination dest
EXPORTING
LANGU = SY-LANGU
TABNAME = name
TABLES
SEL_TAB = wtab
* NAMETAB =
TABENTRY = tab
EXCEPTIONS
INTERNAL_ERROR = 1
TABLE_HAS_NO_FIELDS = 2
TABLE_NOT_ACTIV = 3
NOT_AUTHORIZED = 4
OTHERS = 5 .A.
2007 Jan 08 5:40 AM
Hi max,
My requirement is like this, I want only 10 or 15 fields from ekko table by uing the fm RFC_READ_TABLE. Please send me code as early as possible.
Regards,
Rajesh.
2007 Jan 08 6:00 AM
Hi Rajesh,
Pass the name of the fields you want from EKKO in table FIELDS (a parameter of FM)
Eg:
data: it_fields type RFC_DB_FLD occurs 0 with header line.
it_fields-fieldname = 'EBELN'.
append it_fields.
CALL FUNCTION 'RFC_READ_TABLE'
EXPORTING
QUERY_TABLE = 'EKKO'
DELIMITER = ' '
NO_DATA = ' '
ROWSKIPS = 0
ROWCOUNT = 0
TABLES
OPTIONS = it_option
FIELDS = it_fields
DATA = it_data
EXCEPTIONS
TABLE_NOT_AVAILABLE = 1
TABLE_WITHOUT_DATA = 2
OPTION_NOT_VALID = 3
FIELD_NOT_VALID = 4
NOT_AUTHORIZED = 5
DATA_BUFFER_EXCEEDED = 6
OTHERS = 7
.
Regards,
Vaibhav
Message was edited by:
Vaibhav Modi
2007 Jan 08 6:25 AM
Hi vaibhav,
But we are passing EKKO Table in JCO CODE NOT IN ABAP,
Please can you send the JCO CODE for this.
When I am passing ZSTU(user defined table contains 4 fields) to RFC_READ_TABLE.
I am getting the result. But when I tried with EKKO(contains 78 fields) I got DATA_BUFFER_EXCEED Exception occur.
Please send me the JCO CODE as early as possible.
Regards,
Rajesh.
2007 Jan 30 4:01 AM
Hi,
Also please tell me about how to declare DATA & OPTIONS tab. Am getting the error.
Thanks
Dan
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |