Skip to Content
Technical Articles
Author's profile photo Kallol Chakraborty

Easy way to default position details in IT0000 screen through PA40, if EG/ESG/PERSA is changed at the OM side.

Introduction

When someone changes position level details like Employee Group(EG), Employee Sub-Group(ESG), or Personnel Area(PERSA) at the OM level, the same does not get reflected when we run the PA40 actions automatically. And, I didn’t find any standard way to reflect the same at the PA side.

 

Solution

So, to populate the updated field values in the Action(0000) screen, there is an easy fix, which I want to share with everybody through this blog post.

Please check the below section for the details.

We have 2 important includes in SAP HCM namely ZXPADU01 & ZXPADU02 respectively.

The first one: ZXPADU01 is called when an infotype is called & the second one: ZXPADU02 is called when an action is performed on an infotype.

We have to write a few lines of ABAP codes to achieve the above-mentioned functionality in the include ZXPADU01.

Logic

  1. Fetch the latest employee group/subgroup details from the OM infotype: 1013(Employee Group/Subgroup) using the    FM: RH_READ_INFTY and store it in a work area/variable.
  2. Fetch the latest personnel area details from OM infotype 1008(Acct. Assignment Features) using the same FM: RH_READ_INFTY and store it in a work area/variable.

Note: A simple perform will suffice the need of fetching both the infotype details. If created, we have to write the logic of the perform in the includes having similar names like ZXPADFXX. XX is the number of the include.

  1. Declare 3 field symbols.
  2. Assign the screen fields to the 3 field symbols respectively declared earlier in the same fashion provided below.

‘(MP000000)PSPAR-PERSG’ -> Employee Group
‘(MP000000)PSPAR-PERSK’ -> Employee Subgroup
‘(MP000000)PSPAR-WERKS’ -> Personnel Area

      Code

ASSIGN ('(MP000000)PSPAR-PERSG') TO <fs_tmp1>.
ASSIGN ('(MP000000)PSPAR-PERSK') TO <fs_tmp2>.
ASSIGN ('(MP000000)PSPAR-WERKS') TO <fs_tmp3>.
  1. Lastly, assign the latest values of EG/ESG/PERSA to the respective field symbols.

Note: I am using the ABAP 7.4 syntax to avoid the creation of workareas. Creating workareas/variables & using the same to perform the assignment operation will create no issues.

     Code

try.
    <fs_tmp1> =  lt_p1013[ 1 ]-persg.
    <fs_tmp2> =  lt_p1013[ 1 ]-persk.
    <fs_tmp3> =  lt_p1008[ 1 ]-persa.
CATCH cx_sy_itab_line_not_found.
 "Do Nothing
ENDTRY.

Now, everything is done. Just activate & use it. 🙂

The latest values of the EG/ESG/PERSA will get reflected in the IT0000 screen when a PA action is run through PA40.

As this is my first SAP-related blog post, please share your thoughts regarding the same.

 

Assigned Tags

      2 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Santu Sinha
      Santu Sinha

      Good information. Keep it up good work. 🙂

      Author's profile photo BALASUBRAMANIAN AP
      BALASUBRAMANIAN AP

      Though this is a rare scenario..still it is a good idea to fulfill client's requirement..