cancel
Showing results for 
Search instead for 
Did you mean: 

How to Ignore reversed period dates?

Former Member
0 Kudos

We have a very strange situation regarding the basic pay infotype of the employee. While I was loading attributes of 0employee, I came across an error stating that there are invalid dates and indeed I discovered on ERP side that there are several old records with reversed start/end period dates. Example: Start Date 01/06/2013 and End Date 30/04/2013...yes, you read that right the start date is AFTER the end date. I talked to the guys responsible and they said that at one time they did something that caused this error but they can't reverse it now because there are several payroll runs that occurred after this so I have to live with it.

Now my question is how do I live with it? Is there any option to tell the system to just ignore these records during the load instead of causing errors and stopping the process?

Accepted Solutions (1)

Accepted Solutions (1)

former_member182470
Active Contributor
0 Kudos

1)Modify your standard extractor to exclude these records by checking whose Start date is greater than End Date

                                                             OR

2) Create a Start routine to filter these records with the same logic

                                                             OR

3) Otherwise, edit these records in PSA and proceed further

Former Member
0 Kudos

Thank you for the quick reply, can you further illustrate where the "start date greater than end date" check box you mentioned exists

former_member182470
Active Contributor
0 Kudos

There is no checkbox. I was telling you the logic to be written in your Code.

Former Member
0 Kudos

Ok I got it but since coding isn't quite an option when I try loading the data to PSA only to edit it, instead of bringing in the 50,000 records that are usually brought, the load brings only around 6000 records which do not contain the erroneous periods. What might cause this strange behavior?

former_member182470
Active Contributor
0 Kudos

PSA datapackage size settings can be found in RSCUSTV6 t-code.

Former Member
0 Kudos

I am quite sure nobody edited this between the 50000 erroneous direct-to-infoObject load and the 6000 non-erroneous psa-only load. Looking at the data I am getting the feeling that somehow time dependent stuff simply isn't there/didn't get loaded!

Answers (3)

Answers (3)

former_member182516
Active Contributor
0 Kudos

Hi,

Ask your business or HR functional person to create a new entry with  correct values. As 0employee_attr data source will extract delta data it will extract the latest entry, there won't be any problem for you.

Also can you post the PA0000 entry screen shot for which pernr you are facing the issue?

For ex if you see the below screen shot the pernr 1149 latest updated record at the bottom will be extracted rest won't be as this is the new n modified entry on the pernr.

Skipping the entry will not extract data to BW, there is a chance of loss of that particular master data record in BW.

If this is not solving the issue then try to Write an ABAP logic as suggested by others.

Former Member
0 Kudos

I am working with 0EMPLOYEE_ATTR data source which doesn't seem to be delta-enabled (only showing the full load option)

Screenshot:

This is but one of several employees I am having this problem with

former_member182470
Active Contributor
0 Kudos

Hi Sayyad,

Whether it if Full or Delta, you must write a Start routine in BW system to filter as per the logic. A simple delete statement with Where clause can skip the unwanted records from PSA on wards.

Regards,

Suman

former_member182516
Active Contributor
0 Kudos

yes i agree , i did not check.

If you are using system BW 3.X, Create a start routine and use below code:

   DATA: l_s_datapak TYPE transfer_structure.
   DATA: l_t_datapak TYPE transfer_structure.

   FREE l_t_datapak.
   LOOP AT datapak INTO l_s_datapak.
     IF l_s_datapak-datefrom LE l_s_datapak-dateto.
       APPEND l_s_datapak TO l_t_datapak.
     ENDIF.
   ENDLOOP.
  
   FREE datapak.
   datapak[] = l_t_datapak[].

If you are using system BW 7.X, Create a start routine and use below code:

   DATA: l_t_result TYPE _ty_t_SC_1.

   FREE l_t_datapak.

   LOOP AT source_Package ASSIGNING <SOURCE_FIELDS>.

     IF <SOURCE_FIELDS>-datefrom LE <SOURCE_FIELDS>-dateto.

       APPEND <SOURCE_FIELDS> TO l_t_result.

     ENDIF.

   ENDLOOP.

  

   FREE source_Package.

   source_Package[] = l_t_result[].

Thanks,

KP

anshu_lilhori
Active Contributor
0 Kudos

Hi,

My suggestion would be to do this in start routine while looping on source_package and writing a condition

IF valid from GT valid to

Store the values of these two dates in two variables and then assign them other way around.

Hope this helps.

Regards,

AL

MGrob
Active Contributor
0 Kudos

Hi

While loading your 0employee you build in a startroutine that does a check ensuring the 0datefrom is lower than 0dateto and if not you skip the record.

that should fix your issue

Martin

Former Member
0 Kudos

Thank you for your response but the problem is, I am no Abaper/coder nor do I have one available so I do not know how to do this.

MGrob
Active Contributor
0 Kudos

Hi

It's a simple IF statement you need. something like IF SOURCE-FIELDS-0DATEFROM > SOURCE-FIELDS-0DATETO.

Martin

MGrob
Active Contributor
0 Kudos

Hi

It's a simple IF statement you need. something like IF SOURCE-FIELDS-0DATEFROM > SOURCE-FIELDS-0DATETO.

Martin