Skip to Content
avatar image
Former Member

Executing .SAP file from MIME on user action

Hi experts,

I have uploaded a SAP Shortcut as a MIME object in webdynpro component.

Now i need to execute/access this file of button click.

How i can achieve this funcationality.

Thanks

Depesh

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Nov 03, 2009 at 12:45 PM

    You can download the content like any other content using the

    cl_wd_runtime_services=>attach_file_to_response API.

    If the content is in the MIME repository, you can read it into a XSTRING using the MIME Repository API:

    cl_mime_repository_api=>if_mr_api~get_api( )

    data lr_mime_rep type ref to if_mr_api.
      constants lc_custom_path type string
                               value 'SAP/PUBLIC/BC/NWDEMO_MODEL/Products_custom.xml'.
      lr_mime_rep = cl_mime_repository_api=>if_mr_api~get_api( ).
    
      call method lr_mime_rep->get
        exporting
          i_url     = lc_custom_path
        importing
          e_content = mv_products_xml.

    However this might not start the SAPGUI, it might only prompt the user to save the shortcut file. If you really want to launch a SAPGUI transaction from WDA, the supported SAP suggested way is to use the NetWeaver Portal or NetWeaver Business Client and trigger Object Based Navigation.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 04, 2009 at 11:29 AM

    I used Attach_file_to_response method with mime content to execute this.

    Thannk you

    Add comment
    10|10000 characters needed characters exceeded