Getting GRdate in 2LIS_02_SCL using Processkey
Hi, I have a question about datasource 2LIS_02_SCL.
there are two FILEDS: 1. BUDAT: Posting Date of Goods Receipt or Invoice Receipt for the Purchase Order
2.BWVORG: SAP BW - Transaction Key
I want to seperate BUDAT into two field: GRdate and Invoicedate using BWVORG. Just as following:
I have the following data:
EBELN EBELP BUDAT BWVORG BWGEOO
1000000608 10 001 800
1000000608 10 20080101 002 600
1000000608 10 20080201 003 500
1000000608 10 20080215 003 -500
1000000608 10 20080305 003 600
My problem is about the GRdate, I have the following transformation routine code:
If SOURCE_FIELDS-BWVORG = 002. RESULT = SOURCE_FIELDS-BUDAT.
When I extract the data into DSO which the key is EBELN and EBELP, the GRdate is 00000000.
Because when BWVORG is 003, it will overwrite the GRdate using BUDAT. I want to not update the GRdate when
BWVORG is 003.
But I don't know how to write the ROUTINE CODE. Could anyone help me?
I have checked the BW 3.5 routine, it use RETURNCODE to control this.
if the returncode is not equal zero, the result will not be updated
RETURNCODE = 0.
RETURNCODE = 4.
But in BW 7.0 it's not work.
Can anyone help me? Thanks a lot!