Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

ABAP help for start routine.

Former Member
0 Kudos

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

6 REPLIES 6

Former Member
0 Kudos

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**

0 Kudos

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!

0 Kudos

use function module

DATE_TO_PERIOD_CONVERT

value for parameter<b> i_periv </b> is stored in table <b>t001</b> for each company code.

A

Former Member
0 Kudos

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..

0 Kudos

Thank you Mahesh and Amandeep. Will try to write the routine will more research & learning.

points assigned

Former Member
0 Kudos

Answered. Thanks.