Академический Документы
Профессиональный Документы
Культура Документы
by
Janice Totleben
Abstract
Starting in the 1980s companies began to use RFID in their supply chain systems. This
practice has grown to the point where large companies like Wal-Mart and government
agencies like the Department of Defense have mandated the use of RFID. These mandates
have forced suppliers to use RFID technology and now the goal must be to uncover the
operational benefits of RFID. Organizations today are adopting Enterprise Resource
Planning (ERP) Systems that integrate business processes across department boundaries. It
is a necessity that RFID technology and ERP systems work together to gain the greatest
advantages. This project implements RFID technology into SAP which is the market leader
in ERP systems. Data from RFID tags will be used to input data into the supply chain faster
and with greater accuracy.
There have been inefficiencies in the supply chain which include stock-outs, pilferage, and
inventory obsolescence. With RFID and reengineered business processes the supply chain
problems should be greatly reduced because more accurate data will be available to managers
to make intelligent decisions. The mandates from Wal-Mart and Department of Defense
make tracking of cases and pallets a necessity. Further down the RFID horizon, there is a
vision of item level tracking where an item can be traced from the manufactured level to the
customer level and every stage in between.
The goal of this project is to implement a proof of concept of Integrating Radio Frequency
Identification and Enterprise Resource Planning. The ERP system is SAP which is the
market leader and the supply chain process is the Goods Receipt. Once this is implemented
the same concept will be used to integrate other supply chain processes thereby improving
supply chain return on investment.
List of Symbols
ii
TABLE OF CONTENTS
1. INTRODUCTION ........................................................................................................................................1
1.1. SCOPE ..................................................................................................................................................1
1.2. BACKGROUND ......................................................................................................................................1
1.3. SUMMARY .......................................................................................................................................... 13
2. REQUIREMENTS ANALYSIS ................................................................................................................. 14
2.1. SYSTEM OVERVIEW ........................................................................................................................... 14
2.2. APPLICATION CONSTRAINTS AND DEPENDENCIES.............................................................................. 24
2.3. SPECIFIC REQUIREMENTS ................................................................................................................... 24
2.4. INTERFACES ....................................................................................................................................... 25
2.5. SUMMARY .......................................................................................................................................... 25
3. DESIGN PROCEDURE ............................................................................................................................. 26
3.1. TOP LEVEL DESIGN ............................................................................................................................ 26
3.2. PRODUCT FLOW ................................................................................................................................. 27
3.3. INTERFACE ......................................................................................................................................... 28
3.4. DESCRIPTION...................................................................................................................................... 29
3.5. INITIALIZATION .................................................................................................................................. 29
3.6. INTERFACE DESIGN ............................................................................................................................ 29
3.7. FUNCTIONAL DESIGN ......................................................................................................................... 30
3.8. SUMMARY .......................................................................................................................................... 31
4. FUNCTIONAL TESTING ......................................................................................................................... 32
4.1. FUNCTIONALITY TEST ........................................................................................................................ 34
4.2. SUMMARY .......................................................................................................................................... 36
5. SYSTEM INTEGRATION AND VALIDATION ..................................................................................... 37
7. REFERENCES ........................................................................................................................................... 39
8. APPENDIX ................................................................................................................................................. 40
iii
LIST OF FIGURES
iv
LIST OF TABLES
Table 1 Tag Types…………………..……………………………………3
Table 8 Requirements………………………………………………….24
v
1. INTRODUCTION
The most basic function of the Radio Frequency Identification (RFID) reader is to read tags.
The data from the tags must be integrated into the Enterprise Resource Planning (ERP)
systems that are running the businesses of today in order for this technology to be viable.
RFID technology must be integrated into the existing business processes for companies to
take advantage of its full potential. Through increased accuracy and the ability to gather
information at new points in the supply chain, RFID has the potential to reduce costs in
companies.
1.1. Scope
The scope of the project is to redesign the current business process for receiving. Data read
from the RFID tags will automatically generate a goods receipt transaction in SAP when
RFID tag data is read at the receiving dock. The project is a prototype only and will not
actually implement a field test. The project is being used in demonstrations to local industry
by the RFID Center of Excellence at Penn State Erie.
1.2. Background
1
Figure 1 RFID System Components [2]
A reader interrogates tags for their ID information. A reader typically contains a transmitter,
a receiver, and a microprocessor. The reader also contains an antenna. The antenna
broadcasts the RF signals generated inside the reader’s transmitter into the immediate
environment. The antenna also receives responses from tags within range.
An RFID tag is composed of an RFID chip (also called an Application Specific Integrated
Circuit or ASIC), an antenna, and a power source. The RFID chip consists of modulation
circuitry, control circuitry, memory, and a processor.
Antenna: The antenna receives a signal from the reader and radiates a response back
to the reader. Whether the tag uses an induction coil or antenna is a function of the
frequency at which the tag is designed to operate.
o Low frequency (125 KHz) and high frequency (13.56 MHz) tags normally use
induction coils.
o Ultra high frequency (856-928MHz) and microwave frequency (2.56 GHz and
above and 5.8 GHz) tags have antennas.
Modulation circuitry: Modulation circuitry changes the signal received from the
reader to include data that will be transmitted back to the reader.
Control circuitry: The internal functions under the command of the processor are
controlled by control circuitry.
Processor: The processor interprets the signal received from the reader and controls
memory storage and retrieval.
Memory: The memory element serves as writable and non-writable data storage. [3,
pp. 10-11]
An RFID tag can be powered either by the RF signal from the reader or can have its own
internal power source (battery). The way the tag gets its power generally determines the
category of the tag. The following table gives a summary of the different tag types.
2
Tag Type Distance from Source Usage
Passive Up to 10 ft. (3.3 m) High volume, low cost, smaller distances
tracking. Used in retail, pharmaceutical.
Semi-passive Up to 30 ft. (10 m) Utilizes power source to power on board
sensors and larger memory. Used in retail
tracking.
Active Up to several miles Higher cost and capabilities. Can carry
depending on the design sensors and large memory. Used for
tracking high value goods over long
distances and in difficult environments.
Used by Department of Defense (DoD),
aviation, automotive.
Table 1 Tag Types [3, pp. 11-14]
There are four primary frequency bands for RFID tags. These are summarized in the
following table.
Companies are being given mandates by their partners that they must use RFID technology
and the challenge is to use this new technology to improve productivity in the processes that
are already in place in existing companies. This means that this new RFID technology must
interface with either stand alone IT systems or commercial enterprise systems. A new area of
software is being developed to handle these new requirements.
"Many suppliers have found themselves in a position in which — in the short term — they
must implement RFID to comply with high-profile mandates," says Forrester Research Vice
President and Research Director Sharyn Leaver. "In order to gain long-term benefits, these
suppliers need to intelligently incorporate the data they are collecting to make improvements
to their overall business processes.‖[4]
RFID technology is in its infancy and went through an evolution of changing standards.
With the announced ratification of the royalty-free EPCglobal UHF (ultra-high-frequency)
Generation 2 candidate specification it appears that standards have been set. Companies are
now confident that solutions can be built on standard technology.
3
The Class 1 Generation 2 UHF Air Interface Protocol Standard Referred to as ―Gen 2" EPC
standard is an EPCglobal air interface standard for passive UHF (Frequency range between
865 to 960 UHF) that defines the physical and logical requirements for a passive-backscatter,
Interrogator-talks-first (ITF), radio-frequency identification (RFID) system. Gen 2
EPCglobal air interface standards were ratified in December 2004 as an approved ISO 18006
part C standard. [5]
EPCglobal is a non-profit organization set up by the Uniform Code Council and EAN
International and is made up of chapters in different countries and regions. EPCglobal is
leading the development of industry-driven standards for EPC to support the use of RFID.
EPC Global has issued an EPCglobal Tag Data Standards. The general structure of EPC Tag
Encodings on a tag is a string of bits (i.e. a binary representation) consisting of a fixed length
(8-bits) header followed by a series of numeric fields whose overall length, structure, and
functions are completely determined by the header value.
4
0000 1111 0F Gen 1
5
The EPCglobal Tag Data Standards defines one general identity type. The General Identifier
(GID-96) is independent of any known, existing specifications of identity types. The General
Identifier is defined for a 96-bit EPC. The General Identifier (GID-96) is composed of three
fields:
The General Manager Number – identifies an organizational entity that is responsible
for maintaining the numbers in subsequent fields – Object Class and Serial Number.
The General Manager Number is 28 bits.
The Object Class – is used by an EPC managing entity to identify a class or ―type‖ of
things. The Object Class is 24 bits.
The Serial Number Code – is unique within each object class. The Serial Number
Code is 36 bits.
The EPCglobal Tag Data Standards defines five EPC identity types:
Serialized Global Trade Item Number (SGTIN)
o Header, which is 8 bits and is common for all SGTIN-96 tags.
o Filter, which is 3 bits and specifies if the tagged object is an item, case or
pallet.
o Partition, which is 3 bits and indicates how the subsequent fields are divided
to get the correct data for each.
o Company Prefix, which is 20-40 bits (depending on the Partition) and contains
the company’s EAN.UCC Company Prefix.
o Item Reference, which is 24-4 bits (depending on the Partition) and contains
the item’s GTIN item reference number.
o Serial Number, which is 38 bits and contains the item’s unique serial number.
6
Serialized Global Location Number (SGLN)
o Header, which is 8 bits and is common for all SGLN-96 tags.
o Filter, which is 3 bits.
o Partition, which is 3 bits and indicates how the subsequent fields are divided
to get the correct data for each.
o Company Prefix, which is 20-40 bits (depending on the Partition) and contains
the company’s EAN.UCC Company Prefix.
o Location Reference, which is 21-1 bits (depending on the Partition) .
o Serial Number, which is 41 bits and is not used.
7
Global Returnable Asset Identifier (GRAI)
EPCglobal has defined and described the EPCglobal Architectural Framework. The
EPCglobal Architectural Framework is a collection of interrelated standards for hardware,
software, and data interfaces, together with core services that are operated by EPCglobal and
its delegates, all in service of a common goal of enhancing the supply chain through the use
of EPCs. The EPCglobal Architectural Framework is shown in the following diagram.
8
Figure 8 EPCglobal Architectural Framework [8]
SAP R/2 was a mainframe based business application software suite that was very successful
in the 1980s and early 1990s. It was particularly popular with large multinational European
companies who required soft-real-time business applications, with multi-currency and multi-
language capabilities built in. With the advent of distributed client-server computing SAP
AG brought out a client-server version of the software called SAP R/3 that was manageable
on multiple platforms and operating systems, such as Windows or UNIX since 1999, which
opened up SAP to a whole new customer base. SAP R/3 was officially launched on 6 July
1992. SAP came to dominate the large business applications market over the next 10 years.
[9]
9
The project uses a Microsoft .NET project so it needs to integrate SAP and .NET. In order
to accomplish this task the software will use a .NET integrator specifically SAP.NET. The
SAP client allows your .NET code to execute SAP functions that are remote-enabled (RFC).
In the SAP client solution, the SAP system is the server and the .NET application is the client
that interacts with the RFC. When you generate an SAP client application, a sapwsdl file is
added to your Visual Studio .NET project. This sapwsdl file will contain all the metadata
retrieved from the SAP system, when you later add functions to it. The sapwsdl file in
coordination with a custom tool in Visual Studio creates several C# classes needed to
communicate with the SAP system via either RFC or SOAP. There is one class for the proxy
itself, one for each export parameter and two for each Table parameter in your RFC. [10]
Microsoft.Net
Proxy SAP Technology
Class
Visual Studio.Net Generator
Interface
Repository
VB C# …
SAP.Net
Common Language Connector
Runtime
10
SAP Database
5 Repository
EDI-Enabled
Application
Application Document
Posting IDoc
Program
Inbound 3 1
Trigger
Program EDI VAN
Subsystem
2
5 The application document can be viewed. The application document created via EDI is the
same as any document created manually in the system
Figure 10 Process Flow and Data Flow in an Inbound EDI Process [11, pp. 29-30]
11
The data read from the RFID tags at a receiving dock will be used to automatically interface
with the SAP system. The system will need to create an inbound EDI process. This means
that an IDoc must be created that will be used in the EDI interface. Various configuration
settings must be set up for the IDoc to be processed correctly. The inbound processes uses
the following components to post an application document from an IDoc: IDoc type, port
definition, posting programs, service programs, and configuration tables. These settings will
be addressed in the project.
12
1.3. Summary
The goal of the project is to integrate RFID technology and ERP systems. The RFID product
used in this project is Alien Technology RFID Electronic Product Code (EPC) Class 1 Gen 2
tags and Alien Technology high-performance, flexible RFID readers-software upgradeable
to future protocols. The ERP system is SAP R/3 which is the market leader. The project
demonstrates that RFID tags can be read at a receiving dock and the successful read will
automatically complete the receiving business process in an ERP system. The success of this
project will demonstrate the integration of RFID technology and ERP. The project is a
prototype only.
13
2. REQUIREMENTS ANALYSIS
ASP.NET 2.0
Application
SAP.NET Connector
Penn State University is in the SAP University Alliance. The SAP University Alliances
program is a global endeavor to provide university faculty members with the tools and
resources necessary to teach students how technology can enable integrated business
processes and strategic thinking -- and gives students the skills to add immediate value to the
marketplace. The SAP system is being used as part of the Penn State/SAP University
alliance.
14
2.1.2 Hardware Overview
The project is being completed in the RFID Center of Excellence located at Penn State Erie
in Erie, Pennsylvania. The Center uses Alien Technology RFID Electronic Product Code
(EPC) Class 1 and Class 1 Gen 2 tags. The Center also uses Alien Technology high-
performance, flexible RFID readers-software upgradeable to future protocols. The Alien
RFID Reader can be programmatically controlled using a number of systems and languages.
Alien has developed a .NET API which is contained within AlienRFID.dll and provides type
structures and classes that constitute discrete functional groups for controlling various
aspects of the reader.
The system architecture for the Alien Reader is provided in the following figure.
Host RF Receiver A0
Digital
Communication Control
Circuitry Antenna A1
Interface Switch
A2
RF Source RF
Modulator
15
The specifications for key components of the Alien RFID Reader system are provided in the
tables below.
Name Alien Mlti-Port General Purpose RFID
Reader
Model Number ALR9780
Architecture Point-to-multipoint reader network
Frequency 902.6 MHz – 927.4 MHz
Hopping Channels 63
Channel Spacing 400 KHz
Channel Dwell Time < 0.4 Seconds
RF Transmitter < 30 dBm (abbreviation for the power ratio
in decibel(dB) of the measured power
referenced to one milliwatt (mW))
at the end of 15 ft LMR-195 cable
Modulation Method On Off Keying(OOK)
20 db Modulation Bandwidth < 400 KHz
RF Receiver 2 Channels
Power Consumption 25 Watts (120 VAC a 500 mW)
Communications Interface RS-232, Lan TCPI/IP
Inputs/Outputs 2 or 4 coax antenna 8 logic I/O, com port,
LAN, power
Dimensions (L) 19 cm (7.5 in) x (W) 28 cm (11 in) x (D)
5 cm(2 in)
Weight Approximately 1.8 kg(4lb)
16
3 dB Beamwidth E-plane: 40 degrees
Frequency 902-928 MHz
Gain(dBi) 6.0 dBi
Polarization Linear
RF Connector 15 ft LMR-195 with Reverse-Polarity TNC
VSWR 1.5:1
Dimensions (cm) 19.5x28x4 (in)7.75x11.25x1.65
Weight .57 kg 1.25 lb
17
2.1.3 Physical Overview
The IDoc being used is MBGMCR02 which is the Post Goods Movement. The
following table shows the documentation for the particular BAPI (Business
Application Programming Interface) used to execute the IDoc.
18
Post Goods Movement
Functionality
You can use this method to create a material document for a goods movement.
You can only create one material document each time you call up the method.
You can use a simulation function before posting the goods movement to check how the data
is updated in the database. The standard system is configured so that the goods movement is
posted immediately without simulating beforehand.
Ensure that you transfer the data in the same way as it is run in the database, for example,
Material number 18-figure with leading zeros
Batches with uppercase letters
Note that for all transactions/events listed below, the posting date is entered in the header
data of the material document. In the BAPI2017_GM_HEAD_01 interface, fill the
PSTNG_DATE (import structure GOODSMVT_HEADER) field.
Notes
Authorization check
In the MM Inventory Management component, the method does not execute any
authorization checks.
Note that during a posting of a goods movement, depending on the business transaction of
the system, authorization objects of other applications can also be checked.
Transfer
The following information about the material document that is to be created is transferred to
the method:
a structure with header data
a structure with the code for the movement
a table with the item data
a table with the serial numbers
The posting is carried out in the SAP R/3 via the MB_CREATE_GOODS_MOVEMENT
function module.
Confirmations
Messages are returned in the Return parameter. The parameter documentation shows the
return codes and their meanings.
Further Information
The method can only carry out your function if no error messages were generated in the
Return table. This is the case if the header data and all the items were processed successfully.
Transaction control is not implemented. The calling program therefore has to execute the
19
Commit Work itself after this method has been successfully called (in other words, if no
errors were reported in the Return parameter).
20
The following fields can be filled (incomplete listing):
Stock type
Item text
Unloading point
Delivery completed indicator
You cannot fill the following fields (incomplete listing):
Account assignment fields (account assignment is adopted from the purchase order)
Reservation
Receiving/issuing material
Receiving/issuing plant
Receiving/issuing storage location
In the case of a purchase order item with the "subcontracting" item category, only the GR
item in the interface is to be transferred. The system automatically determines GI items.
Purchase order unknown: Shipping notification known
The following fields have to be filled:
Delivery
Delivery item
Movement type
Other fields, such as those under "Purchase order known". The system determines the
relevant purchase order item via the delivery/delivery item.
Purchase order unknown: Purchase order should be created automatically
The following fields have to be filled:
Material number
Plant
Storage location
Vendor
Movement type
Movement indicator
Quantity in unit of entry
ISO code unit of measurement for unit of entry
The following fields may have to be filled in some cases (incomplete listing):
Shelf life expiration date (if it has been configured like this in the system)
Reason for movement (if it has been configured like this in the system)
Batch (if the material is handled in batches and batches are not assigned automatically)
The following fields can be filled (incomplete listing):
Stock type
Item text
Unloading point
21
You cannot fill the following fields (incomplete listing):
Account assignment fields (automatic creation of purchase order items with account
assignment is not supported)
Reservation
Receiving/issuing material
Receiving/issuing plant
Receiving/issuing storage location
Purchase order unknown: A purchase order should not be created
The following fields have to be filled:
Material number
Plant
Storage location
Vendor
Movement type
Movement indicator
Quantity in unit of entry
ISO code unit of measurement for unit of entry
The following fields may have to be filled in some cases (incomplete listing):
Shelf life expiration date (if it has been configured like this)
Reason for movement (if it has been configured like this)
Batch (if the material is handled in batches and automatic assignment of batch numbers is
not set)
The following fields can be filled (incomplete listing):
Special stock indicator
Item text
Unloading point
Goods recipient
The following fields cannot be filled (incomplete listing):
Account assignment fields (automatic creation of purchase order items with account
assignment is not supported)
Reservation
Receiving/issuing material
Receiving/issuing plant
Receiving/issuing storage location
Receiving/issuing batch
The input combinations listed above for the GM_CODE 01 can be combined within an input
table so that they can be posted in a material document. Items can also be posted for different
purchase orders, provided that all the purchase orders refer to the same vendor.
Transfer of subcontracting components
22
During the posting of the ordered material of a subcontract order with movement type 101,
for the transfer of the subcontracting components, the filled unique identification of the
document line (LINE_ID) is also required.
23
2.2. Application Constraints and Dependencies
The constraints and dependencies in the design of the Integration of RFID and SAP are
The AlienRFID.dll is the Reader software used
Microsoft SQL Server 2005 is the Database Management System used
SAP R/3 is the Enterprise Resource Planning System used
SAP.Net Integrator is a connector that plugs into Visual Studio that allows
.Net applications to access SAP R/3
The following section defines the requirements gathered for the Integration of RFID and
SAP.
RQMT# Requirement Priority Effort Risk
RFIDSAP001 The Alien Critical High High
hardware must
be configured to
read properly
RFIDSAP002 Login Correctly Critical Low Low
RFIDSAP003 Valid User Critical Low Low
RFIDSAP004 The 96-bit Critical High High
RFID tag will
be read using
Alien RFID
readers.
RFIDSAP005 Tag Value must Critical Low Low
be found on the
Advanced Ship
Notice Database
RFIDSAP006 Create the Critical High High
IDOC
MBGMCR02
RFIDSAP007 Configure SAP Critical High High
Partner Profile
RFIDSAP008 Configure SAP Critical High High
Port Profile
RFIDSAP009 Connect to SAP Critical High High
RFIDSAP010 Login to SAP Critical Low High
RFIDSAP011 Send the IDOC Critical Medium High
to SAP
RFIDSAP012 Validate that the Critical Medium High
IDOC was sent
to SAP correctly
Table 8 Requirements
24
The project is sequential in nature so each of the requirements needs to be completed before
the next step is executed. The Priority of each requirement is Critical because of the
sequential execution of the steps.
The Effort of each requirement is categorized as High, Medium, or Low. The High value
indicates that a great deal of time is required to successfully complete this requirement. A
time requirement of 2-4 weeks indicates a High Effort. A Low value indicates that the time
required to meet this requirement is minimal. The effort to complete these tasks is generally
less than a day. The Medium value indicates that the time involved to complete these tasks is
generally more than a day but less than 2 weeks.
The Risk factor is either High or Low. A high risk indicates that the requirement must be
completed successfully and that no error or alternate solution can be tolerated. A low risk
factor indicates that an alternate solution is available and can be used.
2.4. Interfaces
The project is implemented using a Visual Studio 2003 .Net application. The language used
is C#. The application interfaces with the AlienRFID.dll. The application accesses the
Microsoft SQL 2005 database to get Advanced Ship Notice information. The interface
between the Microsoft application and SAP is accomplished by the SAP Connector for .NET.
2.5. Summary
The driving goal for this project is to create a prototype for integrating RFID technology with
existing systems specifically for an SAP enterprise system. A modular approach was used in
addressing the various requirements in this project.
Read and be able to get the data from the RFID tags
Understand and implement the SAP technology for a goods receipt transaction
Understand and implement inbound SAP EDI/ALE technology
Connect to SAP from a Microsoft project application using SAP.NET
connector
Generate a Remote Function Call(RFC) for a goods receipt transaction in SAP
Each step in the approach required extensive research and trial and error in order to
accomplish the task.
25
3. DESIGN PROCEDURE
The following section discusses the design procedure used in the project. Data Flow
Diagrams and Process Diagrams are used. The design of the project integrates a variety
of technologies.
Mat erialOrdered
RFI DTag
Mat erialToShip
2
RFI DTagForMaterial
SupplierMakesMateria
POSentToSupplier
Adv ancedShjpping
Not ice
CreatePO
1
ASNRecordReceived
ComapnyOrdersMaterial
3
Company
Receives
Mat erial
POOnSAP +
IDocCreat e
IDoc
SAP
26
3.2. Product Flow
1.
Purchasing Purchase Order
PO: 4500015241
Company A RFID TAG Item:00001
A Material:DPC1020
OrderQuantity:100
2.
Supplier B
3.
Material
DPC1020
Advanced Ship
Notice RFID TAG
TagValue: 3008
TagValue: 3008
33B2 DDD9 0140 33B2 DDD9
2805 0000 0140 2805 0000
PO: 4500015241
Item:00001
Material:DPC1020
Receiving 4.
Company A
SAP
PO: 4500015241
Item:00001
5. Material:DPC1020
OrderQuantity:100
IDOC ReceivedToDate:0000000001
MBGMCR
Receipt to Stock
27
1. Company A Sends Purchase Order to Supplier B
PO: 4500015241 Item: 00001 Material:DPC1020 Order Quantity: 100
2. Supplier B Produces Material and Ships the Material to Company A. Supplier B
slaps an RFID tag on Material; Tag No: 3008 33B2 DDD9 0140 2805 0000; Supplier B
Ships the Material to Company A.
3. Supplier B creates an Advanced Ship Notice record which indicates that Tag No:
3008 33B2 DDD9 0140 2805 0000 is for PO: 4500015241
4. Company A receives the Material along with the Advanced Ship Notice record
5. Company A reads the RFID tag and a program runs which uses this tag data to send
a Remote Function Call to SAP to generate the SAP Goods Receipt Transaction in
SAP. As a result the SAP system now reflects
PO: 4500015241 Item: 00001 Material:DPC1020 Order Quantity: 100 Received to Date:00001
3.3. Interface
There is no user interface required in the project. Alien RFID Reader API will be used to
expose the objects needed to interact with the Readers. The SAP.NET connector will
create the proxy classes to enable communication between the application and SAP. The
SAP R/3 ALE, EDI & IDoc technology will be used to communicate with the SAP
business processes.
28
3.4. Description
3.5. Initialization
This section defines the initialization phase of the project. Pre requisites etc…
29
3.7. Functional Design
30
3.8. Summary
The design process includes extensive research. Each piece of the process required a
working knowledge of a different technology.
The RFID read tag process required a working knowledge of the Alien.dll API. The methods
for connecting to the Alien Reader and grabbing the data from the tag need to be understood.
A clear understanding of SAP business transactions is needed and a special knowledge of a
Goods Receipt transaction in SAP. In addition, the ALE, EDI, and IDoc technologies for
SAP were essential in completing this project. The book ALE, EDI & IDoc Technologies for
SAP, 2nd Edition by Arvind Nagpal and John Pitlak served as an invaluable tool in my
understanding of this technology. Countless hours of trial and error were experienced trying
to get the SAP R/3 system set up to accept a Goods Receipt transaction from an RFC call.
Finally, there needs to be a communication between the .NET application and the SAP
system. The SAP.NET connector served this purpose and considerable amount of time was
spent understanding how to use this software.
31
4. FUNCTIONAL TESTING
The following table describes the SAP transactions that are needed to perform Functional
Testing. These transactions are essential in the EDI interface. These transactions are used
to set up various configurations needed in the interface and also allows for testing the
setup.
SAP
Used to Setup Transaction
IDoc No. Description
Every IDoc created in the sytem is assined a
Number Ranges 16-digit number that uniquely identifies it in the
for Idocs OYSN sytem.
SE38 or
from the
menus of
the initial
partner
Testing the Partner profile The output is a color-coded report that shows
Profile screen the details of any problems that were found.
32
Select your port definition, and then click the
Outbound File button to view the directory
location where IDoc files will be stored. Click
the Check button on this screen to test
Testing the Port accessibility to the directory. If the check is
Definition WE21 successful, the port definition is correct.
Verifying the
creation of Will show the control records, data records and
Successful IDocs WE05 status records.
Status Code 53-Application document
posted. SUCCESS
33
4.1. Functionality Test
34
Result should be Successful
a syntactically
IDoc Creation correct IDoc
Valid fields in IDoc
MBGMCR02
WE05
35
4.2. Summary
The testing is done in a modular fashion. The following table shows the modules that are
tested and the results. Each module is thoroughly tested and functional before the next
module is attempted.
Module Result
Read and be able to get the data from the RFID tag Passed
Run a Goods Receipt Transaction in SAP Passed
Set up a Partner in SAP Passed
Set up a Port in SAP Passed
Create the MBGMCR IDOC in SAP Passed
Connect to SAP from Microsoft project using Passed
SAP.NET connector
Generate a Remote Function Call Passed
Receipt to Stock Transaction run in SAP Passed
The results indicate that there is a successful completion to the project. The Receipt to Stock
Transaction is run in SAP as a result of a receiving dock read of an RFID tag on an incoming
shipment.
36
5. SYSTEM INTEGRATION AND VALIDATION
37
6. CONCLUSIONS AND RECOMMENDATIONS
The successful implementation of this project allows for tighter integration of RFID
technology into business processes in SAP. The technology developed in this project
has already been used to develop the automatic Purchase Order transaction in SAP.
The RFID Center for Excellence located at Penn State Erie in Erie, Pennsylvania is
pioneering RFID technology in the area. The software developed in this project is
being integrated into the industry demonstrations that are taking place at the Center
showcasing RFID technology and ERP integration. The Center is using the technology
developed in this project to extend RFID into more SAP Business Processes. Currently,
there is a project in the RFID Center to use this technology to integrate RFID into a
Goods Movement Business Process in SAP.
38
7. REFERENCES
39
8. APPENDIX
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using SAP.Connector;
using SAP.Connector.Rfc;
using SAPConnectorProxy2;
using nsAlienRFID;
using System.IO;
namespace Kanban
{
public partial class frmKanban : Form
{
public frmKanban()
{
InitializeComponent();
}
#region Variables
//Delegates for cross-threading
private delegate void displayMessageDlgt(string msg);
private delegate void addNewReaderDlgt(string address);
//create sap proxy
protected SAP.Connector.Destination destination1;
//Declare Reader
public nsAlienRFID.clsReader mReader2 = new
nsAlienRFID.clsReader();
public nsAlienRFID.clsReader mReader = new
nsAlienRFID.clsReader();
//Declare Server
public CAlienServer mServer = null;
//values to use in idoc from Advance Ship Notice database that are
used to receive
static string g_idocPO;
static string g_idocContract;
static string g_idocMaterial;
static string g_idocQty;
//Values that are parsed from the tag value and entered into PO
idoc.
string gMaterial;
string gContract;
string gQty;
string gPO;
#endregion
40
RFID_PO();
}
mReader2.ClearTagList();
mReader2.ClearCommBuffer();
mReader2.AutoMode = "OFF";
mReader2.Disconnect();
}
if (mReader.IsConnected)
{
mReader.ClearTagList();
mReader.ClearCommBuffer();
mReader.AutoMode = "OFF";
mReader.Disconnect();
}
//Stop server from listening
mServer.StopListening();
//************************************************************************
**************
// This function connects to the Kanban Reader and configures
it for Listening for Tags.
//************************************************************************
**************
try
{
//Declare IP addresses for both Readers
string IPAddress = cboKanbanIP.SelectedItem.ToString();
41
lblMessage.Text = "Kanban Reader Connected!";
}
else
{
mReader2.Disconnect();
lblMessage.Text = "Kanban Reader Not Connected!";
}
//************************************************************************
******
//************************************************************************
******
//Configure the Kanban reader for listening mode and
proper settings for demo.
#region Settings
if (mReader2.AutoMode == "ON")
{
mReader2.AutoMode = "OFF";
}
mReader2.ClearTagList();
mReader2.NotifyMode = "OFF";
mReader2.AcquireMode = "Inventory";
//Persist Time of -1 doesn't seem to work with the
9780 readers, so set to 86400 (roughly 24 hours)
mReader2.PersistTime = "86400";
//Grabbing IP address of the server computer (the
computer the App is running on)
string nAddress = (mServer.IPAddressString).Trim() +
":" + Convert.ToString(mServer.Port).Trim();
mReader2.NotifyAddress = nAddress;
mReader2.NotifyTime = "0";
//Tagtype 16 is gen2 and 7 is gen1
mReader2.TagType = 16;
mReader2.SendReceive("RFAttenuation = 60", false);
mReader2.TagListAntennaCombine = "ON";
//mReader2.TagListFormat = "XML";
mReader2.NotifyFormat = "Text";
mReader2.AntennaSequence = "0,1";
//Only Send a notification to the server when a new
tag is added to the field.
mReader2.NotifyTrigger = "Add";
//mReader2.TagListFormat
mReader2.NotifyMode = "ON";
mReader2.AutoMode = "ON";
mReader2.SendReceive("", false);
#endregion
//************************************************************************
******
//************************************************************************
******
42
//Start listening for tags in the read field
mServer.StartListening();
}
catch (Exception ex)
{
lblMessage.Text = ex.ToString();
mReader2.Disconnect();
}
}
//************************************************************************
*****************
// This function connects to the Receiving Reader and
configures it for Listening for Tags.
//************************************************************************
*****************
try
{
//Declare IP addresses for both Readers
string IPAddress = cboRcptIP.SelectedItem.ToString();
//************************************************************************
******
//************************************************************************
******
//Configure the Receiving reader for listening mode and
proper settings for demo.
#region Settings
43
if (mReader.AutoMode == "ON")
{
mReader.AutoMode = "OFF";
}
mReader.ClearTagList();
mReader.NotifyMode = "OFF";
mReader.AcquireMode = "Inventory";
mReader.PersistTime = "86400";
//Grabbing IP address of the server computer (the computer
the App is running on)
string nAddress = (mServer.IPAddressString).Trim() + ":" +
Convert.ToString(mServer.Port).Trim();
mReader.NotifyAddress = nAddress;
mReader.NotifyTime = "0";
mReader.TagType = 7;
mReader.SendReceive("RFAttenuation = 30", false);
mReader.TagListAntennaCombine = "ON";
//mReader2.TagListFormat = "XML";
mReader.NotifyFormat = "Text";
mReader.AntennaSequence = "0,1";
mReader.NotifyTrigger = "Add";
//mReader2.TagListFormat
mReader.NotifyMode = "ON";
mReader.AutoMode = "ON";
#endregion
//************************************************************************
******
//************************************************************************
******
mReader.Disconnect();
}
}
//************************************************************************
*****************
// Function finds the PO and item from the tag value passed
from Notification and assigns
// data to global variables.
44
//************************************************************************
*****************
try
{
objConnection.Open();
objDataReader = objCommand.ExecuteReader();
objDataReader.Read();
//Close Connections
objDataReader.Close();
objConnection.Close();
}
45
{
//************************************************************************
*********************
//When a Notification message is received, parse the
information and check the name of the
//reader. Determines what function to call depending on the
reader that is sending the message.
//************************************************************************
*********************
NotifyInfo ni;
AlienUtils.ParseNotification(msg, out ni);
if (ni.ReaderName == "Alien9780A")
{
displayText(msg);
}
if (ni.ReaderName == "Alien9800B")
{
displayText2(msg);
}
}
//************************************************************************
*********************
//When a Notification message is received, parse the
information and check the name of the
//reader. Determines what function to call depending on the
reader that is sending the message.
//************************************************************************
*********************
NotifyInfo ni;
AlienUtils.ParseNotification(msg, out ni);
if (ni.ReaderName == "Alien9780A")
{
displayText(msg);
}
if (ni.ReaderName == "Alien9800B")
{
displayText2(msg);
}
}
46
//************************************************************************
***********************
//When a Notification message is received from Alien9780A,
this function parses the notification,
//grabs the tagID and runs the appropriate functions to
generate a PO.
//************************************************************************
***********************
try
{
if (this.InvokeRequired)
{
object[] temp = { data };
this.Invoke(new displayMessageDlgt(displayText),
temp);
return;
}
else
{
NotifyInfo ni = null;
AlienUtils.ParseTextNotification(data, out ni);
if (ni.TagList != null)
{
string sTags = "";
//Place all TagIds into an Array
Array tInfo = (ni.TagList);
//Loop through each item in the array and grab the
TagID
foreach (TagInfo x in tInfo)
{
sTags += x.TagID + "\r\n";
}
else
return;
}
}
47
catch (Exception ex)
{
lblMessage.Text = ex.ToString();
}
}
//************************************************************************
***********************
//When a Notification message is received from Alien9800B,
this function parses the notification,
//grabs the tagID and runs the appropriate functions to
generate receive against a PO.
//************************************************************************
***********************
try
{
if (this.InvokeRequired)
{
object[] temp = { data };
this.Invoke(new displayMessageDlgt(displayText2),
temp);
return;
}
else
{
NotifyInfo ni = null;
AlienUtils.ParseTextNotification(data, out ni);
if (ni.TagList != null)
{
string sTags = "";
//Place all TagIds into an Array
Array tInfo = (ni.TagList);
//Loop through each item in the array and grab the
TagID
foreach (TagInfo x in tInfo)
{
sTags += x.TagID + "\r\n";
48
}
}
catch (Exception ex)
{
lblMessage.Text = ex.ToString();
}
}
Run_Query(strSQL);
}
try
{
objConnection.Open();
objDataReader = objCommand.ExecuteReader();
objDataReader.Close();
objConnection.Close();
}
catch (Exception exx)
{
objConnection.Close();
lblMessage.Text = exx.ToString();
}
}
public void Get_PO()
{
}
public void Grab_PO()
{
//************************************************************************
**************************
//Use streamreader to open a textfile, read the PO, add 1 to
the end of the PO, and rewrites the PO.
49
//************************************************************************
**************************
string OutFile;
Int64 PO_Num;
InFile.Trim();
//Assigns the new PO to a global variable
gPO = InFile;
//Converts to Integer to add 1
PO_Num = Convert.ToInt64(InFile);
PO_Num = PO_Num + 1;
//Sends new number back to text file
OutFile = Convert.ToString(PO_Num);
StreamWriter sw = File.CreateText(FILENAME);
sw.Write(OutFile);
sw.Close();
//************************************************************************
**************************
//Reads in Hex Tag ID and parses the information into
Material, Contract, and Qty information.
//************************************************************************
**************************
string temp;
string material1;
string material2;
char material3;
string material4 = "";
int i = 0;
for (i = 0; i < 6; i = i + 2)
{
material2 = material1.Substring(i, 2);
material3 = (char)int.Parse(material2,
System.Globalization.NumberStyles.HexNumber);
material4 += material3;
}
//Grabing particular section of Hex string and converting it
to readable data
50
if (int.Parse(temp.Substring(15, 4),
System.Globalization.NumberStyles.HexNumber) > 1000)
{
material4 += Convert.ToString(int.Parse(temp.Substring(15,
4), System.Globalization.NumberStyles.HexNumber));
}
else
{
material4 += "0" +
Convert.ToString(int.Parse(temp.Substring(15, 4),
System.Globalization.NumberStyles.HexNumber));
}
string InFile;
string OutFile;
//Read entire TextFile into a string
InFile = objStreamReader.ReadToEnd();
//Find and replace dummy values in string with actual
InFile = InFile.Replace("PO12345678", g_idocPO);
InFile = InFile.Replace("MAT9999", g_idocMaterial);
InFile = InFile.Replace("QTY999999999999", g_idocQty);
OutFile = InFile;
51
objStreamWriter.Write(OutFile);
//Close reader and writer
objStreamReader.Close();
objStreamWriter.Close();
try
{
//Create a connection into SAP
SAP.Connector.SAPConnection connection = new
SAP.Connector.SAPConnection((IDestination)destination);
proxy.Connection = connection;
}
catch (Exception ex)
{
lblMessage.Text = ex.ToString();
}
//Declare iDoc sender
SAPIDocSender sapiDocSender1 = new SAPIDocSender();
try
{
//Send iDoc to SAP via RFC
sapiDocSender1.Connection = proxy.Connection;
sapiDocSender1.SubmitIDoc((("mbgmcrott.txt")), myTid);
proxy.ConfirmTID(myTid);
lblMessage.Text = "Idoc Sent";
}
catch (Exception ex)
{
lblMessage.Text = ex.ToString();
}
//Close Proxy
proxy.Connection.Close();
proxy.Connection = null;
52
string FILENAMEOT = "po_idoc2.txt";
string InFile;
string OutFile;
//Set date to current date plus two weeks
string currentDate =
DateTime.Now.AddDays(14).ToString("MM/dd/yyyy");
//Logon to SAP
SAPProxy2 proxy = new SAPProxy2();
SAP.Connector.Destination destination = new
SAP.Connector.Destination();
destination.AppServerHost = "sap1.win.psu.edu";
destination.Client = 406;
destination.Password = "rfid";
destination.SystemNumber = 0;
destination.Username = "ecr124";
destination.Language = "en";
53
}
catch (Exception ex)
{
lblMessage.Text = ex.ToString();
}
proxy.Connection.Close();
proxy.Connection = null;
}
}
}
54