‎2007 Aug 14 12:49 AM
Hi, im using the new version of sap, in which using the tab TABLES is absolete
So, I made a Table Type, and I'm using it on the EXPORT TAB of my function
The code on my Function its very simple, and it works, here it is:
FUNCTION ZGETCLASE.
*"----
""Interfase local
*" EXPORTING
*" REFERENCE(CLASE) TYPE ZCLASE1
*"----
*DATA : clase type standard table of zclase1.
select /BIC/ZRICCLAS /BIC/CLASTXT into table CLASE from /BIC/PZRICCLAS.
ENDFUNCTION.
I'm trying to make it work with a program.
Heres the code i use on my program:
*----
REPORT ZPRUEBAINDCAPITAL.
data: begin of claseoperacion occurs 0,
ricclas like zclase-ricclas,
clastxt like zclase-clastxt,
end of claseoperacion.
CALL FUNCTION 'ZGETCLASE'
IMPORTING
CLASE = claseoperacion.
loop at claseoperacion.
write: claseoperacion-RICCLAS , 30 claseoperacion-CLASTXT.
skip 1.
endloop.
The problem is when i run my programs, it won't work because of this error:
CALL_FUNCTION_CONFLICT_TYPE
Excep. CX_SY_DYN_CALL_ILLEGAL_TYPE
any ideas??
thanks
‎2007 Aug 14 1:12 AM
Hi,
Try to change the following and try
data: begin of claseoperacion occurs 0,
include structure ZCLASE1.
end of claseoperacion.
aRs
‎2007 Aug 14 1:01 AM
Hi,
Change this in your code
DATA claseoperacion TYPE TABLE OF ZCLASE1.
Regards,
Atish
‎2007 Aug 14 1:12 AM
Hi,
Try to change the following and try
data: begin of claseoperacion occurs 0,
include structure ZCLASE1.
end of claseoperacion.
aRs
‎2007 Aug 14 2:57 AM
An Extended Syntax change will normally highlight where the problem exists... what confuses me is that you say you have defined "ZCLASE1" as a table type, so why is "clase" a standard table of a table type... i.e. should you have something like (not syntax checked):
FUNCTION ZGETCLASE.
*"----------------------------------------------------------------------
*"*"Interfase local
*" EXPORTING
*" REFERENCE(CLASE) TYPE ZCLASE1
*"----------------------------------------------------------------------
DATA :
lt_clase type zclase1.
select /BIC/ZRICCLAS /BIC/CLASTXT into table lt_clase
from /BIC/PZRICCLAS.
clase[] = lt_clase[].
ENDFUNCTION.and call it with:
REPORT ZPRUEBAINDCAPITAL.
data:
gt_clase type zclase1,
gs_clase like line of gt_clase.
start-of-selection.
CALL FUNCTION 'ZGETCLASE'
IMPORTING
CLASE = gt_clase.
loop at gt_clase into gs_clase. "into a structure like line of gt_clase.
write: gs_clase-RICCLAS, 30 gs_clase-CLASTXT.
skip 1.
endloop.(sorry, I don't have a system in front of me otherwise I'd do a better example).