on 05-23-2012 11:54 AM
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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)
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
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
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
User | Count |
---|---|
15 | |
4 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.