<?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: Using set in validation rule in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-set-in-validation-rule/m-p/6835000#M1472171</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Create a SET in &lt;STRONG&gt;GS01&lt;/STRONG&gt; T-Code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample Code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; SELECT SINGLE * FROM setheader WHERE setname = 'ZCASH_EXPOSURE_ACCTS'.
    IF sy-subrc = 0.
      CONCATENATE setheader-setclass
                  setheader-subclass
                  setheader-setname
                  INTO v_setid.

      CALL FUNCTION 'G_SET_TREE_IMPORT'
        EXPORTING
          client     = sy-mandt
          fieldname  = 'HKONT'
          setid      = v_setid
          tabname    = 'BSIS'
        TABLES
          set_values = i_setvalues.

      LOOP AT i_setvalues.
        MOVE 'I'  TO range_hkont-sign.
        MOVE 'BT' TO range_hkont-option.
        MOVE i_setvalues-from TO range_hkont-low.
        MOVE i_setvalues-to   TO range_hkont-high.
        APPEND range_hkont.
      ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Apr 2010 09:46:30 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-04-16T09:46:30Z</dc:date>
    <item>
      <title>Using set in validation rule</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-set-in-validation-rule/m-p/6834999#M1472170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to set a validation rule using set. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The requirement is I have a set of Marketing G/L accounts and a set of Cost centres related to Marketing. Now if I post a transaction to any of Marketing G/L account and try to post entry to any cost centre OTHER THAN that in Marketing cost centre set, this validation should stop me. This will help me to prevent entries going to wrong cost centres.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried a lot in OB28. I am stuck up at how to put "check" in validation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anybody help? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chandrashekhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Apr 2010 09:36:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-set-in-validation-rule/m-p/6834999#M1472170</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-16T09:36:28Z</dc:date>
    </item>
    <item>
      <title>Re: Using set in validation rule</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-set-in-validation-rule/m-p/6835000#M1472171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Create a SET in &lt;STRONG&gt;GS01&lt;/STRONG&gt; T-Code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample Code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; SELECT SINGLE * FROM setheader WHERE setname = 'ZCASH_EXPOSURE_ACCTS'.
    IF sy-subrc = 0.
      CONCATENATE setheader-setclass
                  setheader-subclass
                  setheader-setname
                  INTO v_setid.

      CALL FUNCTION 'G_SET_TREE_IMPORT'
        EXPORTING
          client     = sy-mandt
          fieldname  = 'HKONT'
          setid      = v_setid
          tabname    = 'BSIS'
        TABLES
          set_values = i_setvalues.

      LOOP AT i_setvalues.
        MOVE 'I'  TO range_hkont-sign.
        MOVE 'BT' TO range_hkont-option.
        MOVE i_setvalues-from TO range_hkont-low.
        MOVE i_setvalues-to   TO range_hkont-high.
        APPEND range_hkont.
      ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Apr 2010 09:46:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-set-in-validation-rule/m-p/6835000#M1472171</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-16T09:46:30Z</dc:date>
    </item>
    <item>
      <title>Re: Using set in validation rule</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-set-in-validation-rule/m-p/6835001#M1472172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have to use GGB0 &amp;amp; add the check in the prerequisite.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are using the callup point '0002' then you have the fields BSEG-HKONT (G/L account) &amp;amp; BSEG-KOSTL(Cost Center) which you can use in prerequisite.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@Manas: Did you understand the OP's question at all ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Suhas Saha on Apr 16, 2010 3:28 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Apr 2010 09:54:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-set-in-validation-rule/m-p/6835001#M1472172</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2010-04-16T09:54:24Z</dc:date>
    </item>
    <item>
      <title>Re: Using set in validation rule</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-set-in-validation-rule/m-p/6835002#M1472173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suhas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your immediate reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please tell me what check should i add in GGB0. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried using BSEG-KOSTL IN &amp;lt;set name&amp;gt; but the result is that I am not able to post to ANY cost centre...!! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chandrashekhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Apr 2010 10:00:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-set-in-validation-rule/m-p/6835002#M1472173</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-16T10:00:58Z</dc:date>
    </item>
    <item>
      <title>Re: Using set in validation rule</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-set-in-validation-rule/m-p/6835003#M1472174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;if I post a transaction to any of Marketing G/L account and try to post entry to any cost centre OTHER THAN that in Marketing cost centre set, this validation should stop me.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the prereuisite you should check:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;BSEG-HKONT IN ZGL_SET "G/L Account in the GL Set
AND BSEG-KOSTL NOT IN ZCOST_CENTER "Cost Center is outside the Cost Center set&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Apr 2010 10:09:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-set-in-validation-rule/m-p/6835003#M1472174</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2010-04-16T10:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: Using set in validation rule</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-set-in-validation-rule/m-p/6835004#M1472175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suhas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried the same. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The message i am getting is "The formula was composed upto the first syntax error".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any other way out?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chandrashekhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Apr 2010 10:17:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-set-in-validation-rule/m-p/6835004#M1472175</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-16T10:17:19Z</dc:date>
    </item>
    <item>
      <title>Re: Using set in validation rule</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-set-in-validation-rule/m-p/6835005#M1472176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Take help of some functional consultant, they should be able to help you. The UI is a bit cranky, but you have to live with it &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Apr 2010 10:19:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-set-in-validation-rule/m-p/6835005#M1472176</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2010-04-16T10:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: Using set in validation rule</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-set-in-validation-rule/m-p/6835006#M1472177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suhas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am functional consultant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried using a single value of cost centre in "check". It worked fine. But when I try to use a "set" of cost centre it is not working. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any problem with the set itself?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chandrashekhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Apr 2010 10:39:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-set-in-validation-rule/m-p/6835006#M1472177</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-16T10:39:02Z</dc:date>
    </item>
    <item>
      <title>Re: Using set in validation rule</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-set-in-validation-rule/m-p/6835007#M1472178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; I am functional consultant.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oops sorry, my bad !!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does this work fine for the check on the GL a/c set ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Apr 2010 10:48:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-set-in-validation-rule/m-p/6835007#M1472178</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2010-04-16T10:48:39Z</dc:date>
    </item>
    <item>
      <title>Re: Using set in validation rule</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-set-in-validation-rule/m-p/6835008#M1472179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suhas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's ok.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there anything that I have to say "TRUE" or "FLASE" with regard to condition in "check" ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chandrashekhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Apr 2010 10:52:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-set-in-validation-rule/m-p/6835008#M1472179</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-16T10:52:06Z</dc:date>
    </item>
    <item>
      <title>Re: Using set in validation rule</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-set-in-validation-rule/m-p/6835009#M1472180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The prerequisite check always checks if the statement is true. If it is false the validation wont trigger.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Apr 2010 11:01:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-set-in-validation-rule/m-p/6835009#M1472180</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2010-04-16T11:01:08Z</dc:date>
    </item>
  </channel>
</rss>

