cancel
Showing results for 
Search instead for 
Did you mean: 

Sapscript form to supply Edifakt data?

Former Member
0 Kudos

Dear all,

In a healthcare program (PMD) a Sapscript form is in use to print a letter. Now the user wants the possibility to send a copy of the letter via Edifakt to external partners. Next possibilities should be possible:

1)print the letter

2)print the letter and send an EDI-message (Edifakt) with the same text data as the letter

3)send an EDI-message without printing the letter

To avoid double development I am wondering if it is possible to execute the Sapscript form and receive the data in an internal table without printing the letter. The internal table I would like to use to build up the the FTX segments within the Edifakt message.

Can somebody give me a hint? If yes, can you also give me some program examples?

Thank you in advance.

With kind regards, Simon

Accepted Solutions (1)

Accepted Solutions (1)

juan_suros
Contributor
0 Kudos

The Function Module CLOSE_FORM has an optional TABLES parameter called OTFDATA that can be filled with the contents of the document instead of printing.

To do this, you must set the field TDGETOTF = 'X' in the OPTIONS structure that can be supplied as an optional parameter to Function Module OPEN_FORM when the document is opened for output.

This table contains the OTF format data that describes your SAPscript document. Normally the SAPscript compositer would print this to an external printer or fax or email, but once captured in your program you can do anything you like with this information.

For instance, you can convert OTF data to a PDF file using SX_OBJECT_CONVERT_OTF_PDF. See the many threads on this topic in the ABAP Development forum if you are interested.

I hope this hint is helpfull to you. Good luck.

Answers (0)