cancel
Showing results for 
Search instead for 
Did you mean: 

Requirement Macro

0 Kudos

Hello Colleagues,

need to create a Macro which aggregated the values of two Key Figures into one particular Key Figure. I know this is also simple activity but my complexness is that, my aggregated data of the two Key Figure need to updated in the Key Figure of a different selection profile.

I would give more details:

I have Planning Book and Data View: ZIGTM_AP_GENERIC and ZIGTM_AP_GEN_LITE respectively. I do selection of my data with respect to Region. Ex: Canada and load the Selection. In this I need to aggregate the values of two Key Figure KF1 and KF2. I need to update these aggregated values of the Key Figures into Key Figure KF3 but for different selection profile. I need to copy these aggregate values from the Canada Region to US Region.

Hope my question is clear. Kindly revert back if you have any query. I need to check whether above request feasible in the SAP System. We are using SCM5.0. Kindly let me know the procedure if this feasible.

Thanks,

Best Regards,

Bhaskar

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello,

There are several ways to do this -

1. Fetch the sum value for cannada region using a normal standard macros, and then call a Z function module in the macro, whcih would in trun call a planning book change BAPi, whcih would update data in the US region.

2. Include both the regions in same selection id, and write a user exit macro to achieve this functionality.

3. Write a standalone program which would do this kind of addition for a particular region and put into the appropriate region.

Either of above three options would solve you problem.

Thank you.

Regards,

Jacky Jain.

0 Kudos

Hi Jacky,

Thanks a lot for you response. I need some clarification on your solution. My requirement is that I need to Aggregate the KF1 and KF2 for the Canada selection profile and update the KF3 in the same Planning Book but for the selection profile US. Here for the Canada selection there might some TD for the KF3 which shouldn't be changed while performing this activity.

Would your solution satisfy the above condition. Actually our expectation from the activity is :

We are creating a Job which can perform this activity. In the job we can choose the Macro which we are trying to create and also choose the selection Id in the job.

I need a small favor. I am business analyst and I don't have major access to the system. I have authorization to create Macro and Job creation. Could you please let me know, out of the below option listed by you as solution which would be best to execute and also could you elaborate on what needs to be done on your solution.

Thanks,

Best Regards,

Bhaskar

Former Member
0 Kudos

Hello there,

Yes, all the above solution would take care of your requirements (that you need not updates some time dependant data from the target region).

Regarding what solution to be best fit in your scenario, I would need more information about your system and to be process.

I mean, say you have a fix requirement that the cannada region is always copied into US region. then you would need to maintain this somewhere (example Z tables). In this case either of 1st and 2nd option would suffice the purpose.

Or in case you need a selection id to determine the target and source of the action, then the third option of wiring a stand alone program with selection screen accepting the source and target selection ids would be more helpful.

Just to add to this, all the three solutions would require abap efforts to take care of your requirements.

Let me know in case you need more information on the same.

Thank you.

Regards,

Jacky Jain.

aparna_ranganathan
Active Contributor
0 Kudos

Bhaskar

That is interesting. I thought about your requirement and was looking at macro functions that can be used to achieve your requirement.

The ACTUAL_IOBJNM_VALUE(info object) function will return the value of info object being queried. In your case using this function you can retrieve the value of characteristic "region". If the region is canada then you can aggregate the values of kf1 and kf2 into a key figure say kf3.

The same function can be used to check if the region is US. If the region is US then you have to somehow access region canada and get the value of kf3 and put it in the required keyfigure for US region. I think you have to write custom logic to achieve this. I was not able to figure out how to solve the second piece of the puzzle.

Thanks

Aparna