Skip to content

Posts from the ‘ABAP’ Category

22
Jan
SAP Tricks

Customer-specific text on the SAP Gui logon screen

Why change the SAP login Screen?

Some companies choose to modifiy the login screen to:

  • Give security notice warnings to potential unauthorised access.
  • List client numbers and their use within a system.

The history:

Before Release 4.6 the logon screen was modified through program SAPMSYST screen 0020. From release 4.6 onwards it is simply modified using transaction SE61.

Proceed as follows:

Go to Transaction SE61and select the document class ‘General Text’ (selection using F4 help).

Create a text with the name ZLOGIN_SCREEN_INFO in the system language. (If the text does not exist in the system language, no output is made.)

TIP – Check profile parameter “zcsa/system_language” in transaction RZ11 to determine your system language.

Title lines may be used, as well as very basic text formatting. You may also include standard SAP icons within the message. A tip is to change the editor from within SE61 (Goto–>change editor), this will clearly show you the available character and paragraph codes.

Note: Creating/changing this text requires a changeable system. Therefore, for production systems, SAP recommends maintaining the text in the upstream system and then transporting it. To do this, select a transportable (customer) development class when you create the text and save the active version prior to the export.
The transport is done via the transport object R3TR  DOCT  ZLOGIN_SCREEN_INFO

 

 

18
Jan
SAP Tricks

What to use to measure performance improvement

You know of ST05, ST01 and SE30. But do you know why  you would use one transaction code and not the other? What are the main purposes of each one when it comes to performance improvement and measurement?

To measure and improve performance of ABAP programs – Use SE30 to measure:

  • Excessive or unnecessary use of modularization units
  • CPU-intensive program functions
  • User-specific functions that could be replaced with ABAP statements
  • Inefficient or redundant database access.

In addition you may want to analyze or fine-tune a program’s database accesses – Use ST05 to measure:

  • Database accesses (SQL trace)
  • Table buffers
  • RFC calls
  • Lock operations (client side)

If you wishto fine tune the system – use ST01 to measure:

  • Authorization checks
  • Kernel functions
  • Kernel module

In addition ST01 encompasses the majority of the functionality of ST05.

23
Nov
SAP Tricks

SGEN – The SAP Load Generator

The SAP Load Generator is executed through transacion code SGEN. SGEN may be required to be executed after a large upgrade or release of functionality in a system. If you don’t run SGEN and try to access specific objects the programs may start to be  compiled as they are individually accessed.

 

Quick Overview 

  • SGEN is used to “compile” ABAP programs.
  • It can be used to re-generate all the SAP programs after you change version of your SAP kernel, upgrade your SAP system or apply support packages.
  • It is best to execute it during a period of time with very low user activity.
  • SGEN is a client independent transaction.
  • SGEN can also be used to re-generate objects within a Transport Request from SGEN menu–>Regenerate Existing Load
  • If you want to regenerate loads, make sure that there is enough space available in the database. The space required can be several hundred MB. Generation over all components requires around 2 GB of free space.
  • The runtime depends on the type of hardware configuration and number of objects being generated. (It would not be uncommon for this to take 5 hours.)
  • You can limit the components to be generated, in order to reduce the runtime.
  • You can schedule RSGENINVLAS to automatically regenerate invalidated loads. (Note this report has no selection screen)

 Use

1. Select the generation task.

On the initial screen of transaction SGEN you can select the task that suits the purpose of the generation:

Generate all Objects of Selected Software Components

Choose this strategy if you want to generate the loads of all objects of certain software components. This may be the case, for example, if your system has been reinstalled. Here, the loads that are required for operation are not yet available and must be regenerated.

After selecting this task, the Selection of the Generation Set by Software Components screen appears. Here, you can restrict the amount of objects to be generated by selecting software components. Use the pushbuttons to select the software components you require.

Regenerate After an SAP System Upgrade

After an upgrade, you have to regenerate the ABAP object load in the system.

Regenerate the Objects of the Last Run

This task is suitable, for example, in the following cases:

    • The generation of objects of the generation set that was used in the previous run was terminated and you want to regenerate the remaining objects.
    • You want to regenerate all objects of the generation set that was used in the previous run.

After selecting this task, the following two options are available to you:

    • Restart
      The generation set that was used in the previous run in transaction SGEN is used. Only those objects that were not generated in the previous run or whose generation was terminated due to a system error, are generated.
    • Generation:
      All objects of the generation set used in the previous run of transaction SGEN are generated.

Regenerate Existing Loads

This task allows you to regenerate all ABAP loads and invalidated loads that exist in your system, and to generate loads for objects of a Support Package queue. You have the following options:

    • Generate all Objects with Existing Load
    • Generate Objects with Invalidated Load Only

An object load is invalidated if, since the time the load was generated, activated changes were made to the object or to objects used by this object, such as includes or tables. This may occur by importing a Support Package (SPAM) or a kernel patch.

If you want to generate loads for objects from a Support Package queue, start the task after importing the queue. The task determines the generation set using the invalidated loads in the system. Unlike the Generate objects of a transport request task, this task also takes into account ABAP loads that were invalidated by modified Dictionary objects.

Note: You can also periodically schedule an automatic regeneration of invalidated loads (every night, or at other times when the system load is low, for example). To do this, schedule the RSGENINVLAS report for the relevant time and period. The report then determines the invalidated loads for every type of host in your system at the specified time, and regenerates them.

Generate Objects from a Transport Request

You can use this generation task to regenerate the ABAP load for all objects in a transport request that can be generated. However, this task does not take into consideration ABAP loads that were invalidated by modified Dictionary objects. To include these loads, choose Regenerate Existing Loads -> Generate Objects with Invalidated Load Only.

After choosing this task, a screen appears that allows you to search for the name of the transport request using the selection button, or to specify it directly.

Generation of BSP Applications

This task enables you to generate BSP applications of selected software components.

Each Business Server Page is realized technically by an ABAP object class. When BSP applications are generated, these classes and their ABAP loads are generated. BSP applications are not included in the generation sets of the Generate All Objects of Selected Software Components, Regenerate After an SAP System Upgrade and Regenerate All Existing Loads tasks, since they are optional. You can use this task to deal with these.

After selecting this task, the Selection of the Generation Set by Software Components screen appears. Here you can restrict the amount of BSP applications to be generated by selecting software components. Use the pushbuttons to select the software components you require.

If you quit the generation of BSP applications before it has finished, or if the system terminates generation, the Regenerate the Objects of the Last Run task allows you to resume the generation.

 

2. Select the servers for parallel generation.

The generation is based on a method where the generation set is divided into small subsets that are processed by parallel processes. Depending on resources, available servers are included in the parallel processing, whereby multiple parallel processes run on one server.

From the Selection of Servers for Parallel Generation screen, you can select the servers that are to be used in the parallel processing. Note that loads depend on the machine type (MT) of a host. This means that it only makes sense to parallel process the generation set of servers of the same machine type.

The default selection uses the server that you are logged on to. It corresponds to your logon server and all servers on your system that have the same machine type. If you want to use the default selection, choose Continue.

If you want to exclude individual servers from the generation, or if you want to generate the load for a particular machine type that is different to that of the logon server, then use the pushbutton to select the corresponding servers and choose Continue.

Note: The parallel servers are depicted via the logon groups in transaction RZ12. For transaction SGEN, logon group ‘parallel_generators‘ is created. Do not use this group for your own purposes, as transaction SGEN uses and continually redefines this group.

After you have selected the servers, the system starts to define the generation set dynamically, and stores it in the database (database table GENSETC). This can take several minutes.

Job Monitor Pushbutton

This function allows you to call the job process control directly, without redefining the generation set. By choosing Job Monitor -> Job Overview ->  Spool or Job Log, you can display logs from previous generation jobs.

1
Nov
SAP Tricks

Measure specific portions of ABAP Runtime

Most people know about SE30 which can be used to do an ABAP runtime analysis. However did you know that you are able to dynamically call the runtime analysis for a portion of source code for example a section of a user exit, or for a specific function module?

This is easily done by changing the user variant as follows:

  1. Open SE30
  2. On Measurement restrictions (1/2 way down the page) create/change your user defined variant.
    1. Within the variant under program parts, select the “particular Units” check box and save.

Now from within SE38 for the code you wish to measure – set your breakpoint for the position from which you  wish to measure and another for the position to which you wish to measure.

Go back to SE30 and execute your code when you reach the breakpoint activate the runtime analysis from System–>Utilities–>Runtime Analysis –> Switch On.

Run through the code by selecting F8.

When you reach your end point de-activate the analysis by selecting System–>Utilities–>Runtime Analysis –> Switch Off.

TIP: You can activate the runtime performance analysis start by entering the command prompt code /RON in the transaction box. You can de-activate the analysis by using the command prompt code /ROFF.

NOTE: If you get the message “The Particular “units” option is not selected – S7100.  It means you are not using your new changed default user variant for the execution.

 

21
Sep
SAP Tricks

How to Scan ABAP Sources for Specific Strings

It is simple to locate a string within a program but have you ever wondered how to find all programs where a specific ”string”, or line of text, or object name, is used.

There is a wonderful report which is I use to find ABAP programs related to specific search terms.

  • The Report name is – RPR_ABAP_SOURCE_SCAN 
  • You can execute it from transaction SA38 or SE38.

Some useful benefits of this report are:

You can limit the search range of the programs for example to your custom built developments only for example all programs starting with Y* or Z*.

Tip - Another similar program is RKCTSEAR.

23
Aug
SAP Tricks

ABAP Code Inspector

Do you need to easily check the performance of an ABAP program or do some analysis on its code?

 You can use the transaction SCI.

This is a very powerful transaction code, which can do more than a performance check.

However here is an example of one of the more simpler uses:

 From transaction SCI.

-Enter Person responsible

-Enter A name and version and select the “Create” Icon.

From the new screen

-Select the “Single” radio button

-From the drop down select “PROG Program”

-Enter the program/report you wish to analyse in the adjacent field.

-Under the check variant section enter “PERFORMANCE_CHECKLIST” (If this value does not work simply select the value from the F4 match-code selection list).

-Select Execute

From the next screen select the “Results” Icon (Shift + F6).

17
Aug
SAP Tricks

SAP Table Editing Function

This is a SAP Trick that is possibly too powerful, if authorizations are not in place in your system you dont want to use this too liberally:

To edit the contents of a table (Virtually any table from customizing to database records):

  1. Use transaction SE16n or in some systems transaction n.
  2. Enter the table name and see the records. (Sometimes you may be able to change a tables contents depending on its attributes.)

However if you wish to change most tables regardless of table attributes/control you can do the following:

  1. Use transaction SE16n or in some systems transaction n.
  2. Then enter &sap_edit in the command field.
  3. You will see a message “SAP editing function is activated”.
  4. Now enter the table name and execute to see the records. You will now be able to change the contents of the table.

This SAP technique may be useful to maintain faulty data in your system. But should only be used by a very experienced person.

1
Aug
SAP Tricks

Batch Input Reports

Here are some reports related to batch input:

-   RSBDCSUB -  Process sessions outside transaction SM35
-   RSBDCDRU -  Print session contents (transactions and data)
-   RSBDCLOG -  Process logs
-   RSBDCREO -  Reorganize processed sessions that are still in the system Reorganize logs (delete logs and shrink log file to actual size)

- RSBDC_REORG -  Same as old report RSBDCREO but with selection screen for reorganizing processed sessions.

RSBDCTL3 - Analyze Batch Input logs

12
Jul
SAP Tricks

Batch Input Recordings SM35

What: A Batch Input Recording is a recording of a series of screens and fields

Why: A Batch Input Recording can be used for multiple uses, some of the more common ones are:

  • To test functionality after a change has been done in the system.
  • To enter data into a system.
  • To create a Function module.
  • To create a program.

How: Create a Batch Input Recording via transaction SHDB.

Brief Process:

  1. Transaction SHDB
  2. Select New Recording button.
  3. Enter a recording name and a transaction code for example VD02. (Update mode = A, CATT mode = No CATT, Defualt size checked and all other fields unchecked.)
  4. Start Recording –> Follow the screen and field sequence you wish to record.
  5. At Commit (save) the recording will end and you will be provided with a list of program and screen and field names, with entered values.
  6. Now Save
  7. What you have created now is a simple recording of a sequence of steps with 1 unique set of transactional or master data. As you have no variables in the load/runtime you cannot use this recording to load data or for any other purposes than simple test executions.
  8. An idea on its use – Execute this same recording any time you change customising and wish to run a series of automated non regression tests.
  9. To execute it you need to create a batch input session, from within SHDB select “Create Session”, which will then create a session to be executed in SM35.
  10. Go to SM35 select your session and execute it.

I will do another post with the steps to create a data transfer program using a Batch Input Recording.

Tips:

  • Not all BDC OK codes work such as /nxxxx where xxxx is a transaction code. Another code which does not work is /i
  • If you wish to set the cursor on a field in a screen in the batch input use
    -   Utility field BDC_CURSOR and specify the field name:    For example: Cursor on field HUGO, then BDC_CURSOR = HUGO.
  • To go to the Batch Input menu, choose “System” -> “Services” -> “Batch input”
  • With batch input running, you can:. Delete a running transaction   OK code /bdel or BI menu. Call the next transaction              /n       -”-. Terminate batch input                  /bend    -”-. Set the processing mode  . Process in foreground        OK code /bda  or BI menu   . Display errors only                /bde     -”-. Activate expert mode          OK code /bdx  or BI menu. Deactivate expert mode                /bdy     -”
  • You can record sessions using SHDB (The transaction Recorder).
  • You can examine logs/print/export and archive them with SM35P.
22
Jun
SAP Tricks

ABAP System Fields – Use of structure SYST

Often one needs to use the values of the system structure SYST. Here is an alphabetical list of the different fields followed by a few sentences on the usage of their values.

Alphabetical List

Name Type Length Use Description
ABCDE CHAR 26 Constants Alphabet (A,B,C,…)
APPLI RAW 2 Obsolete
BATCH CHAR 1 Background processing Program runs in the background
BATZD CHAR 1 Obsolete
BATZM CHAR 1 Obsolete
BATZO CHAR 1 Obsolete
BATZS CHAR 1 Obsolete
BATZW CHAR 1 Obsolete
BINPT CHAR 1 Batch input Program runs under batch input
BREP4 CHAR 4 Obsolete
BSPLD CHAR 1 Obsolete
CALLD CHAR 1 ABAP Program Call mode of ABAP program
CALLR CHAR 8 Printing Lists ID for print dialog function
CCURS DEC 9 Obsolete
CCURT DEC 9 Obsolete
CDATE DATS 8 Obsolete
CFWAE CUKY 5 Internal
CHWAE CUKY 5 Internal
COLNO INT4 10 Creating Lists Current column in the list
CPAGE INT4 10 List processing Current page number
CPROG CHAR 40 ABAP Program External procedure call
CTABL CHAR 4 Obsolete
CTYPE CHAR 1 Obsolete
CUCOL INT4 10 Screens Horizontal cursor position at PAI
CUROW INT4 10 Screens Vertical cursor position at PAI
DATAR CHAR 1 Screens Displays user input
DATLO DATS 8 Date and time Local date of user
DATUM DATS 8 Date and time Current (application server) date
DAYST CHAR 1 Date and time Daylight saving time flag
DBCNT INT4 10 Database accesses Number of processed table rows
DBNAM CHAR 20 ABAP Program Linked logical database
DBSYS CHAR 10 R/3 System Name of central database system
DCSYS CHAR 4 Obsolete
DEBUG CHAR 1 Internal
DSNAM CHAR 8 Internal
DYNGR CHAR 4 ABAP Program Screen group of current screen
DYNNR CHAR 4 ABAP Program Number of current screen
ENTRY CHAR 72 Internal
FDAYW INT1 3 Date and time Factory calendar weekday
FDPOS INT4 10 Character strings Offset in character strings
FFILE CHAR 8 Internal
FLENG INT4 10 Internal
FMKEY CHAR 3 Obsolete
FODEC INT4 10 Internal
FOLEN INT4 10 Internal
FTYPE CHAR 1 Internal
GROUP CHAR 1 Internal
HOST CHAR 8 R/3 System Name of application server
INDEX INT4 10 Loops Current loop pass
INPUT CHAR 1 Internal
LANGU LANG 1 R/3 System Current language
LDBPG CHAR 40 ABAP Program Program of logical database
LILLI INT4 10 List processing Selected list row
LINCT INT4 10 Creating Lists Page length of list
LINNO INT4 10 Creating Lists Current row
LINSZ INT4 10 Creating Lists Column width of list
LISEL CHAR 255 List processing Content of selected row
LISTI INT4 10 List processing Index of selected list
LOCDB CHAR 1 Obsolete
LOCOP CHAR 1 Obsolete
LOOPC INT4 10 Screens Number of rows visible in table
LPASS CHAR 4 Internal
LSIND INT4 10 List processing Index of detail list
LSTAT CHAR 16 List processing ID for list levels
MACDB CHAR 4 Obsolete
MACOL INT4 10 Printing Lists Columns from SET MARGIN statement
MANDT CLNT 3 R/3 System Client number from logon
MARKY CHAR 1 Obsolete
MAROW INT4 10 Printing Lists Rows from SET MARGIN statement
MODNO CHAR 1 R/3 System Index of external modes
MSGID CHAR 20 Messages Message class
MSGLI CHAR 60 Messages Message line
MSGNO NUMC 3 Messages Message number
MSGTY CHAR 1 Messages Message type
MSGV1 CHAR 50 Messages Message variable
MSGV2 CHAR 50 Messages Message variable
MSGV3 CHAR 50 Messages Message variable
MSGV4 CHAR 50 Messages Message variable
NEWPA CHAR 1 Internal
NRPAG CHAR 1 Internal
ONCOM CHAR 1 Internal
OPSYS CHAR 10 R/3 System Operating system of application server
PAART CHAR 16 Print parameters Print formatting
PAGCT INT4 10 Obsolete
PAGNO INT4 10 Creating Lists Current page:
PAUTH NUMC 2 Internal
PDEST CHAR 4 Print parameters Output device
PEXPI NUMC 1 Print parameters Retention period
PFKEY CHAR 20 Screens Current GUI status
PLAYO CHAR 5 Internal
PLAYP CHAR 1 Internal
PLIST CHAR 12 Print parameters Name of spool request
PNWPA CHAR 1 Internal
PRABT CHAR 12 Print parameters 

 

Part of cover sheet
PRBIG CHAR 1 Print parameters Selection cover page
PRCOP NUMC 3 Print parameters Number of copies
PRDSN CHAR 6 Print parameters Name of spool dataset
PREFX CHAR 3 Obsolete
PRI40 CHAR 1 Internal
PRIMM CHAR 1 Print parameters Print immediately
PRINI NUMC 1 Internal
PRLOG CHAR 1 Internal
PRNEW CHAR 1 Print parameters New spool request
PRREC CHAR 12 Print parameters Recipient
PRREL CHAR 1 Print parameters Delete after print
PRTXT CHAR 68 Print parameters Text for cover sheet
REPI2 CHAR 40 Internal
REPID CHAR 40 ABAP Program Current main program
RSTRT CHAR 1 Internal
RTITL CHAR 70 Print parameters Title of printing program
SAPRL CHAR 4 R/3 System Release status R/3 System
SCOLS INT4 10 Screens Number of columns
SFNAM CHAR 30 Obsolete
SFOFF INT4 10 Internal
SLSET CHAR 14 Selection screens Name of variant
SPONO NUMC 10 Printing Lists Spool number
SPONR NUMC 10 Obsolete
SROWS INT4 10 Screens Number of rows
STACO INT4 10 List processing First displayed column
STARO INT4 10 List processing Uppermost displayed row
STEPL INT4 10 Screens Index of current table row
SUBCS CHAR 1 Internal
SUBRC INT4 10 Return value Return value after ABAP statement
SUBTY RAW 1 Internal
SYSID CHAR 8 R/3 System Name of R/3 System
TABID CHAR 8 Internal
TABIX INT4 10 Internal Tables Current row index
TCODE CHAR 20 ABAP Program Current transaction code
TFDSN CHAR 8 Obsolete
TFILL INT4 10 Internal Tables Current number of rows
TIMLO TIMS 6 Date and time Local time of user
TITLE CHAR 70 Screens Text in header line
TLENG INT4 10 Internal Tables Row size
TLOPC INT4 10 Internal
TMAXL INT4 10 Obsolete
TNAME CHAR 30 Obsolete
TOCCU INT4 10 Obsolete
TPAGI INT4 10 Obsolete
TSTIS INT4 10 Internal
TTABC INT4 10 Obsolete
TTABI INT4 10 Obsolete
TVAR0 CHAR 20 Creating Lists Text variable for headers
TVAR1 CHAR 20 Creating Lists Text variable for headers
TVAR2 CHAR 20 Creating Lists Text variable for headers
TVAR3 CHAR 20 Creating Lists Text variable for headers
TVAR4 CHAR 20 Creating Lists Text variable for headers
TVAR5 CHAR 20 Creating Lists Text variable for headers
TVAR6 CHAR 20 Creating Lists Text variable for headers
TVAR7 CHAR 20 Creating Lists Text variable for headers
TVAR8 CHAR 20 Creating Lists Text variable for headers
TVAR9 CHAR 20 Creating Lists Text variable for headers
TZONE INT4 10 Date and time Time difference to Greenwich Mean Time
UCOMM CHAR 70 Screens Function code that triggered PAI
ULINE CHAR 255 Constants Horizontal line with length 255
UNAME CHAR 12 R/3 System Logon name of user
UZEIT TIMS 6 Date and time Current (application server) time
VLINE CHAR 1 Constants Vertical line
WAERS CUKY 5 Obsolete
WILLI INT4 10 Obsolete
WINCO INT4 10 Obsolete
WINDI INT4 10 Obsolete
WINRO INT4 10 Obsolete
WINSL CHAR 79 Obsolete
WINX1 INT4 10 Obsolete
WINX2 INT4 10 Obsolete
WINY1 INT4 10 Obsolete
WINY2 INT4 10 Obsolete
WTITL CHAR 1 Creating Lists Flag for standard page header
XCODE CHAR 70 Internal
XFORM CHAR 30 Internal
XPROG CHAR 40 Internal
ZONLO CHAR 6 Date and time Time zone of user

 

Thematic Overview

The following is a thematic summary of the system fields with notes on their use:

Read more »

5
Jun
SAP Tricks

Share Quick View Reports

Have you ever created a Quick View Report using SQVI and then wanted to share that report with another user?

You can do this simply by doing the following:

  1. Run SQVI
  2. Select the report name
  3. Select the menu path: Quick View–>Additional Functions –>Display Report Name

This will give you a dialog box with the report name sometimes with unusual characters such as “=” signs. Select the entire report name and share it with any user whom will be able to execute thee report by using the transaction code SA38.

17
May
SAP Tricks

System Performance Analysis Transaction Codes

Here are some transaction codes I find useful when checking for performance related issues in a system:

Depending on the issue, I start with ST05 with all trace options (SQL, Enqueue, RFC, Buffer) active with a very small time frame where data is captured so as not to have more than +-2000 records.

I then compare the results with an identical capture of the same process and time frame using standard SAP.

With both recordings I activate the extended results, which gives times for each execution. Permitting one to easily see the time differences between the executions. These results should point you in the right direction.

Here are the transaction codes I find useful in this analysis:

  • SM21 – System Log
  • ST03N - R3 Workload statistics
  • ST03G - Global System Workload Analysis
  • STAD - Statistical Records
  • STATTRACE - Functional Trace
  • ST05 - Performance Trace (SQL, Enqueue, RFC, Buffer)
  • SLIN - ABAP Program Syntax Check
  • SE30 - ABAP Runtime Analysis
12
May
SAP Tricks

Send a SAP message via a dialog box in the GUI

This one has been a personal trick of mine for a few years. Use it with caution and hopefully all you system administrators have restricted this functionality (Function Module testing) to responsible users.

There are a number of requirements where you may wish to send a message to a specific user or all users in a system. Yes there are alternative solutions in doing this, but here is a simple and powerful method.

You can send a message which will be pushed to the user on the users desktop via a dialog box through the SAP GUI.  To do this  simply use SE37 and the Function Module “TH_POPUP”.

Beware what values you use in the import parameters.

If you do not use a user ID, the system will send the message to everyone in the system.

If you use a user ID the system will send the message to that user only.  The user must be logged into the system to receive the message.

An example of settings you can use:

  • CLIENT                          211   (Your client)
  • USER                            S1010631     (Your user ID)
  • MESSAGE                         PLEASE RELEASE SALES DOC 1234567 URGENTLY    (Any Message)
  • MESSAGE_LEN                     0
  • CUT_BLANKS

 

2
May
SAP Tricks

Background Job Variants

You may know how to check the parameter values of a variant in SM37 by checking the variant name associated with the program being executed. But what do you do if the variant was created ad-hoc and has not been saved. That is it was a temporary variant with a name similar to SAP&0001.

You can see the values used in temporary variants by doing the following:

From the job overview within SM37:

  1. Select the Job that was run/is running.
  2. Select the “Step” button (Ctrl+Shift+F9)
  3. Select the program name.
  4. Then select the menu path Goto–>Variant

Also – A tip is changing the defaulted Job Overview screen Layout to add the “Executing server” to the display. Do this from within the Job Overview of SM37 by selecting (Ctrl+F7).

26
Apr
SAP Tricks

SM12 – Lock Entries Tips

If you check SM12 you may find some lock entries – this is not a problem. Locked entries are required in standard SAP processing. In most instances the entry will remain in SM12 for a few seconds milliseconds, however they could remain in SM12 for a lot longer depending on the logical unit of work.

Factors which can impact the entry in SM12:

  • Sizing and performance of the enqueue server.
  • Sizing and performance of the application server/number of available processing sessions. (indirectly related)
  • Program logic being executed on the application server.

What you may not know is that there is a hidden menu path for SM12 analysis. To activate this menu path you can do the following:

Run SM12, then enter OK code “test”. You will now see the top menu path has included a new Menu Option labelled “Error Handling”.

This menu option has many parameters and test functions which you can use to analyse the enqueue and dequeue processes.

If you require advice on how to use this new functionality you can refer to OSS note 5424 which is the SM12 FAQ! Success!

3
Mar
SAPTricks

Wild cards in searches

Did you know that a wild card search in a selection such as * is not the only wild card option. A * is used as a wild card for 1 or more characters, while a + may also be used as a wild card for a single character.

14
Feb
SAP Tricks

Compare ABAP objects across systems

So you know how to use OY19 to see and compare cross system customising objects and you know how to use SE39 to see and compare an ABAP program across systems. But do you know how to search and compare all ABAP objects across a system?

For example you have made a system copy and want to compare all Z* and Y* programs?

You can do this with Transaction Code – SREPO - Repository Comparison.

1) Select the RFC destination (you can use SM59 to do this).

2) Select “Customer Objects and Modified SAP objects”

Then follow the wizard.

24
Jan
SAP Tricks

Great ABAP Transaction Code

If you have never used this transaction code before – try it out – ABAPDOCU

It provides the SAP ABAP Documentation with examples.

11
Jan
SAP Tricks

Support Packages

To check the support packages in the System we can go to the menu and select System –> Status then select the component information (magnifying glass) under Sap System Data.

One will then see the following:

  • Software Component
  • Release
  • Level
  • Highest Support
  • Short description

But did you know that the information is depicted in a transaction code SPAM – the Support Package Manager.

Select “All Support Packages” then button “Display”.

If you open the Package header for example: SAP_APPL      -   Logistics and Accounting

You will see the Support packages and their Numbers.

30
Nov
SAP Tricks

Function Modules for SD Reports and Smartforms

These function modules are great to get the information used to populate Smartforms and reports in SD.

Remember you can access the data with transaction SE37 and use the test/execute icon [F8].

Read more »

29
Nov
SAP Tricks

How To: Generate a WSDL from a RFC Function Module

WSDL – Web Service Description language – (WSDL, pronounced ‘wiz-del’) is an XML-based language that provides a model for describing Web services. (A web service is typically an application programming interface (API) or Web API that is accessed via Hypertext Transfer Protocol (HTTP) and executed on a remote system, hosting the requested service.)

An example in layman’s terms is, you can have a RFC (Remote Function Call) function module which is used in SAP for example to create a sales document. You then have a company outside of your system which needs to send the input parameters to your system in order to create the sales document. The process to follow below will create the interface WSDL which the external company can use to place the data. Read more »

17
Nov
LEARN_LOGO-s

BAPI Explorer

RFC  (Remote Function Calls) may be made to the function module on which the BAPI is based. Knowing how to obtain the correct BAPI will therefore help you in your system design.

3 popular BAPI names are: Read more »

16
Nov
LEARN_LOGO-s

BAPI’s and Function Modules

BAPI stands for Business API(Application Program Interface). A BAPI is remotely enabled function module ie it can be invoked from remote programs like standalone JAVA programs, web interface etc.

SAP describes BAPIs (Business Application Programming Interfaces) as “business (not technical) interfaces of an SAP System, which do not require users to have a thorough knowledge of the SAP System or of the SAP development environment.”

One can simply test a function module with transaction SE37. Read more »

4
Nov
SAP Tricks

Check Background Jobs

How do I check all background jobs running at a particular time frame? Read more »

11
Oct
LEARN_LOGO-s

Understanding the Application Server

ERP/ R/3 system architecture consists of amongst others:

  • Presentation Server
  • Application Server
  • Database Server
  1. You can display a list of application servers that have registered themselves with the SAP message server by executing Transaction SM51, or by choosing Administration –> System Administration –>Monitor –>System Monitoring –>Servers.

The application server may have the following Message Types: Services provided by the application server This contains the configured SAP Work Process types (Dialog, update (Update and Upd2), Enqueue, Batch and Spool) as well as the following services:

Read more »

6
Oct
SAP Tricks

Table Edit without SM30 or Maintenance Dialog

We all know you can edit table contents in SM30, but did you know you can also edit table contents in SE16N? Read more »

1
Oct
SAP Tricks

SAP Tips – IDocs – Parallel Processing versus Packet Size

What is best to use for system performance?

It is not a cut and dry answer – both methods are valid and have their strengths and weaknesses. The following will help: Read more »

1
Oct
SAP Tricks

SAP Tips – IDoc Commit and Packet Size

Program – RBDAPP01

Use - Inbound processing of IDocs

Tip - Packet Size – (Field- EDP13-PCKSIZ) Read more »

16
Sep
SAP Tricks

SAP Tips – Work Process Types

Checking SM66 or SM50, the following process types are used:

  • DIA – Work process for executing dialog steps in user transactions
  • UPD – Update process for executing update requests
  • ENQ – Process for executing enqueue requests
  • BTC – Process for executing batch requests
  • SPO – Process for executing spool requests
  • UP2 – Process for executing V2 update requests

Read more »

27
Jul
SAP Tricks

SAP Tips – Using field PSTYV in a Pricing condition table

You want to use the field PSTYV (Sales Document Item Category) that is contained in the structure KOMP (Communication Item Pricing) as a key for a condition table.  However, when you create a condition table (transaction V/03), the system does not propose the field in the field catalog.

For technical reasons, the field PSTYV was included in the structure KOMP, but not in the structure KOMG (Allowed Fields for Condition Structures).

To solve the problem, proceed as follows:

1. Call the ABAP Dictionary (transaction SE11) and create the data type ZZPSTYV. Select PSTYV as the domain. As the short description, you can use ‘ZZ – Sales Document Item Category’ (for example) and as the field labels, you can use the field labels of the data type PSTYV. Save, check and activate your entries.

2. In the ABAP Dictionary (transaction SE11), enter the structure KOMPAZ,  switch to change mode and make the following entries:

Component             Component type

ZZPSTYV                  ZZPSTYV

Save, check and activate the change.

3. Note: Due to the changes in the structure KOMPAZ, the field ZZPSTYV is now known in the structures KOMG and KOMP because the structure KOMPAZ is included in both structures.

4. Call transaction SPRO. Go to ‘Sales and Distribution > Basic Functions > Pricing > Pricing Control’ and execute ‘Define Condition Tables’.  Select ‘Conditions: Allowed fields’ and enter ZZPSTYV as a new entry.

5. Note: When you create the condition table Axxx, you can now use the field ZZPSTYV as a key field.

6. Populate the new field you defined by including the following source code line in the user exit USEREXIT_PRICING_PREPARE_TKOMP:  MOVE xxxx-PSTYV TO TKOMP-ZZPSTYV.

In order processing, the user exit is available in the include MV45AFZZ, and in billing document processing, it is available in the  include RV60AFZZ

Remember too that you can use this technique for other user defined fields. For header fields, use the structure KOMKAZ instead of the structure KOMPAZ, and use the user exit USEREXIT_PRICING_PREPARE_TKOMK instead of the user exit USEREXIT_PRICING_PREPARE_TKOMP.

More information is available in transaction SPRO when you go to ‘Sales and Distribution > System Modifications > Create New Fields (Using Condition Technique) > New Fields for Pricing’, and in OSS Note 21040