Using eCATT to automate loading records with specific keys

24 January 2020
Written by Paul Hammersley

As Senior Vice-President of the ALM Products at EPI-USE Labs, Paul Hammersley's portfolio includes test data management, landscape optimisation, and archiving. He has been a remarkable technical force in the SAP arena for over 20 years, and has extensive hands-on experience of implementing Data Sync Manager (DSM) and helping clients to manage data across the breadth of their SAP landscapes.

automating-Header-image-3

Cloning data with Object Sync? Leverage eCATT to set exact keys 

Ever needed to automate repetitive steps with Object Sync? (Object Sync is part of our Data Sync Manager™ (DSM) suite). Keep reading to find out how I chose to do this recently (other ways are of course possible):

I needed to set up around a thousand customer records that matched some data in a partner’s demo system, so we could showcase consistent masking inside and outside of SAP (more to come on that in a future blog). They sent across their file with keys and names which I wanted to replicate in SAP. So, I took two example customers and wanted to clone them.

The reason I needed two was because it mattered whether they were male or female for the masking that would come later. So the challenge was how to renumber the clones when the keys weren’t a complete range, but rather two sets interspersed within a range (for the uninitiated, Object Sync allows you to clone and choose a ‘Start at’ number and then increments that number with each new record it clones – great if you only need one record cloning to a sequential set of numbers).

I thought through all the renumbering options within DSM, and considered trying to code a renumbering exit on the object that could read my seed table...but then I remembered my rather limited (aka criminally poor) coding skills. So I concluded that using the clone option in Object Sync where you clone once and assign the number would be my best bet. I just needed to do it about a thousand times! With any data challenge like this, I first try to guess what the manual effort would be before weighing up other options, and that was a very very quick decision in this case – I needed to automate.

So for anyone out there looking to develop very specific test sets to match an external system - here’s how to go about it...

Creating the Test Script

Back in the day (Clinton was President, Blair PM of the UK - to give you some context) I was rather nifty with LSMW (if I do say so myself). But unfortunately the basic screen recording of LSMW doesn’t work with our screen libraries, so I had to step out of my comfort zone. The computer aided test tool eCATT is a very flexible successor to LSMW, and is the core of automation run via SolMan. The tcode SECATT starts this adventure:Extented-Computer-aided-test-tool-Initial-screen

Enter a name for your new Test Script and Click Create.create-test-script-zph

Enter a Title, and Application Component then click on Pattern.insert-pattern

Choose UI Control and SAPGUI.system-data-container-is-missing

Accept the pop up which means the system we’re in is where the logic will run.record-sap-gui-command

Enter the transaction code you wish to record, in my case the import transaction of DSM to leverage a file I'd previously created with one female customer, and then click Start recording.record-sap-gui-command-2

In the pop up asking for system information just choose Yes to again choose the system you’re in.object-sync-select-sync

And now start teaching ECATT what it should do in the play back:object-sync-sync-details

For my use case the key is the ‘Start at’ value, which for the recording I entered the first in my list since, just like LSMW, the recording will actually commit the activities tracked.object-sync-import-sync

The file I was importing was already masked since DSM5 does this on exit (great for Hybrid cloud but generally pretty good for data privacy in this brave new world of protecting personal data).dsm-monitor-desk-object-function

recording-running

Now my import has been started I can Stop recording by toggling back to the session that started it.create-test-script-zph-os-load-cust

Double click in to the recording by clicking on SAPGUI_1 -.create-test-script-zph-os-load-cust-2

In here you can now see all the glorious screen activity that was going on underneath the hood.load-cust-f

If you expand the steps you should be able to find the places where values were entered. In my case, this is the new key value for my single cloned record. This is what I now wish to make a variable.load-cust-f-2

Which we do by double clicking on that step, and then replacing the next key I used in the recording with a variable name of my choosing. I chose the rather imaginative ‘NEWVAL’.parameter-maintenance

Upon saving we can choose where this variable will come from.
I wanted it to be an Import variable so I chose that radio button and then Yes.zph-os-load-cust-editor

Now we can see the variable as a parameter.
Don’t forget to remove the value you entered in the recording; in my case 93605Extented-Computer-aided-test-tool-Initial-screen-1

Then Save.
Now we must create a ‘Test configuration’, you don’t have to use the same name but I did.create-test-configuration-zph-os-load-cust-f-3

Enter a title and an application component.create-test-configuration-zph-os-load-cust-f-4

Then switch to the Configuration tab and add the test script name.download-variants

Then Click on Download variants, the fourth button from the left.sap-gui-save-as

And choose where to save the file.
I just used the default name which is based on the test configuration name.downloaded-variant-data

Say Yes to the pop up.excel-1

Now open the file in Excel, making sure you keep it in the same format.
Make sure there is a column blank under description. After I saved it and reopened the file it appeared in column 2 again, move it back or the script won’t find it.excel-2

Once you’ve added all your data, save (keeping the file format as it was).ecatt-default

Now on the Variants tab change to External Variants/Path and choose your file.ecatt-file

Save and now Execute.start-option

Choose to process in the Foreground and set your error handling choices. If your file isn't processed then having the error message is handy. Then Execute.

Now you should see your script processing in a new session with the values from your file being used each time. 
And in my case, it gave me the 1300 customers ready to mask with gender specific rules.
data-secure

 

If your file doesn’t process or you get error messages, make sure your GUI has scripting active.sap-logon

Make sure the client settings in SCC4 allow scripting.display-view-details

And make sure the parameter sapgui/user_scripting is TRUE.maintain-profile

There are always at least three ways to do something with DSM, so in a future blog I’ll report back on trying to achieve the same outcome via a user exit on the object. Also, look out for the masking story that used this data I generated with eCATT.

 

OBJECT SYNC: FIND OUT MORE

 

 

 

Explore Popular Tags

SAP S/4HANA Test Data Management Data Sync Manager S/4HANA Migrations SAP SAP migration Data Sync Manager (DSM) Archive Central Object Sync SAP test data management Brownfield DSM Data Secure News Transformation s/4HANA technology EPI-USE Labs SAP data Automation Client Sync Cloud Cloud Migration Decommissioning ERP Greenfield Insider Managed Services SAP Landscape SAP environment SAP systems data copy data scrambling data testing Data Archiving Digital transformation Hybrid PRISM S/4 S/4 system landscape S4HANA SAP Cloud Deployment SAP RISE SAP S/4HANA Assessment SAP SuccessFactors SAP TDMS SAP data privacy & security SLO Sandbox Selective Data Transition (SDT) Sunsetting legacy data Upgrade cloud hosting quality of test data sap testing ALM Accurate test data Agile Archive Cloud Solutions DSM solution Data Privacy Data Security DevOps Display only Governance, Risk Management and Compliance (GRC) Lean secure SAP Legacy PRISM free assessment Production system Rise with SAP SAP Landscape Transformation SAP Road maps SAP SuccessFactors Employee Central Payroll SAP certified solution SAP client copy SAP data migration SAP data privacy and compliance SAP system copy SAP test system landscapes Sunsetting System Analysis TDM Video Webinar cloud environment landscape transformation ABAP Acquisition BW, Big data and IA C/4HANA CRM experience Control Center Controller Copy and mask test data Croatia Croatian kuna to euro conversion Customized service DSM Readiness Assessment DSM for HCM DSM5 Data access Data agility Data footprint Data masking Data minimisation Data privacy compliance Data privacy regulations Data visibility Design Thinking EC ECATT EPI-USE Employee Central Europe Eurozone Event Flexible framework GDPR Hybrid SAP SuccessFactors environment Hybrid SAP and SuccessFactors Hybrid cloud Hyperscaler IDOCs IT Improved productivity and efficiency Infotype 41 Managed Refresh Services Migration OData API PCE PCE XXS PI Pilot Premium Support Services Production ERP Production data Reliable Releases S/4 Hana migrations S/4HANA Private Cloud Edition (PCE) S/4HANA version 1709 SAN SAP AppHaus Network SAP Archive Extractor technology SAP BW SAP Basis SAP HCM SAP HCM Data SAP HR SAP IS-U SAP cloud migrations SAP customers SAP data copying and masking SAP environments SAP experts on call SAP landscape design SAP on AWS SAP roadmap for IS-U SAP system refresh SAP system types SAP test systems SAP-certified SAPinsider Secure scrambled production data for testing Solman Solution Manager Success Story SuccessFactors System Landscape Optimization System conversion Tailored expertise User Experience XXS archiving big data analysis business goals content tables data model data tailored design develop divestiture incremental updates industry sectors masking rules mergers multiple clients new functionality predictive analysis production SAP database regression testing release strategy technical data reductio technical logging technical tables test test data masking
+ See More

Get Instant Updates


Leave a Comment: