IDOC_AAE Sender Adapter Configuration

Overview:

* A business scenario in which IDoc is to be sent from SAP-ECC to Non-SAP System via SAP-PO (SAP Process Orchestration 7.5 Single Stack).
* Here, in this blog, we focus on how IDoc is been transferred from SAP-ECC to SAP-PO.
* In SAP-PO, IDoc-xml is to be transformed to a specific message format of Non-SAP System using Graphical Map and transformed message will be sent to Non-SAP System using SOAP Receiver Adapter communication channel, thus technically it can be called as a “Outbound IDoc-to-Soap Asynchronous Interface”.

Communication Channel Configuration:

IDoc is been transferred from SAP-ECC to SAP-PO using IDOC_AAE Sender Adapter, which can be configured in following manner:

1. RFC Server Parameters: Default(Recommended)

2. RFC Server Parameters: Manual

3. RFC Server Parameters: From NWA

Common errors during IDoc processing:

Normally in SAP-ECC’s t-code SM58, we see following common errors during outbound IDoc processing:

[1] Bean IDOC_INBOUND_ASYNCHRONOUS not found

[2] Error when opening an RFC connection (CPIC-CALL:

[3] Commit fault: ASJ.ejb.005043 (Failed in component: sap.com/com.sap.aii.ad

Resolution of above common errors:

* 3rd Error can be resolved by correcting/verifying following points:

* Check IDoc_AAE Sender channels started or not
* Also verify SAP-ECC’s t-code WE20 partner profile outbound parameter details

* 1st and 2nd errors can be resolved by correcting NWA Configirations for ‘Default’ settings as given below…..

NWA Configuration Steps for ‘Default’:

 [1]         In SAP-PO create a RFC Destination connecting to SAP-ECC

Create one RFC Destination named as  ‘XI_IDOC_DEFAULT_DESTINATION’

NWA url:       http://sappoHost:port/nwa

Path:             NWA -> Configuration -> Infrastructure -> Destinations -> Destinations

Enter SAP-ECC details like:

* Target Host                    eccHost
* System Number             eccSysNum
* System ID                      eccSystemID
* SAP Gateway Host        eccHost

* SAP Gateway Service   sapgwXX

* where XX is SAP-ECC’instance Number (generally value is 00)

[2]          In SAP-PO create a Program-ID for Sap-Ecc

Path: NWA -> Configuration -> Infrastructure -> JCO RFC Provider -> Create

Here again, we need to enter all following parameters related to SAP-ECC, for example:

* Program ID                     PgmID_Ecc_PO
* Gateway Host                 eccHost
* Gateway Service            sapgw00
* Server Count                  5
* Application Server Host  eccHost
* System Number              eccSysNum
* Client                               eccClient
* User                                 eccUserId 
* Password                         *****
* Language                        EN
*

[3]          In SAP-PO, Resource Adapter ‘inboundRA’ configuration

Path: NWA -> Configuration -> Infrastructure -> Application Resources -> filter ‘inboundRA’ -> select ‘inboundRA’ ‘Resource Adapter’ -> Tab ‘Properties’

In ‘Properties’ tab, maintain following settings:

* ProgramID                          PgmID_Ecc_PO
* MaxReaderThreadCount    5
* DestinationName                XI_IDOC_DEFAULT_DESTINATION
* GatewayServer                   eccHost
* GatewayService                  sapgw00
* Local                                   false
* BindingKey                          PI_AAE_IDOC

[4]          In SAP-PO, starting Java Applications for Resource Adapter ‘inboundRA’

Path: NWA -> Operations -> Systems -> Start & Stop -> Java Applications -> filter ‘inboundRA’ -> select ‘com.sap.aii.adapter.idoc.sapjra.inboundRA’ -> start

Once Java-Application ‘com.sap.aii.adapter.idoc.sapjra.inboundRA’ gets started, its status turns to green, and respective ‘inboundRA’ status also turns to green

[5]          In SAP-ECC, check Registered Program

Once Java-Application ‘com.sap.aii.adapter.idoc.sapjra.inboundRA’ gets started, at this event, program-id ‘PgmID_Ecc_PO’ gets registered in SAP-ECC

Registered programs in SAP-ECC can been seen via following steps:

* in t-code ‘SMGW’
* -> Menu item ‘Goto’ -> ‘Logged on Clients’
*
* Once window opens, check TP Name= program-id ‘PgmID_Ecc_PO’
* Here total 5 entries of TPName ‘PgmID_Ecc_PO’ can be seen, as maxThreadCount in ‘inboundRA’ is given as 5.
*

 [6]         In SAP-ECC, create a tRFC RFC Destination

Create one tRFC RFC Destination (t-code SM59) with following parameters:

* Registered Server Program        enabled
* Same program-id                        PgmID_Ecc_PO
* GatewayHost                              eccHost
* GatewayService                         sapgw00
* Unicode                                      enabled

Testing:

Once above configuration gets completed, to trigger IDoc from SAP-ECC to SAP-PO, we need to do following tasks:

* ALE-Configurations for outbound IDoc

* In SAP-ECC,

* t-code BD54:  maintain Logical Systems for SAP-ECC, SAP-PO
* t-code WE21: maintain tRfc PORT having tRFC destaination
* t-code WE20: maintain Partner profile for outbound IDoc
* t-code BD64:  maintain distribution model

* In SAP-PO,

* use import/use meta structure of IDoc in Enterprise Repository
* Configure scenario having IDoc_AAE Sender Channel with ‘Deafult(Recommended) settings’

* Trigger IDoc

  http://bit.ly/2Ejbzwd #SAP #SAPCloud #AI

Optional Parameters in CDS Views

Hi All,

I am a newbie to SAP-HANA world and was recently exploring different types of CDS Views (particularly CDS Views with Input Parameters).

Though CDS Views with Input Parameters were introduced quite a long time back but I could not find a way to make some of the input parameters as Optional. So I played around with some annotations and found out a way to accomplish the same.

I did that with the help of annotation @Environment.systemField: #USER

I used the above annotation in my CDS View along with parameters in the following way: @AbapCatalog.sqlViewName: ‘Z_CDS_OP’ @AbapCatalog.compiler.compareFilter: true @AccessControl.authorizationCheck: #CHECK @EndUserText.label: ‘Material Query’ define view ZCDS_OP with parameters @Environment.systemField: #CLIENT p1 : mandt, @Environment.systemField: #USER p2 : uname, p3 : aenam as select from mara as ar { :p1 as Client, :p2 as Name, aenam as Created_By, matnr as Material } where ar.mandt = :p1 and ar.aenam = :p3;

Here the parameter p2 is defined for the sy-uname value, but it functions as an optional parameter at run-time.

If no value is passed for p2 parameter, the system defaults it to the sy-uname value.

Note that there is no asterisk (*) over p2 field. Below is the output of this query:

In this case my username is ‘FUNCTIONAL’ and is displayed in column ‘Name’.

Now I pass the value to the optional parameter:

Now, the p2 parameter value gets used and I get the following result:

This CDS view can also be consumed in an ABAP Program like the following: “Select Data from CDS view without optional parameter SELECT Client, Name, Created_By, Material FROM zcds_op( p3 = ‘FUNCTIONAL’ ) INTO TABLE @DATA(li_mara).

and "Select Data from CDS view with optional parameter SELECT Client, Name, Created_By, Material FROM zcds_op( p2 = ‘DEEPAK’, p3 = ‘FUNCTIONAL’ ) INTO TABLE @DATA(li_mara).

Both the code snippets work perfectly fine and generate the desired results.

So in this way I made a parameter optional in a CDS View. http://bit.ly/2EhL7CM #SAP #SAPCloud #AI