MUNDOSAP

MUNDOSAP (foro/index.php)
-   Programación ABAP IV (foro/forumdisplay.php?f=4)
-   -   Text_convert_xml_to_sap (foro/showthread.php?t=10248)

SitaF 15/01/08 11:14:39

Text_convert_xml_to_sap
 
Hola,

Soy novata en esto, asi q os explico mi duda a ver si algun alma caritativa me echa una mano.

Estoy intentando importar un xml a Sap, para lo que me han dicho q use la siguiente funcion TEXT_CONVERT_XML_TO_SAP, no he encontrado mucha (vamos basicamente casi nada) informacion al respecto, pero bno me las he apañado para hacer algo, lo que pasa es q me da un error raise conversion_failed, si mirais mi codigo creo q es por la tabla, por eso lo he intentado definiendola de unas cuantas maneras.. pero ni con esas.. asi q si alguien tiene algun manual de como funciona o lo ha utilizado y me puede contar un poco al respecto se lo agradeceria!!

Venga aki os pego mi codigo.. (declaraciones de prueba incluidas..)
Muchas gracias por anticipado!!


DATA: tab_raw_data TYPE truxs_xml_table,
tot_size TYPE i,
tot_size1 TYPE i.



TYPES: BEGIN OF ty_tabla,
data1(250) TYPE c,
END OF ty_tabla.

* DATA: BEGIN OF tabla OCCURS 0,
* data1(250) TYPE c,
* END OF tabla.

* DATA: tabla TYPE STANDARD TABLE OF ty_tabla.

DATA: tabla TYPE ty_tabla OCCURS 0.

* DATA: BEGIN OF tabla OCCURS 0,
* data1 LIKE zatr_res_mot-des_motiv, "char210
* END OF tabla.



CALL FUNCTION 'TEXT_CONVERT_XML_TO_SAP'
EXPORTING
* I_FIELD_SEPERATOR = ';'
* I_LINE_HEADER =
i_tab_raw_data = tab_raw_data
i_filename = p_fichero
i_totalsize = tot_size
TABLES
i_tab_converted_data = tabla.
* EXCEPTIONS
* conversion_failed = 1
* OTHERS = 2.
* IF sy-subrc <> 0.
* BREAK-POINT.
*
* ENDIF.

ballan 16/01/08 11:01:22

Prueba a utilizar las funciones

SDIXML_XML_TO_DOM y SDIXML_DOM_TO_DATA

karasap 18/01/08 10:00:05

cargar table control
 
Una pregunta rapida.Y DATA_AS_ROM de que tipo es? que pongo?


Husos Horarios son GMT. La hora en este momento es 23:05:23.

www.mundosap.com 2006 - Spain
software crm, crm on demand, software call center, crm act, crm solutions, crm gratis, crm web