Mentor SAP

After the form creation process, the form hold in the XSTRING “PDF” can be stored in a file or sent via e-mail.

 

While you are developing and testing the entire business process, it is helpful to download the offline form and just test its interactive functions. The download function is suitable for this task.

 

The importing formal parameter “/1bcdwb/formoutput” carries the PDF field. There, the PDF form is stored in binary format (as XSTRING).

 

To download the PDF binary content, use the method GUI_DOWNLOAD of the class CL_GUI_FRONTEND.

Before calling the download function, the function SCMS_XSTRING_TO_BINARY is needed. It converts XSTRING into an internal table of hex bytes.

The changing parameter DATA_TAB expects this format.

 

The figure shows the conversion of XSTRING into the internal table of hex bytes.

 

If you need to upload the form, the sequence is opposite:

 

SAP offers an include program that already carries the coding for uploading and downloading. You do not need to code the uploading and downloading coding yourself; just use the form routines inside FP_UTILITIES.