Skip to Content
author's profile photo Former Member
Former Member

Fox formula problem

Hi experts,

i'm relatively new to BI Integrated planning and have looked around the forums if i could find anything that helps me out.

So far i did not succeed.

in web application designer we have a dataset which is restricted by a few variables which are on the filter for the aggregation level and for the query.

I am trying to create a function which does the following things

- walk through my dataset and find the max value for a particular characteristic (sequence number).

- adds 1 to the the found max value so far.

- then creates (copies) a new record with only the sequence number different from the existing records.

In the characteristics to be changed i only used the sequence nummber characteristic (ZCSTSQNR in the code below).

i tried a lot of things but it doesn't work so far.

My first problem is how to walk through the dataset

i tried FOREACH but the values ii get are not the ones i have in my dataset.

Can anybody explain this?

Can it be caused by binding variables or so?

Also my copy statement isn't working properly.

It seems to work. AT least the message statement shows me the values i expect but i don't get any new records.

Underneath the code i made so far:

DATA PKP TYPE 0COSTCENTER.

DATA PKS TYPE 0COSTELMNT.

DATA RESULT TYPE ZCSTSQNR.

DATA ORIG TYPE ZCSTSQNR.

DATA TELLER TYPE ZCSTSQNR.

DATA KEYFIGURE TYPE KEYFIGURE_NAME.

DATA AMNT TYPE F.

*trying to walk the dataset

FOREACH ORIG.

PKP = OBJV( ).

PKS = OBJV( ).

MESSAGE I000(RSPLS) WITH PKP 'PKS: ' PKS ORIG.

IF ORIG > TELLER.

TELLER = ORIG.

ENDIF.

ENDFOR.

*show what is found so far

MESSAGE I000(RSPLS) WITH ORIG.

RESULT = TELLER.

CALL FUNCTION ZPLF_GEN_SEQ_NBR

CHANGING E_NBR = RESULT.

MESSAGE I000(RSPLS) WITH 'ML' RESULT.

  • Copy actions

FOREACH KEYFIGURE.

{ KEYFIGURE, RESULT } = 0.

AMNT = { KEYFIGURE, RESULT }.

MESSAGE I000(RSPLS) WITH KEYFIGURE RESULT AMNT.

ENDFOR.

Marco

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Oct 02, 2009 at 11:50 AM

    problem is solved.

    Two problems actually solved.

    - web templates had a link to another query, was not OK in the HTML code

    - trying to copy a set of data where all keyfigures stay zero doesn't work.

    Marco

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.