cancel
Showing results for 
Search instead for 
Did you mean: 

Don't want to sort variable values in Formula function reading from Exit

Former Member
0 Kudos

Hi,

I've a variable defined on Characteristic "CUSTOMER" of type user exit. let'z say, when executed, Funtion Module provides the following values.

2500

3000

1200

I've a formula function that uses CUSTOMER variable values for calculations.

But, while reading the CUSTOMER values, formula is sorting the values and reading the values. But, I need to maintain the order as it is provided by the Function Module.

formula function is as follows.

DATA COUNT TYPE I.

DATA ENTRIES TYPE I.

DATA CUST TYPE 0CUSTOMER.

ENTRIES = VARC('CUSTOMER').

COUNT = 1.

IF ENTRIES <> 0.

DO.

CUST = VARI('CUSTOMER',COUNT).

          • some calculations here ******

COUNT = COUNT + 1.

IF ENTRIES < COUNT.

EXIT.

ENDIF.

ENDDO.

ENDIF.

In the debugging mode, CUSTOMER values are being read in this order

************

EXIT FORMULA

************

2500 1200

3000 2500

1200 3000

where, EXIT column displays the order of CUSTOMER values ouput reading from the Function Module.

where, FORMULA column displays the order of CUSTOMER values reading witin DO loop of formula function.

How do i maintain the order of CUSTOMER values in the FORMULA, same as the order sent by user exit function module?

Appreciate your ideas.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Hari,

sorry for my stupid question...what do you want to do with your formula ?

I understand you restrict the char CUSTOMER with a variable custom exit...then where do you want to apply a formula ? If you need only a counter there shouldn't be need to use a sorted list...

Waiting for your exlanation..

Bye,

Roberto

Former Member
0 Kudos

Hi Roberto,

Thanks for your reply.

I've a layout that is restricted to current quarter variable (4/2004). (quarter in data columns)

I'm trying to copy data from a reference quarter (3/2004 variable in planning folder) into current quarter. so, am copying actuals 3/2004 data into 4/2004.

let's say current layout has following data.

Mat CUST PL AC

==============

M11 2500 30 0

M22 3000 25 0

M33 1200 24 0

Mat = Material, CUST = CUSTOMER, PL = Planning quantity (refers to plan data), AC = Actuals quantity (refers to actuals data).

plan & actuals differ each other in version. so version is defined in the data columns. PL & AC columns have different versions.

I already took care of version to copy data only into actuals version.

I need to fill AC column by copying 3/2004 into 4/2004.

let's say cube has following data for quarter 3/2004.

Mat CUST Qty

============

M11 1350 40

M22 1123 35

M33 1435 34

I need to copy 3rd quarter into 4th quarter.

============================================

I need to copy M11 1350 40 into M11 2500 AC.

I need to copy M22 1123 35 into M22 3000 AC.

I need to copy M33 1435 34 into M33 1200 AC.

I'm reading Customer values from a variable.

User Exit order -


Variable reading order in Formula

=======================================================

CUST -


CUST

2500 -


1200

3000 -


2500

1200 -


3000

so, while copying in the formula,

For M11, data is getting copied into CUST 1200

For M22, data is getting copied into CUST 2500

For M33, data is getting copied into CUST 3000

I'm expecting to get the following

Mat CUST PL AC

==============

M11 2500 30 40

M22 3000 25 35

M33 1200 24 34

But, I'm getting the following.

Mat CUST PL AC

==============

M11 2500 30 0

M11 1200 0 40

M22 3000 25 0

M22 2500 0 35

M33 1200 24 0

M33 3000 0 34

Hope it is clear.

For this scenario, if there is other alternative, I welcome your advice / suggestions.

If it is still not clear and if you don't mind, I appreciate if you can write to me at hariimmadi@yahoo.com so that I can send you the screenshots of all which makes it easy for you to understand the scenario.

Appreciate your help looking into my problem.

Former Member
0 Kudos

Hi Hari,

I'm sorry, but I'm not be able to give you some help at this moment for your scenario...hoping for others contributions,

bye,

Roberto