‎2006 Jun 08 2:20 AM
Hi,
I am using FM RSAN_ODS_DATA_READ.
CALL FUNCTION 'RSAN_ODS_DATA_READ'
EXPORTING
I_ODSOBJECT = 'ZORGFUND'
IMPORTING
ET_DATA = g_t_data1
EXCEPTIONS
FAILED = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
I defined g_t_data1 as follows
TYPES: BEGIN OF GT_S_DATA1,
ZFUNDCNTR(24) TYPE C,
ZFUNDGRP(24) TYPE C,
ZDWR_ORG(24) TYPE C,
END OF GT_S_DATA1.
DATA: g_t_data1 TYPE STANDARD TABLE OF gt_s_data1
WITH HEADER LINE,
But then I got an error:
<b>You attempted to pass the field "G_T_DATA1" to the formal parameter "ET_DATA"
but the formal parameter "ET_DATA" can accept only fields of
type "h". The field "ET_DATA" has the type "u".</b>
What is type 'h' and ''u'. I have never seen this. How should I define g_t_data1 so that I won't get a dump?
Thanks,
RT
‎2006 Jun 08 4:42 AM
Hi,
please remove the WITH HEADER LINE statement in internal table declaration.
‎2006 Jun 08 2:29 AM
How is ET_DATA declared as an export parameter inside the function module RSAN_ODS_DATA_READ???? Declare your G_T_DATA1 as,
data: G_T_DATA1 type standard table of <type assosiated with ET_DATA inside the FM> with header line.
‎2006 Jun 08 2:42 AM
Hi Rob,
What's your SAP version,I can't get the FM named "RSAN_ODS_DATA_READ" in my SAP system.
I used IDES ECC5.0.
‎2006 Jun 08 4:33 AM
Hi Bob,
Actually I am working withg BW and this is to read data from the ODS Object in BW.
Hi Sharath kumar,
ET_DATA is define as TYEP ANY TABLE from the EXPORT tab of the FM. I think I already have defined G_T_DATA1 similar to your suggestion as seen here:
<b>I defined g_t_data1 as follows
TYPES: BEGIN OF GT_S_DATA1,
ZFUNDCNTR(24) TYPE C,
ZFUNDGRP(24) TYPE C,
ZDWR_ORG(24) TYPE C,
END OF GT_S_DATA1.
DATA: g_t_data1 TYPE STANDARD TABLE OF gt_s_data1
WITH HEADER LINE,</b>
Per your suggestion
data: G_T_DATA1 type standard table of <<b>gt_s_data1</b>> with header line.
Have I missed something? Please advise.
Thanks,
RT
‎2006 Jun 08 4:42 AM
Hi,
please remove the WITH HEADER LINE statement in internal table declaration.