This article is part of a bigger one
- Part 1 : Send message from Hana Cloud Integration to Azure Service Bus
- Part 2 : Send SAP ERP Customer (DEBMAS) events to HCI you are here
- Part 3 : Receive event from HCI for updating SAP ERP Customer (DEBMAS) FUTURE ARTICLE
Create everything around DEBMAS for sending update & creation events of Customers with help of IDOC to Hana Cloud Integration (HCI).
This time we are hitting SAP hard for a newbie like, great helps came from Bhavesh Kantilal's article.
Disclaimer: I'm not used to SAP terminology, I might doing some approximations in vocabulary, do not hesitate to comment if anything need to be corrected.
Extend our HCI Flow
In previous article, we've created a dummy flow for sending data to Azure. This flow can be easily extended for being triggered by
idoc from SAP ERP.
Timer Start Event by
Start Message and remove the
Dummy Message block
* Add a
Sender and link it to
Start Message, finally select
Declare HCI platform + certificate
Let's create a
Logical System (LS) using
bd54 transaction with a friendly name
when you save it, you might have to create a new workbench for further SAP transport.
HCI certificate has to be added using transaction
STRUST, either you already have this certificate from part 1 or download it with firefox (easier).
First import certificate and click on
Add to Certificate List
You should then see the certificate added to
Certificate list of your system
Configure outbound settings for HCI
Destination platform (HCI) has to be declared with
sm59 for creating a new
HTTP Connections to External Server (G)
The bahavior of the form is weird for getting the
Technical Settings tab to be displayed ... I've double click anywhere ... I don't know exactly the meaning of
cxf, I suspect it's a mandatory prefix which is created when you create the endpoint in HCI.
DEBMAS05 will be our endpoint name.
sm59 we associated HCI certificate with
DEFAULT SSL Client, let's activate it and choose this option.
and force the
Login with User
Save & perform a connection test.
If nothing, except a small green bottom progress bar happened (no new dialog), it means that SAP isn't able to reach at all HCI (not even talking about SSL certificate or credentials). In my initial case, I've forgot to configure the HTTP proxy as SAP ERP server do not have direct access to internet and not Cloud Connector is configured yet.
If you get
ICM_HTTP_SSL_PEER_CERT_UNTRUSTED, the SSL certificate you are using isn't correct or you choose the incorrect SSL client configured back in
If HCI could be reached, you should get an authentication dialog for HCI credentials. I had to force using my email account rather S account otherwise I was getting 401 error afterward.
If you get
401 Unauthorized wrong credentials :)
Finally, if you get an
HTTP 500 result, you're done ! HCI at that point has no idea about your query, but you were able to reach HCI and authenticate
Finally we switch to IDOC focus activities: an IDOC port associated to our HCI external system has to be created with
- Port : You can set whatever you want for the Port name (with test limitation).
- RFC destination : what we've just created above
- Do not forget to check
SOAP Protocol(not per default)
Partner Profile has to be created with
we20 for associating a 'Logical System' with an
IDOC port (X_DEBMAS05) and an outbound
message type (DEBMAS)
bd64 for creating new
Model View in
Distribution Model, beware that you are correctly choosing the sender, usually I'm far to be sure so I create a record for all :). Then choose as
Receiver the HC destination platform. Finally choose
DEBMAS for message type.
Active Change Pointers & Change DEBMAS pointer
bd61 ensure that
Change pointers activated - generally is checked
and specifically that
DEBMAS is active with
At that point, we are ready to perform some tests
bd21(creating Idoc Type from Change Pointers) and
DEBMASas message type you should get a dialog indicating that
1 master Idocs set up for message type DEBMAS
and then a second one
1 communication Idoc(s) generated for message type DEBMAS
we02allows you to check the status of generated Idocs, if you get a dialog with
No Idocs selectedwith default
we02filter (idocs created today), you have already an issue, high probability that it's a missing change pointer.
Configure RBDMIDOC background job
RBDMIDOC generate IDOC from message type with change pointers. Without these commands, nothing happens: a schedule of
RBDMIDOC has to be setup and it's a little bit tricky.
sm36 for creating a new Background job
* First define
Start condition by choosing
Immediate and then check
Periodic Job and choose the period
ABAP program with name
RBDMIDOC and the
Variant we created in previous section (Test)
BEWARE (I've lost so many time here), the
Step List Overview isn't saved at this point, you have to go back
and finally save
sm37, you can track your job execution
and finally enjoy the result