cancel
Showing results for 
Search instead for 
Did you mean: 

CRM - C4C integration - Edit business logic of a C4C service consumer

Former Member
0 Kudos

Hi,

I wish to edit the logic of the C4C standard consumer associated with

CA: Opportunity Replication from SAP Business Suite

     Outbound Communication: Confirm Opportunity Replication to SAP Business System

I don't need to extend data type of the WebService because I already see in the data structure the field where I will put the new data that I will extract after I will edit the consumer.

So, I only need to modify business logic of the consumer.

Is this possible ? Where I find the entry point to insert my code ?

In SDK I see only inbound services.

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Hi Fransesco,

From the question in SCN it looks like the you want to use
own logic to update a certain field that appears in the outbound message (
Opportunity replication to SAP Business Suite e.g. SAP CRM).

The answer would be that the field value could be ( if allowed
by the Opportunity object)   modified via the SDK in an extension
exit of the Opportunity object. This modified value would then be picked up and
sent via the outbound message.

The question to ask you would also be if you intend to
also store the altered value in the Opportunity object.

Currently it is not possible by the customer to update field
values of outbound interfaces, unless the application provides dedicated exits(
for assembling the message data) for the customers to implement via the SDK. It does not look like the case at least for this use case.

Best regards,

Pavan.

Former Member
0 Kudos

I'll try to explain what I would do and what are my requirements.

"As is" situation.

When an Opportunity coming from SAP CRM is correctly received and processed in SAP C4C a new outbound (from C4C) message is automatically generated. This message is the Opportunity Confirmation, directed back to SAP CRM in order to pass to SAP CRM the C4C opportunity ID that will become the external ID in SAP CRM.

For this flow (Opportunity confirmation back to CRM) the standard integration interface grabs from C4C only the C4C Opportunity ID and "hardcodes" in PI mapping the following fields:

PROCESS_TYPE = OPPT   (Business Transaction Type)

OBJECT_TYPE = BUS2000111 (Object Type)

Our Issue.

Our problem is in the hardcoded Business Transaction Type.

If we send from CRM to C4C an Opportunity with a custom Business Transaction Type (for example  ZOPT)  we need that the coming back confirmation message from C4C must contain again this Business Transaction Type otherwise the inbound idoc processor will go in error, status 51, with a "No valid document header could be determined". I tried to edit the IDOC in CRM changing OPPT with the correct code (for example ZOPT) and the I posted it again using BD87. Posting succesful, status 53.

Possible Solution.

I had a look at the data structure of the confirmation service and it has not used field. I want to fill one of those field  with the C4C Processing Type Code that is the Business Transaction Type in CRM and another one with the OBJECT TYPE. Then I will create a PI Value Mapping in order to decode the C4C processing type code in SAP CRM Business Transaction Type.

What I miss here is where's the consumer source code that fills the outbound message structure. We are talking about already existing C4C fields that in the case of the Opportunity-Confirmation-to-CRM are not passed to the outbound message.

0 Kudos

Hi Fransesco,

This is not possible to be filled from within C4C itself, since the application has not provided an exit to do so. But this should still be possible to fill the values into the message payload via SAP PI. Aren't you using SAP PI in your landscape?

Regards,

Pavan.

Former Member
0 Kudos

Yes I'm using PI but the matter is that PI doesn't "know" the right Business Transaction Type.

The Opp Confirmation Message from C4C to PI contain only the following significant info:

  • CRM Opp. ID
  • C4C Opp. ID

Here below the significant part of xml that C4C sends to PI:

  <Opportunity>

    <ID schemeID="CRX">7451</ID>

    <OpportunityReference>

      <ID schemeID="C4CTENNANTID">57</ID>

      <TypeCode>72</TypeCode>

    </OpportunityReference>

  </Opportunity>

In order to map in PI the right PROCESS_TYPE (target field) we need C4C sends  Processing Type Code (Source field).

I'm thinking that a possible solution could be a SOAP lookup inside the PI mapping of Opp. Confirmation,  that reads ALL the Opportunity Data from C4C.....but this seems to me as we are firing at flies using cannons

Former Member
0 Kudos

This is what I want to do, as explained in the first post.

But you need to pass an input value to the value mapping. The Opp Confirmation message doesn't pass this input value at the moment.

The input Value is the C4C Processing Type that will be decoded in the CRM Business Transaction Type (PROCESS_TYPE field in the target IDOC).


Here's an ax example of how the standard integration works.

According to CRM customizing, we can generate from CRM to C4C Opportunity with this Business Transaction Type:

  1. ZOP1
  2. ZOP2
  3. ZOP3

We create in CRM an Opportunity of type ZOP1. CRM sends a message to C4C with CRM Opp ID = 100 and BusTransType=ZOP1.

In PI, the Business Transaction Type is mapped into the Processing Type Code field of the target message.

In C4C we created a CodeListMapping for the Processing Type Code, so when the an Opportunity coming from CRM arrives in C4C we can decode it in the right internal C4C code (we created custom code in C4C with name similar to CRM ones):

  1. ZOP1  ---> ZOPA
  2. ZOP2 -----> ZOPB
  3. ZOP3  ----> ZOPC

So, all runs ok for the Opportunity_CRM_to_C4C message. When this message is succesfully processed by C4C, C4C generates a confirmation messages.

The Opportunity is inserted in the C4C system with C4C Opp ID = 30 and ProcessinTypeCode = ZOPA

This confirmation messages doesn't contains the Processing Type Code (so we can map it back into CRM business transaction field PROCESS_TYPE) but the standard mapping put 'OPPT' code in the business transaction field PROCESS_TYPE of the target IDOC. The messages contains only the C4C Opp ID and the CRM Opp ID

So, when the message arrives in CRM, the idoc loader try to find an opportunity with ID=100 and BussTransType=OPPT and it fails to find it.

0 Kudos

Ok, I get the problem now. This is a bug, since the confirmation is for a source message from CRM, C4C should not modify the original value for the PROCESS_TYPE, since the ID mapping used at CRM is just not with IDs but also the PROCESS_TYPE. Did you report the issue via raising a ticket?

Former Member
0 Kudos

I'm going to raise it but it seems a precise design choice by SAP and not a bug

Former Member
0 Kudos

Hi Francesco,

I was going through your post to get some understanding for similar issue, could you please share how you managed to solve it or did SAP came back with some resolution.

Regards,

Lisha W.