Skip to Content

Hi All,

Mass Data Run feature is only works for custom business object, you can schedule an action for many instances of custom business object using MDR.

But you can not be create MDR on standard BO, however there is always requirement to run a job to update standard object.

We have a work around with this we can update standard object periodically.

We will create a MDR on custom business and in action which will run for MDR, we write logic for updating standard object. I am trying to give you details how can you update standard object with MDR.

Pre-Requisite: You have created a custom business object with an action and query. In my example I will update Customer BO and have extended a field in customer BO and will update this field via MDR.

BO def.JPG            xbo def.JPG

                Custom BO                                                                                                               Customer XBO

MDR will update extended field  “Valid till”, for each instance of available customers

Details Images
Right click on custom BO and create MDR Mdr1.JPG

Enter name of MDR and select custom action where you will  write action to update customer(std) bo.

mdr2.JPG

In step2, select query this query will use in selecting custom bo instance.

for example I have used two fields from query as selection parameter ‘FeedbakID’ and ‘Creation Date’. I will use this query at run time while creating run id for MDR.

mdr3.JPG

In step3, selection option from drop down,

application logs will be deleted by the the retention time.

In Step4, Review all details for MDR and click on finish

In solution explorer “UpdateCustomer.run” content will be created, activate this and right click and create screens. 3 screens will created( OWL, QAF and View)

mdr4.JPGMDR5.JPG

MDR6_1.JPG

Write the logic in custom action which you have selected in MDR to update the customer(std bo), I would suggest does not use this action to change custom bo instance.

This action is querying Customer BO wtithout any selection so it will returns all available customers in BO and then in loop, each instance will get updated.

MDRLogic.JPG
Now Assigned MDR work center view to Work center, I have already have created screens for custom BO, now I have assigned WoC view to custom WoC. view.JPG
Now all the design activity has completed and our MDR is ready, now login into system and assigned Custom work center to your user or any other business user. Before assigning to business user your solution should be scoped.

Create run Id for MDR, click on New button it will open a new window(QAF).

Here you will see two selection parameter has been added, so now we should set query selection parameter in a way so we will only read only one records. In this image with Feedback ID =5 there is only one instance is available. My custom action will run for only this instance, and in action it query all customer instance and update extended field with current system date.

Save and Activate this run id.

.

runid.JPG
Now schedule this run ID schedulre.JPG
Now here you have option to schedule the batch job, you can set  as recurrence(daily weekly etc), however I will start it immediately start immedi.JPG

wait for some time and check for execution details for scheduled run Id.

Once it will be executed maximum severity will become green, in case if it get red then click on log id to check the logs

                 execution.JPG
Now all available customer records has been updated, and added extension field ‘Valid till’ has updated with current system date.               result.JPG

We are touching standard BO by querying in custom BO, and from MDR point of view it will execute single instance of custom bo however custom bo action will read all instance from Customer(standard bo), and update the required value. You should check this link Re: Mass data run-Custom field update with system date on daily basis

Note: You should not work one  customer BO (std BO) when MDR is in execution, there is possibility you may have locked any customer(std bo) instance and MDR will returns lock errors.

There is another very nice blog has written for scheduling MDR every hour, How to create an hourly mass data run in C4C | SCN

Regards

Sunil

To report this post you need to login first.

6 Comments

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

    1. Sunil Kumar Maurya Post author

      Hi

      We have not tried for huge records but what I have updated arround 1580 records.
      As per my knowledge maximum time limit for one MDR package is 10hrs, in this case we have only one instance for MDR and that will keep executing till 10 hrs. I guess you can update many records (arround 5K to 10K). but make sure no records is locked by any other user when you running.

      (0) 
  1. Mohan Babu K J

    Hello Sunil,

    I’ve gone through one of your thread https://archive.sap.com/discussions/thread/3512841 where you had issues updating tickets using MDR. I’ve the same exact problem. Could you please let me know how did you resolve that issue?

    Thanks.

    Regards,
    Mohan Babu

    (0) 
  2. Sunil Kumar Maurya Post author

    It has been long time .. I made bunch of data to update through MDR let say 500 of ticket get updated first then other which bunch would stop we had  to correct manually each ticket.

    (0) 
    1. Katie Bebbington

       

      Hello Sunil,

      Do you have a workaround for the issue where, in your example if one of the Customer BOs fails to save then none of the Customer BOs will be saved?

      (Since everything is run in one package).

      (0) 
  3. Pratyush SINHA

    Hello Sunil

    Thank you for the Blog.

    I have a similar scenario where I need to Update the customer. When the Customer is updated in C4C , Customer in the CRM is also getting updated as there is integration using PI.

    In my  Custom BO, I have all the Customer ID which should be updated . When I run the MDRO, all the customer gets updated. But in 1 Payload I have instances of all the customer which got updated and this doesnt work with PI. I want 1 instance in Payload. Do you have any Idea or a way to achieve this.

    Thanks

    Regards
    Pratyush

    (0) 

Leave a Reply