cancel
Showing results for 
Search instead for 
Did you mean: 

Read a text file from the MIME repository

IanStubbings
Active Participant
0 Kudos

Hi

I have a requirement to read a text file from the mime repository into my WDA component. The file contains properties for a roadmap component.

How would I achieve this?

Any help much appreciated.

Ian

Accepted Solutions (1)

Accepted Solutions (1)

thomas_szcs
Active Contributor
0 Kudos

Hi Ian,

Please find below an example from WDR_TEST_EVENTS/GANTT


  data:
    mime_repository type ref to if_mr_api,
    content type xstring,
    url type string value '/SAP/BC/WebDynpro/SAP/WDR_TEST_EVENTS/gantt.xml'.

  mime_repository = cl_mime_repository_api=>get_api( ).

  call method mime_repository->get
    exporting
      i_url = url
    importing
      e_content = content.

  wd_context->set_attribute( name = 'DATA' value = content ).

Best regards,

Thomas

IanStubbings
Active Participant
0 Kudos

Thanks Thomas.

I'll give it a go once I fixed an issue with my used component.

Ian

Answers (0)