• No se han encontrado resultados

Capítulo 4. Resultados de la investigación

4.1. Resultados del análisis de los documentos

4.1.3. Análisis de las tablas de digitaciones

Exercise Objectives

After completing this exercise, you will be able to:

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

Business Example

Your local PC has a local application with the software component SC_BIT_TravelSoft. This software component has an outbound interface for flight master data and gets the data as an XML file. The application has been assigned the name BS_BIT_TravelAgency_## as a business system.

You want to use SAP Exchange Infrastructure to transfer the flight master data to another system by using the inbound file adapter.

Task 1:

Create all objects that are required for an outbound interface for the software component SC_BIT_TravelSoft in the Integration Repository.

The interface structure should correspond to the following XML file:

(Replace # with your group number).

<?xml version="1.0" encoding="UTF-8" ?>

1. Log on to the Integration Repository. Navigate to the software component SC_BIT_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.

159

2. Is there a data type that has the same field name as the 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:

Create an inbound file adapter in your local Adapter Engine that transfers an XML file containing flight master data to the Integration Server pipeline.

1. Create an inbound file adapter Training##_xmlFile_inbound in your Adapter Engine. Use the file_inbound template. Navigate to the Edit mode in the configuration.

2. Check the Java class name.

3. Configure the access data for the Integration Server pipeline:

Continued on next page

BIT400 Lesson: Inbound File Adapter

4. Which URL takes you to the Integration Server? Which configuration parameter do you have to assign this information to?

5. Which client do you have to log on to? Enter xiappluser as the user and xipass as the password and select the logon language. Which configuration parameters do you have to assign this information to?

6. What is the sender business system called? What is the outbound interface called in the Integration Repository? Which namespace does it belong to? Which configuration parameters do you have to assign this information to?

7. Create a XMLFiles subdirectory and an Archive subdirectory. You want the file adapter to look in the XMLFiles subdirectory every 60 seconds to check whether it contains any new files and transfer these files to XI. You want files that have been processed successfully to be written to the Archive directory. Which configuration parameters are responsible for this setting? Refer to the documentation.

8. You do not have to configure any file structure data since the file is in XML format.

Task 3:

Configure a scenario and test your inbound file adapter. If necessary, create a message mapping in the Integration Repository.

1. Start the file adapter and check the log.

2. If the log does not return any errors, copy a valid XML file to the source directory. Check the log again.

Continued on next page

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

161

3. Check the inbound message in the monitor in the Integration Server.

4. Optional: Configure a scenario to send your message to a business system and an outbound interface. Define a message mapping in the Integration Repository, if necessary.

BIT400 Lesson: Inbound File Adapter

Solution 9: Configuring the Inbound File Adapter for an XML Source File

Task 1:

Create all objects that are required for an outbound interface for the software component SC_BIT_TravelSoft in the Integration Repository.

The interface structure should correspond to the following XML file:

(Replace # with your group number).

<?xml version="1.0" encoding="UTF-8" ?>

1. Log on to the Integration Repository. Navigate to the software component SC_BIT_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 field name as the file?

Answer: The data type DT_BIT400_## should contain the same field names as the file. 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.

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_##.

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.

Continued on next page

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

163

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_##in 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:

Create an inbound file adapter in your local Adapter Engine that transfers an XML file containing flight master data to the Integration Server pipeline.

1. Create an inbound file adapter Training##_xmlFile_inbound in your Adapter Engine. Use the file_inbound template. Navigate to the Edit mode in the configuration.

a) Reactivate the template file_inbound for the inbound file adapter.

b) Create a new file adapter by choosing Add New Adapter.

Enter file_inbound as the template and select Training##_xmlFile_inboundas the name.

c) Deactivate the template.

2. Check the Java class name.

a)

classname = com.sap.aii.messging.adapter. ModuleFile2XMB

3. Configure the access data for the Integration Server pipeline:

a)

BIT400 Lesson: Inbound File Adapter

4. Which URL takes you to the Integration Server? Which configuration parameter do you have to assign this information to?

Answer: To find out the target URL, call transaction SXMB_ADM in the Integration Server and choose ConfigurationConfiguration Data (Integration Engine). Choose the Check icon. Assign the URL that you find in the System Landscape to the parameter XMB.TargetURL.

5. Which client do you have to log on to? Enter xiappluser as the user and xipass as the password and select the logon language. Which configuration parameters do you have to assign this information to?

Answer: Assign this information to the configuration parameters XMB.User=xiappluser XMBPassword XMB.Client and XMB.Language.

6. What is the sender business system called? What is the outbound interface called in the Integration Repository? Which namespace does it belong to? Which configuration parameters do you have to assign this information to?

Answer: The sender business system is called BS_BIT_TravelA-gency_##. The outbound interface is called O_msgIF_BIT400_## and belongs to the namespace BIT400_##.

7. Create a XMLFiles subdirectory and an Archive subdirectory. You want the file adapter to look in the XMLFiles subdirectory every 60 seconds to check whether it contains any new files and transfer these files to XI. You want files that have been processed successfully to be written to the Archive directory. Which configuration parameters are responsible for this setting? Refer to the documentation.

a) file.sourceDir=<path>/xmlFiles file.sourceFilename=*.*

file.processingMode=archive file.archiveDir=<path>/Archive file.pollInterval=20

8. You do not have to configure any file structure data since the file is in XML format.

a) If no code page conversions are required, se-lect the parameter XMB.ContentKind=B XMB.ContentType=application/xml .

Continued on next page

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

165

Task 3:

Configure a scenario and test your inbound file adapter. If necessary, create a message mapping in the Integration Repository.

1. Start the file adapter and check the log.

a) Choose Restart in the detail view of your file adapter. Next, check the log by choosing View Log.

2. If the log does not return any errors, copy a valid XML file to the source directory. Check the log again.

a) To refresh the log, choose View Log again. If the file adapter has transferred the message to the pipeline successfully, the log displays the number of the XI message.

3. Check the inbound message in the monitor in the Integration Server.

a) Log on to the Integration Server. Call transaction SXMB_MONI and start the monitor for processed XML messages. On the selection screen, enter BS_BIT_TravelAgency_## in the Sender Business System field and choose Execute to start the monitor.

b) Navigate to the detail view of your message and check the message structure by choosing Inbound MessagePayloadsMain Document.

4. Optional: Configure a scenario to send your message to a business system and an outbound interface. Define a message mapping in the Integration Repository, if necessary.

a) Use the exercises on configuring a scenario for help.

BIT400 Lesson: Inbound File Adapter

Exercise 10: Configuring the Inbound File