• No results found

Configuring the Inbound File Adapter for a Sequential Source File

In document Bit400 en Col34 Fv Part a4 (Page 175-180)

Configurations for a Sequential Source File

Exercise 10: Configuring the Inbound File Adapter for a Sequential Source File

Exercise Objectives

After completing this exercise, you will be able to:

• Configure a scenario that reads a sequential file from a directory and transfers it to the Integration Server pipeline as an XI-XML message

Business Example

An external system delivers flight master data as a sequential file. You want to import this data to a system by using SAP Exchange Infrastructure.

Task 1:

Create all objects that are required for an outbound interface for the software component SC_BIT400_TravelSoft in the Integration Repository. The interface structure should correspond to the following sequential file:

File Structure for the External Application

Field Name Meaning Type Length; Detail

AirlineID ID of airline Char 3

Connec-tionID

ID of flight connection Char 4

FlightDate Date of flight Char 8; YYYYMMDD FlightPrice Price of the flight in

the currency from the Currency field

Char 12; Decimal symbol= ’.’

Currency Currency ISO code Char 3

Transfer an XML document with the following structure to the Integration Server pipeline:

<?xml version="1.0" encoding="UTF-8" ?> - <resultset> - <row> <field0>LH</field0>

<field1>0400</field1> <field2>20020525</field2> <field3>666.0000</field3>

<field4>EUR</field4> </row> </resultset>

1. Log on to the Integration Repository. Navigate to the software component SC_BIT400_TravelSoft. The namespace BIT400_##

has been created for this exercise. Check which objects you can use for the inbound interface and, if necessary, create the missing objects.

Continued on next page

26-02-2004 © 2004 SAP AG. All rights reserved.

167

2. Is there a data type that has the same fields as the file? Do the field lengths match the specifications for the sequential file?

3. Is there a message type whose name matches the corresponding XML tag of the XML file? Does this message type reference the data type appropriate for the file?

4. Is there an outbound interface that references this message type?

If necessary, create a message interface O_msgIF_BIT400_## that references the data type in 3.

5. Create any missing objects and activate all the objects you have created.

Task 2:

Use either the sequential file containing flight master data that you created on your computer in the outbound file adapter exercise, or a sequential file provided by the instructor. Transfer this file to the Integration Server pipeline by using your inbound file adapter. Check the structure of the XI message. As an extra exercise you can set up a scenario that processes this XML message further and transfers it to a receiver business system by using an outbound adapter.

BIT400 Lesson: Inbound File Adapter

Solution 10: Configuring the Inbound File Adapter for a Sequential Source File

Task 1:

Create all objects that are required for an outbound interface for the software component SC_BIT400_TravelSoft in the Integration Repository. The interface structure should correspond to the following sequential file:

File Structure for the External Application

Field Name Meaning Type Length; Detail

AirlineID ID of airline Char 3

Connec-tionID

ID of flight connection Char 4

FlightDate Date of flight Char 8; YYYYMMDD FlightPrice Price of the flight in

the currency from the Currency field

Char 12; Decimal symbol= ’.’

Currency Currency ISO code Char 3

Transfer an XML document with the following structure to the Integration Server pipeline:

<?xml version="1.0" encoding="UTF-8" ?> - <resultset> - <row> <field0>LH</field0>

<field1>0400</field1> <field2>20020525</field2> <field3>666.0000</field3>

<field4>EUR</field4> </row> </resultset>

1. Log on to the Integration Repository. Navigate to the software component SC_BIT400_TravelSoft. The namespace BIT400_##

has been created for this exercise. Check which objects you can use for the inbound interface and, if necessary, create the missing objects.

a) Use the following questions:

2. Is there a data type that has the same fields as the file? Do the field lengths match the specifications for the sequential file?

Answer: The data type DT_BIT400_## should contain the same fields as the file, but with different field names. If this is not the case, then look at the XML file that you generated in the exercise for the outbound file adapter. The data type field names should be identical to the names in your file. Copy the data type to DT_BIT400_##_flatand change the field names.

Continued on next page

26-02-2004 © 2004 SAP AG. All rights reserved.

169

3. Is there a message type whose name matches the corresponding XML tag of the XML file? Does this message type reference the data type appropriate for the file?

Answer: There should be a message type msgT_BIT400_##

that references the data type DT_BIT400_##. Create a message type msgT_BIT400_##_flat that references the data type DT_BIT400_##_flat.

4. Is there an outbound interface that references this message type?

If necessary, create a message interface O_msgIF_BIT400_## that references the data type in 3.

Answer: There should not be any outbound asynchronous message interfaces in your namespace.

5. Create any missing objects and activate all the objects you have created.

a) Create a message interface with ’outbound’ and asynchronous’

attributes. From the input help, select the message type msgT_BIT400_##_flatin the namespace BIT400_##.

b) Navigate to the Change Lists tab page and activate your objects by calling the context menu and choosing Activate.

Task 2:

Use either the sequential file containing flight master data that you created on your computer in the outbound file adapter exercise, or a sequential file provided by the instructor. Transfer this file to the Integration Server pipeline by using your inbound file adapter. Check the structure of the XI message. As an extra exercise you can set up a scenario that processes this XML message further and transfers it to a receiver business system by using an outbound adapter.

BIT400 Lesson: Inbound File Adapter

Lesson Summary

You should now be able to:

• Configure an inbound file adapter and describe the runtime procedure

• Configure a scenario that reads an XML file from a directory and transfers it to the Integration Server pipeline as an XI-XML message

• Configure a scenario that reads a sequential file from a directory and transfers it to the Integration Server pipeline as an XI-XML message

26-02-2004 © 2004 SAP AG. All rights reserved.

171

In document Bit400 en Col34 Fv Part a4 (Page 175-180)