Skip to content
Aug 20 14

ABAP OO in your Custom Workflow – Part 3

by admin
Recommend This Post! Tweet about this on TwitterShare on FacebookShare on LinkedInShare on Google+Pin on Pinterest

Lets conclude our exploration of ABAP OO and using it in SAP workflow. In this final post, Bill will continue his discussion of classes, introduce functional method calls, and give us some great tips we can use as we move forward in our own OO coding. Here is a little bit about Bill….

Bill CraigBill Craig is the president of ASAP Consulting Inc., located in Centennial, Colorado.  Bill has over 10 years of experience with SAP ECC systems and integration with SRM.  His areas of expertise include SAP Business Workflow and ABAP development.  He made his way into programming as a COBOL programmer, switching to SAP when the company he worked for migrated from mainframe programming to SAP.  Prior to programming, Bill ran an upholstery shop in Denver, where he managed the workforce, payroll, sales, scheduling and delivery.  You can reach him at bill.craig@asapconsultinginc.com

ABAP Object Oriented Coding and Workflow BOR Integration

In the first part of this blog regarding the use of ABAP OO with SAP Workflow, I explained how to use an ABAP OO class to start a workflow as well as call one of the methods in the class from a work item.  In this final installment I will demonstrate how to instantiate an ABAP OO class from workflow, the use of functional methods, and finally some tips I have learned while developing custom workflows using ABAP OO.

Since BOR is still a common repository for a number of objects it is likely that you have a workflow that is triggered by a traditional BOR event.  But for our demonstration purposes you want to use a class to handle many of the functions and rather than add these methods to the BOR. You want to utilize an ABAP OO class.

read more…

Recommend This Post! Tweet about this on TwitterShare on FacebookShare on LinkedInShare on Google+Pin on Pinterest
Aug 20 14

ABAP OO in your Custom Workflow – Part 2

by admin
Recommend This Post! Tweet about this on TwitterShare on FacebookShare on LinkedInShare on Google+Pin on Pinterest

Lets continue our exploration of ABAP OO and using it in SAP workflow. In this post, Bill will show us how to use ABAP Classes to streamline our code for an easier and elegant solution. Here is a little bit about Bill….

Bill CraigBill Craig is the president of ASAP Consulting Inc., located in Centennial, Colorado.  Bill has over 10 years of experience with SAP ECC systems and integration with SRM.  His areas of expertise include SAP Business Workflow and ABAP development.  He made his way into programming as a COBOL programmer, switching to SAP when the company he worked for migrated from mainframe programming to SAP.  Prior to programming, Bill ran an upholstery shop in Denver, where he managed the workforce, payroll, sales, scheduling and delivery.  You can reach him at bill.craig@asapconsultinginc.com

Using ABAP Object Oriented Coding in your Custom Workflow

In the first part of this blog regarding the use of ABAP OO with SAP Workflow, I explained some of the benefits of using ABAP OO with your custom workflows.  In this part I will go into more detail about creating an ABAP OO class and using it within a workflow.  This blog does not go into great detail about ABAP OO programming so learning some basics via other blogs or books is helpful.

Creating a class that can be used by workflow is a little more time consuming than creating a copy of a standard SAP Business Object and delegating your new object, but once you have done it a few times, it is rather simple and allows you to utilize ABAP OO.

Using SE24 I created a class ZCLZZ_WF_DEMO_CLASS which I will use in this example to represent a vendor.  In order for workflow to be able to use this class you need to add the  interface IF_WORKFLOW.  The important part of this interface is called the Local Persistent Object Reference, which is used to convert the workflow object reference into the specific instance of the ABAP Class, as well as the reciprocal.  This transformation is handled in the two interfaces included with IF_WORKFLOW; BI_PERSISTENT and BI_OBJECT.

read more…

Recommend This Post! Tweet about this on TwitterShare on FacebookShare on LinkedInShare on Google+Pin on Pinterest
Aug 20 14

ABAP OO in your Custom Workflow – Part 1

by admin
Recommend This Post! Tweet about this on TwitterShare on FacebookShare on LinkedInShare on Google+Pin on Pinterest

In the next few installments of this blog I will be inviting a good friend of mine William Craig to teach us about ABAP Object Oriented coding and custom workflow development. Here is a little bit about Bill….

Bill CraigBill Craig is the president of ASAP Consulting Inc., located in Centennial, Colorado.  Bill has over 10 years of experience with SAP ECC systems and integration with SRM.  His areas of expertise include SAP Business Workflow and ABAP development.  He made his way into programming as a COBOL programmer, switching to SAP when the company he worked for migrated from mainframe programming to SAP.  Prior to programming, Bill ran an upholstery shop in Denver, where he managed the workforce, payroll, sales, scheduling and delivery.  You can reach him at bill.craig@asapconsultinginc.com

Using ABAP Object Oriented Coding in your Custom Workflow

SAP Business Workflow was built on an approximation of object orientated programming called the Business Object Repository or BOR.  It uses object oriented techniques which allowed developers the ability to create copies of standard BOR objects, modify them and through inheritance allow them to be used in place of the standard.

This was my comfort zone.  I learned SAP and ABAP programming using BOR (Business Object Repository) objects, creating attributes, coding methods, and developing workflows to meet my client’s needs.  As a workflow consultant I was special, as most of my ABAP friends felt intimidated by the concept of workflow and using Business Objects.   However, as I enjoyed my specialized skill, I started doing a lot more ABAP development apart from workflow, and realized the new tools such as the ABAP workbench were much easier to use that the Business Object editor.

When I used the Business Object Editor I felt I was going back towards my COBOL days of 72 column limitations.  How free I felt being able to write code that continued right past my visible screen.  Then came ABAP OO, and I started to realize my version of object oriented programming, was a far cry from where SAP was heading.  I was an old dog!  I enjoyed the ABAP workbench, but at the same time I intimidated by what seemed to me as a completely new programming language.

read more…

Recommend This Post! Tweet about this on TwitterShare on FacebookShare on LinkedInShare on Google+Pin on Pinterest
Aug 10 14

Using Memory Inspector to Analyze Usage in Real Time

by admin
Recommend This Post! Tweet about this on TwitterShare on FacebookShare on LinkedInShare on Google+Pin on Pinterest

In this installment of our IT Partners blog on ABAP and Quality, I will be inviting a good friend of mine Gennady Shlyapintokh  to teach us about using the Memory Inspector to analyze the memory usage of an ABAP program. Typically, you use the Memory Inspector when you want to find out the following:

  1. How much memory does an ABAP application use? Is the usage higher than I expect it should be?
  2. Does an ABAP application have memory leaks? Does the memory consumption of the application increase over time? If so, where, in which objects?

Here is a brief intro to Gennady…..

ABAP Memory InspectorYears of IT Experience in the USA – 25. Consultant, Developer, Project Leader, President of the Consulting Company. Technologies Used: SAP, Java, Oracle, C, C++, and Visual Basic. Two Master’s Degrees: Oceanography from Russian State Hydrometeorological University, Saint Petersburg. Computer Science from Loyola University, Chicago, IL. USA Companies worked for: Baxter Healthcare, Cardinal Health, Sargent and Lundy, LLC, SAP America, Inc., GSHL Consulting, LLC. Hobbies: Learning, Traveling, Fishing, Boating, Riding Motorcycle, Camping, Hiking, Writing Silly Stories, Speaking Russian on weekends. Countries Lived: USSR, Belarus, Russia, Latvia, Italy, USA. Countries Visited: May be 70? You can reach me at gennady.shlyapintokh@gmail.com

Roll Area Too Small

Here is the problem: The SAP job abended with – Roll Area Too Small error. This is a sure sign of High Memory Usage! A usual step in resolving a job abend problem is to go to the ABAP dump analysis – Transaction ST22. In my case no ST22 entry is created.

Next, I will search on the internet (you can go to http://scn.sap.com/ but these days a regular Google search in most cases is sufficient) produced number of advices mostly checks the memory parameters:

ztta/roll_first
ztta/roll_area
rdisp/roll_SHM
rdisp/roll_MAXFS
em/initial_size_MB
ztta/roll_extension
abap/heap_area_dia
abap/heap_area_nondia
abap/heap_area_total

These parameters are available with the transaction RZ11 – Profile Parameter Maintenance. Also there are recommendations what values these parameters should have. Useful suggestions, no doubts but I have three problems with it: read more…

Recommend This Post! Tweet about this on TwitterShare on FacebookShare on LinkedInShare on Google+Pin on Pinterest
Jul 13 14

Evaluating the Quality of Your ABAP with Code Inspector – Part 3

by admin
Recommend This Post! Tweet about this on TwitterShare on FacebookShare on LinkedInShare on Google+Pin on Pinterest

Tony CecchiniAnthony Cecchini is the President of Information Technology Partners (ITP), an SAP consulting company headquartered in Pennsylvania. ITP offers comprehensive planning, resource allocation, implementation, upgrade, and training assistance to companies. Anthony has over 17 years of experience in SAP R/3 business process analysis and SAP systems integration. His areas of expertise include SAP NetWeaver integration; ALE development; RFC, BAPI, IDoc, Dialog, and Web Dynpro development; and customized Workflow development. You can reach him at ajcecchini@itpsap.com.

 

Standard Checks That Come with the Code Inspector

In this final installment, I’d like to show you some of the built-in checks that come with Code Inspector. They can be grouped into categories, like the one’s below…

Syntax checks
Program generation
Security checks
Performance checks

To help you get the most out of the Code Inspector right away, we want to introduce you to the most important checks in these categories. Remember that you can display the online documentation for an individual check to learn more about it.

 

Syntax Checks

This category contains checks that are associated with the ABAP Syntax Check. All checks are standard tests that are also available individually from the ABAP Workbench. The advantage of applying the checks in the Code Inspector is that you can combine them with other checks and perform them on a set of programs at the same time.

The checks in this category are:

Normal ABAP Syntax Check

This check performs the ABAP Syntax Check, which is also available from most workbench transactions. You control its behavior by setting the following parameters:

-One or Several Errors: Normally the syntax check terminates after the first error is detected, but you can also choose to proceed. If a fatal error is detected or the maximum number of 50 errors is exceeded, the check is terminated.

-With or Without Warnings: In addition to error messages, the syntax check also returns warnings for minor syntax problems, such as missing implementations of interface methods. You can turn these warnings on or off.

Extended Program Check

This check uses the same set of checks that is available with the workbench transaction SLIN for single objects. It processes static checks that are too complicated or too time-consuming for the normal syntax check. The first operation of this check is a normal syntax check. If any error is detected, no further checks are performed. You can learn more about the SLIN transaction by clicking HERE.

The checks can be broken down into the following…..

References to program external units:Verifies that the external program units exist and interfaces are used correctly.  This would include ABAP statements such as CALL TRANSACTION ‘tcod’,  PERFORM form IN PROGRAM program, MESSAGE Ennn, SUBMIT ‘report’, CALL METHOD ‘method’, and of course CALL FUNCTION ‘func’ .

Multi-language enabling: Searches for constructs that hamper the use of a program in different languages — for example, text literals without text IDs. Text literals appear in the language in which they were typed, and are not processed by translation services.

Package check: Detects the illegal use of objects from other packages.

EBCDIC/ASCII portability: Detects whether a program behaves differently in EBCDIC and ASCII (e.g., the comparison of character fields).

Statements in wrong context: Scans for statements that are used in an inappropriate language context. For example, the COMMIT WORK statement within a SELECT … ENDSELECT loop leads to the loss of the database cursor.

Unnecessary items: Searches for form subroutines that are not used in a program, or fields that do not have read access.

read more…

Recommend This Post! Tweet about this on TwitterShare on FacebookShare on LinkedInShare on Google+Pin on Pinterest
default-poup