<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Case statment in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/case-statment/m-p/2380869#M528393</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the values are not comming in SY-UCOMM and ok_code variables... its showing blank when iam debugging...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Jun 2007 04:38:17 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-18T04:38:17Z</dc:date>
    <item>
      <title>Case statment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/case-statment/m-p/2380865#M528389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: object_type like crmd_orderadm_h-object_type.&lt;/P&gt;&lt;P&gt;data: ok_code like sy-ucomm.&lt;/P&gt;&lt;P&gt;ok_code = sy-ucomm.&lt;/P&gt;&lt;P&gt;object_type = ok_code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case object_type.&lt;/P&gt;&lt;P&gt;when 'PHC'.&lt;/P&gt;&lt;P&gt;Perform ....&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here in this code no values r coming when im debugging...i want to trigger object_type value when it checks.... in my code did i do any mistake... send me right code...plz....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 04:26:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/case-statment/m-p/2380865#M528389</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T04:26:39Z</dc:date>
    </item>
    <item>
      <title>Re: Case statment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/case-statment/m-p/2380866#M528390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make sure the object type is of data type syucomm..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

data: object_type TYPE syucomm.
data: ok_code like sy-ucomm.
ok_code = sy-ucomm.
object_type = ok_code.

case object_type.
when 'PHC'.
Perform ....
endcase.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 04:29:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/case-statment/m-p/2380866#M528390</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T04:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: Case statment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/case-statment/m-p/2380867#M528391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The error is that, you are trying to assign the sy-ucomm to object_type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can say, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CASE ok_code.&lt;/P&gt;&lt;P&gt;WHEN 'PHC'.&lt;/P&gt;&lt;P&gt;  perform &amp;lt;subroutine name&amp;gt;&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Raj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 04:31:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/case-statment/m-p/2380867#M528391</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T04:31:27Z</dc:date>
    </item>
    <item>
      <title>Re: Case statment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/case-statment/m-p/2380868#M528392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think its a module pool... if it is so then&lt;/P&gt;&lt;P&gt;you have to code it in PAI module..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;like &lt;/P&gt;&lt;P&gt;module pai input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ok_code = sy-ucomm.&lt;/P&gt;&lt;P&gt;object_type = ok_code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case object_type.&lt;/P&gt;&lt;P&gt;when 'PHC'.&lt;/P&gt;&lt;P&gt;Perform ....&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;endmodule.&lt;/P&gt;&lt;P&gt;now when user will interact with the screen (pressing push button or something) it will trigger and give you the correct output...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;shiba dutta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 04:32:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/case-statment/m-p/2380868#M528392</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T04:32:39Z</dc:date>
    </item>
    <item>
      <title>Re: Case statment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/case-statment/m-p/2380869#M528393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the values are not comming in SY-UCOMM and ok_code variables... its showing blank when iam debugging...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 04:38:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/case-statment/m-p/2380869#M528393</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T04:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: Case statment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/case-statment/m-p/2380870#M528394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which kind of report is this. Is it a normal program or module pool?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Atish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 04:40:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/case-statment/m-p/2380870#M528394</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T04:40:46Z</dc:date>
    </item>
    <item>
      <title>Re: Case statment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/case-statment/m-p/2380871#M528395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is a normal ABAP program in SE38....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 04:42:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/case-statment/m-p/2380871#M528395</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T04:42:08Z</dc:date>
    </item>
    <item>
      <title>Re: Case statment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/case-statment/m-p/2380872#M528396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in the screen painter, in 'element list' tab -&amp;gt; Genral attributes, have you filled in Name 'ok_code' for the type 'ok' ??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 04:46:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/case-statment/m-p/2380872#M528396</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T04:46:21Z</dc:date>
    </item>
    <item>
      <title>Re: Case statment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/case-statment/m-p/2380873#M528397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if on click of  object-type ur debugger is getting activated then probably u must have made a mistake somewhere else in the code.&lt;/P&gt;&lt;P&gt;had it been not taking value ur debugger wont let u to move to the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;have u clear the object type before using it.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;ravish&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;plz dont forget to reward points if helpful&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        ravish goyal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 04:46:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/case-statment/m-p/2380873#M528397</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T04:46:22Z</dc:date>
    </item>
    <item>
      <title>Re: Case statment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/case-statment/m-p/2380874#M528398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;then you have to write the code in at user-command event and when user will make some interaction with menu bar then it will trigger else sy-ucomm will be initial. You can set your own menu bar also by set pf-status 'ZSPD' like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you are not interacting with menu bar sy-ucomm remain initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at user-command.&lt;/P&gt;&lt;P&gt;ok_code = sy-ucomm.&lt;/P&gt;&lt;P&gt;object_type = ok_code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case object_type.&lt;/P&gt;&lt;P&gt;when 'PHC'.&lt;/P&gt;&lt;P&gt;Perform ....&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;shiba dutta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 04:46:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/case-statment/m-p/2380874#M528398</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T04:46:46Z</dc:date>
    </item>
    <item>
      <title>Re: Case statment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/case-statment/m-p/2380875#M528399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the normal ABAP program you can't get anything in the Sy-ucomm. As you can see from the field description itself this is User command field. In this program user is not interacting with the code so this field will be blank. This field will be filled if you convert this report into interactive report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it is clear. if you just want to see how CASE statement work see the code below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data value TYPE i.&lt;/P&gt;&lt;P&gt;value = 1.&lt;/P&gt;&lt;P&gt;CASE value .&lt;/P&gt;&lt;P&gt;	WHEN 1.&lt;/P&gt;&lt;P&gt;    WRITE: / 'Value is 1'.&lt;/P&gt;&lt;P&gt;	WHEN 2.&lt;/P&gt;&lt;P&gt;	WHEN OTHERS.&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Atish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 04:51:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/case-statment/m-p/2380875#M528399</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T04:51:10Z</dc:date>
    </item>
  </channel>
</rss>

