2007 Aug 29 7:31 PM
Hi ,
We have two Sales ODSs. The first ODS has a key Sales Order, Sales Order item.
The second, sales order, sales order item, fiscal period. ODS1 feeds ODS2.
sample data :
2LIS_11_VAITM
SO SOITEM OCALDAY AMOUNT RECORDMODE
ABC 10 07/03/07 100
ABC 10 08/05/07 -100 X
ABC 10 08/05/07 110 Y
ODS1 (KEY : SALESORDER, SALESORDERITEM)
SO SOITEM OCALDAY AMOUNT
ABC 10 08/05/07 110
ODS2 (KEY: SALESORDER, SALESORDERITEM, FISCPER)
SO SOITEM OFISCPER AMOUNT
ABC 10 07/07 100
ABC 10 08/07 10
To achieve this, in the update rules from ODS1 to ODS2, we convert the ocalday into fiscal period and then sum records with record mode X and record more Y , by key sales order, sales order item and fisc per.
How to write this in ABAP?
Message was edited by:
CC
Hi ,
We have two Sales ODSs. The first ODS has a key Sales Order, Sales Order item.
The second, sales order, sales order item, fiscal period. ODS1 feeds ODS2.
sample data :
2LIS_11_VAITM
SO SOITEM OCALDAY AMOUNT RECORDMODE
ABC 10 07/03/07 100
ABC 10 08/05/07 -100 X
ABC 10 08/05/07 110 Y
ODS1 (KEY : SALESORDER, SALESORDERITEM)
SO SOITEM OCALDAY AMOUNT
ABC 10 08/05/07 110
ODS2 (KEY: SALESORDER, SALESORDERITEM, FISCPER)
SO SOITEM OFISCPER AMOUNT
ABC 10 07/07 100
ABC 10 08/07 10
To achieve this, in the update rules from ODS1 to ODS2, we convert the ocalday into fiscal period and then sum records with record mode X and record more Y , by key sales order, sales order item and fisc per.
How to write this in ABAP?
Message was edited by:
CC
2007 Aug 29 7:37 PM
Hi,
I am not clear with your question.. You want to build the same logic in the start routine in the transformation on ODS2 infosource??
Or if you have already bulit it, then where you want to code it in ABAP now?
Thanks and Best Regards,
Vikas Bittera.
**Points for useful answers**
2007 Aug 29 7:40 PM
Hi Vikas,
The logic needs to be applied when we feed data from ODS1 to ODS2.
I dont know how to convert calday to fiscal period and all in ABAP.
Thanks!
2007 Aug 29 7:54 PM
use function module
DATE_TO_PERIOD_CONVERTvalue for parameter<b> i_periv </b> is stored in table <b>t001</b> for each company code.
A
2007 Aug 29 7:55 PM
HI,
SO SOITEM OCALDAY AMOUNT RECORDMODE
ABC 10 07/03/07 100
ABC 10 08/05/07 -100 X
ABC 10 08/05/07 110 Y
ODS1 (KEY : SALESORDER, SALESORDERITEM)
SO SOITEM OCALDAY AMOUNT
ABC 10 08/05/07 110
ODS2 (KEY: SALESORDER, SALESORDERITEM, FISCPER)
SO SOITEM OFISCPER AMOUNT
ABC 10 <b>07/07</b> 100 fiscal period is not the calender month
ABC 10 <b>08/07</b> 10
you can do this..
data : lv_fiscper(5) type c.
lv_fiscper = 0calday+4(2).
if lv_fiscper >= 4.
lv_fiscper = lv_fiscper - 3.
else.
lv_fisper = lv_fiscper + 9.
endif.
this will give you the fiscal month then just do this.
concatenate lv_fiscper '/' 0calday+2(2) into lv_fiscper..
2007 Aug 29 9:27 PM
Thank you Mahesh and Amandeep. Will try to write the routine will more research & learning.
points assigned
2007 Dec 07 5:26 PM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |