2008 Jul 16 12:30 PM
dear experts,
i need to uploads the time machine recording data from xml file to the sap for this let me know the best way means which BAPI sud i use to fetch the data from xml file or i have to use report program for this ,after fetching the data in my own internal table will i use "HR_INFOTYPE_OPERATION" FOR updating the infotype 2011...or i have to go to in a different ways,,,,,plz help me ...
dear experts,
i need to uploads the time machine recording data from xml file to the sap for this let me know the best way means which BAPI sud i use to fetch the data from xml file or i have to use report program for this ,after fetching the data in my own internal table will i use "HR_INFOTYPE_OPERATION" FOR updating the infotype 2011...or i have to go to in a different ways,,,,,plz help me ...
2008 Jul 16 12:39 PM
One easy way to upload XML data into an internal table:
types: begin of t_tabup,
insert structure for upload table here
end of t_tabup.
DATA: x_tabup TYPE STANDARD TABLE OF t_tabup INITIAL SIZE 0.
DATA: lv_xml_string TYPE string.
TYPES: t_xmltab(5602) TYPE c.
DATA: lx_xmltab TYPE TABLE OF t_xmltab,
lw_xmltab TYPE t_xmltab.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = w_fname
filetype = 'BIN'
has_field_separator = ' '
TABLES
data_tab = lx_xmltab
EXCEPTIONS...
IF sy-subrc <> 0.
" Display error message and abort processing
ENDIF.
Transform to internal table
LOOP AT lx_xmltab INTO lw_xmltab.
CONCATENATE lv_xml_string lw_xmltab INTO lv_xml_string.
ENDLOOP.
CALL TRANSFORMATION ('ID')
SOURCE XML lv_xml_string
RESULT tab = x_tabup[].
Hope this helps.
2008 Sep 25 1:41 PM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |