cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to write data table through 'Write File' Action

Former Member
0 Kudos

Hi All,

I am trying to save a file which will contain tabular data with the help of Write File action in a Transaction. The transaction calls other transaction in it with Call Transaction action.

The problem is, if I link Text field of Write File action to one of the fields from called transaction output(e.g. Material number: Which has multiple row output for each material i.e. Material List) Then the file saves only first row, no matter I places Write File action below Repeater action or not.

In other case if I link OutputXML field directly from Call Transaction to Text field of Write File; then it saves it as a xml output not as tabular data.

I also tried this using PDF actions with PDF Tables, but in that case also while opening the PDF file it gives error that the content is not supported by PDF document.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Sharad,

if you want to write tabular data into an output file, what format should have the content of the file? For example, you may have a CSV-file with comma separated values with rows, or a XML file, or just a text file with multiple rows.

An easy way to work with tabular data is using the MII internal xml format to build the data structure and then use the XML Saver action. If you like to have a CSV file, you could use the xml input from MII in a Repeater to run through the data rows and use the Writer in append mode to build the file contents.

In case of a simple text file with multiple lines, you can use a Repeater to build up a data string, appending a "crlf" function as an end-of-line marker, and afterwards use a Text Saver to write the complete string to a file.

So which format do you need in your file?

Michael

Former Member
0 Kudos

Hi Michael,

Thank you for your valuable suggestions.

I want the output to be in Tables, preferably in PDF or xls format, in html format with tables will also do.

I want this output file to be used in Send Mail action as a attachment.

Former Member
0 Kudos

Hi Sharad,

if you need a PDF output file, this makes it easy. You only have to build the output table data as MII xml, e.g. by using the XML actions creating a XML Document and append rows. To build a PDF and save it:

- define a PDF document

- define the PDF table, use the XML as input, the action automatically builds the table

- save the file using the Image Saver action, input is the output of the PDF Document

Please also have a look at the MII help concerning PDF actions:

[http://help.sap.com/saphelp_xmii120/helpdata/en/45/1d996b0f515352e10000000a114a6b/frameset.htm]

Building a MII XML structure:

[http://help.sap.com/saphelp_xmii120/helpdata/en/44/71f7e99ea03abee10000000a155369/content.htm]

Michael

Former Member
0 Kudos

Thank you very much sir.

Actually I tried this using PDF actions, but I think there might be some mistake I made thats why it was showing the error. This time it is done.

Now the problem is solved. Thank you very much!

Answers (0)