on 06-15-2015 4:30 PM
Hi All,
I have particular requirment with object dependency code.Say we have two characteristics assigned to a class .
The first characteristics values would have multiple values entered on it(For eg1st value=1001,2nd values=1002,3rd value=1003)
I need the second characteristics value to count the number of characteristics values in it.(Result to be populated=3).
Thanks in advance.
Regards
Richie
Dear Richie,
Try with a procedure:
$SELF.CHAR2 =0,
$SELF.CHAR2 = $SELF.CHAR2 +1 IF $SELF.CHAR1 ='1001',
$SELF.CHAR2 = $SELF.CHAR2 +1 IF $SELF.CHAR1 ='1002',
$SELF.CHAR2 = $SELF.CHAR2 +1 IF $SELF.CHAR1='1003
Regards,
Senthilkumar SD'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
The example explained by me previously will work for fixed values, not for random values.
If char values are assigned dynamically, Use variant functions, check below links.
Creating a Function to Dynamically Determine the D - Batch Management (LO-BM) - SAP Library
Take your ABAP team help also.
Regards
Ravikumar B
Please open a new thread instead of updating an old thread. If you have silimar issue , you can refer a link of old thread. While doing so please also mention have you tried the solution suggested in this thread.
Thanks
Ritesh
It will be nice , if you can share business requiremnt tied with it , isnt its already visible in configuration how many values user already assign to a multi-value characterstic? Why do you want to calculate that number again?
Thanks
Ritesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ritesh,
The requirement is the material has various batch characteristics.Based on these charactersitics values the system would identify the suitable customer as per the maintenance in the inspection rule and would update in the first characteristic value .We can identify the number of characteristics values(customer) in the first charcteristic itself,But still we need a separate characteristic value to capture the count.
I saw a command called "COUNT_PARTS",but it doesnt work.
please help me with some ideas to capture the count.
Regards
Richie
Hi Richie Ravi
Check with below procedure and assign it to Mutli Value char.
$SELF.COUNT = 0,
$SELF.COUNT = $SELF.COUNT + 1
IF MULTI_CSTIC = '1',
$SELF.COUNT = $SELF.COUNT + 1
IF MULTI_CSTIC = '2',
$SELF.COUNT = $SELF.COUNT + 1
IF MULTI_CSTIC = '3',
$SELF.COUNT = $SELF.COUNT + 1
IF MULTI_CSTIC = '4',
$SELF.COUNT = $SELF.COUNT + 1
IF MULTI_CSTIC = '5'.
It is working for me. check and reply.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
7 | |
7 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.