Permission roles derivation (inheritance)

Continuing with SAP alphabet. Hope we both understand that there are template roles and functional and they differ.
First ones are never assigned to end users and in fact are templates for functional roles. We use them to quickly edit function in one place and derive changes to functional. Functional roles are already typed with exact permissions for personnel areas, employee groups and subgroups, business units and other objects.

If you don’t want to die creating all combinatoric variety of functional roles per each personnel area and employee group, you can use derivation tool. When deriving we define master role (template) with a nice user menu, setup authorization objects with organizational levels. Then with easy we create derived role which references to master role. Derived role inherits menu and all authorization objects from the master role. When we do any change in master role it reflects in slave roles. Also we can do any changes in slave roles without any effect to master. You only can’t change user menu in slave role.

In pictures it looks like this.

Create master role

Read More


Right way to organize SAP testing

Why pay for 3rd party test tools and software?

I don’t see any reason and willingness to do that. We have paid enough to SAP to have these tools for free and already integrated into our workflows. Here is a way to organize SAP testing in SAP ERP system. it’s free as already covered by your professional licenses. Solution Manager could be a great extension but even without it classic SAP ERP already has all required tools. It’s just best practice from SAP how to build test plans, test cases, organize testing itself and control every single step. Hundreds of users? User Acceptance Test, Unit-Test, Automated Testing – no problem at all!

Step by step guide how to organize SAP testing

Transaction STWB_1. Create test catalog. There are three main options. Creating manual tests (a-la MS Excel, MS Word), automated eCATT, external (through an external program).

For example, I’ve created two simple tests.

Read More


Organisational Levels – Simplify SAP Permission roles management

How to maintain a huge number of permission roles in SAP?

Have you ever maintained a huge number of permission roles in SAP systems? It’s a nightmare when you need to change dozens of roles to run a new personnel area or a plant. Clever boys in SAP have provided two really working solutions to us. Permission roles inheritance and organizational levels. The first one is explained in details here, while the second part is below for your convenience.

Solution – Organizational Levels

Organisational levels are variables which could be filled centrally instead of filling up in each permission object manually. The organizational level is created in PFCG_ORGFIELD_CREATE report. Run it, fill with technical field name (like PERSK) you want to make available as org. level. If you made a mistake, run PFCG_ORGFIELD_DELETE report to delete. So you create an organizational level for PERSK field in the P_ORGIN object and can set it up within one window. It’s very convenient in HCM where you could have several P_ORGIN objects within a single role.

Change role and authorization in PFCG transaction

Change role and authorization in PFCG transaction

Read More


LSMW errors when you work with files

Sometimes when you load file in LSMW (Read Data step) system throws an error with a code without any human explanation. To understand this I advise you to look at this ABAP code from the standard LSMW program. Having this function module return codes (the same time error codes for LSMW) it would be easier to understand what’s wrong. Here is the list of LSMW errors when you work with text files. This step occurs just before you run convert data in legacy workbench. These return codes represent errors SAP shows us during file read step.

program /SAPDMC/SAP_LSMW_READ_FORMS:
CALL FUNCTION ‘GUI_UPLOAD’
EXPORTING
filename                      = l_filename
filetype                      = l_filetype
codepage                      = l_codepage
*     HAS_FIELD_SEPARATOR           = ‘ ‘
*     HEADER_LENGTH                 = 0
*     READ_BY_LINE                  = ‘X’
*   IMPORTING
*     FILELENGTH                    =
*     HEADER                        =
TABLES
data_tab                      = “l_upload_table”
EXCEPTIONS
file_open_error               = 1
file_read_error               = 2
no_batch                      = 3
gui_refuse_filetransfer       = 4
invalid_type                  = 5
no_authority                  = 6
unknown_error                 = 7
bad_data_format               = 8
header_not_allowed            = 9
separator_not_allowed         = 10
header_too_long               = 11
unknown_dp_error              = 12
access_denied                 = 13
dp_out_of_memory              = 14
disk_full                     = 15
dp_timeout                    = 16
OTHERS                        = 17


How to load multiple files in SAP LSMW

Here is a trick. Some time ago I found how to load hierarchical structures in LSMW from one file. We need to create a file in a special way so that structure record is repeated. These files are hard to create in legacy system particularly when there are no local developers who support the system. That’s why we prefer to work with flat simple files where one file is a single table. But, let me show you how to load multiple files in SAP LSMW tool with ease.

Couple days ago I was loading payroll wage types into SAP with a standard BUS7023 ManagerExtPayroll object. In the output, there is an IDOC which is stored in T558* tables for payroll migration. IDOC structure is a hierarchy itself, where on the top there is an employee, periods are below, and wage types are on the bottom line.

Loading multiple files in SAP LSMW

To simplify I decided to create three files:

  • Employees
  • Periods
  • Wage types

Every other file contains a reference to the previous one. Look what I’ve got.

lsmw_py_0

Read More


Translate WDA texts

One good man wrote an article for me how to translate WDA applications in SAP. Sergey, thank you!

There are three ways to do translation:

1. Online Text Repository (OTR) (transaction SOTR_EDIT)
2. Configuration translation in SE63
3. Data element translation

To find out where to find needed element for translation we need to open WDA component configuration:
trans_1

Read More