15
© 2014 Informatica Corporation. No part of this document may be reproduced or transmitted in any form, by any means (electronic, photocopying, recording or otherwise) without prior consent of Informatica Corporation. All other company and product names may be trade names or trademarks of their respective owners and/or copyrighted materials of such owners.

Informatica Cloud SAP BAPI Quick Start Bundle User Guide

Embed Size (px)

Citation preview

Page 1: Informatica Cloud SAP BAPI Quick Start Bundle User Guide

© 2014 Informatica Corporation. No part of this document may be reproduced or transmitted in any form, by any means (electronic, photocopying, recording or otherwise) without prior consent of Informatica Corporation. All other company and product names may be trade names or trademarks of their respective owners and/or copyrighted materials of such owners.

Page 2: Informatica Cloud SAP BAPI Quick Start Bundle User Guide

2

Overview

Use the SAP BAPI Quick Start bundle to access SAP BAPI functionality. A bundle provides a set of prebuilt logic that you can execute with Informatica Cloud tasks. Bundles improve development productivity and enhance the quality of SAP integration projects.

The SAP BAPI Quick Start bundle includes integration templates that that use mapplets to process source data. The bundle also includes the mapplets as standalone objects. You can use the mapplets in mappings when you want to use custom transformation logic, such as lookups or filters, in the mapping configuration task.

The SAP BAPI Quick Start bundle includes the following integration templates:

BAPI_MATERIAL_GET_DETAIL. Uses a mapplet based on the BAPI_MATERIAL_GET_DETAIL BAPI to read material master data.

BAPI_MATERIAL_SAVEDATA. Uses a mapplet based on the BAPI_MATERIAL_SAVEDATA BAPI to create or update material master data.

BAPI_CUSTOMER_GETDETAIL1. Uses a mapplet based on the BAPI_CUSTOMER_GETDETAIL1 BAPI to read customer master data.

BAPI_CUSTOMER_CREATEFROMDATA1. Uses a mapplet based on the BAPI_CUSTOMER_CREATEFROMDATA1 BAPI to create a customer record.

BAPI_SALESORDER_GETSTATUS. Uses a mapplet based on the BAPI_SALESORDER_GETSTATUS BAPI to read the status of a sales order.

BAPI_SALESORDER_GETLIST. Uses a mapplet based on the BAPI_SALESORDER_GETLIST BAPI to read a list of orders based on the customer, sales organization, and material.

BAPI_SALESORDER_CREATEFROMDAT1. Uses a mapplet based on the BAPI_SALESORDER_CREATEFROMDAT1 BAPI to create sales orders.

INFADI_READ_TEXT. Uses a mapplet based on the /INFDI/READ_TEXT RFC Function to convert binary long text data to ASCII data.

The SAP BAPI Quick Start bundle also includes the following mapplets:

BAPI_MATERIAL_GET_DETAIL. Reads material master data based on the BAPI_MATERIAL_GET_DETAIL BAPI.

BAPI_MATERIAL_SAVEDATA. Creates or updates material master data based on the BAPI_MATERIAL_SAVEDATA BAPI.

BAPI_CUSTOMER_GETDETAIL1. Reads customer master data based on the BAPI_CUSTOMER_GETDETAIL1 BAPI.

BAPI_CUSTOMER_CREATEFROMDATA1. Creates a customer record based on the BAPI_CUSTOMER_CREATEFROMDATA1 BAPI.

BAPI_SALESORDER_GETSTATUS. Reads the status of a sales order based on the BAPI_SALESORDER_GETSTATUS BAPI.

BAPI_SALESORDER_GETLIST. Reads a list of orders based on customer, sales organization, and material data based on the BAPI_SALESORDER_GETLIST BAPI.

BAPI_SALESORDER_CREATEFROMDAT1. Creates sales orders based on the BAPI_SALESORDER_CREATEFROMDAT1 BAPI.

INFADI_READ_TEXT. Converts binary long text data to ASCII data based on the /INFDI/READ_TEXT RFC Function.

For more information about mapplets, integration templates, or other Informatica Cloud functionality, see the Informatica Cloud User Guide or online help.

Installing the Bundle

The SAP BAPI Quick Start bundle appears as an available bundle in your organization. To view and install the bundle, in your organization, click Configure > Published Bundles.

After you install the bundle, you can use the objects in the bundle.

Page 3: Informatica Cloud SAP BAPI Quick Start Bundle User Guide

3

Prerequisites

Before you use the SAP BAPI Quick Start bundle, verify the following prerequisites:

Informatica Cloud Standard Edition.

SAP Informatica Cloud Connector license.

SAP Connector, completely configured.

SAP user account with the privileges required to execute the BAPI.

Bundle Sample Files

The bundle includes sample files that you can use. The sample files provide a basic structure and some sample data to enable working with the integration templates. You might need to edit the files to work in your environment.

You can download the sample files from the following community article: SAP BAPI Quick Start Bundle. You can download the following sample files: BAPIQuickStart_SampleInput.zip, BAPIQuickStart_SampleOutput.zip.

BAPI_MATERIAL_GET_DETAIL Integration Template

Use the BAPI_MATERIAL_GET_DETAIL integration template to read material master data. The template passes data to a mapplet based on the BAPI_MATERIAL_GET_DETAIL BAPI and writes return data to targets.

Template Data Flow

In this template, you can configure a filter to reduce the data passed to the mapplet. The mapplet accepts the following input segments:

MATERIAL

PLANT

VALUATIONAREA

VALUATIONTYPE

MATERIAL EVG

The mapplet writes the following output segments:

MATERIAL_GENERAL_DATA

MATERIALPLANTDATA

MATERIALVALUATIONDATA

RETURN

The template writes data to the Material_Detail target. It writes the RETURN segment, with data from the BAPIRETURN parameter, to the Bapi_Return target.

The following image shows the data flow of template:

Page 4: Informatica Cloud SAP BAPI Quick Start Bundle User Guide

4

Template Parameters

The following table describes the parameters in the template:

Parameter Name Label in Task Description

$Source$ Source Source connection and source object.

$Bapi_Material_Get_Detail$ BAPI_Connection SAP connection for the mapplet.

$Material_Detail$ Material_Detail Target connection and target object for the Material_Detail target.

$Bapi_Return$ BapiReturn Target connection and target object for the Bapi_Return target.

$fil_Condition$ Filter Filter condition. Excludes records based on the condition. The task performs the filter on source data.

By default the filter condition is set to TRUE, which passes all rows.

$Input_FieldMap$ Input_FieldMap Field mappings from the data flow to the mapplet.

$Material_FieldMap$ Material_FieldMap Field mappings from the mapplet to the Material_Detail target.

$BapiReturn_FieldMap$ BapiReturn_FieldMap Field mappings from the mapplet to the Bapi_Return target.

Sample Files

You can use the following sample files to work with the template:

Source. Input_Bapi_Material_GetDetail.txt.

Targets. Out_MaterialDetail.csv, Out_BAPI_Return.txt.

BAPI_MATERIAL_SAVEDATA Integration Template

Use the BAPI_MATERIAL_SAVEDATA integration template to create or update material master data. The template passes data to a mapplet based on the BAPI_MATERIAL_SAVEDATA BAPI and writes return data to targets.

Template Data Flow

In this template, you can configure a filter to reduce the data passed to the mapplet. The mapplet accepts the following input segments:

HEADDATA

CLIENTDATA

MATERIALDESCRIPTION

The mapplet writes the following output segments:

RETURNMESSAGES

RETURN

The template writes data to the BapiReturn1 target. It writes the RETURN segment, with data from the BAPIRETURN parameter, to the BapiReturn target.

The following image shows the data flow of template:

Page 5: Informatica Cloud SAP BAPI Quick Start Bundle User Guide

5

Template Parameters

The following table describes the parameters in the template:

Parameters Label in Task Description

$Source$ Source Source connection and source object.

$BAPI_MATERIAL_SAVEDATA$ BAPI_Connection SAP connection for the mapplet.

$Bapi_Return1$ Bapi_Return1 Target connection and target object for the Bapi_Return1 target.

$Bapi_Return$ BAPIReturn Target connection and target object for the Bapi_Return target.

$fil_Condition$ Filter Filter condition. Excludes records based on the condition. The task performs the filter on source data.

By default the filter condition is set to TRUE, which passes all rows.

$SI_FieldMap$ Input_FieldMap Field mappings from the Exp_Material transformation to the mapplet.

$Desc_FieldMap$ Desc_FieldMap Field mappings from the Exp_Desc transformation to the mapplet.

$Scalar_FieldMap$ BapiReturn1_FieldMap Field mappings from the mapplet to the Bapi_Return1 target.

$BapiReturn_FieldMap$ BapiReturn2_FieldMap Field mappings from the mapplet to the Bapi_Return target.

Sample Files

You can use the following sample files to work with the template:

Source. Input_Bapi_Material_SaveData.txt.

Targets. Out_Material_ScalarReturn.txt, Out_Material_BapiReturn.txt.

BAPI_CUSTOMER_GETDETAIL1 Integration Template

Use the BAPI_CUSTOMER_GETDETAIL1 integration template to read material master data. The template passes data to a mapplet based on the BAPI_CUSTOMER_GETDETAIL1 BAPI and writes return data to targets.

Page 6: Informatica Cloud SAP BAPI Quick Start Bundle User Guide

6

Template Data Flow

In this template, you can configure a filter to reduce the data passed to the mapplet. The mapplet accepts the following input segments:

CUSTOMERNO

PI_SALESORG

PI_DISTR_CHAN

PI_DIVISION

The mapplet writes the following output segments:

PE_PERSONALDATA

PE_OPT_PERSONALDATA

PE_PERSONALDATA_NEW

PE_OPT_PERSONALDATA_NEW

PE_COMPANYDATA

PE_OPT_COMPANYDATA

PE_CONSUMER_FLAG

PE_ADDRESSTYPE_NO

RETURN

The template writes data to the Customer_Detail target. It writes the RETURN segment, with data from the BAPIRETURN parameter, to the BAPI_Return target.

The following image shows the data flow of the template:

Template Parameters

The following table describes the parameters in the template:

Parameters Label in Task Description

$Source$ Source Source connection and object.

$BAPI_CUSTOMER_GETDETAIL1$ BAPI_Connection SAP connection for the mapplet.

$CustomerDetail$ CustomerDetail Target connection and object for the CustomerDetail target.

$BAPI_Return$ BAPIReturn Target connection and object for the BAPI_Return target.

$filCondition$ Filter Filter condition. Excludes records based on the condition. The task performs the filter on source data.

By default the filter condition is set to TRUE, which passes all rows.

$Input_FieldMap$ Input_FieldMap Field mappings from the data flow to the mapplet.

Page 7: Informatica Cloud SAP BAPI Quick Start Bundle User Guide

7

Parameters Label in Task Description

$Customer_FieldMap$ Customer_FieldMap Field mappings from the mapplet to the CustomerDetail target.

$BapiReturn_FieldMap$ BapiReturn_FieldMap Field mappings from the mapplet to the BAPI_Return target.

Sample Files

You can use the following sample files to work with the template:

Source. Input_Bapi_Customer_GetDetail1.txt.

Targets. Out_CustomerDetail.csv, Out_BAPI_Return.txt.

BAPI_CUSTOMER_CREATEFROMDATA1 Integration Template

Use the BAPI_CUSTOMER_CREATEFROMDATA1 integration template to create a customer record. The template passes data to a mapplet based on the BAPI_CUSTOMER_CREATEFROMDATA1 BAPI and writes return data to the target.

Template Data Flow

In this template, you can configure a filter to reduce the data passed to the mapplet. The mapplet accepts the following input segments:

PI_PERSONALDATA

PI_OPT_PERSONALDATA

PI_COMPANYDATA

PI_OPT_COMPANYDATA

PI_CONSUMEREN

PI_COPYREFERENCE

PI_CREDIT_CONTROL_FLAG

The mapplet writes the following output segments:

CUSTOMERNO

RETURN

The template writes the customer data to the CustomerNo target. It writes the RETURN segment, with data from the BAPIRETURN parameter to the BapiReturn target.

The following image shows the data flow of template:

Template Parameters

The following table describes the parameters in the template:

Page 8: Informatica Cloud SAP BAPI Quick Start Bundle User Guide

8

Parameters Label in Task Description

$Source$ Source Source connection and object.

$BAPI_CUSTOMER_CREATEFROMDATA1$ BAPI_Connection SAP connection for the mapplet.

$CustomerNo$ CustomerNo Target connection and object for the CustomerNo target.

$BapiReturn$ BapiReturn Target connection and object for the BapiReturn target.

$fil_Condition$ Filter Filter condition. Excludes records based on the condition. The task performs the filter on source data.

By default the filter condition is set to TRUE, which passes all rows.

$Input_FieldMap$ Input_FieldMap Field mappings from the data flow to the mapplet.

$CustNo_FieldMap$ CustNo_FieldMap Field mappings from the mapplet to the CustomerNo target.

$BapiReturn$ BapiReturn_FieldMap Field mappings from the mapplet to the BapiReturn target.

Sample Files

You can use the following sample files to work with the template:

Source. Input_Bapi_Customer_CreateFromData1.txt.

Targets. Out_CustomerNo.txt, Out_BAPI_Return.txt.

BAPI_SALESORDER_GETSTATUS Integration Template

Use the BAPI_SALESORDER_GETSTATUS integration template to read the status of a sales order in SAP. The template passes data to a mapplet based on the BAPI_SALESORDER_GETSTATUS BAPI and writes return data to targets.

Template Data Flow

In this template, you can configure a filter to reduce the data passed to the mapplet. The mapplet accepts the following input segments:

SALESDOCUMENT

The mapplet writes the following output segments:

STATUSINFO

RETURN

The template writes sales order data to the StatusInfo target. It writes the RETURN segment, with data from the BAPIRETURN parameter, to the BapiReturn target.

Page 9: Informatica Cloud SAP BAPI Quick Start Bundle User Guide

9

The following image shows the data flow of the template:

Template Parameters

The following table describes the parameters in the template:

Parameters Label in Task Description

$Source$ Source Source connection and object.

$Bapi_Salesorder_Getstatus$ BAPI_Connection SAP connection for the mapplet.

$StatusInfo$ StatusInfo Target connection and object for the StatusInfo target.

$BapiReturn$ BapiReturn Target connection and object for the BapiReturn target.

$fil_Source$ Filter Filter condition. Excludes records based on the condition. The task performs the filter on source data.

By default the filter condition is set to TRUE, which passes all rows.

$Input_FieldMap$ Input_FieldMap Field mappings from the data flow to the mapplet.

$SO_Status_FieldMap$ Status_FieldMap Field mappings from the mapplet to the StatusInfo target.

$BapiReturn_FieldMap$ BapiReturn_FieldMap Field mappings from the mapplet to the BapiReturn target.

Sample Files

You can use the following sample files to work with the template:

Source. Input_Bapi_SalesOrder_GetStatus.txt

Targets. Out_SalesOrder_Status.csv, Out_BAPI_Return.txt.

BAPI_SALESORDER_GETLIST Integration Template

Use the BAPI_SALESORDER_GETLIST integration template to provide a list of orders based on the customer ID, sales organization, and material. The template passes data to a mapplet based on the BAPI_SALESORDER_GETLIST BAPI and writes return data to targets.

Template Data Flow

In this template, you can configure a filter to reduce the data passed to the mapplet. The mapplet accepts the following input segments:

CUSTOMER_NUMBER

SALES_ORGANIZATION

MATERIAL

DOCUMENT_DATE

DOCUMENT_DATE_TO

Page 10: Informatica Cloud SAP BAPI Quick Start Bundle User Guide

10

PURCHASE_ORDER

TRANSACTION_GROUP

PURCHASE_ORDER_NUMBER

MATERIAL_EVG

The mapplet writes the following output segments:

SALES_ORDERS

RETURN

The template writes sales order data to the SalesOrders target. It writes the RETURN segment, with data from the BAPIRETURN parameter, to the BapiReturn target.

The following image shows the data flow of the template:

Template Parameters

The following table describes the parameters in the template:

Parameters Label in Task Description

$Source$ Source Source connection and source object.

$BAPI_SALESORDER_GETLIST_ mapplet$

BAPI_SALESORDER_GETLIST SAP connection for the mapplet.

$SalesOrders$ SalesOrder_List Target connection and target object for the SalesOrders target.

$BapiReturn$ BapiReturn Target connection and target object for the BapiReturn target.

$fil_Condition$ Filter Filter condition. Excludes records based on the condition. The task performs the filter on source data.

By default the filter condition is set to TRUE, which passes all rows.

$Input_FieldMap$ Input_FieldMap Field mappings from the data flow to the mapplet.

$SO_FieldMap$ SalesOrder_FieldMap Field mappings from the mapplet to the SalesOrders target.

$BapiReturn_FieldMap$ BapiReturn_FieldMap Field mappings from the mapplet to the BapiReturn target.

Sample Files

You can use the following sample files to work with the template:

Source. Input_Bapi_SalesOrder_Getlist.txt

Targets. Out_SalesOrder_GetList.csv, Out_BAPI_Return.txt.

Page 11: Informatica Cloud SAP BAPI Quick Start Bundle User Guide

11

BAPI_SALESORDER_CREATEFROMDAT1 Integration Template

Use the BAPI_SALESORDER_CREATEFROMDAT1 integration template to create an SAP sales order. The template passes data to a mapplet based on the BAPI_SALESORDER_CREATEFROMDAT1 BAPI and writes return data to the target.

You can use the integration template to create sales orders from the Salesforce Opportunity object or similar opportunity data from CI applications.

Template Data Flow

In this template, you can configure an expression to convert date data to the correct date format for the REQ_DATE field in the mapplet.

The mapplet accepts the following input segments:

ORDER_HEADER_IN

WITHOUT_COMMIT

CONVERT_PARVW_AUART

ORDER_ITEMS_IN

ORDER_PARTNERS

The mapplet writes the following output segments:

SALESDOCUMENT

RETURN

The template writes sales order data and the RETURN segment, with data from the BAPIRETURN parameter, to the BapiReturn target.

The following image shows the data flow of the template:

Template Parameters

The following table describes the parameters in the template:

Parameters Label in Task Description

$Order_Hdr$ Order_Hdr Source connection and source object for opportunity data.

$Order_Item$ Order_Item Source connection and source object.

$Bapi_Salesorder_Createfromdat1$ BAPI_Connection SAP connection for the mapplet.

$BapiReturn$ BapiReturn Target connection and target object for the BapiReturn target.

$ReqDate$ ReqDate Expression to convert a date format to the

Page 12: Informatica Cloud SAP BAPI Quick Start Bundle User Guide

12

Parameters Label in Task Description

BAPI date format, if necessary.

$Header_FieldMap$ Header_FieldMap Field mappings from the data flow to the mapplet.

$Partner_FieldMap$ Partner_FieldMap Field mappings from the data flow to the mapplet.

$Item_FieldMap$ Item_FieldMap Field mappings from the data flow to the mapplet.

$BapiReturn_FieldMap$ BapiReturn_FieldMap Field mappings from the mapplet to the BapiReturn target.

Sample Files

You can use the following sample files to work with the template:

Sources: Input_SalesOrder_HDR.txt, Input_SalesOrder_Item.txt

Target. Out_SO_BapiReturn.txt.

INFDI_READ_TEXT Integration Template

Use the INFDI_READ_TEXT integration template to convert binary long text to ASCII. The template passes data to a mapplet based on the /INFDI/READ_TEXT RFC Function and writes return data to the target.

After you convert binary data to text, you can use the results in other tasks.

Template Data Flow

In this template, you connect the data flow to the mapplet.

The mapplet accepts the following input segments:

OBJECT. Name of the SAP object.

NAME. Primary key of the object.

ID. Text type or ID that needs to be converted.

LANGUAGE. Language of the text to be converted.

CLIENT. Optional.

The mapplet writes the following output segments:

LINES. Converted text.

RETURN_MSG. Information from the BAPIRETURN parameter.

The template writes converted text data to the Table_Output_Lines target. It writes the RETURN_MSG segment, with data from the BAPIRETURN parameter, to the Table_Output_Return_Msg target.

Page 13: Informatica Cloud SAP BAPI Quick Start Bundle User Guide

13

The following image shows the data flow of the template:

Template Parameters

The following table describes the parameters in the template:

Parameters Label in Task Description

$Src$ Source Source connection and object for the task.

$Table_Output_Return_Msg$ Bapi Return Target connection and object for the RETURN_MSG segment.

$Table_Output_Lines$ LongText Target Target connection and object for the converted data.

$_InfaDi_Read_Text_Mapplet$ BAPI Connection Connection to the mapplet.

$Input_FieldMap$ LongText Input Field mapping for the data flow to the mapplet.

$LongText_FM$ LongText Output Field mapping for the converted data.

$BapiReturn_FM$ BapiReturn Field mapping for the RETURN_MSG segment.

Sample Files

You can use the following sample files to work with the template:

Sources: SAP_LongText_Input.txt.

Target: SAP_LongText.txt, BapiReturn.txt.

Configuring a Mapping Configuration Task

After you import an integration templates to your organization, you can use the template in a mapping configuration task.

Use the Mapping Configuration Task wizard to create a new task and configure it as follows:

1. On the Definition page, select the integration template.

2. On the Sources page, select a source connection and source object.

3. On the Targets page, select the SAP connection for the mapplet. And then, select target connection and target object.

4. On the Mapplet Input page, optionally add a filter condition to reduce the source data passed to the mapplet, map the Integration ID mapplet input field, and then configure other mapplet input field mappings.

5. On the Mapplet Output page, configure the mapplet output field mappings.

6. Save and run the task.

Page 14: Informatica Cloud SAP BAPI Quick Start Bundle User Guide

14

Additional Information

When you use bundle templates, consider BAPI processing and integration template requirements.

BAPI Return Data

Each BAPI mapplet in the integration templates returns the SAP BAPIRETURN parameter. The BAPIRETURN parameter contains success messages or error messages for the BAPI. Depending on the SAP R/3 version, it uses one of the following dictionary structures: BAPIRETURN, BAPIRETURN1, BAPIRET1, BAPIRET2 or BAPIRET2_FIX.,

BAPIRETURN dictionary structures include the following fields:

TYPE. Message type. Uses one of the following codes: S (success), E (error), W (warning), I (information).

ID. Message class.

NUMBER. Message number.

MESSAGE. Message text.

The following message variables: MESSAGE_V1, MESSAGE_V2, MESSAGE_V3, and MESSAGE_V4.

When a transmission is successful, the mapplet returns the following results:

RETURN is empty. All the fields have their initial fields for their types.

TYPE field has the value S.

For more information about the results for each BAPI, see the SAP BAPI documentation.

Integration ID Field

Each BAPI mapplet in the integration templates includes an Integration ID input and output field. The Integration ID field is a key field in the BAPI transformation. The Integration ID controls the boundaries of a single transaction and ensures data integrity.

When you configure a task, map a primary key field from the source to the Integration ID input field. Connecting the Integration ID output field is recommended, but not required.

Note: You must map the Integration ID input field even when a BAPI does not require other input fields.

BAPI Internal and External Data Formats

SAP uses internal and external data formats. Use the SAP internal data format when you integrate data with BAPI/RFC from an external system like Informatica Cloud. For example, the internal date format is YYYYMMDD, where YYYY represents the year, MM represents the month, and DD represents the day.

Most key fields require additional padding. For example, to pass a customer number of 2200, use 0000002200.

You can view the internal data formats in the SE17 transaction. Some exceptions might apply. For more information about BAPI internal and external data formats, see the SAP BAPI documentation.

SAP BAPI Documentation

For more information about the BAPI that you want to use, enter the BAPI function module name into the relevant SAP transaction, such as SE37 or SE80.

You can also test individual BAPIs in these transactions to better understand the input and output field mappings.

Informatica Global Customer Support

You can contact a Customer Support Center online or by telephone.

For online support, click Submit Support Request in the Informatica Cloud application. You can also use Informatica MySupport to log a case. MySupport requires a user name and password. You can request a user name and password at https://mysupport.informatica.com.

Page 15: Informatica Cloud SAP BAPI Quick Start Bundle User Guide

15

The telephone numbers for Informatica Global Customer Support are available from the Informatica web site at http://www.informatica.com/us/services-and-training/support-services/global-support-centers/.