Author |
Message
|
Harshalw |
Posted: Wed Jul 23, 2008 11:16 pm Post subject: Case Statement for WMB 6.1 |
|
|
Voyager
Joined: 23 Jul 2008 Posts: 77
|
Hi,
I am using a case statement in ESQL for WMB 6.1.
Here is the below statement .
CASE InputRoot.XML.wwprttxn.price.pricepointtype
WHEN 'MOD' THEN
SET Matnr = InputRoot.XML.wwprttxn.price.offering || 'NEW';
SET Varcond = 'MODEL: ' || InputRoot.XML.wwprttxn.price.pricepointvalue;
WHEN 'FEA' Then
SET Matnr = InputRoot.XML.wwprttxn.price.offering || 'NEW';
SET Varcond = 'FEATURE: ' || InputRoot.XML.wwprttxn.price.pricepointvalue;
WHEN 'RPQ' THEN
SET Matnr = InputRoot.XML.wwprttxn.price.offering || 'NEW';
SET Varcond = 'RPQ: ' || InputRoot.XML.wwprttxn.price.pricepointvalue;
WHEN 'SWF' THEN
SET Matnr = InputRoot.XML.wwprttxn.price.offering;
SET Varcond = 'SWFEATURE: ' || InputRoot.XML.wwprttxn.price.pricepointvalue;
WHEN 'FUP' THEN
SET Matnr = InputRoot.XML.wwprttxn.price.offering || 'UPG';
SET Varcond = 'FEAT CONV: ' || InputRoot.XML.wwprttxn.price.pricepointvalue;
WHEN 'MUP' THEN
SET Matnr = InputRoot.XML.wwprttxn.price.offering || 'UPG';
SET Varcond = 'MOD CONV: ' || InputRoot.XML.wwprttxn.price.pricepointvalue;
WHEN 'TMU' THEN
SET Matnr = InputRoot.XML.wwprttxn.price.offering || 'UPG';
SET Varcond = 'TYPE MOD CONV: ' || InputRoot.XML.wwprttxn.price.pricepointvalue;
WHEN 'TFU' THEN
SET Matnr = InputRoot.XML.wwprttxn.price.offering || 'UPG';
SET Varcond = 'TYPE FEAT CONV: ' || InputRoot.XML.wwprttxn.price.pricepointvalue;
WHEN 'VAR' THEN
WHEN 'SBB' THEN
WHEN '' THEN
SET Matnr = '';
SET Varcond = '';
ELSE
SET Matnr = 'HARHSAL';
SET Varcond = 'Harshal';
END CASE;
* I am New to ESQL and WMB*
I am able to execute the code however when i debug the code i could see variable 'matnr' modified however updating the 'varcond' variable, it come out of funcion. Please let me know if the above syntax is correct or wrong.
Thanks
Harshal |
|
Back to top |
|
 |
AkankshA |
Posted: Wed Jul 23, 2008 11:24 pm Post subject: |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
since ur bar file was deployed successfully.. thats removes the possibility of a syntactical error...
Here the control shall come out after updating the 'varcond' variable...
Are u expecting soemthing else here... _________________ Cheers |
|
Back to top |
|
 |
Harshalw |
Posted: Wed Jul 23, 2008 11:33 pm Post subject: |
|
|
Voyager
Joined: 23 Jul 2008 Posts: 77
|
I wanted to see the value in 'Varcond' variable even when function ends. How can i declare a global variable in Esql? Is it somewhat like C.
Can you please refer some document which will have examples as well proper descrition for Esql language. |
|
Back to top |
|
 |
AkankshA |
Posted: Wed Jul 23, 2008 11:37 pm Post subject: |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
I suppose this CASE is in a function which u are calling from main module.... So simply pass the variables from main module to this funcation and when your control will resume back to main eSQL, you can see the value populated in dubug mode..
refer to eSQL guide from IBM infocenter _________________ Cheers |
|
Back to top |
|
 |
Harshalw |
Posted: Thu Jul 24, 2008 12:04 am Post subject: |
|
|
Voyager
Joined: 23 Jul 2008 Posts: 77
|
|
Back to top |
|
 |
|