2006 Jul 06 2:13 PM
hi
i uploaded the xml file from application server into a internal table
data : begin of t_x occurs 0,
d type string,
end of t_x.
OPEN DATASET file FOR INPUT IN TEXT MODE ENCODING DEFAULT .
DO.
READ DATASET file INTO t_x-d.
IF sy-subrc <> 0.
EXIT.
ELSE.
append t_x.
clear t_x.
ENDIF.
ENDDO.
CLOSE DATASET filename.
and after i want to call call transformation but i can't put a structure ref to a table like this
CALL TRANSFORMATION ('ID')
SOURCE XML xmlupl
RESULT tab = t001[]
because my file xml are not always the same structure.
So is it possible to have a call transformation wit dynamic structure
thanks for your help
serge
2006 Aug 16 4:06 PM
Hello Serge
If you know what kind of structure you require for your itab you can dynamically create the appropriate itab:
DATA:
gd_struc TYPE tabname,
gdo_data TYPE REF TO DATA.
FIELD-SYMBOLS:
<gt_itab> TYPE TABLE.
* Somehow find the required structure name
gd_struc = 'KNA1'. " for example
* Create data reference with required type (dynamically)
CREATE DATA gdo_dref TYPE (gd_struc).
* Assign the data reference to your field symbol
ASSIGN gdo_data->* TO <gd_itab>.
* NOTE: <gd_itab> has the line structure of 'KNA1'.
...
Regards
Uwe
2007 Feb 07 4:06 PM
Hi guys,
is there any possibility to transport the name of the structure (KNA1) also in that xml? or maybe the definition of the fields if the structure is not available local.
best regards,
Ionut
2007 Feb 07 6:58 PM
check this code sample
where i send the table definiton (field cat) in the xml and using call transformation and xslt to dynamically define the structure and load data to it.
Regards
Raja
2009 Feb 19 2:43 PM
After the Call transformation statement, we get the XML string. How can we download that into the XML File into our frontend.