Using the SAP connection as the source
If you want to read data from ECC you need to find an RFC/BAPI module or a BAPI that returns the data you need. The data you need can be supplied by metadata, field mapping, and finding the values of fixed length fields and columns.
Metadata
The Metadata contains the name(s) of the RFC/BAPI table(s) you want returned in the
result set. You may enter a "*
" to choose all tables, imports and
exports. You may choose either one table or all tables; but, for example, you cannot
choose two tables out of five.
BAPI_CUSTOMER_GETLIST
*" TABLES
*" ADDRESSDATA STRUCTURE BAPICUSTOMER_ADDRESSDATA
In an HEI activity document this would appear as the value entered in the source "Table Name" field. For example -- Table Name: ADDRESSDATA.
Field mapping
Fields contained in an RFC/BAPI table are referred to by concatenating the name of
the table with the actual field name. When you enter ‘*
’ for
Metadata, you will also be able to map Import and
Export parameters, as well as your tables.
Suppose you choose to retrieve data from both an ECC table and an Export Parameter. In this case, the following scenario describes the expected results.
A table FOO is returned with 5 rows of data and also an Export parameter named EXPORTSPARAM. When you move this data into Domino, the fields in row one of table FOO will become fields in a new document in Domino. The Domino form has a field named EXPORTSPARAM. You have only row of data in EXPORTSPARAM, because it is either a simple parameter or a structure (which is a table with one row). It will go into the first document created in Domino. When you process the next row of table FOO, you have no more rows of data in EXPORTSPARAM to supply values to fill in field EXPORTSPARAM in the remaining Domino documents. In this case, EXPORTSPARAM was a simple parameter or structure, and has only one value (one row of data). This means that for Domino documents 2 through 5 the EXPORTSPARAM field will be empty.
Field name | Data element | Type | Length | Short text/description |
---|---|---|---|---|
CUSTOMER | KUNNR | CHAR | 10.00 | Customer number 1 |
SORT1 | AD_SORT1 | CHAR | 20.00 | Search term 1 |
NAME | AD_NAME1 | CHAR | 40.00 | Name 1 |
COUNTRY | LAND1 | CHAR | 30.00 | Country Key |
COUNTRYISO | INTCA | CHAR | 2.00 | Country ISO Code |
CITY | AD_CITY1 | CHAR | 40.00 | City |
POSTL_COD1 | AD_PSTCD1 | CHAR | 10.00 | City postal code |
REGION | REGIO | CHAR | 3.00 | Region (State, Province, Country ) |
STREET | AD_STREET | CHAR | 60.00 | Street |
TEL1_NUMBER | AD_TLNMBR1 | CHAR | 30.00 | First telephone no.: dialing code+number |
FAX_NUMBER | AD_FXNMBR1 | CHAR | 30.00 | First fax no.: dialing code+number |
ADDRESS | ADRNR | CHAR | 10.00 | Address |
You enter these fields (either manually or by automatic field mapping) for the SAP source in the HEI activity document "Field List" as show below:
- ADDRESSDATACUSTOMER
- ADDRESSDATASORT1
- ADDRESSDATANAME
- ADDRESSDATACOUNTRY
- ADDRESSDATACOUNTRYISO
- ADDRESSDATACITY
- ADDRESSDATAPOSTL_COD1
- ADDRESSDATAREGION
- ADDRESSDATASTREET
- ADDRESSDATATEL1_NUMBER
- ADDRESSDATAFAX_NUMBER
- ADDRESSDATAADDRESS
Fixed length fields and columns
All fields and columns are of a fixed length in SAP. The SAP Connector handles adding spaces to the ends of strings when necessary. In other circumstances, it may be necessary for you to add leading zeros, for example, to the start of a string to make a call work. These problems are extremely difficult to figure out, because when you use the ABAP workbench's Function Library to check out the interface of a call, these things are done for you. They are not done for you when you use the external interfaces for ECC.
@If(@Contains(CUSTOMER_TKUNNR;"00000");CUSTOMER_TKUNNR;"00000" + CUSTOMER_TKUNNR)
Select statement
bapi_customer_getdetail2
*" IMPORTING
*" VALUE(CUSTOMERNO) LIKE BAPICUSTOMER_ID-CUSTOMER
*" VALUE(COMPANYCODE) LIKE BAPICUSTOMER_ID-COMP_CODE OPTIONAL
CUSTOMERNO="0000000484"
FUNCTION BAPI_VENDOR_FIND
*"----------------------------------------------------------
*"*"Lokale Schnittstelle:
*" IMPORTING
*" VALUE(MAX_CNT) LIKE BAPIVENDOR_12-MAX_CNT DEFAULT 0
*" VALUE(PL_HOLD) LIKE BAPIVENDOR_12-PL_HOLD
*" DEFAULT SPACE
*" EXPORTING
*" VALUE(RETURN) LIKE BAPIRETURN1 STRUCTURE BAPIRETURN1
*" TABLES
*" SELOPT_TAB STRUCTURE BAPIVENDOR_10
*" RESULT_TAB STRUCTURE BAPIVENDOR_11
*"----------------------------------------------------------
MAX_CNT=0,PL_HOLD="*",SELOPT_TAB.1.COMP_CODE="3000",SELOPT_TAB.1.TABNAME="LFA1",
SELOPT_TAB.1.FIELDNAME="NAME1",SELOPT_TAB.1.FIELDVALUE="*"