‎2008 May 13 12:45 PM
Hi All,
I have a doubt in Variant Configuration. In CL04 I created a class called FIBER. I created 2 characteristics
in CT04 as Fiber_Id ( type Char20) and Fiber_color (type Char10) and assigned to the class FIBER. The characteristic values for Fiber_Id are say A100, B110,K120,C130,A111, A333. The characteristic values for Fiber_color are say Natural, Blue,Green and White. For all the Fiber_Id s starting with 'A' the Fiber_Color should be Natural. So in the tcode CT04 I have chosen the chracteristic value Natural and written the precondition as Fiber_Id+0(1) EQ 'A'. This gives me syntax error. Can anybody help me to process strings in Object dependency editor in CT04.
Thanks,
Manjula.S
Edited by: Manjula on May 13, 2008 5:15 PM
‎2008 May 13 4:59 PM
I am assuming the following, which may or may not be the case, but should help you. I would not write the dependency at the Characteristic Value. You could use the SET_DEFAULT statement in the Config Profile or at the Characteristic value, but the SET_DEFAULT will allow the user to change the value. My recommendation is a Procedure at the Config Profile. Variant Config uses its own special commands, not ABAP Code. Check the SAP Help for Syntax.
Fiber_ID: Char val: 1 Char Description: A100
Char val: 2 Char Description: B110
Char val: 3 Char Description: K120
Char val: 4 Char Description: C130
Char val: 5 Char Description: A111
Char val: 6 Char Description: A333
Fiber_Color Char val: 1 Char Description: Natural
Char val: 2 Char Description: Blue
Char val: 3 Char Description: Green
Char val: 4 Char Description: White
Write a Procedure in your Config Profile (cu42): PRO_SET_FIBER_COLOR_NATURAL
$self.Fiber_Color = '1'
if $self.Fiber_ID = '1' or
$self.Fiber_ID = '5' or
$sefl.Fiber_ID = '6'.
‎2008 May 14 5:06 AM
Hi Mike,
Thank you for trying to answer the question. I think you did'nt get my question clearly. Fiber_Ids are as shown below. There can be 1000s of Fiber_Ids which are alphanumeric as shown below. For all those Fiber_Ids starting with A , the Fiber_color should be 'Natural'.Hope I'm clear in my question. I want a syntax which is something like CS or CA in ABAP.
Fiber_ID:
Char val: A100
Char val: B110
Char val: K120
Char val: C130
Char val: A111
Char val: A333
Thanks,
Manjula.S
Edited by: Manjula on May 14, 2008 9:36 AM
Edited by: Manjula on May 14, 2008 10:06 AM
‎2008 May 14 12:55 PM
Again, the Syntx is limited in Variant and you may use the SAP Help to see what is available. One Option would be to Create a Variant Table for the Valid Combinations you wish to maintain. Another option would be to write a Variant Function, which is written in ABAP, and use the snytax you indicated to set the Value of FIBER_COLOR. You may substitute your Char Values for mine in the Above Example I gave you, and you would have the proper syntax for the Procedure. Since you have many values, which was not clear in your example, the Variant Function or the Variant Table would be the most efficient to use as you were not clear on the number of characteristic values you had to maintain. I did not "try" to answer your question, I gave you the best solution for the amount of information you provided
$self.Fiber_Color = '1'
if $self.Fiber_ID = 'A100'' or
$self.Fiber_ID = 'A11' or
$sefl.Fiber_ID = 'A333'.
Good Luck
‎2008 May 14 1:19 PM
‎2008 May 15 11:33 AM
Hi Manjula,
create a procedure and add it to the configuration profile of that marerial,
and the syntax in the procedure write something like below.
$self.fiber_color = 'NATURAL' if $self.fiber_id LIKE '%A'.
i hope it wroks.
please do reply even if u have solved the query by ur self with the answer. i am also in need of variant configuration information.
regards,
pavan,
‎2008 May 15 11:51 AM
Hi Pavan,
Thanks for your reply. The above code didnt work. Still I'm trying to solve it.Surely I will post the answer once I resolve it.
Thanks,
Manjula.S