cancel
Showing results for 
Search instead for 
Did you mean: 

Transfer purchase document to XML file

jiri_faltin2
Explorer
0 Kudos

Hello experts,

during PO printing, I need sometimes not to print document, but only save as XML document to front end. Is there any chance to do it e.g. changing medium from print to e.g. EDI? I'm not sure, if I do it in printing prigram, that system will behave correctly.

Thanks for help,

Jirka Faltin

Accepted Solutions (0)

Answers (2)

Answers (2)

OttoGold
Active Contributor
0 Kudos

Why would you use IDoc? Is that because you want to use some existing extractor?

How I would do that: (if that does not fits for you, please tell me why)

1) add custom button to the user transaction

2) create a function module triggered by the button

a) loads the data (in transaction the variables are filled at runtime, aren´t they)

b) create a XML string (file content) using the standard ID transformation which creates XML string based on the filled variable structure

c) automatically call the GUI_DOWNLOAD (after the button click the save file dialog is trigerred)

Regards, Otto

OttoGold
Active Contributor
0 Kudos

Hello,

what would be the partner EDI system? Is there one? Or you just need to save the XML file?

I would create the enhancement point and call there my customer function module which gets the data and saves the XML file. Do you need any complex XSLT? Or to generate XML with less possible effort?

I don´t get what the problem is. Because this task is not "printing" imho.

Regards, Otto

jiri_faltin2
Explorer
0 Kudos

Hello Otto,

thanks for reply. I don't need to pass information to EDI system. Users need sometimes print PO to the printer, sometimes only save as XML file to frontend computer. But only one of these two actions should happend. We don't wnat to create different output types, so we decided to use Medium field, which can user change before printing.

There is some posibility to create idoc from PO or to create XML instead of idoc. Do you have some experience with this?

Thanks&regards,

Jirka