on 05-07-2012 6:13 PM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.