on 02-16-2007 7:43 PM
Hi All,
We are getting following error when we check for errors in ABAP program for ABAP client proxies:
"RECORDS" is not an internal table - the "OCCURS n" specification is missing.
Let me explain the scenario and proxy objects its generated and proxy objects we are refering in program:
Its syncrounous client proxy scenario.
In XI:
We have DT_Req, MT_Req, DT_Res, MT_Res and MI_Sync_OB (O/p Message: MT_Req, I/P message:MT_Res)
Proxy Objects generated:
ZCO_MI_SYNC_OB
ZMT_REQ
ZDT_REQ
ZDT_REQ_RECORDS
ZMT_RES
ZDT_RES
ZDT_RES_RECORDS
ZDT_RES_RECORDS_TAB
ABAP Code:
REPORT ZTEST_DELETE.
DATA:
lo_history TYPE REF TO ZCO_MI_SYNC_OB,
lo_sys_exception TYPE REF TO cx_ai_system_fault,
Structures to set and get message content
lv_history_req_mt TYPE ZMT_REQ OCCURS 0 WITH HEADER LINE,
lv_history_res_mt TYPE ZMT_RES,
lv_history_req_rec TYPE ZDT_REQ_RECORDS,
lv_history_res_rec TYPE ZDT_RES_RECORDS.
lv_history_req_rec-VLAUE = SY-DATUM.
APPEND lv_history_req_rec TO lv_history_req_mt-MT_REQ-RECORDS.
CREATE OBJECT lo_history.
TRY.
Call outbound Proxy
CALL METHOD lo_history->execute_synchronous
EXPORTING
output = lv_history_req_mt
IMPORTING
input = lv_history_res_mt.
Error handling
CATCH cx_ai_system_fault INTO lo_sys_exception.
SKIP 2.
WRITE:/ lo_sys_exception->errortext.
RETURN.
ENDTRY.
When we execute this program we get following error:
"REC" is not an internal table - the "OCCURS n" specification is missing.
Can anybody please fogure out the why we getting this error??
We had the similar kind of scenario working. Only one difference in the proxy objects generated:
In working scenario we had the _TAB object genearated for the Req
In our current scenario _TAB proxy is generated for the Res.
Thanx
Navin
HI Navin,
you append:
>>>APPEND lv_history_req_rec TO lv_history_req_mt-MT_REQ-RECORDS
RECORDS has to be a table, but it is not. Go to flag "structure" in SPROXY, where you can control your proxy objects, which in ABAP are nothing else than deep structures. There should be a table RECORDS (blue square icon), but you dont find it there. Change your interface, the corresponding field has to have an occurance 0-n or 1-n.
Regards,
Udo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
did you create your Data type with mulitple occurences (0..n) ? if not change the occurence of the data type in the Integration Repository and activate it. also make sure that Message type and message interface reflects the same.
then go to SAP application system -R/3 and regenerate the proxy and activate it.
hope it works..
Regards,
Moorthy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Moorthy,
Everything you said is done. Still get the same error.
Hi Mario,
I tried to define with your example a, still I have problem.
I think I kind of figure out the reason.
As I mentioned in the first post (question), proxy object "ZDT_RES_RECORDS_TAB" has created for the object data type DT_RES. The fields in the data type "DT_RES" are already existing in the SAP.
The fields in the data type DT_REQ are not in the SAP, and in the proxy objects its not generated any kind of TABLE. I think this is the reason we are getting error ""RECORDS" is not an internal table - the "OCCURS n" specification is missing." either we define
lv_history_req_mt TYPE ZMT_REQ OCCURS 0 WITH HEADER LINE, OR
lv_history_req_mt TYPE ZMT_REQ,
Does it make sense what I was explaining above???
Any lead on this would be great.
Thanx
Navin
Hi navin,
in ABAP a internal table is an array (like in JAVA).
There are several ways to declare an internal table.
a) with reference to data dictionary:
MyTable type table of BUT000.
(this is an example to create a table that has the same structure like BUT000)
b) without reference to data dictionary:
Data: begin of Maytable occurs 10,
field_1(2),
field_2(9).
Data: end of Maytable.
Try to ask a ABAP developer in your company.
Regards Mario
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
see
/people/vijaya.kumari2/blog/2006/01/26/how-do-you-activate-abap-proxies
/people/prateek.shah/blog/2005/06/14/file-to-r3-via-abap-proxy
/people/siva.maranani/blog/2005/05/23/communication-between-sap-system-webservice-using-proxies
/people/siva.maranani/blog/2005/04/03/abap-server-proxies
/people/ravikumar.allampallam/blog/2005/03/14/abap-proxies-in-xiclient-proxy
http://help.sap.com/saphelp_nw04/helpdata/en/02/265c3cf311070ae10000000a114084/frameset.htm
Regards
Chilla..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.