This blog will provide technical tips and tricks for Adobe Document Server (ADS) used from ABAP stack.
Questions that will be answered are:
How to retrieve ADS version information from ABAP stack?
How to test if the technical and functional connection from ABAP stack to ADS is working?
Where to find information on Adobe LifeCycle Designer?
Where to find more information on further issue analysis?
Reading the Adobe Document Server version from the ABAP stack
Run program FP_PDF_TEST_00 (unfortunately no transaction linked, so you need to run it from SE38 or SA38). Result is the ADS server version information.
ADS link test programs
There are two main test programs to run to check the connection from the ABAP stack to the Adobe Document Server.
First run program FP_PDF_TEST_00 (unfortunately no transaction linked, so you need to run it from SE38 or SA38). The output will be the version number of the Adobe Document server. If this check works, the connection from ABAP to ADS is working at network level and low basis level.
The second test program is called FP_CHECK_DESTINATION_SERVICE (unfortunately no transaction linked, so you need to run it from SE38 or SA38). The output is just number of bytes sent. If this check works, the connection from ABAP to ADS is working for functional forms connection as well.
For developing the forms you need to install Adobe LifeCycle designer on your developer laptop or desktop. The most recent list of versions and patches is kept on dedicated SAP wiki page.
Further issue analysis on setup
Follow the step in this SAP blog for further issue analysis. If this blog does not help, you can use the details from the very extensive OSS note “944221 – Error analysis for problems in form processing”.
SAP has delivered many ADS forms to replace existing SapScript and SmartForms. Unfortunately these are not default turned on. Also not on newly installed systems. To unlock all the standard SAP delivered ADS forms, goto SFW5 and activate the switch ERP_ALL_FORMS:
After this is done, run report RERP_EHP_SHOW_FORM_LIST. This list will give you pointer for each form what to change in customizing to point to new ADS form.
SICF services
Adobe document server connection requires these 2 SICF services to be active:
The general use to print output via ADS is included in the SAP license. If you want to use the advanced interactive form capability: this is subject to extra license. See oss note 750784 – SAP Interactive Forms: Licenses.
This blog will explain one of the most useful new tools from SAP when having to find bugs in standard SAP coding. The ANST (automated notes search tool) is not receiving the recognition that is should get. In usability it is same ease as the SNOTE tool.
If you love SNOTE you will also love the ANST tool! Just try it out.
Questions that will be answered in this blog:
What is the ANST automated notes search tool?
How does is work?
Why should I always use this tool before submitting an incident to SAP?
ANST (advanced notes search tool)
The ANST tool can help you in:
Quickly finding OSS notes for your issue
Check if you Z code is causing the issue or dump, or it is a standard SAP issue
OSS note 1818192 is the ANST FAQ note which also has the minimum version. This note also has an extensive explanation. The how to use below is just a summary.
OSS note 2605555 also contains an excellent PDF inside as attachment, that gives a step by step manual.
How to use the ANST tool?
Start transaction code ANST.
If you launch it for first time you might get an error "ANST001 Fatal Error. Customizing table is not filled". If this is the case follow the solution steps in OSS note 1909768.
In the transaction code box key in the transaction where you have the issue. As example we will use transaction code S_BCE_68001417 (search for authorizations by complex criteria). The user admin is complaining about an incorrect number of selected authorizations that are shown in that transaction.
So key in the transaction code and description (you can keep it same).
Now press execute: the transaction will be called. In the authorization object screen fill out S_DEVELOP and execute again to get the results:
Now leave the transaction recording.
In the left bottom of the screen you can see the recording being written into the trace file:
Depending on the complexity and amount of screens you have passed this can take up to 1 to 10 minutes.
The result is shown after the trace file. The result is sorted per SAP module. If you open the details, you can also see the exact program blocks that were hit during the recording.
Now you can select the modules (if wanted specific code blocks) where you thinks is the issue. After selection hit the Note Search button. The SAP system will now connect to SAP service marketplace and look for the most recent notes for your version, which have not yet been implemented.
The middle note seems to be very relevant. From this screen you can can already link to the note (click on note number) and start download to SNOTE already.
Tips on the selection of the components:
1. Never select more than 1000 components: ANST will reject this
2. The less components you select the faster you get results, and shorter list of potential notes as well
3. If you want you can later retrieve the recording and make a different search on different components: no need to re-record
4. Most of the times you can ignore the basis and cross application and basis notes
5. Run the recording and the result together with your functional consultant: he can help filter the components and select useful notes
Changing settings for maximum amount of notes
Especially in the basis or core ABAP area you will notice that ANST cannot read more than 1000 notes at once. This is a default setting you can easily change. In the main ANST screen hit the Settings button and scroll to the right to increase the maximum notes number:
Using ANST to analyze short dumps
The ANST tool can be used as well to analyze short dumps. Just start the ANST tool and run the steps including the step where the dump occurs. After the dump the ANST tool will trace the modules including the point where the dump occurs.
Make sure OSS note 2535278 is applied: this contains bug fix for the short dump case.
Checking for customer code issues
After the trace file is generated and you have searched for OSS notes, it can be there is still an issue caused by your own customer code. To exclude this (or to check it anyhow), you have to use the button Customer Code from the trace result screen with all the components. Be a bit patient while the tool is scanning for modifications, user-exits, BADI implementations and enhancement spots it came across in the recording.
If you want to analyze implicit and explicit enhancements as well with ANST you must apply OSS note 2408785 first.
ANST clickable demo
SAP has made a nice clickable demo to show you how it works: link to demo.
Use of ANST tool before submitting incident to SAP
Even if the ANST tool does not help you search for the correct OSS note for your issue, the ANST tool can help you in speed up of the incident solution for SAP.
If you want to report the issue to SAP as an incident download the ANST trace file. If you report the incident mention:
ANST tool is used and add the recording
Add list of already implemented OSS notes
You already checked for customer code
With this information the first line processor will have a quick job assigning the incident to the real issue solvers in Walldorf. This will save you valuable time, since the first line normally come with simple list of notes, or also run the ANST tool themselves, and then come with obvious notes.
Increasing the maximum number of objects limit
If you are using the ANST tool on a transaction with many objects (for example ME21n purchase order), you will notice that you cannot search for more than 1000 objects at the same time. Then you have to open subsection and select subtree and run it more than once with different selections. But sometimes one node really expands into more than 1000 objects. In this case, you best increase the maximum object limit. In ANST start screen choose the Settings button can increase the Max.Object counter on the far right of the settings (scrolling required)
Needless to say, more objects do take more time to analyze. But it is worth the wait.
Some standard SAP tables are delivered by SAP as customizing tables with transports, but which are logically and business wise application tables and are maintained directly in production by business people. Example is the currency exchange rate table.
This blog will explain the option and best practices to overcome this.
Questions that will be answered:
What are current settings and how does it work?
When and how to de-customize a standard SAP table?
Current settings
Current settings is bit of hidden feature in SAP systems. Per customizing object you can select if it is using the current settings option or not.
To do this, start transaction SOBJ and select the customizing object or table. The current setting flag is indicated on the example picture below for the currency conversion rate table:
The effect of the Current Settings is as follows: if the system client in SCC4 is set to “Productive” the transport flags are ignored, and the user can directly update the table and save the changes without transport request popup.
On a development or quality system the “Productive” setting is not there and the SAP system will prompt you for transport request. Especially on quality systems this can be quite annoying.
If you want a customizing table to be maintainable directly on development and quality systems, without transport request, you have to de-customize the customizing table.
Always ask for approval for procedure below and document the tables for which this procedure was applied. Pending on your business security and regulatory requirements more approvals and documentation can be needed.
The de-customization procedure
Step 1 starts with transaction SE11 to call up the table. This you have to doc in the development system. In the delivery and maintenance tab the delivery calls normally shows as type C (customizing).
Now edit and change it to type A (application):
In most cases this will do the trick. The change itself you have to put in a transport request.
Step 2 would be to re-generate the maintenance view and de-activate the recording routine. This should look as shown on picture below:
Also this change must be executed on development system and must be put in transport request.
Step 3 is to move the transport request into the quality and later productive system.
RSA1 settings to avoid transport popup for BI objects
Some settings in RSA1 like process chain starters you want to set locally per system. Default SAP asks you for a transport. In RSA1 you can overrule this. Select Transport Connection on the left hand side. Then select the button Object Changeability on top. In the popup right click on the Not Changeable and set it to Everything Changeable for the items that you don’t want a transport popup to come.
The SCI tool is great for analyzing custom code based on SAP delivered checks. For specific reasons you might want to built in your own specific checks that cannot be setup using the out-of-the-box SCI tool.
This blog will answer following questions:
When to setup custom check and when not?
How to setup custom check?
How does my check show up in the SCI and ATC results?
How to document the checks so it really fits into the standard framework?
How to influence the behavior of the checks and the settings for the checks?
When not to set up a custom SCI check?
If you want to do one of the following things, don’t set up custom check:
Change the priority outcome of a check (example from warning to error): use the option to change message priorities for this.
Search for specific string: use the Search functions options in SCI (they can even search trough comment blocks)
How to set up a custom SCI check?
Setting up the new category
First thing to do is to setup a new category. This will act as a placeholder for your checks.
To do this goto SE24 and copy the example class CL_CI_CATEGORY_TEMPLATE to your own Z implementation.
In the copy go to the CONSTRUCTOR method and adapt the description to your needs:
Important here is not to forget to double click on the 000 message and to create the message text: from here the framework will read the description. The quoted description is just for yourself to be able to read the code better.
Implementing the check
Per check you want to have, you need to have an implementation. There are two options here:
Copy one of the two templates (CL_CI_TEST_ROOT_TEMPLATE or CL_CI_TEST_SCAN_TEMPLATE)
Copy one of the existing SCI checks (they all start with CL_CI_) that already resembles the check you want, and modify where needed to make it your own check
The second option is easier to start with.
Hint: first take a good look at the Attributes of an existing check. Some have none (simple check), some have a few tick boxes, and for some you can have a full multiple selection as input. By using a multiple selection which you can fill in the SCI tool, you can avoid hard coding of your checks.
After the copy is done you have to go to the CONSTRUCTOR of your own check:
Important here is not to forget to double click on the message and to create the message text: from here the framework will read the description. The quoted description is just for yourself to be able to read the code better.
The CATEGORY has to refer exactly to the category class you have already created.
On the class level attributes make sure the always present attribute C_MY_NAME has the initial value of the class name of the check you have made.
Depending on the source class check of template you have copied more constant attributes need to be checked or changed.
The actual implementation of the check is to be done in the RUN method. The advantage of copying template or existing check will be obvious in this part, since the complex coding of scanning through source code or fetching other elements like table attributes is already there. You just need to modify when you want a check to fire.
Firing a check happens within the RUN method by invoking the INFORM method. This can be invoked as many times as needed. If not invoked then the check is passed (result zero).
The inform will pass the following to the SCI report tool:
Name of the test (your Z test set in the C_MY_NAME constant attribute you set above)
Point to the code line and statement where your check fired off
Severity level (error, warning, information)
Activating your category and check
To activate your category and check go to transaction SCI and select the menu Code Inspector / Management of / Tests.
Your test will be fully at the bottom since they are Z checks.
Activation of both category and check will not work in one shot.
First activate the category by selecting it and pressing Save. Next activate the custom check by selecting it and press Save.
The text in the description is taken from the text element in the DESCRIPTION that you have made in the CONSTRUCTOR.
Testing the check
After the activation the test is available in SCI. You can make new SCI variant for testing your check. Write a small test program where you are sure the check will fire off. Then run the SCI tool with your check variant to see that your check fires off properly. Now solve the issue and rerun the SCI tool to make sure the check does not fire off any more.
Embedding in SCI and ATC
If your tests all have passed, don’t forget to activate your check in your global SCI variant.
By updating the global SCI variant used in the ATC tool, your check is automatically done as well in the ATC global and local runs.
Finalizing the checks by proper documentation
To make your check look like standard SAP ones you need to spend some time on online documentation of the checks.
First start to document your custom check. To do this start transaction SE61 to create the help text. Switch the Document Class field to Class attribute. Then in the document field put in your Z class for the custom check and for attribute fill out 0000.
Press create and enter your specific help text:
Hint: copy text from standard SAP help text that you like: this saves you lot of time in the lay-outing
Save and activate and your help text is done.
Now you can setup the help text for you own category.
The basic principle of help text is the same, but now you want to hyperlink in the category text to the detailed check help text. This is bit tricky if you don’t know how. To do this select the menu entry Include / Link. The following screen will appear where you can search the referenced check and set up a text for the description:
The end result in the editor is bit ugly since the above nice input screen is translated into technical terms:
In the category help text you can list now all you checks in this way.
End result in the SCI tool help icon will look like this:
The detailed check appears light blue like hyperlink: and it is! If you click it you jump from the category help text straight to your custom check help text.
How to activate the attributes?
You can have attributes for your own check which you can fill out on the SCI screen, and that will be passed to your test.
For this feature to work, you must do following:
Set the HAS_ATTRIBUTES flag to true in the CONSTRUCTOR
Implement the IF_CI_TEST~QUERY_ATTRIBUTES method to define the attributes (tick boxes, fields, multiple selection options) and the text of the attributes
Implement both the GET_ATTRIBUTES and PUT_ATTRIBUTES methods
Hint: by copying right SAP SCI check class that resembles your wanted check, you also will also copy the elements above. Just need to modify it to your own needs.
This blog will explain you the ATC tool to manage your complete custom code base. The name ATC is bit misleading: officially the name is ABAP Test Cockpit, but the tool has nothing to do with test management. It is a code profiling tool.
This blog will answer questions like:
How do I scan my complete custom ABAP code base for issues?
Can I scan custom ABAP code for a complete project?
What is my state of quality of my complete ABAP code base?
The SCI SAP code inspector is nice, but how can I enforce it?
How can I use ATC in the peer review process?
How can I prevent an ABAP workbench from being released if the coding is not ok?
Does the ATC tool replace a peer review?
How do I organize the implementation of the ATC tool in my organization?
How is ATC used in S4HANA migration?
Setting up the ATC tool
Setting up the ATC is quite simple. Just launch transaction code ATC:
Then choose the Configure ATC entry on the screen.
The ATC tool runs on top of the SAP code inspector (SCI). This must be setup first. Choose the variant you have created here as Global Check Variant.
To enable peer review set ATC exemptions to Yes.
If you want to integrate ATC with transport system: set the behavior on Release to either information or error. Be aware that if you set this setting to Error, the transport mechanism will run the ATC tool and will completely block release and transport if any prio 1 or 2 item is found! Only when the issues are solved or exempted, the transport will be released.
This is a great feature for enforcing code standards, but do not switch it on after you have some experience with the ATC tool and your developers are used to the process. Switching it on should also be clearly communicated to basis team and all consultants working on the system. They should be aware of the block coming when releasing transport in SE10 (the description of the block is bit cryptic):
Running the ATC tool
The ATC tool can be run in two different modes:
Globally by development lead for complete custom code base
Locally by developer for one or more of his objects
Running ATC tool globally
To run the ATC tool on all custom code you need to select the Schedule Runs in the ATC tool menu.
Before you can run the tool, you have to create a Run variant. In the setup of this variant it is very important to select the right packages. For custom code only put in Z* in the package selection. If you have projects doing development in separate packages, it is possible to setup a dedicated project variant for that Z project package only.
If you have chosen to use the exemptions and allow pragma’s to be used by the developers, do check the help text in Handling of pragma’s carefully before making a selection.
After the variant has been created, you can now select is and press the Schedule button:
In the next screen before hitting execute, please make sure you have checked the number of processes versus your system hardware. The default value of 10 is pretty aggressive and is assuming a large development system. Use transaction SM50 to check the amount of dialog processes on your system. Don’t fill in more than half the amount of DIA processes than your system has. If you do you might find an angry basis admin at your desk asking you why you are completely filling up your system….
After the executing starts a batch job is triggered, which will fire off as many dialog processes as you have indicated. The amount of time the job takes depends on:
Amount of Z code in your system and selected in your variant
Amount of processes chosen and infrastructure power you have
Using HANA or not (complete code base scanning on HANA runs amazingly fast: full code base of 1000 Z objects with 10 parallel processes can finish under 10 minutes. Running same on slow non-HANA system can run over 8 hours in the night.)
You can use the ATC run monitor to see if your run has finished:
Result of ATC run
When the run is finished go to the Manage Results entry in the ATC menu.
Here you can see the results and the statistics of the results of your run.
If you are working in an agile devops environment this overview screen is very nice. If you run the ATC tool daily or weekly, this can immediately provide you with the needed code quality KPI statistics for the ongoing sprint.
If you select the run results you get a list sorted by priority. Selecting one of the findings will give you the details of the finding (code positing, explanation of reason of the finding):
Double clicking on the object name will immediately jump you to the code program point where the finding is found.
Running the ATC tool locally
The other option is to run the ATC tool locally. In each editor you can call Program/Check/ABAP test cockpit to run the ATC for you specific program.
If you work in Eclipse, you can also run ATC by selecting Run/Run as/Abap test cockpit.
Fixing ATC issues
The easiest way of fixing ATC is simply taking away the root cause. In some cases this simply isn’t possible. Reason can be: you have to select data without full key and ATC is detecting this as error. If agreed upon, you can use the corresponding pragma to suppress the finding in the results. Best practice here is to add a comment line why the pragma was used.
Another sample program:
REPORT zpragma.
DATA: zgs_mara TYPE mara.
* need all for demo, suppress with pragma
SELECT MATNR FROM mara INTO zgs_mara. "#EC CI_NOWHERE
ENDSELECT.
The corresponding ATC result looks like this:
As you can see the error for having no selection clauses is not shown. It is suppressed with the #EC CI_NOWHERE pragma.
The ATC is still throwing issues: there is no check on SY-SUBRC. If needed the ATC tool suggests to use the #EC CI_SUBRC pragma.
Practical use of pragma’s
If you want to allow the pragma’s or not is up to you. The ATC result list can be configured to simply ignore the pragma’s. Best practice is to allow the use of pragma’s, but to demand comment line with explanation. Some pragma’s (like the previous example of not checking sy-subrc) you might suggest not to use at all.
If the issues in ATC cannot be solved by changing the code or using the pragma, the last resort it to request an exemption.
This can be done on the detailed screen of the ATC finding:
Upon requesting the system will ask you to fill out why the exemption is needed:
The approver need to be configured in the ATC overview screen. Only the exempters in that list will be shown here.
Unfortunately the ATC tool forces you now to enter a fixed name here. You cannot send the exemption to the group of approvers.
Judging the exemption
If the admin allows to setup mail on your development system you are lucky and get a mail (if configured in the ATC main configuration screen). If not, you either have to check regularly or ask the developers to tell you if they have submitted and exemption.
In the ATC main screen select the Exemption Browser select the exemptions for which you are the approver:
You get a list of items for you to approve, reject or return to the requester.
Again here: if you don’t have mail system, send a signal to the requester that you did an action.
Dealing with old ABAP code
If you have to perform a change to ABAP code that is created before you implemented the ATC tool, the tool might highlight a lot of issues that are in the old section of the code. Should you fix these issues as well? This depends on the size of the coding and the organizational agreements you make. Typically if the coding is very small (user exit with 20 lines) it is common just to fix it. If the coding is large, best practice is to ignore the findings of the ‘old’ code: it is simply too dangerous and too much work to fix it. Or you can work with the baseline option (see this dedicated blog).
ATC tool versus peer review
The ATC tool does not replace a peer review. It is a tool to speed up the peer review, since the tool takes away the burden of the more technical checks like naming conventions, checks of use of SY-SUBRC, are hard coded text replaced by text symbols etc.
Peer review tasks that cannot be done by the ATC tool:
Judgement if the development itself makes any sense
Judging use of comment lines (sufficient?)
Judging if the coding is structured in readable way: future maintenance can be done easily
Correct use of pragma’s
….
Implementation of the ATC tool in your organization
The ATC tool can be implemented in every organization.
Steps to do:
Organize your code standards: have them documented and approved. This is the basis for the setup of the SCI variant you want to run in the ATC tool.
Deploy the SCI tool in your developer community and make sure they understand and run the tool consistently. This is also the time you can fine tune the outcomes of the SCI tool.
Now setup the ATC tool without Exemptions and without transport block. First run the tool globally only yourself to see and understand the ATC tool results and statistics. This will get you a feeling on how long the tool runs on your system and how many exceptions it will report.
Consider if you want to use the pragma’s fully, partially or not.
Set up the Exemption users and organizational agreements (like dealing with old code).
Start to communicate the use of the ATC tool to your developers. If you didn’t think about the pragma’s and the exemption process you will very soon receive many questions from the developers.
If the ATC process with exemptions is running stable, if you want you can now turn on the transport block to avoid any bad code from being released.
From step 1 to step 7 can take several months depending on the speed you can organize, agree and communicate the usage of the standards and tools. Don’t rush it without having the proper communication and organization.
Reorganization of ATC data
If you have large custom code base and run ATC often, the results table SATC_RT_RUN_EXE might get large and your system admin might complain to you about it. If this is the case you can schedule clean up program SATC_AC_REORG_REPOSITORY on weekly basis.
Running ATC central for more systems or against older versions: remote ATC
If you want to run ACT centrally for more development systems, or against an older SAP version not yet enabled for ATC: please read this blog on remote ATC.
ATC settings logging
The ATC setting changes are not logged. The logging is needed if you have a large crew of ABAP developers and apply the rules strictly (for example if you use the option to give an Error on transport release with ATC). To achieve this, switch on table logging for table TRCHECK.
SAP code inspector is a SAP delivered tool to quickly inspect your custom built ABAP code.
This blog will answer following questions:
Why use SAP code inspector?
SAP code inspector versus other source code scanner tools
How to setup SAP code inspector?
Which SCI checks are recommended in general?
Which SCI checks are a must do for S/4 HANA readiness?
Why use SAP code inspector?
SAP code inspector can be used by both ABAP developer or customer who has outsourced ABAP development. The SAP code inspector will check custom ABAP code for:
Potential performance issues
Potential usability restrictions
Robust programming checks
Use of ABAP code naming conventions
Scan for certain statements if wanted
The code inspector has been given big boost last few years by SAP, since has become primary tool to prepare custom ABAP code for S/4 HANA.
SAP code inspector versus other source code tool scanners?
Several major IT parties have setup their own custom build source code inspector tool. In the past these tools could deliver source code scanning functions that SAP did not provide in SCI.
With the improvements done last years on preparing ABAP code for S/4 HANA the SCI tool is now so mature that there are almost no checks missing any more.
The setback of other source code tool scanners is their lack of integration with the SAP development tools (SE38, SE80, SE24, SE37, Eclipse ADT, etc).
How to setup SAP code inspector?
Setting up SAP code inspector is quite straightforward. Start transaction SCI and you come to the main SCI screen.
In this main screen goto the part for Check Variant. Give it a name and make sure that the icon next to Name is switched to global variant as is shown in the screenshot:
Now press create and the empty variant screen is shown.
By clicking on the i icon you can get detailed information on the checks.
By default no checks are active and you have to select which checks are relevant for you.
Let’s go over a few important ones.
Make sure the performance checks are on:
Under Syntax Check make sure the classical SLIN extended program checks is switched on:
In the robust programming section switch on the SY-SUBRC handling. Here you have to take care (as do some other checks) to fill out the details (click on the green multiple selection symbol):
Finally (this is optional) you can also set the ABAP naming conventions:
Setting the variant as DEFAULT SCI variant
If we want to run the SCI tool from code editor the variant DEFAULT is used. This is different variant then we just created. To set the variant for SCI tooling for our own created variant, goto tcode SE16 and edit the contents of table SCICHKV_ALTER:
In the CHECKVNAME_NEW enter the name of the created SCI variant.
Running the SCI tool
The SCI tool can be run from different places. You can run it from tcode SCI itself by entering object or transport there. Or you can run it from code editor and selecting the menu Program/Check/Code Inspector.
Let’s use this sample program:
REPORT zscidemo.
DATA: zlt_vbak TYPE TABLE OF vbak.
DATA: zls_vbak TYPE vbak.
SELECT * FROM vbak INTO TABLE zlt_vbak.
LOOP AT zlt_vbak INTO zls_vbak.
WRITE: / zls_vbak-vbeln.
ENDLOOP.
And now we run code inspector. Results:
The result shows 3 aspects:
Use of SELECT * on large table
SY-SUBRC is not handled after the read: this is correct and should have been done
Naming conventions of variables are not according to settings
After the run the developer can repair the items and rerun as much as needed.
SAP SCI will determine the severity of the found issue into Critical (error/red), Warnings (yellow) and Information (green).
Fine-tuning the SCI message priority
For several reasons you want to fine-tune the SCI message priority. Some check you regard as less important than SAP and some check you regard as more important then SAP is rating them in the SCI standard settings.
If you are in the main SCI screen choose the menu entry Code Inspector/Management Of/ Message Priorities, you come to the screen to adjust and fine-tune the priorities:
The example show is the increase of the check from warning to error (yes, it is still the German Fehler) for the omission of SY-SUBRC check after direct database update.
SCI tool and S/4 HANA migration
When you are in the process of migrating or thinking to migrate to S/4 HANA, then the SCI tool checks play a central role in preparing the custom ABAP code.
You can run these new variants specifically, but it is best to already incorporate these checks into your existing SCI main variant. Even if you don’t plan to upgrade, the checks are good anyhow.
Most important highlights:
Mandatory use of ORDER BY or SORT BY (this check is vital: if not done it can even cause functionality issues!)
Unsecure use of FOR ALL ENTRIES (if not checked if table has entries, ALL database entries will be read, which causes both functional issues and kills performance)
Don’t use SELECT * (code will work, but in HANA this is a performance killer)
Checking for database hints (you rarely see this in custom code, but if done code will not properly work after migration)
This last check is bit hidden: open the multiple selection and in the details make sure Native SQL and DB hints are checked on.
If you want to check your complete Z code base or a larger block for a project, you can use the ATC tool. The ATC tool uses the SCI checks to analyze large blocks of Z code.
This blog will explain the normal aftercare that needs to happen after an SAP system is upgrade or has been patches with support packages.
Questions that will be answered:
What is the normal processing sequence in SPAU?
What is the new SPAU_ENH transaction?
Which aftercare is needed when using embedded search via TREX or HANA?
Which aftercare is needed for the authorization team?
What are the general sanity checks after an upgrade?
How to regenerate SAP_ALL and SAP_NEW?
How can I check for new or altered security parameters?
What other things to do after upgrade?
SEGW issues after upgrade, how to solve them?
SPAU processing
For extensive explanation on SPAU, read the dedicated blog. The below is a summary.
When starting transaction SPAU in a netweaver 7.50 or higher system the screen will look as follows:
First thing to do is to hit the Reset OSS notes button or Prepare OSS notes button (the name can differ bit per version):
This will download all OSS notes again and automatically mark the obsolete ones and will remove them from the list. Wait until the batch job doing this job for you is finished. This will save you a lot of time.
In a 7.50 or higher system look at OSS note 2532229 that solves a bug with notes in adjustment mode.
Second step is to process all the OSS notes. Don’t start the other activities until the OSS notes are done.
Third step is to process the tab With Assistant. Only when this is done continue with the tab Without Assistant.
The steps Deletions, Migrations and Translations are optional, but best to do as well. Deletions can be many, but here you can select all and reset to SAP quite quickly.
SPAU_ENH to process enhancements
Often forgotten is the post processing with transaction SPAU_ENH.
If there are changes in enhancements made by SAP conflicts with customer implementations can occur. SPAU_ENH will list them, and you can process them. If forgotten the customer implementation might not be called, which can lead to functionality giving errors.
After any upgrade/support package the basis person must run the RTCCTOOL program. This will check and list any needed updates.
In almost all cases the actions behind the button Addons&Upgr must be triggered by the basis person.
DMIS plug in OSS notes
If you are using the DMIS plugin for SLT, then you need to run the DMIS note analyzer program(s) again after the support package or upgrade. More information: read this blog.
Scenario
Report name
Object Based Transformation (OBT)
CNV_NOTE_ANALYZER_OBT
ABAP Integration for SAP Data Intelligence (DI)
CNV_NOTE_ANALYZER_DI
S4HANA Migration Cockpit (MC)
CNV_NOTE_ANALYZER_MC_EXT
SAP Landscape Transformation (SLT) Replication Server
CNV_NOTE_ANALYZER_SLT
Near Zero Downtime Technology (NZDT)
CNV_NOTE_ANALYZER_NZDT
Embedded search post processing
With an upgrade or support package SAP will deliver new improved version of embedded search models. If you are using embedded search you have to do post processing to make use of these new improved versions.
By default SAP will keep using the old model to make sure the search function keeps working. The basis administrator can then update the search models at their convenience.
To update start transaction ESH_COCKPIT:
Then from the Other drop down select the option Model modified:
Note: if there are no Model modified present, but you do get the message like "update in background started", then wait until the model update background job is finished. This job can take long time. If finished restart transaction code ESH_COCKPIT again.
Select all to be updated (or in case there is a lot a subsection). Then select from Actions menu the Update option:
Then you have to wait (a lot). Even on HANA this will take a long time.
You might get a message that you yourself are locking the update process: in this case, wait until your processes in the background are done (SM66 monitoring) and then try again, or use smaller selection.
Alternative is to delete the search model after the upgrade and redo completely. For setting up search model in S4HANA read this dedicated blog.
The authorization team needs to do post processing in the SU25 transaction to update profile generator.
Upon starting this transaction after the upgrade or support packages it will prompt you for having checked OSS note 440231 (SU25 preparation FAQ note).
Do download the most recent version (redownload the OSS note!) and read the content. The note cannot be applied automatically (it will say cannot be implemented). This is because it is a FAQ note. If you open the content scroll to your version and check the OSS notes. Make sure the notes listed there are applied to your system before continuing with SU25.
Then startup SU25 again and process steps 2a, 2b and 2c:
After any SAP support package or upgrade, SAP will improve and/or change the standard clean up jobs.
To do this: go to SM36 and click the button Standard Jobs. Then select the Default Scheduling job. Then the system will tell you which jobs will be stopped (no longer needed), changed and new jobs there will be planned. See also the technical clean up blog.
If you use custom IMG nodes, you have to re-integrate your node into the main IMG using transaction S_IMG_EXTENSION. For more information see the blog on setting up custom IMG nodes.
Updating requirements and formulas
After an upgrade or support package the requirements and formulas might need to be regenerated via program RV80HGEN. More details: read this blog.
Updating ABAP where used list
After an upgrade or support package the ABAP where used list must be regenerated again. Read this dedicated blog.
General sanity checks after an upgrade
The basic sanity checks after an upgrade actually start before the upgrade!
Before the system is being upgraded, you should check following items:
If you check this at regular intervals before the upgrade you get a good mental picture (you can also take screen shots before the upgrade) of the issues already present in the system.
After the system upgrade and/or support package you check these items again. Because you checked before it is easy for you to see and filter out new items. New items can be analyzed for solution (can be SAP note that is needed, custom code that is not properly updated, changes in functionality, etc).
SGEN code generation
After support pack or upgrade you can use transaction SGEN to generate all ABAP code (standard SAP and custom) and check for errors in code generation. More information in this blog.
After a support pack most security parameters remain the same. After and upgrade you need to check for new or altered security parameters. For S4HANA upgrade there is special note and program to quickly check for new and altered security parameters including the SAP recommendation: read more in this blog.
Other things to do after an upgrade
After an upgrade you can scan and check for new or enhanced functions you can use.
Examples to check:
Update the SCI variants delivered by SAP (see blog)
SAP audit logging will deliver new checks, but these are deselected after the upgrade
If using enterprise search: check if SAP delivered new search models that might be interesting for the business
This blog is about the new and too much unknown new Swiss knife for idocs: the WLF_IDOC transaction.
The blog will answer questions like:
What are the new features of the WLF_IDOC transaction?
Which transactions does WLF_IDOC replace?
Why should I start using the WLF_IDOC transaction?
How can I search in idoc content?
Idoc listing
The first function WLF_IDOC replaces are the idoc listing transactions WE02 and WE05.
Starting up WLF_IDOC will give you first screen to enter selections for idocs:
This will give you the output screen with the list:
So far nothing new.
The new part is the single idoc view:
The idoc segments are shown on the left hand side and the idoc statuses top right.
The main new difference is when you select a segment on the left hand side, the right hand side bottom view will show you ALL the segments of that name in the idoc. This will give you a more complete overview of the idoc content. There is no need any more to scroll through the segments one by one: you see all in one shot.
Compare content of 2 idocs
If you are in the list screen of the idocs in WLF_IDOC, you can select two idocs and then use the idoc compare icon to compare the content of the selected idocs:
End result:
This output screen now shows you the differences in the two selected idocs.
Idoc reprocessing
From the list overview you can start the idoc reprocessing for idocs with status 51. If you select and idoc and press the Process button:
you will be given following choices:
You can do online, background or jump to the classical BD87 idoc reprocessing transaction.
In the overview screen you can select multiple idocs as well for mass processing.
Change idoc status
If you have selected idocs in the overview screen you can use this button to change the idoc status:
You can use this for example to change status 51 (error in processing) to status 68 (error – no further processing) to avoid the idoc from ever being processed again.
Search in idoc content
In the selection screen of WLF_IDOC content there is a tab called criteria for data record.
This tab can be used to filter idocs based on content of the idoc for a field fo the segment. You can select based on 1 filter (just leave the second one empty). Or you can use it to have and / or selection of the content of 2 segment data fields.
This can be used for example to fast select all the idocs for a certain material number inside the idocs.
Do keep in mind that the idocs are still filtered based on the data in the first tab (status, date, idoc type, etc.).
Alternative transaction for search is WE09.
Editing idoc content
To be able to edit idoc content, there are 2 ways:
Classic BD87 and WE19 test tool approaches (BD87 can be used also in production, but WE19 should not be used in production): from WLF_IDOC you can go to BD87 by selecting an idoc and press Process (then select BD87 dialog), or go to WE19 by selecting an idoc and selecting menu option Utilities/Idoc Test Tool.
Allowing some idoc fields to be edited directly
To allow some idoc fields to be edited, you first have to customize this. In SPRO go to the menu path Cross-Application Components, then select Idoc Monitor for Agency Business and Retail (yes, it is a strange place), finally select Idoc Maintenance Settings.
Now enter the message type and segment you will allow editing. And in the details specify the fields that should be editable. Example is given below:
In the WLF_IDOC transaction, you can now select and idoc from the main screen and press the change button. In the details these fields have become editable (and only these fields):
Make the changes and save the idoc. Go back to the main screen in WLF_IDOC and you can reprocess the idoc via the Execute/reprocess idoc button.
You have to indicate the editing per message type/segment/field. It is not suitable for mass processing or test functions. This is really meant for a limited amount of fields in a productive system where business needs to correct idocs (most likely wrong reference numbers or dates).
Running in productive systems
This section requires intermediate SAP knowledge
When you run WLF_IDOC in a productive system (in SCC4 system is set to productive) some functions are restricted:
Change control record
Copy IDOC and delete segment
Change status
If you still want to use these functions, you must have proper authorizations. Next to that add parameter RWLFIDOC_NEW_EXPERT with value X in your user defaults (transaction code SU3).
If you are in WLF_IDOC, key in &expert into the transaction code area and you will be switching to Expert Mode where these functions are available.