Skip to Content

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

regards
Gagan Gupta

To report this post you need to login first.

3 Comments

You must be Logged on to comment or reply to a post.

  1. Desislava Tsoneva

    Hello,

    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.

    (0) 
    1. 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.

       

      Regards

      Gagan Gupta

      (0) 

Leave a Reply