Simple Use Cases For B2B NRO and Archive Module Configuration
Simple Use Cases For B2B NRO and Archive Module Configuration
31 – Process Integration Simple Use Cases for B2B NRO and Archive Module
1
SAP NetWeaver 7.31 – Process Integration Simple Use Cases for B2B NRO and Archive Module
TABLE OF CONTENTS
1 PREFACE .......................................................................................................................................... 3
2 INTRODUCTION AND PREREQUISITES ........................................................................................ 3
2.1 Introduction ................................................................................................................................. 3
2.1.1 Archive Module & Java Archiver Mapping .................................................................................... 4
2.1.2 Number Range Objects (NRO) ..................................................................................................... 4
2.2 Prerequisites................................................................................................................................ 4
2.2.1 General Prerequisites ................................................................................................................... 4
2.2.2 Prerequisites for Archive Module .................................................................................................. 5
2.2.3 Prerequisites for Number Range Objects ..................................................................................... 6
2.2.4 Providing the necessary User and Authorizations ........................................................................ 6
2.2.5 Setting Up the File Directories ...................................................................................................... 7
2.2.6 Adding Software Components to PI B2B ADDON product ........................................................... 7
2.3 Design Objects Used .................................................................................................................. 8
3 VARIANT 1: ONE SENDER AND ONE RECEIVER WITH NRO AND ARCHIVE MODULE AT
OUTBOUND .................................................................................................................................................... 10
3.1 Design Object Used .................................................................................................................. 10
3.2 Configuring the Process Integration Scenario ...................................................................... 10
3.2.1 Calling the Process Integration Designer .................................................................................... 10
3.2.2 Creating the Business Components ........................................................................................... 10
3.2.3 Creating the Integration Flow ...................................................................................................... 11
3.2.4 Creating Channels ...................................................................................................................... 11
3.2.5 Assign Mapping to Integration Flow ............................................................................................ 12
3.2.6 Saving and Activating the Configuration Objects ........................................................................ 13
3.3 Executing the Use Case ........................................................................................................... 13
3.3.1 Channel Monitoring ..................................................................................................................... 13
3.3.2 Message Monitoring .................................................................................................................... 14
3.3.3 Modify Operation Mapping and Execute the Use Case (Optional) ............................................. 15
4 VARIANT 2: ONE SENDER AND ONE RECEIVER WITH NRO & ARCHIVE MODULE AT
OUTBOUND AND INBOUND .......................................................................................................................... 15
4.1 Extending the Integration Flow................................................................................................ 15
4.2 Saving and activating the Configuration Objects .................................................................. 16
4.3 Executing the Use Case ........................................................................................................... 16
5 VARIANT 3: ONE SENDER AND ONE RECEIVER WITH ARCHIVE MODULE AT
OUTBOUND AND MULTIPLE NUMBERS PER MESSAGE FOR NRO MODULE WITH ROTATION
ENABLED ........................................................................................................................................................ 17
5.1 Design object used ................................................................................................................... 17
5.2 Extending the Integration Flow................................................................................................ 17
5.3 Saving and activating the Configuration Objects .................................................................. 17
5.4 Executing the Use Case ........................................................................................................... 17
5.5 Modify NRO Parameter and Execute the Use Case ............................................................... 18
6 APPENDIX ....................................................................................................................................... 18
6.1 Formatting options supported for Directory and File name of Archiver Module
Parameters ................................................................................................................................................. 18
6.2 Number Range Object .............................................................................................................. 19
2
SAP NetWeaver 7.31 – Process Integration Simple Use Cases for B2B NRO and Archive Module
1 Preface
Constraints
The texts, references, and graphics contained in this manual have been compiled with utmost care;
nevertheless, it is impossible to guarantee that they are fully without error. SAP cannot assume any
responsibility for the correctness or completeness of the following documentation; the user alone is
responsible for verifying the information contained therein.
SAP will only assume liability for damage arising from the use of this documentation – irrespective of the
pertinent legal basis – in the case of intentional or active negligence; under no other circumstances will a
warranty be made.
Definition
This manual describes simple application cases for SFTP (Secure File Transfer Protocol) adapter using
NRO (Number Range Object) and Archive Module. The scenario is configured using Integration Flow for
process integration and all the configuration steps that are necessary to execute the application cases on
the basis of SAP NetWeaver 7.31.
Intended Audience
This manual is intended to be used by both technology and application consultants.
Structure
The structure of this document follows the sequence of steps required to configure and run the use cases.
Additional Documentation
List of related documentation
Documentation Purpose
SAP NetWeaver Documentation Simple Use Cases Introduction to Simple Use Cases and description of
the simple use case scenarios for Process
Integration
Variants Description
Variants 1: One Sender and One Receiver with NRO and Archive Module at receiver side with
NRO and Archive Module at Outbound Message Mapping along with Java Archiver
Mapping class
Variant 2: One Sender and One Receiver with NRO Module at receiver side and Archive Module
NRO & Archive Module at Outbound and at both sides with Message Mapping along with
Archive Module at Inbound Java Archiver Mapping class
3
SAP NetWeaver 7.31 – Process Integration Simple Use Cases for B2B NRO and Archive Module
Variant 3: One Sender and One Receiver with NRO Module at receiver side and Archive Module
Archive Module at Outbound and Multiple at both sides with Message Mapping along with
Numbers per message for NRO Module with Java Archiver Mapping class
rotation enabled
You can aim to learn about the following with the use cases:
Working with SFTP adapter with the Process Integration Designer in NWDS: Configuring simple
scenarios and understanding created configuration objects
Working with B2B module – Number Range Object and Archive Module within B2B adapters
Working with the runtime: Executing the use cases and checking the results by using the monitoring
tools
Note: Archiver Mapping is dependent on the Archive Module and cannot be use independently, whereas
the Archive Module can be used independent of the Archiver Mapping.
2.2 Prerequisites
Step Documentation
1. You have installed the Advanced Adapter Engine You can find the corresponding guides on SAP
Extended. Service Marketplace in the Implementation
Documentation Center for SAP NetWeaver 7.3
and SAP NetWeaver 7.3 including Enhancement
Package 1
4
SAP NetWeaver 7.31 – Process Integration Simple Use Cases for B2B NRO and Archive Module
2. You have installed the B2B and SFTP Add-on. You can download the B2B add-on from the
following location:
http://service.sap.com/swdc -> Installation and
Upgrades -> Browse our Download Catalog - >
SAP NetWeaver and complementary products ->
PI B2B ADDON and PI SFTP PGP ADDON.
For downloading latest Support package and
patches, please refer to the following location ->
http://service.sap.com/swdc -> Support Packages
and Patches -> Browse our Download Catalog ->
SAP NetWeaver and complementary products ->
PI B2B ADDON and PI SFTP PGP ADDON
3. You have imported the content for the Enterprise SAP Note 836200
Services Repository corresponding to the latest
support package/patch into the Advanced Adapter
Engine Extended System. The simple use cases are located in the
Enterprise Services Repository in below software
components
SAP BASIS, software component version SAP
BASIS 7.31, namespaces
http://sap.com/xi/XI/System/Patterns
SFTP ADAPTER, software component version
SFTP ADAPTER 1.0, namespaces
http://sap.com/xi/XI/SFTP
B2B MAPPING KIT, software component version
B2B MAPPING KIT 1.0, namespaces
http://sap.com/xi/B2B/MappingFunctions
4. You have configured the System Landscape Configuring, Working with and Administering
Directory (SLD) for the Advanced Adapter Engine System Landscape Directory
Extended System.
5. You have installed the NetWeaver Developer You can find the corresponding guides on SAP
Studio. Service Marketplace at
https://service.sap.com/installnw73 Under
Installation - Standalone Engines and Clients
Installation – Clients Inst. and Update - SAP
NetWeaver Developer Studio 7.3 EHP1.
Note that you set up the use cases in your development or test system, but not in your
productive system.
5
SAP NetWeaver 7.31 – Process Integration Simple Use Cases for B2B NRO and Archive Module
Check if following 2 NRO objects /B2B/NRO01 and /B2B/NRO02 are present and check for
attributes values as per below table. If NRO objects do not exist, proceed with below steps for
creation.
Click create new Number Range Object button.
Create two NRO‟s using the data specified in the below table.
NRO 1 is with Rotation Disabled.
NRO 2 is with Rotation Enabled. This means that once the NRO has reached its maximum value,
counter will be re-initialized back to the starting value.
Name Name of the NRO with prefix /B2B/<NRO>. The <NRO> /B2B/NRO01 /B2B/NRO02
specified in this field is used to look up the NRO and
substitute the values.
Description Field which describes the function of the NRO NRO 1 for NRO 2 for
Simple Use Simple Use
case case
Minimum The minimum value of the NRO. The start of the number Any Number Any Number
Value range. (e.g. 12350) (e.g 22350)
Maximum The maximum value of the NRO. The end of the number Any Number Any Number
Value range. (e.g. 13350) with difference
of 10 (e.g.
22360)
Value This field lets you control the length of the NRO value that is Number of digits Number of digits
length substituted. The number will be padded with 0‟s. to display for to display for
NRO value (e.g. NRO value (e.g.
05) 05)
Warn Level This filed lets you control the warning that will be issued Value in terms Value in terms
when the NRO reaches the test warn level. of Percentage of Percentage
(e.g. 90) (e.g. 90)
Rotate Select this check box if you want to continue the NRO from „„ „X‟
minimum value again when the end of range is reached.
Click on Save and Create button to finish the creation.
Create one more NRO object with one of the above names. Clicking on Save and Create button
will throw error.
6
SAP NetWeaver 7.31 – Process Integration Simple Use Cases for B2B NRO and Archive Module
SAP_XI_MONITOR_J2EE
A work directory already exists on many computers that can be used for this purpose and
under which you can create the required directories.
3. Create two further sub directories in the sub directory ModuleTest. Suggested names: Sender and
Receiver. Create one further sub directory in both the sub directories Sender and Receiver.
Suggested names: Archive.
You must have authorization to access this directory to be able to test the process
integration scenario. Bear this in mind when you define the directory, and, if applicable,
contact your system administrator.
4. Copy the following files to directory Sender
ZB2B_InvoiceInput1.xml
ZB2B_InvoiceInput2.xml
ZB2B_InvoiceInput3.xml
These files are provided by SAP in a ZIP file. The ZIP file for 7.31 containing also the EOIO
test files is available in SAP Developer Network (SDN) and can be found using the direct
link EHP 1 for SAP NetWeaver Process Integration 7.3 – Test Files for Simple Use Cases.
7
SAP NetWeaver 7.31 – Process Integration Simple Use Cases for B2B NRO and Archive Module
This section explains all the design objects that are used for describing the variants.
The subsequent description of each variant will refer to the description in this section; the
relevant design objects will only be listed briefly in each case.
Below you can find details of the design objects being used in this use case
Below you can find details for Message Mapping object being used in this use case
8
SAP NetWeaver 7.31 – Process Integration Simple Use Cases for B2B NRO and Archive Module
Pool Name Used Function in the Mapping Elements used as I/P Explanation
Mapping
UDFNodePool CreateNumberRange I/P: startValues and endValues Creates an empty string for
each number of the missing
I/P Elements: argument-argument 2-
E1EDK01: NTGEW E1EDK01: interval
BRGEW
O/P Element:
S511: LIEFNR
UDFArithmetics bigDecimalMod I/P: value and modValue Returns the MOD value
Pool based on the inputs
I/P Elements: provided
E1EDKA1: TELFX
CONSTANT: 2
O/P Element:
S512: SATZART
O/P Element:
“getDateDifference“ Function
Node (UDFDateTimePool)
UDFDateTimeP getDateDifference I/P: dateBegin and dateEnd Gets the number of days
ool between two dates of
I/P Elements: YYYYMMDD format.
O/P from transformFromVDADate
(E1EDK03: DATUM)
O/P Element:
S512: LIEFABFNRNEU
O/P Element:
S512: BESTELLNR
Below you can find details for Operation Mapping object being used in this use case
9
SAP NetWeaver 7.31 – Process Integration Simple Use Cases for B2B NRO and Archive Module
The Operation mapping OM_INVOIC02_TO_VDA4905 is having two mappings – a Java Archiver Class
and a Message Mapping. The Java Archiver Class archives the result of the mapping as per its order of
usage in operation mapping and saves the result in temporary location of PI server (which will remain
until PI server it‟s not restarted). Later if archive module is set at channel, then archived file from archiver
class is copied from temporary location to the location mentioned in module parameter.
The Operation mapping OM_INVOIC02_TO_VDA4905_EXTN is similar to above mapping except that the
order of mapping is reversed.
The Operation mapping OM_INVOIC02_TO_VDA4905_R is having only message mappings with multiple
message at outbound.
3 Variant 1: One Sender and One Receiver with NRO and Archive Module at
Outbound
This variant enables you to configure and execute the simplest kind of message exchange:
One sender (file directory Sender) sends a message to one receiver (file directory Receiver). Hereby, the
message is exchanged between sender and receiver adapter by using one Advanced Adapter Engine
Extended. Two Mappings are used. First mapping (Java Class archiver) archives the sender payload to a
temporary location of the PI server. The second mapping uses Number Range object to assign values
from Number Range Object in two elements on the inbound interface. Also some fields result in values as
per the User Defined Functions used (see 2.4.4). At last Archive Module used on receiver channel picks
the sender payload from temporary location and archives it to the directory set along with the mapped file.
3.1 Design Object Used
The Operation mapping OM_INVOIC02_TO_VDA4905 & OM_INVOIC02_TO_VDA4905_EXTN will be
used.
appear.
Under PI Tools configuration select Tool-Specific.
Under Update Local Cache Status click the button Update to Refresh the SLD cache.
Click on OK button to close the window. On the Right bottom corner of NWDS the label “Updating
cache” will appear & it will show the status progress. When the cache update finished continue
with the next steps.
10
SAP NetWeaver 7.31 – Process Integration Simple Use Cases for B2B NRO and Archive Module
11
SAP NetWeaver 7.31 – Process Integration Simple Use Cases for B2B NRO and Archive Module
SFTP Server -> Server fingerprint Server Fingerprint Value (you can refer
http://wiki.sdn.sap.com/wiki/display/XI/How+to+Determine+the+Public+Key+Finge
r+Print+of+a+SSH+Server )
File Parameter Enter details of the Filename and Filepath (~/ - represent the home directory of the
configured user where SFTP server is installed)
8. To enter details for NRO (Number Range Object) and Archive Module, click on Module tab of SFTP
receiver channel. Enter the following below details within Processing Sequence table.
Use the Move Up button to move module for NRO as first and then module for Archiver Module.
Amb archiveBaseDir Directory path for Archived files to be stored on receiver (see 2.2.4)
12
SAP NetWeaver 7.31 – Process Integration Simple Use Cases for B2B NRO and Archive Module
13
SAP NetWeaver 7.31 – Process Integration Simple Use Cases for B2B NRO and Archive Module
3. Use appropriate filter criteria to restrict the number of channels displayed. On the very right hand
side select Advanced to get all possible filter criteria displayed. To select your channels, put in the
channel ID (you can find it in the channel editor screen) into the communication channel field,
press Go and select your sender channel from the list.
Check communication channels
1. Check that the channel is running without error.
2. In the Processing Details section you can find the processing logs and the links to the processed
messages. The link can be followed to get the message details.
Alternatively, you can access the Message Monitor from the Monitoring Home page of the de-central
Adapter Engine
1. Start the Monitoring by calling the Configuration and Monitoring Home on the AAE:
http(s)://<AAE-host>:<AAE-port>/pimon.
2. Select tab Monitoring and choose Adapter Engine Message Monitor
3. Use appropriate filter criteria to restrict the number of XML messages displayed (for example, the
processing period).
4. Choose Go.
5. The system displays the selected messages in a table. You want to locate the messages that
were sent during execution. Look for the corresponding Integration Flow and Sender/Receiver
Component, respectively.
6. Select the message(s) to be displayed by selecting the link (number of messages) on the
Overview table. i.e. under the column “Success”
Check the processed messages
1. The “Message List” table is displayed at the bottom of the Message Monitor page. Select the
message you want to have a look at by selecting the corresponding row.
2. The section “Message Details” is displayed. On the tab Message Content, details of the message
can be seen. Processing details can be seen on the tab Message Log.
14
SAP NetWeaver 7.31 – Process Integration Simple Use Cases for B2B NRO and Archive Module
3.3.3 Modify Operation Mapping and Execute the Use Case (Optional)
In this case different operation mapping will be used. Here the message mapping is first in order and then
java class archiver mapping. Hence Java Class archiver mapping archives the mapped payload
(including 2 NRO elements with parameter based NRO values e.g. $B2B_UEBNR*).
1. In the SAP Process Integration Designer open the integration flow B2B_ModuleTest by double-
clicking.
2. Select the mapping object in the graphical view. The properties tab will open.
3. Using the Browse functionality select the operation mapping OM_INVOIC02_TO_VDA4905_EXTN of
namespace http://sap.com/xi/B2B/MappingFunctions.
4. The above operation mapping is having a parameter „tempDirectory‟. This parameter has to be
assigned a value (folder/directory location) to which the Java Archiver Mapping Class (used in
operation mapping) will archive the file during runtime.
5. Save, Activate and Deploy the integration flow.
6. On the host of the Advanced Adapter Engine Extended, open the file directory Sender.
7. Rename the file ZB2B_InvoiceInput1.xml as B2B_InvoiceInput1.xml.
8. If the configuration was executed without errors, the file will be moved from the source directory within
60 seconds after it is renamed. After the file is picked either rename it back to
ZB2B_InvoiceInput1.xml or else stop the sender channel.
9. Open the receiver directory as per configured within SFTP channel and check that the file has
arrived.
10. Open the file and check whether the content has changed. It will have 2 new elements with values
from Number Range Object. It will be as below
<S512>
<DOCNUM_PREV><current value – 1 from NRO></DOCNUM_PREV>
<DOCNUM_CUR><current value from NRO></DOCNUM_CUR>
11. Go to NRO Module maintenance page and check for above values from the file with values per NRO
object.
12. Now open the archived directory location as per configured in receiver SFTP channel for archive
module. It should be having 2 files, one file with .arc and other with .1 as extension. Both the files will
named as per configured parameter archiveFile for Archive Module Bean.
13. The Java Archiver class used in operation mapping will be executed after the message mapping and
hence it archives the mapped file (with variable value for NRO) into a temporary location location as
per configured in parameter „tempDirectory‟ of operation mapping with .arc file. Later when Archive
Module is found on receiver side, this file is moved to the directory location mentioned in receiver
channel archive module. This file will have below elements
<S512>
<DOCNUM_PREV><$B2B_UEBNR_BEFORENRO01$B2B_END_UEBNR></DOCNUM_PREV>
<DOCNUM_CUR><$B2B_UEBNRNRO01$B2B_END_UEBNR></DOCNUM_CUR>
14. Additionally the archive module archives the mapped file but since there is already a file with .arc it
will put .1 as extension to the file in the archive directory location. The structure of this file will be
same as received file.
4 Variant 2: One Sender and One Receiver with NRO & Archive Module at
Outbound and Inbound
This variant extends variant 1 by adding an archive module bean at sender. This will enable to archive the
sender payload and mapped file at sender archive module bean directory.
15
SAP NetWeaver 7.31 – Process Integration Simple Use Cases for B2B NRO and Archive Module
Perform the following steps to open the integration flow you created in variant 1.
1. In the SAP Process Integration Designer open the integration flow B2B_ModuleTest. To do so, in the
SAP NetWeaver Developer Studio call the SAP Process Integration Designer and open the
integration flow B2B_ModuleTest by double-clicking.
2. On the line representing the sender channel, double click to enter into details of the same.
3. Enter the following below details within Processing Sequence table.
Use the Move Up button to move module for NRO as first and then module for Archiver Module.
Amb archiveBaseDir Directory path for Archived files to be stored on sender (see 2.2.4)
16
SAP NetWeaver 7.31 – Process Integration Simple Use Cases for B2B NRO and Archive Module
5 Variant 3: One Sender and One Receiver with Archive Module at Outbound
and Multiple Numbers per message for NRO Module with rotation enabled
This variant extends variant 1 with iteration of values per NRO constant in the same message.
5.1 Design object used
The Operation mapping OM_INVOIC02_TO_VDA4905_R will be used.
Proxy SOCKS4
8. Now go to Modules tab and click on Add button for Module Configuration table.
17
SAP NetWeaver 7.31 – Process Integration Simple Use Cases for B2B NRO and Archive Module
2. If the configuration was executed without errors, the file will be moved from the source directory within
60 seconds after it is renamed. After the file is picked either rename it back to
ZB2B_InvoiceInput3.xml or else stop the sender channel.
3. Check the receiver directory location to find file with iteration of values per NRO constant in the same
message. It will be as below.
<S512>
<DOCNUM_PREV><current value – 1 from NRO></DOCNUM_PREV>
<DOCNUM_CUR><current value from NRO></DOCNUM_CUR>
One more structure as below ->
<S512>
<DOCNUM_PREV><current value from NRO ></DOCNUM_PREV>
<DOCNUM_CUR><current value from NRO + 1></DOCNUM_CUR>
4. Go to NRO Module maintenance page and compare above values from the file with values per NRO
object.
5. Open the receiver archive directory. Since the Archive module is also used in receiver channel, it will
archive the mapped file and hence structure of archive file is same as the received file.
6. Since in this NRO object (/B2B/NRO02) rotation is enabled, execute the scenario again and again
until the NRO value starts repeating. Also compare the value of NRO field to the maintenance tool
value.
6.1 Formatting options supported for Directory and File name of Archiver Module Parameters
Pattern Description
“%id” Will be substituted with the message ID
“%TS” Will be substituted with the current time in the format: “yyyy.MM.dd_HH-mm-
ss.SSS”, e.g. 2004-12-24_17-30-59.362
18
SAP NetWeaver 7.31 – Process Integration Simple Use Cases for B2B NRO and Archive Module
Select the NRO Object and Click on Edit number range object. Check the flag Deleted and click on save
button. The selected Number Range Object gets deleted. You can hit the refresh button to validate
whether it is deleted or not.
If you wish to create a Background Job in NWA to perform the Assigned numbers clean up task, follow
the below steps.
Go to NWA (http ://<host>:<port>/nwa) and navigate to Operation -> Jobs -> Java Scheduler -> Job
Definitions -> filter for „AssignedNumbersCleanup‟. The Job ‘AssignedNumbersCleanup’ should be
present in the table:
Go to the Tasks tab. If the task ‘AssignedNumbersCleanup’ is not configured execute the following
configuration steps:
Press New/Add to create new Task
Select the ‘AssignedNumbersCleanup’ and press Next:
Leave the default settings and press Next:
Enter a value for the messageIdLifetime property, for example 1 hour:
Create a recurring schedule when the job to be executed (be sure to configure the first execution
of the job in several minutes so you can monitor the execution) and press the finish button:
19
SAP NetWeaver 7.31 – Process Integration Simple Use Cases for B2B NRO and Archive Module
20
www.sap.com
Crossgate, m@gic EDDY, B2B 360°, and B2B 360° Services are
registered trademarks of Crossgate AG in Germany and other
countries. Crossgate is an SAP company.
All other product and service names mentioned are the trademarks of
their respective companies. Data contained in this document serves
informational purposes only. National product specifications may vary.