cancel
Showing results for 
Search instead for 
Did you mean: 

Script logic Look up In same model

former_member220155
Participant
0 Kudos

Hi Guys,

I have requirement to read data from at Higher level (Costcenter,JOb,IO level) which is entered by planners and assign it to detail level (Costcenter,Job,Position,IO level) transaction data.

Position is property of JOb but i don't want read all the positions from JOb and i want assign the JOb level planned IO percentages to Postions which is already planned (transaction data). Can i use the LOOK up to read data from JOb level and assign it to Position level. Can anyone share the some pseudo code for using Look up to read data from one set of data and assign it to another set of data.

Scope of data at JOB level:

*XDIM_MEMBERSET  DATATAG= DT_PEXP_TMAL

*XDIM_MEMBERSET  HRACCT= ALLOC_PCT

*XDIM_MEMBERSET  EMPLOYEE= No_EMPLOYEE

*XDIM_MEMBERSET  HRPOSITION= NO_HRPOSITION

*XDIM_MEMBERSET  COSTCENTER= %COSTCENTER_SET%

*XDIM_MEMBERSET  JOB= %JOB_SET%

*XDIM_MEMBERSET SKF=NO_SKF


There could be one more IO (Internal Order) Percentages planned at JOB level.

Data is something like this.


Datatag     HRAcct   Employee  HRPosition       Costcenter        JOb          SKF            IO   Measure(KF)

Dt1          acct1         No_EMP    NO_Positon           CC1             Job1  No_SKF         IO1      60%

                                                                                                                                IO2     40%



Scope of data Position level (transcation data which is already planned)

*XDIM_MEMBERSET  DATATAG= DT_PEXP_TMAL

*XDIM_MEMBERSET  HRACCT= ALLOC_PCT

*XDIM_MEMBERSET  EMPLOYEE= No_EMPLOYEE

*XDIM_MEMBERSET  COSTCENTER= %COSTCENTER_SET%

*XDIM_MEMBERSET  JOB= %JOB_SET%

*XDIM_MEMBERSET SKF=NO_SKF


Existing Data at Position level in the system


Datatag     HRAcct   Employee  HRPosition       Costcenter        JOb          SKF            IO   Measure(KF)

Dt1          acct1         No_EMP    POS1           CC1               Job1        SKF1                IO3      50%

                                                                                                                                  IO4     50%

So i want to read data from JOb level assign it to Positon level data

My output should be like this

Datatag     HRAcct   Employee  HRPosition       Costcenter        JOb          SKF            IO   Measure(KF)

Dt1          acct1         No_EMP    POS1           CC1               Job1        SKF1                IO1      60%

                                                                                                                                  IO2     40%

Can anyone share you ideas on this how to read data from JOb level and assign it to Posiiton level using Look up or something.

Thanks in advance.

Thanks

Best regards

SG

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Kudos

Sorry, but what is the issue?

You can use RUNALLOCATION to copy NO_HRPOSITION value to all required positions:


*RUNALLOCATION

*FACTOR=1

*DIM HRPOSITION WHAT=NO_HRPOSITION; WHERE=POS1,POS2

*ENDALLOCATION


Instead of POS1,POS2 you can use BAS(...) or some variable %POSITIONS% with a list of positions


Vadim

former_member220155
Participant
0 Kudos

Hi Vadim,

Thanks for your reply i thought Run allocation but i don't have any variable of to define what. Position is a property of JOb but i don't want to read all the positions from the JOb the reason is there could be 10 positions assigned to JOb (Master data) but i want copy the data from JOB to Positions which are exist in transcation data either 1 or two or whatever positions are planned for that JOb but not all the positions of that job.

My Issues is how do i read the postions of that job form transcation data and pass it to run allocation.

That's what i am thinking something i can use Look up to read data at JOb level and assign it to Position (transcation data).

Select and XDIm_Filter both work on Master data and i am looking something to read form transcation data.

Do we have any other thoughts to achieve this one.

Thanks for your help.

former_member186338
Active Contributor
0 Kudos

Sorry, but the explanation is absolutely not clear... I am unable to understand relation between Job and position. Please try again. Show screenshots of tables etc...

Vadim

former_member220155
Participant
0 Kudos

Hi Vadim,

Sorry to confusion about my previous reply.

I am writing the steps and data looks like below in my system

Step1) User Input Position level

Position level data in Model A (Transcation data)

DATATAG     HRACCT     EMP      POSITION     JOB  COSTCENTER     IO     MEASURE(KF)

DT1               ACCT1     NO_EMP  POSITION1   JOB1               CC1               IO1               50

DT1               ACCT1     NO_EMP  POSITION1    JOB1              CC1                 IO2               50

STEP2) User input JOb level

JOb level data in Model A (Transaction data)

DATATAG     HRACCT     EMP         POSITION           JOB COSTCENTER       IO     MEASURE(KF)

DT1               ACCT1      NO_EMP     NO_POSITION     JOB1          CC1           IO3          40

DT1                ACCT1     NO_EMP     NO_POSITION     JOB1          CC1            IO4         60

So now i want replace IO percetanges entered at POSITION (IO1,IO2) with IO percentages enterd at JOB level (IO3,IO4).

I am expecting output like this

DATATAG   HRACCT   EMP         POSITION   JOB  COSTCENTER  IO MEASURE(KF)

DT1               ACCT1     NO_EMP  POSITION1 JOB1  CC1              IO3   40

DT1              ACCT1     NO_EMP   POSITION1 JOB1  CC1              IO4  60

Note: JOb is property of Position and there are multiple positions Pos1,Pos2, pos3 are assigned to same job1.

But i want copy data only to positions(Pos1) from job(Job1) which are already exist in my transcation data (Model)only Pos1 . If i use run allocation it will copy to all the Positions Pos1,Pos2 and Pos3 from Job1 which i don't want.

Can you please share thougths how do achieve this to copy only to few positions.

former_member186338
Active Contributor
0 Kudos

Now you start talking about IO... What is it? How it's related to job or position?? What do you mean by "So now i want replace IO percetanges entered at POSITION (IO1,IO2) with IO percentages enterd at JOB level (IO3,IO4)."?? Replace?

P.S. Please use tables or screenshots - your posts are hard to read!

P.P.S. Don't show constant dimensions like Account etc...

former_member220155
Participant
0 Kudos

Sorry Vadim.

I am attaching screenshot of the data from Model can you please share your thoughts on this.

former_member186338
Active Contributor
0 Kudos

On the screenshot I see the only difference in the SENDER_IO and HRPOSITION dimensions...

HRPOSITIONSENDER_IOValue
Position
200250361100008411.0
Job
NO_HRPOSITIONFG0001000.5
NO_HRPOSITIONFG000000

0.5

Result
2002503FG0001000.5
2002503FG0000000.5

You have to scope job records:

*XDIM_MEMBERSET HRPOSITION=NO_HRPOSITION

*XDIM_MEMBERSET SENDER_IO=FG000100,FG000000

*WHEN HRPOSITION

*IS *

*REC(EXPRESSION=%VALUE%,POSITION=2002503)

*ENDWHEN

former_member220155
Participant
0 Kudos

Hi Vadim,

Thanks for your inputs. I tried to use that code but it will not work since there are could be multiple positions are assigned same JOB.

I am adding some more details of Master data and transaction data also

Master data of Position. Job is property of Position.

Position idJOb is property of Position
20025033009903
20020093009903
20010073009903
20045093009903

Transaction data in the Model

POSITIONJOBSENDER_IOVALUE
POSITION
2002503300990361100008411.0
2002009300990361100007501.0
JOB
NO_POSITION3009903FG000100.50
NO_POSITION3009903FG000000.50
RESULT
20025033009903FG000100.50
20025033009903FG000000.50
20020093009903FG000100.50
20020093009903FG000100.50

In the Master data there are 4 positions are assigned same JOb 3009903 but in the transcation data only two positions(2002503,2002009) are planned . Job is property of Postion and it is separate diemnsion.

I want to copy data from JOb(3009903) to only two postions (2002503,2002009) only.

I am trying in diffrent ways. i could n't read the refrence data in the logic. can you please share your thoughts on this.

former_member186338
Active Contributor
0 Kudos

Please stop attaching xml files! Script logic is just a text.

Second - please show table with the desired result: "I want to copy data from JOb(3009903) to only two postions (2002503,2002009) only." - unclear terms used...

Vadim

former_member186338
Active Contributor
0 Kudos

And how to perform SENDER_IO selection? I am talking about members 6110000841, 6110000750...

former_member220155
Participant
0 Kudos

I don't have any specific selection for IO. They can charge to any SENDER_IO.

Scope for  SENDER_IO:

XDIM_Memberset  Sender_IO = <ALL>

Sorry please ignore my other staement.

Expected results like below which i mentioned previous post.

former_member186338
Active Contributor
0 Kudos

The logic with SENDER_IO is a problem!

Is it possible to have:

POSITIONJOBSENDER_IOVALUE
POSITION
2002503300990361100008411.0
2002503300990361100008421.0

2 or more initial records with the same position and job and different 6xxx SENDER_IO?

And how to separate 6xxx from FGxxx?

former_member220155
Participant
0 Kudos

2 or more initial records with the same position and JOb and diffrent 6xxxx Sender_IO : Yes

And how to separate 6xxx from FGxxx?  after we generate new records with FGxxx we can drop the old records with 6xxx :   we have don' have any business rules to charge to spcific sender_io so they can charge to any sender_io.    I am trying with script which i attached in previous post it is reading refrence data but not updating. 

Thanks for you help...., Is there any way we can use Look UP to read data from JOB level Sender_io and update with Positions level sender_io?

former_member186338
Active Contributor
0 Kudos

Lookup will not help you!

And unfortunately the requirements are not logically defined...

Also you always use incorrect wording - like "charge to any sender_io" - absolutely incorrect. You can't change dimension member for record, you can create a new record for another intersection. It's not a table it's a cube!

You script is wrong, but without clear logic I can't propose a solution...

Answers (0)