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.
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
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum