Dear SAP Experts,
I have a scenario as following:
- In DP, I create one my own Planning Object Structure “ZPOSDP03” with some Characteristics:
+ 9ALOCNO
+ 9AMATNR
+ Z_VALTYPE (this is my own Characteristic), including values like: ‘1’, ‘2’…
- With Tcode SPRO -> SCM Basis ->Master Data ->Maintain Free-Definable Attributes: I activate Field “ATT01” of Table “/SAPAPO/MATKEY”
- For Each Product-Location, I maintain a different value for Field “ATT01” by Tcode /SAPAPO/MAT1, tab Properties -> Additional Data, Field “ATT01”.
- In planning book PLB01, and Dataview DV01, I have two Key Figures:
+ ZQUANTITY
+ZVALUE
- I need to write a macro to convert from ZQUANTITY to ZVALUE with conditions as followings:
+ If Char Z_VALTYPE = ‘1’:
Then ZVALUE = ZQUANTITY * MAT( 'ATT01' ; ACT_PRODUCT ; ACT_LOCATION )
+ If Char Z_VALTYPE = ‘2’:
Then ZVALUE = ZQUANTITY
Please Experts help me to write Macro for my scenario.
Thanks very much for your support!
Duyennx