cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in enabling DCN in Hybrid web container app

midhun_vp
Active Contributor
0 Kudos

Hi friends,

I am developing Hybrid web container application with WF DCN in the app.

Objective: Once a new Purchase order is created in SAP a notification has to reach the mobile device.

The steps I followed are:

  • Created MBO and added into “on demand” cache group(Also tried with DCN cache group).
  • The load parameter for the MBO is username of the SAP EIS. So the load parameter is filled with the personalisation key “username”(which is default).
  • Deployed the MBO in the “default” domain and “SSO” configuration.
  • Created a WF(Workflow) application with server initiated point.
  • Find by parameter query is added in the server initiated properties.
  • Single sign  on is enabled in the WF application.
  • Generated code for the WF from the SUP workspace.
  • Assigned user for the workflow from SCC.
  • Tested the server initiated functionality by sending a message from the SUP workspace. Its reaching the device.

To enable DCN in the SAP EIS following steps are:

  • Created a HTTP request in JSON format(  {"pkg":"hybrid:1.0","messages":[{"id":"1","mbo":"Purchase_Orders","op":":upsert","cols":{"PO_NUMBER":"4500000084","REL_CODE":"","VENDOR":"YELLAM","TOTAL_PRICE":"170000.00","CREATED_ON":"20120918","STATUS":"In release"}}]}  )
  • We created one RFC destination. Http client is created by destination using below method:

cl_http_client=>create_by_destination .

  • Data send to http client using below method:

client->send( exceptions HTTP_COMMUNICATION_FAILURE = 1
HTTP_INVALID_STATE
= 2
HTTP_PROCESSING_FAILED
= 3
HTTP_INVALID_TIMEOUT
= 4
others = 5 ).

  • When we use cmd value as “dcn” we are getting a response http 200 (That represents “ok”).
  • When we use cmd value as ”wf” we are getting response “{"id":null,"success":false,"statusMessage":"error in processing workflow DCN request:null","result":[]}##

We have some questions :

  1. What is to be assigned to MBO for DCN?
  2. What should be the cmd value in the JSON?
  3. What are the configurations needed in SCC to enable DCN?
  4. How to check DCN configured in SAP EIS is correct?

Please give a solution for this as soon as possible.

Regards,

Midhun.V.P

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Midhun,

If you are using workflow DCN ie(cmd=wf)then the JSON format should be like below,  The message must contain e-mail information: subject, to, from, and so on,

{”id”:””,”op”:””,”subject”:””,”to”:””,”from”:””,”read”:””,”priority”:””,”body”:””,

“data”:[{”id”:””,”pkg”:”Package”,”messages”:[{”id”:”2”,”mbo”:”MBO”,”op”:”:upsert”,

”cols”:{”attribute1”:”value1”,”attribute2”:”value2”,”attribute3”:”value3”}}

See this link for more information.

http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc01218.0213/doc/html/fre13...

Thanks,

Doak Regis

Answers (0)