on 03-28-2006 6:34 PM
Hi all,
I have a datasource that among other fields (Material, Month) delivers the following information
<b>Key Figure: Total Shipments (ZTOTSHIP) and
Characteristic: Shipment ID (ZSHIPID). Shipment ID can have the value 1 or 2</b>
I would like to implement the following logic in the update rules. Can you help with that?
<b>If in a datarecord
- Total Shipments (ZTOTSHIP) comes in combination with
Shipment ID (ZSHIPID) = '1' then update Key Figure A
(ZA).
If in a datarecord
- Total Shipments (ZTOTSHIP) comes in combination with
Shipment ID (ZSHIPID) = '2' then update Key Figure B
(ZB).</b>
Can you help with the coding for that in the update rules?
Thanks a lot
Christian
Hi Christian,
You can do this by using formula. Write following formula for Key Figure A(ZA):
If(ZSHIPID='1', ZTOTSHIP, 0)
Similarly use following formula for Key Figure B(ZB):
If(ZSHIPID='2', ZTOTSHIP, 0)
Regards,
Rohit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There is two ways to do it. One is update rule level or at the start routine of the update rule.
Update rule leve create a formula for the key figure ZTOTSHIP
then use if condition
IF( ZSHIPID = 1, ZTOTSHIP = 'za', ZTOTSHIP = 'zb' )
Or on your start routine use the following
Loop at Data_package
if Data_package-ZSHIPID = '1'
Data_package-ZTOTSHIP = 'ZA'
else
Data_Package-ZTOTSHIP = 'ZB'
endif.
Modify Data_package.
endloop.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
if i got your requirement correctly.
please check this.
IF( communication_structure-ZSHIPID = 1).
communication_structure-ZA = communication_structure-communication_structure-ZTOTSHIP.
elseif (communication_structure-ZSHIPID = 2).
communication_structure-ZB = communication_structure-ZTOTSHIP.
endif.
check this and let me know. you can write this in the Update Rule.
All the best.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.