Modifying SAP Forms Using SAPscript

PostalMethods provides email-to-post functionality for SAP R/3 and enables postal delivery from SAP. This is step 3.1 of our How To Send Mail From SAP guide.

In order to send postal mail from SAP R/3 using PostalMethod, you will need to adapt your forms (template) and/or create a new form according to the guidelines appearing in the PostalMethods "How To Place Content In The Document" guide.

You may use our SAPscript form code and upload it to SAP R/3 by using the RSTXSCRP application (Transaction Code SE38).

In SAP Standard Menu, navigate to the following path: SAP menu > Tools > Form Printout > SAPscript > SE71- Form.

SAP R/3 Edit Forms for Postal Mail - SAPscript

Choose the Create option:

SAP R/3 Edit Forms for Postal Mail - SAPscript - Form Painter

In Administrative Data: Description text box, provide a short description for the form:

SAP R/3 Edit Forms for Postal Mail - SAPscript - Administrative Data

In Basic Settings: select the "Letter" Page Format and the "Portrait Format" Orientation:

SAP R/3 Edit Forms for Postal Mail - SAPscript - Basic Settings

Now the Standard Tool bar becomes active:

SAP R/3 Edit Forms for Postal Mail - SAPscript - Tool Bar

Click the "Pages" button to create a new page and provide a short description in the Description text box:

SAP R/3 Edit Forms for Postal Mail - SAPscript - Create Page

Create a Window. A window is a text area where the postal addresses and content of the letter will be placed. The Main Window is created by default.

SAP R/3 Edit Forms for Postal Mail - SAPscript - Create Window

Click Create Element in the menu to create a new element:

SAP R/3 Edit Forms for Postal Mail - SAPscript - Create Element

Create the following two elements:

  1. Window: REC_ADRS and Description: Recipient Address
  2. Window: RET_ADRS and Description: Return Address

SAP R/3 Edit Forms for Postal Mail - SAPscript - Edit Element

Your Windows screen should look like this:

SAP R/3 Edit Forms for Postal Mail - SAPscript - Show Elements

Click the Page Windows button to associate your window with the page.

SAP R/3 Edit Forms for Postal Mail - SAPscript - Show Windows

Double click on each of the window line to adjust its size. Edit each window and set its measurements:

SAP R/3 Edit Forms for Postal Mail - SAPscript - Edit Window

After setting the dimensions, enter the following text in the "REC_ADRS" window:
&p_rec_name&
&p_rec_name2&
&p_rec_street&
&p_rec_post_code&
&p_rec_country&

Enter the following text in the "REC_ADRS" window:
&p_rec_name&
&p_rec_name2&
&p_rec_street&
&p_rec_post_code&
&p_rec_country&

SAP R/3 Edit Forms for Postal Mail - SAPscript - Enter Text

Check the graphical window display:

SAP R/3 Edit Forms for Postal Mail - SAPscript - Graphical Window Display