Advanced Print Work-Bench, one more step towards the complex correspondence

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.

  http://bit.ly/2hT4QSH #SAP #SAPCloud #AI

Getting Started With AS2 Protocol Using AS2Gateway and OpenAS2

Most of the large retail providers and consumer product suppliers such as Walmart, Amazon, Morgan Foods, etc. have decided to go with AS2 protocol in the last few years. Based on this trend, all of their suppliers are asked to send their invoices, purchase orders, and other B2B trading messages over AS2. Because of that, the trend for usage of AS2 has been significantly increased over the last couple of years. In this blog, I’m going to explain how to get started with AS2 protocol and how you send and receive AS2 messages using two software applications which provide AS2 capabilities.

What Is AS2?

In simple terms, the Applicability Statement 2 or AS2 specification defines a mechanism for secure and reliable transfer of structured business data over the Internet. In contrast to other traditional B2B trading protocols, AS2 offers a secure, efficient, and simple to use trading environment without a need for proprietary devices, software, or expensive private networks or value added networks. If you are new to AS2 protocol, I highly recommend you read this description of AS2 protocol before going to use it in your production requirements. It describes what AS2 is, why we need AS2, and its key benefits in simple terms, and you don’t have to have a technical background to understand it. If you have some technical background and you want to know how the protocol operates over the HTTP/S protocol, you can refer to this and get a better understanding of the implementation of the AS2 protocol. https://goo.gl/Ucqw3P #DataIntegration #ML