Skip to Content

What is Print Workbench?

Print Workbench is a tool used as Basic or Central development environment for creating standardized outgoing correspondence, and is used for printing/RDI-outbound purpose in IS-Utilities. We find this as a very efficient and improved way of communication through correspondence from the perspective of easy data retrieval and understanding.

 

Advantages of Print Workbench

Separated and independent data retrieval procedure from layout design with dynamic print programs. Increase performance for mass printing.

 

The Print Workbench tool has following components.

Form Classes

Carries the data retrieval hierarchy in the form of modularized accessible subroutines, detailed information about the data for an application, Form class: Application Form cardinality can be 1: N.

Application Forms

These are configuration objects used for the application and integration of Data structure defined in Form Class Can be integrated with different form layouts like Smart Forms, SAP scripts or PDF Forms.

An example:

One very simple Print Workbench example is given below.

As soon as a business partner wants to start consuming any utility service or supply, (move-in is required), the utility company automatically creates a welcome letter / Move-in letter / Correspondence based on the PWB object name configured and that is sent to the customer.

One standard form class is given in SAP to carry out the necessary data retrieval for this purpose that is IS_U_CS_MOVE_IN_WELCOME_LETTER.

Go to Transaction ‘PWB’

Double click on application form, and give the name as ‘Z_TEST_WELCOME_LETTER’ and click on create button.

 

Use Form Class IS_U_CS_MOVE_IN_WELCOME_LETTER which is a standard Form Class provided by SAP for Move-in Letter.

And fill the other parameters as described.

One SAP Script is created to display the output. SMART-FORMS or ADOBE-FORMS can also be used.

System will ask for Transport Request.

Create one Request.

Next screen will come as follows.

Activate the application form. [SHIFT + F8]

Double click on Z_TEST_WELCOME_LETTER blue highlighted line.

Following screen will appear.

User Top Include is for declaring the global data types and data objects.

User Exit Include is used for the ABAP customization.

Start Exit is called before the PWB data fetching printing or interface operation is started, hence all the initialization should be done in the exit.

End Exit is called after the all the PWB operation is is done, all the collation or post operation activities can be done here.

Double click and create Include, and create the exits in the user exit include.

Activate the application form again.

As this is welcome letter we need to get the business Partner details.

In the following hierarchy we can see that the tables are available, so we decide to display our business partner details here.

 

We are creating a text exits to write our code and display those data just below the CO_ADDRESS node.

Click on the node MOVEINDOCC.

Click on Create Text [SHIFT + F4].

Give description and text name and create as child.

 

Click on Pencil and ‘T’ to create the Text and Exit respectively.

Now before writing the display variable population logic, go to the generate function module by double clicking on the blue highlighted Z_TEST_WELCOME_LETTER line.

We can see here that CONTRACT node is populated by the work area WA_CONTRACT,

In this work area all the fields of table EVER will be available.

We will write logic to fetch the Business Partner number by using this

In the same fashion we can see that installation structure and address structure is filled by using the work area WA_INSTALL and WA_CO_ADDRESS.

Write the following code in the text exit created by us.

*****************************************************************************************************************

DATA: L_WA_FKKVKP    TYPE FKKVKP.  (Declare this work are in top include).

SELECT *
FROM FKKVKP
INTO L_WA_FKKVKP
UP TO 1 ROWS
WHERE VKONT = WA_CONTRACT-VKONTO.
ENDSELECT.

*****************************************************************************************************************

Now we have all our necessary data into the work areas namely L_WA_FKKVKP (Locally defined in exit of structure for table FKKVKP), WA_INSTALL (output type V_EANL) and WA_CO_ADDRESS (output type EADRDAT) and WA_CONTRACT (Output Type EVER).

And the move-in letter is generated per contract ( that means for 1 Business Partner and 1 contract account, there is always going to be single entries, that’s why work area is considered instead of internal tables).

Straight away we can write the WORKAREA-FIELD while displaying the output upon clicking on the pencil button of the text node created (after activating this).

Go back to the main screen and again activate this.

Let us create one more text to display the FKKVKP entries that we have fetched.

Don’t create any exit for code in this newly created text exit; this is only for display purpose,

Write the variables you want to display as described below.

Now execute the print work-bench object with one valid (live) contract.

Select the following parameters. You can also generate spool by checking the SAP script format as spool of the above screenshot and clicking the new spool request of the below screenshot.

Here is the output displayed in the script. (Installation Status has no value in the table, hence it is coming as blank.

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply