cancel
Showing results for 
Search instead for 
Did you mean: 

Routine for start transformation - enhancement of 0EMPLOYEE

Former Member
0 Kudos

Hi experts

I'm enhancing object 0EMPLOYEE with cost center information from infotype 0032.

I need to create a routine to exclude records that are blocked.

This is how my DS looks like

PERNR   SUBTY    OBJPS    SPRPS    ENDDA           BEGDA          SEQNR   ZKOSTL_17

1                                                         01.01.2010      31.12.9999                       Y

1                                               X        01.01.2010      31.12.9999                       X

I've created the following start routine on my transformation:

delete SOURCE_PACKAGE where SPRPS NE ' '.

This is working and in this case the records is not going to infoobject.

But i can have another scenario

On moment 1, a certain employee doens't have SPRPS marked

PERNR   SUBTY    OBJPS    SPRPS    ENDDA           BEGDA          SEQNR   ZKOSTL_17

2                                                         01.01.2010      31.12.9999                       Y

The information goes to BW and ZKOSTL_17 Y is shown as an attribute of employee 2 (for period 01.01.2010 to 31.12.9999).

But on a second moment, that same record can be blocked in R3 (SPRPS = X) and in this case no ZKOSTL_17 should be displayed as an attribute o

0EMPLOYEE.

On the DataSource I will now have

PERNR   SUBTY    OBJPS    SPRPS    ENDDA           BEGDA          SEQNR   ZKOSTL_17

2                                              X          01.01.2010      31.12.9999                       Y

Basically i need a routine tha besides deliting new records with SPRPS NE ' ', deletes field ZKOSTL_17 that is already in BW if SPRPS is equal to X.

CAn anyone help me with this routine? I don't have any ABAP knowledge.

Many thanks

Joana

Accepted Solutions (1)

Accepted Solutions (1)

dheeraj_gupta5
Explorer
0 Kudos

If you are ok that if SPRPS NE ' ' record may exist in database with ZKOSTL_17 = blank then write following code in place of delete styatement

loop at source_package.

if source_package-sprps NE ' '.

source_package-zkostl_17 = ' '.

modify source_package.

endif.

endloop.

Answers (0)