This website is not affiliated with, sponsored by, or approved by SAP AG.

Fox formula question

All postings related to SEM only

Moderators: Snowy, thx4allthefish

Fox formula question

Postby g_a_n_007 » Mon Sep 18, 2006 8:41 pm

I am able to copy thru fox formula from say fiscper 001.2006 to 001.2007.
The Period Variable was 001.2006.

Now I need to have the above run 12 times.

One option is I can run 12 times by setting the period variable every time to 002.2006, 003.2006 etc

Or I should write a formula that will do that for me.


The above requirement is different from copying current period to next 12 periods etc.


Any help Appreciated.
g_a_n_007
 
Posts: 30
Joined: Thu Sep 30, 2004 11:32 am

Postby Pavel Gnedov » Thu Sep 21, 2006 4:55 am

Code: Select all
DATA RMONTH TYPE 0CALMONTH.
DATA HMONTH TYPE 0CALMONTH.
DATA DMONTH TYPE 0CALMONTH.

DATA LMONTH TYPE STRING.

DATA YEAR TYPE STRING.
DATA MON TYPE STRING.

* Example 02.2006
RMONTH = VARV( 'VMONTH' ).
LMONTH = RMONTH.

* End of year fo epaxmle 12.2006
YEAR = SUBSTR (RMONTH,0,4).
MON = YEAR * 100 + 12.
MON = SUBSTR (MON,0,6).
HMONTH = TMVL (MON,0).

DO.
  LMONTH = LMONTH + 1.
  IF LMONTH > HMONTH. EXIT. ENDIF.
  DMONTH = TMVL (LMONTH,0).
{0AMOUNT,DMONTH} = {0AMOUNT,RMONTH}.
{0QUANTITY,DMONTH} = {0QUANTITY,RMONTH}.
ENDDO.
Pavel Gnedov
 
Posts: 36
Joined: Tue Feb 25, 2003 3:54 am
Location: Russia/ St. Oskol/ Moscow

Thanks

Postby g_a_n_007 » Fri Sep 22, 2006 5:02 pm

Substr is not an option for me to use in SEM 3.3. I Think it is available only from BW 3.5 or sem 4.0

But thanks anyway. You have given me some ideas


Thanjs
[/quote]
g_a_n_007
 
Posts: 30
Joined: Thu Sep 30, 2004 11:32 am


Return to SEM

Who is online

Users browsing this forum: No registered users and 1 guest





This website is not affiliated with, sponsored by, or approved by SAP AG.