Skip to Content
author's profile photo Former Member
Former Member

XML

Hi,

I hv one program it is used to convert ABAP datas to XML file . its working but datas r not coming to file. i attached the program also . PLZZZZZZZ

Its Urgent. points will be given.

DATA : ADRC LIKE TABLE OF ADRC WITH HEADER LINE.

DATA : BEGIN OF itab OCCURS 0,

a(100) TYPE c,

END OF itab.

DATA: xml_out TYPE string .

SELECT name1 name2 FROM ADRC INTO TABLE ADRC.

*----


XML

CALL TRANSFORMATION ('ID')

SOURCE tab = adrc[]

RESULT XML xml_out.

*----


Convert to TABLE

CALL FUNCTION 'HR_EFI_CONVERT_STRING_TO_TABLE'

EXPORTING

i_string = xml_out

i_tabline_length = 100

TABLES

et_table = itab.

*----


Download

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

filetype = 'BIN'

filename = 'c:\ADRC1.xml'

TABLES

data_tab = itab.

REFRESH ADRC.

CLEAR adrc.

Thanks

Girish M

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Nov 24, 2007 at 07:53 AM

    check this modified code

    DATA : ADRC LIKE TABLE OF ADRC WITH HEADER LINE.
    
    DATA : BEGIN OF itab OCCURS 0,
    a(100) TYPE c,
    END OF itab.
    
    data: begin of temp_tab occurs 0,
         name1 like adrc-name1,
         name2 like adrc-name2 ,
         end of temp_tab .
    
    DATA: xml_out TYPE string .
    refresh: temp_tab .
    SELECT name1 name2 FROM ADRC INTO TABLE temp_tab.
    
    *------------------- XML
    CALL TRANSFORMATION ('ID')
    SOURCE tab = temp_tab[]
    RESULT XML xml_out.
    
    *------------- Convert to TABLE
    
    CALL FUNCTION 'HR_EFI_CONVERT_STRING_TO_TABLE'
    EXPORTING
    i_string = xml_out
    i_tabline_length = 100
    TABLES
    et_table = itab.
    
    
    *-------------- Download
    
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    filetype = 'BIN'
    filename = 'c:ADRC1.xml'
    TABLES
    data_tab = itab.
    
    REFRESH ADRC.
    CLEAR adrc.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Durairaj ,

      Thanks yaar. i hv given the points also.

      Another requriment is for me that is interface b/w EWM and Legacy .same thing EWM should send data's to legacy in XML file.can give me sample program.

      Thanks

      Girish M

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.