CRM and CX Blogs by Members
Find insights on SAP customer relationship management and customer experience products in blog posts from community members. Post your own perspective today!
cancel
Showing results for 
Search instead for 
Did you mean: 
arnabroy_in
Explorer
2,980

Preface


Before I start this blog on the complex data structure and features of print work-bench to achieve the complex requirements of different correspondence, hope you enjoyed my previous blog

https://blogs.sap.com/2017/10/18/a-pocket-guide-to-print-work-bench-step-by-step/

on basic features of Print work-bench.


The Requirements


Many a times we come across some requirements which demand to show some manipulated data into a different place (i.e. different text nodes along with some other data) from where they are fetched and manipulated (i.e. the text-exits)

The Solution


In these cases the text nodes are created and marked as inactive (to stop implicit calling for display) and that is called explicitly for display from another text node.

An Example


In the following example it is explained how an inactive (which is suppressed by SAP to be displayed) text node can be explicitly called and displayed.

Along with this, the basic technique of using during loop is explained.

Go To Transaction Code PWB.

Create an application form of form class IS_U_CS_MOVE_IN_WELCOME_LETTER

As displayed below





One installation can have multiple register; here we are displaying those register (logical register number) details.



DATA: LT_LOGIC_NO TYPE EASTL. (Locally Defined)

To access this table from other part of the program we need to pass the values into some custom defined global internal table in ‘During Loop’

DATA: T_EQUIP TYPE TABLE OF V_EGER (Globally Defined, hence can be accessed from any where from the object)





 

We are creating one text node in the following node hierarchy, and making this text node as inactive (unccheck the check box as described below) and text exit for this node is not created. As the result the implicit calling of this exit during display will be suppressed. To display the output of this text node, we have to call it explicitly.





 

Activate.



Create the display of the text node.

Give the following details.



Activate.



 

Create a During Loop as explained.

(‘During exit’ is an exit that is created in the loop of standard data fill flow of PWB(generated function module), in the same manner we can create ‘Before Exit’ and ‘After Exit’ that is called before and after the loop of standard data fill flow of print work-bench (generated function module) respectively.



Activate.







 

APPEND WA_LOGIC_NO TO GIT_LOGICNUM.

 

Append the work area into a global internal table, so that can be accessed from other part of object, also create work areas for the internal table GIT_LOGICNUM and T_EQUIP).

 



Declare the internal table in the PWB top include.





 

Activate.

Create another text node with text exit (to call the inactive node) in the following hierarchy as displayed.



Create the Exit to write the code.



Write the following code in it.



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

LOOP AT GIT_LOGICNUM INTO L_WA_LOGICNUM.
READ TABLE T_EQUIP INTO L_WA_EQUIP
WITH KEY LOGIKNR = L_WA_LOGICNUM-LOGIKNR.
IF SY-SUBRC = 0.
PERFORM OUTPUT_TEXT
USING
'ISU_DISP_REGSTR'
'MAIN'
'BODY'
'APPEND'.
ENDIF.
ENDLOOP.

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



Activate

Execute with data.





Two rows should come in the output of inactive node calling part, as two entries are there in the table where loop is executed.





Rate type data is not there in the table; hence it is blank in output.

 
4 Comments
Labels in this area