Show TOC

mime-info MacroLocate this document in the navigation structure

Use

You use the mime-info macro to retrieve information from the ITS about transferred MIME data.

mime-info
mimetab   (out,savwmpmime)
         

Parameter

Description

mimetab

Internal table that contains information about MIME data in the ITS.

Example

The following HTML template allows you to upload files from the PC where the Web browser is running:

<form enctype="multipart/form-data" action="`wgateurl()`">
<input       type="file"   name="localfile1">
<input       type="file"   name="localfile2">
<input       type="submit" name="~OKCode=FIUP"
                value="File Upload">
</form>
         

When you submit this form, the ITS holds two files known internally as localfile1 and localfile2. To ensure proper transfer of data from the Web browser to the ITS, you must use the enctype tag.

You can use the following ABAP code to retrieve information from the ITS about the MIME objects - localfile1 and localfile2- held:

data: mime_info like savwmpmime occurs 0 with header line.
mime-info mimetab.
loop at mimetab.
* mimetab-conttype contains the MIME type
* mimetab-contlength contains the length 
* mimetab-contname contains the original HTML field name
* mimetab-contfname contains the file name on the browser pc
endloop.

         

The elements of mimetab could now contain the following values:

conttype

contlength

contname

contfname

application/excel

12345

localfile1

c:\temp\localfile1.xls

application/octet-stream

54321

localfile2

c:\temp\localfile2.doc

If the MIME type is unknown to the Web browser, mimetab-conttype contains the value application/octet-stream.