Skip to Content
Author's profile photo Former Member

Steps to create Custom fields in C4C and extend it to integrated system(ECC)

In this case we are going to add two Reason code field ReasonCodeWR and ReasonCodeFD to line item in ticket document in cloud for customer, once the field is created we will extend the fields so that it can be received at integrated system ECC via HCI system.

So we will be dividing complete development into 3 parts:

A. C4C System

  1. Login to your respective tenant with User ID and Password.

  1. Now traverse to the screen where you want to add Custom Fields. Go to Adapt and then click on Edit Master Layout.

  1. Go to the screen where you want to add Custom fields. Click on any field and then click on Add field button. Then Click on New Field button.

  1. Add the field Details. Click on Save and Close.

  1. Again go to custom fields. Go to property of field and then to Field Definition.

  1. Now go to SERVICES tab, Edit and select the check box for object in which you want to extend the Custom fields. We want to extend it to follow up Documents. Then Save.

  1. Now Go to Adapt and click on End Layout Changes. Go to Adapt again and open a tenant in Silverlight mode by clicking on Launch in Microsoft Silverlight.

  1. Go to Application and User Management work center and then to Communication Arrangements. Since we need to generate WSDL of our service, we need to find for our communication scenario. Click on it. We will be selecting Ticket Follow Up Document.

  1. Go to Outbound Communication and select the Service and Click on Download WSDL button. The generated WSDL will be used in HCI to map the custom fields.

B. Integration System (in our case ECC)

  1. Login to your integration System in our case it’s going to be ECC system.

  1. Check the standard process working as per C4C integration. In WE02 find the standard Idoc which is received when document is processed in C4C.For Ticket Document the IDoc received is COD_SERVICE_CONFIRMATION01.

  1. Now we need to add our custom fields to above IDoc.                                                                  a . So now we need to try extend the Idoc Goto WE30, click on EXTENSION radio button            and then click create. Enter the basic type and give a description.

              b. When you click OK either it might create an extension so we need to add our custom                       fields to that extension or it might give an error “Action is not possible on Idoctype”.                         Means the basic type cannot be extended.

             c. If you came across the error in step b. then go to WE31 create a segment with custom                     fields. We have added Item Number to differentiate the custom fields in case of multiple                   items.

d. Now we need create a copy of standard basic type. And add the above created                               segment to it.

  1. Maintain the basic type against the message type for complete inbound process. You can create Z message type as well and maintain that message type in partner profile.

  1. Now for last step we need to generate WSDL file for our Z idoc or extended Idoc. Go to SE38 and execute program ‘SRT_IDOC_WSDL_NS’. Enter the message type and basic type and execute the program to generate the WSDL file.

C. HCI integration

  1. Open Eclipse, Go to File and Import the standard object.

  1. In pop-up, go to SAP HANA Cloud Integration and then to Integration Content Archive.

  1. In open pop-up, Select From location as Tenant Management Node and tenant ID as C4C tenant ID. And select integration content as “Create Ticket Follow Up Document in SAP Business Suit”.

  1. Enter the project Name.

  1. A project would be added in Package Explore.

  1. Select the WSDL COD_SERVICE_CONFIRMATION and go to source code. Open the WSDL which was generated by IDoc in ECC. Pick only the piece of code for custom segment. And add that code to WSDL COD_SERVICE_CONFIRMATION.COD_SERVICE_CONFIRMATION01. Change the basic type in WSDL from standard one to extended/custom basic type.

NOTE: Adding only piece of code instead of changing complete wsdl will retain the mapping of fields.

  1. Now in a same way, go to second WSDL ServiceRequestFollowUpDocumentReplicationRequest and open the WSDL generated from C4C system. Pick the piece of code for custom fields and add that piece of code to this WSDL at same location.

  1. Go to Mapping COD_ERP_ServiceRequestConfirmationProcessingRequest.mmap and update the WSDL by replace button.

  1. Once WSDL is updated, go to design tab and check the mapping. Changing complete WSDL will lead to no mapping. So to avoid that we only added the custom fields to both the WSDL’s. All the standard mapping would be maintained except our custom fields.

  1. Maintain the mapping for custom field by dragging and dropping the fields. Map segment as Constant 1.

  1. In mapping go to EDI_DC40 segment and change the constant value for field IDOCTYP and MESTYP to the basic type created in ECC (ZCOD_SERVICE_CONFIRMATION01) and message type if created in ECC.

  1. Go to Design tab of WSDL’s and check the properties are maintained for each and every connection.

  1. Deploy the solution. The Custom fields now flow from C4C to integrated system and the fields can be used in integrated system for validation or as a value for any field.

Happy Learning

Gagan Gupta

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Balaswamy Kakarla
      Balaswamy Kakarla

      Thank you Gagan for the superb process steps.

      Author's profile photo Former Member
      Former Member


      I did all those steps, but maybe something is missing. The inbound Idoc cannot be processed in ERP - it fails with syntax error "

      The segment ZC4C_ITEM_DATA does not occur at the current level of the basic type COD_SERVICE_CONFIRMATION01"

      Even if my basic type is ZCOD_SERVICE_CONFIRMATION01 (not the standard), the system keeps checking for the standard basic type.

      Author's profile photo Gagan Gupta
      Gagan Gupta

      Hello Desislava,


      I think you have missed the step of updating WSDL for IDoc in HCI.

      Hoping doing that will make this work.



      Gagan Gupta

      Author's profile photo Grace Chuah
      Grace Chuah

      Hi Gagan,


      I have a requirement to extend new field in service provider in ECC "SalesOrderPricingInformationQueryResponse_In". This service provider is used in opportunity external pricing request scenario.


      I have managed to extend the new field in C4C and download and upload the WSDL into iflow. However, I'm looking a way to extend the new field in ECC in the service provider.

      The incoming message type in this service provider in ECC is "SLS_SO_PR_INFO_Q_SYNC". I checked in WE81 but could not find the existing message type.

      This scenario does not use IDOC. It uses web service in ECC. Do you know how I can extend a new field in this scenario in ECC?



      Grace Chuah

      Author's profile photo Anish Abraham Palakudyil
      Anish Abraham Palakudyil

      Hi Grace,

      how did you manage to extend the standard service ? I have a similar requirement.

      Appreciate your feedback.