Skip to Content

44 Comments

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

    1. De Luca Davide Post author

      Thank you Mithun.

      Yes, it has been strange when we discovered that no Change Log functionalities have been released in the standard C4C implementation. That’s the reason why we developed.

      Hope that the code snippets could be useful.

      Cheers,

      Davide

      (0) 
      1. Horst Schaude

        Hello Davide,

        There is already a possibility to get a history of changes.

        But this works only for Custom BOs and only in ByD systems, not in C4C. (Reason: different role codes of the tenants for ByD and C4C).

        I am sad to say that we do not offer the possibilty to switch it on for SAP BOs.

        Bye,

            Horst

        (0) 
        1. De Luca Davide Post author

          Hi Horst,

          yes I had a discussion with some colleague of mine that is currently working on ByD, and then we did the activities explained in this article as an outcome of the replies we got on the following thread:

          Tracking the old field value in Business Objects Event Handler

          Unfortunately it seems that on the C4C front there isn’t so much on these features. We hope that now, after we deployed this solution, some of the SAP Development team consider the opportunity to review this code and implement a standard functionality.

          Cheers,

          Davide

          (0) 
          1. Horst Schaude

            Hello Davide,

            Good news:

            I am currently working on getting the good-old-ByDesign ChangeLog into the BODL code.

            You will be able to define per node / element which should be part of the ChangeLog.

            Plus: This would work for both ByDesign and Cloud4Customer. 😆

            Expected arrival: Release 1508

            Bye,

               Horst

            (0) 
            1. De Luca Davide Post author

              Hi Horst,

              that’s a good news!

              In my opinion, the Account Change Log development honestly has been a good exercise for getting the grip and the taste of the Cloud Application Studio, but it has some limitations, due to the complexity required for looking up some fields and the maintainance required.

              I would be pretty happy to know if this experience has been useful for the standard ChangeLog development, lol…

              Kind regards,

              Davide

              (0) 
              1. Horst Schaude

                Hello Davide,

                Sorry, but I am just enabling the old stuff. 😕

                Currently there is nobody developing / enhancing / refurbishing the standard Change Log 🙁

                Bye,

                    Horst

                (0) 
                  1. Horst Schaude

                    Hello Davide,

                    I even did not find the section for the Cloud Application Studio in the link to “C4C 1508 Release Notes”. 🙁

                    But it will come. 🙂

                    I saw it in the SAP Cloud Application Studio 1508 delta feature rollout session.

                    (They took my example for the demo 😀 )

                    Bye,

                       Horst

                    (0) 
        2. Sangeeta Roy

          Hello Horst,

          As you have mentioned above that there is a possibility to get a history of changes for Custom BOs. Is this available via sdk for partner developed BOs so that we can view the change log via the CHANGES tab ?

          Is there any documentation on the same?

          Regards,

          Sangeeta

          (0) 
          1. Horst Schaude

            Hello Sangeeta,

            Yes, that’s possible. 😀

            Just annotate the elements / nodes you want to be tracked in the Change Log with [ChangeHistory].

            Afterwards follow the steps described in the docu at “Developer Desktop” -> “Business Objects” -> “Task” -> “Enable Change History”, but omit the BCO stuff.

            It seems that the Task section needs an update. 😕

            Bye,

               Horst

            (0) 
    1. De Luca Davide Post author

      Hello Sriram,

      sorry if I reply just now, but I’m back from Christmas holidays from today.

      Well, the answer is the same as for the Premise SAP CRM solution: Business Roles are assigned to a Business User (with logon information), and the Business User has the reference to an Employee ID. If you need any further detail, I would suggest to take a look on the Cloud for Customer Administration Guide: https://websmp204.sap-ag.de/~sapidb/012002523100016725002014E/EN-2.pdf

      In the particular case of the Cloud Application Studio, the BO representing Business Users is called Identity (namespace: AP.PC.IdentityManagement.Global). In the example above, it is one of the fields of theCustom BO AccountChangeLogEntry.

      Hope I replied to your question. Please let me know if you need any other information.

      Cheers,

      Davide

      (0) 
      1. sriram ks

        Hi Davide,

        Thanks for your reply. I would like to know how Employee Bo and Identity Bo are related. In the Cloud Studio i did a Query By Identification on Employee Bo it showed me associations but i cant find Identity,

        One more question is how can i create a Query on extension Bo?

        Thanks in Advance

        Sriram

        (0) 
        1. De Luca Davide Post author

          Hi Sriram,

          in the Employee BO you can use the node AssignedIdentity, which will contain the ID attribute (it’s the IdentityID), in case you are interested in retrieving the Identity from the Employee, or a QueryByElements, in the converse case you are interested in retrieving the Employee from an available ID.

          Please let us know if that hint fulfills your needs.

          Cheers,

          Davide

          (0) 
            1. sriram ks

              Hi Davide,

              One more query. I want to expose a webservice that can be used to fetch all Reporting Line Units.

              Since RLU BO dont have any query, i can create only a Read webservice which takes in an ID or UUID and gives me the RLU details.

              Is there a possibility that i can create a query on RLU BO so that i can expose it as webservice?

              Thanks in Advance

              Sriram

              (0) 
              1. De Luca Davide Post author

                hi Sriram,

                you should create a custom Query component on your BO, and then create a WebService with the Query operation linked to the custom Query component.

                Please, let me know if it worked then.

                Cheers,

                Davide

                (0) 
  1. Swadini Sujanaranjan

    One help from you all.

    My scenario is to assign the value for standard field in Opportunity–>Product tab. (say like amount) from Cloud Application Studio.

    I have checked with the Extensibility browser of Opportunity, but it just allows to adjust the properties of field like, Visibility / Mandatory check / Read only check only. And in script also those fields are locked (read only mode)

    Is this possible to set value for standard field through SDK? If so kindly help me out.

    Regards

    Swadini Sujanaranjan

    (0) 
    1. Uldis Kalviskis

      Hi Swadini,

      it’s possible only if Opportunity xbo has access to product node. If yes then you can add this z-field there and using UI designer add it using extension explorer. But again it will work if operation of assigning  extension field is avaible for table anchor.

      Cheers,

      Uldis

      (0) 
  2. Swadini Sujanaranjan

    Hi all,

    Thanks for your reply.

    I have added new fields on extending the bo and achieved it.

    But here my requirement is to set the value of ‘ExpectedNetAmount’ field which is in standard BO (Opportunity.Item.ExpectedNetAmount). For that, I tried to do something with Extensibility explorer it just allowing me to adjust properties as I said early.

    From SDK when I try to set value for any standard bo field, its in read only.

    I dono whether I could set the value for standard field through SDK or not.

    Kinldy help me.

    Regards

    Swadini Sujanaranjan

    (0) 
    1. De Luca Davide Post author

      Hi Swadini,

      just a question: which is the deployment unit you used for the solution?

      I noticed that Read-Only fields in standard BO can happen in case there is a mismatch in the Deployment Unit of both (the Solution one and the BO one). They should be both set on CustomerRelationshipManagement.

      If this rule has been applied, then I can access to the Item Amount via the following:

      var amount = 58.60;

      this.Item.Create().ExpectedNetAmount.content = amount;

      Please let me know if it works for you.

      Cheers,

      Davide

      (0) 
      1. Swadini Sujanaranjan

        Hi Davide

        Both my custom bo and standard Opportunity has the same deployment unit CustomerRelationshipManagement.

        One more clarification, how can we get the standard field using ‘this’ keyword. I m trying with Opportunity.Item.ExpectedNetAmount.contect = amount;

        Create() is not supported there.

        Please clear my point.

        Regards

        Swadini

        (0) 
          1. De Luca Davide Post author

            Hi Swadini,

            no worries. In the meanwhile I was trying a mock up of your problem.

            At first I set up a new BO like this:

            import AP.Common.GDT as apCommonGDT;

            businessobject BusinessObject1 {

            element OpportunityID:BusinessTransactionDocumentID;
            element CustomAmount:Amount;
            action WriteAmount;

            }

            And then after I set up the action WriteAmount with the following logic:

            import ABSL;
            import AP.Common.GDT;
            import AP.CRM.Global;

            var opportunity:BusinessObject::Opportunity;

            opportunity = Opportunity.Retrieve(this.OpportunityID);

            opportunity.Item.GetFirst().ExpectedNetAmount.content = this.CustomAmount.content;

            This works in my case.
            Probably it’s just a matter of copying the content propriety in a content propriety.

            Glad to be helpful.

            Cheers,

            Davide

            (0) 
            1. Swadini Sujanaranjan

              Hi Davide


              In Event Before save of Item node, I have written the below code:


              var amt = “23.00”;

              var cur = “USD”;

              var expam = this.ExpectedNetAmount.content;

              this.ExpectedNetAmount.Clear();

              this.ExpectedNetAmount.content = amt;

              this.ExpectedNetAmount.currencyCode = cur;


              In debugger its changing but in UI the previous value only resist. What can I do for this. Is there something like commit or save in code?

              Regards

              Swadini S

              (0) 
  3. Abhishek Kumar

    Hi Davide,


    Can you explain,in above before save event-handler,how to create BCO(MONITORED_FIELDS) its list of fields and BCS(Business Configuration Set) and What is field.FIELD_NAME.



    regards,

    Abhishek Kumar.

    (0) 
    1. De Luca Davide Post author

      Hi Abishek,

      you are right. Honestly I thought I had specified that section in the main article, but I have checked that is actually missing. Thank you for noticing.

      The BCO MONITORED_FIELDS has been created just as a Customizing table with a couple of fields: FIELD_NAME and ENABLED, as shown here below:

      MONITORED_FIELDS.png

      The FIELD_NAME field has been created using an external Codelist, in a way I can have an extensible Drop-Down ListBox:

      /wp-content/uploads/2015/06/codelist_730108.png

      The list of Values and Descriptions in the Codelist is totally arbitrary. You can use your favourite values. After building and activating the BCO, the initial Configuration Set has been built has shown here below:

      FIELDS_SET.png

      Of course, you can then generate a Business Configuration View too and publish it into the Implementation Project WorkCenter of your C4C system, as explained in the Cloud Application Studio user manual.

      Please let me know if you need any other information about it.

      Cheers,

      Davide

      (0) 
  4. Abhishek Kumar

    Hi Davide,


    Thanks for your valuable help.Thank you very much.


    But I facing some issues once again  in before save event-handler code,In 1505 releases

    ChangeTypeCode not exist in the system in  var typeCode:ChangeTypeCode;

    And cannot access QueryLastEntry in

    var query = AccountChangeLogEntry.QueryLastEntry.QueryByElements; with mentioned namespaces.

    Also,how to access RefBusinessPartner_InternalID and bp in

    selectionParams.Add(query.RefBusinessPartner_InternalID, “I”, “EQ”, bp);

       






    regards,

    Abhishek Kumar.

    (0) 
    1. De Luca Davide Post author

      Hi Abhishek,

      the ChangeType object is a custom Codelist, useful for bringing always the same constant values and to buind a quick Dropdown ListBox:


      ChangeType.png

      About the QueryLastEntry, it’s just a custom query. You can create it directly by rightclicking on the BO in the Solution Explorer, or you can maybe use the standard QueryByElements query.

      Kind regards,

      Davide

      (0) 
  5. Abhishek Kumar

    Hi Davide,


    Thanks once again.

    I cannot  access ChangeLogReuseLibrary in

    logEntry= AccountChangeLogEntry.Create(

                         ChangeLogReuseLibrary.CreateNewEntry(typeCode, fieldName, “”, newValue, bp, true));

    how to access it, it is custom or standard.

    Kind regards,

    Abhishek Kumar.

    (0) 
  6. Abhishek Kumar

    Hi Davide,



    Please help me to achieve the above task,how to access 

    ChangeLogReuseLibrary in

    logEntry= AccountChangeLogEntry.Create(

                         ChangeLogReuseLibrary.CreateNewEntry(typeCode, fieldName, “”, newValue, bp, true));

    how to access it, it is custom or standard.

    regards,

    Abhishek Kumar.


    (0) 
    1. Horst Schaude

      Hello Ajith,

      Solutions are “sandboxed”. They can only access entities from SAP and from their own solution.

      This is also true for BC Sets. 😛

      Sorry,

         Horst

      (0) 
    1. De Luca Davide Post author

      Thank you, Nikhil.

      But I must say that, with the Release 1508, the functionality is now available on the Standard Solution. Just enable the CHANGES tab in the Account and Customer WorkCenter.

      Cheers,

      Davide

      (0) 
    1. Nikhil W

      Hi Som,

      As of now change history is available only for std BO but i think it must be there for custom business object.
      I am suspecting that it must be available as a reusable component (like notes, attachment etc etc).

      Please check in reusable components. if it is not there you can easily implement it for bespoke BO as well.

      Thanks,

      Nikhil

      (0) 

Leave a Reply