cancel
Showing results for 
Search instead for 
Did you mean: 

Copy data cross location

Former Member
0 Kudos

Dear SAP Experts,

Please help me on this scenario:

I have Locations L1, L2 and products P1, P2. Then I combine CVCs and assign the value of those CVCs in KF1 as following:

L1-P1 = 1000

L1-P2 = 2000

L2-P1 = 0

L2-P2 = 0

Now I want that: Products in Location L2 have the same value as Products in Location L1 as following:

L2-P1 = L1-P1 = 1000

L2-P2 = L1-P2 = 2000

How can I write Macro or do any function to get value as expectation?

Thanks very much for your kindly supports!

Duyennx

Accepted Solutions (1)

Accepted Solutions (1)

rajkj
Active Contributor
0 Kudos

Hi Duyennx,

For interactive planning, you can first copy the key figure value of required CVC to a variable and then recopy the value to the key figure of another CVC as shown in the screenshots.

Thanks,
Rajesh

Former Member
0 Kudos

Dear Mr. Rajesh,

Thanks very much for your suggestion. However, I will explain more about my case:

Propose I have Locations in pairs. Each pairs are MRP Storage Locations of a Plant

  Pair 1: Z_0111, Z_0112  ( belong to Plant 0110)

  Pair 2: Z_0211, Z_0212 (belong to Plant 0210)

and Products:

  A224_APO, A255_APO.

At first, data is as following:

After running macro, I expect the result as following:

    Products of Location Z_0112 will copy to Z_0111 (respectively in pair)

    Products of Location Z_0212 will copy to Z_0211 (respectively in pair)

   

I write Macros I following:

I Pressed button to run Macro "Call all to copy", but nothing changed.

I also tried to not include Macro "Execute drill down", "Execute drill up", but nothing changed.

Please help me to change Macros

Thanks very much for your help!

Duyennx

Former Member
0 Kudos

Dear Mr. Rajesh all SAP Experts,

Please give me suggestion for my case!

I really need to find solution to this requirement!

Thanks very much for your kindly supports.

Duyennx

rajkj
Active Contributor
0 Kudos

Hi Duyennx,

If you need to copy the  key figure values of multiple products from one locations to another location as explained above, use of BAdI exit macro would be an elegant way. Please check the following SAP notes for useful information on BAdI and user exit macros.

https://service.sap.com/sap/support/notes/1119651

https://service.sap.com/sap/support/notes/418801

Your ABAP expert can help you in implementing the BAdI or user exit.

Thanks,
Rajesh

Former Member
0 Kudos

Dear Mr. Rajesh,

Thanks very much for your help!

Could you please give more detailed instructuctions, ABAP pseudo-code... for me?

I want to try.

Thanks very  much!

Duyennx

rajkj
Active Contributor
0 Kudos

Hi Duyennx,

Hope you got access to the SAP service market place. The second link (SAP note on user exit macro) gives you sample code as well. However, your ABAP expert can lead you with the implementation.

The sample code of SAP note 418801 attempts to fill all buckets for the FELDH key figure within the time intervalVONTG to BISTG with a constant value V. The selection is determined by the IOBJNM and CHAR_VAL fields, whereby the first field provides the technical name of the characteristic and the second indicates the value of the characteristic.

For BAdI based custom macro (SAP Note 1119651), you have sample implementation in the system.

Use t.code SE18 to check the BAdI /SAPAPO/ADVX and check the example class implementation

Class: /SAPAPO/CL_EX_ADVX_EXAMPLE

Method: /SAPAPO/IF_EX_ADVX~USER_EXIT_MACRO

Per SAP recommendation and to meet your requirement, you need to use BAdI based macro.

Thanks,

Rajesh

Former Member
0 Kudos

Thanks Mr. Rajesh very much!

Duyennx

Answers (0)