<?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: Methods inside object types WORKFLOW in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/methods-inside-object-types-workflow/m-p/1602425#M270470</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;I am giving you sample code with which your issue will be resolved. in case if you have any problem please ask.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'Y_WF_PREQ_AUTO_PO_CHG_POSSIBLE'&lt;/P&gt;&lt;P&gt;EXPORTING                                                   P_BANFN   = OBJECT-KEY-PURCHASEREQUISITION    &lt;/P&gt;&lt;P&gt;  P_EKGRP   = OBJECT-KEY-PURCHASINGGROUP        &lt;/P&gt;&lt;P&gt;TABLES                                                      T_EBAN_REDUC  =   T_EBAN_REDUC                      &lt;/P&gt;&lt;P&gt;  T_EKPO_REDUC  = T_EKPO_REDUC                      &lt;/P&gt;&lt;P&gt;  T_COMPARISON  = T_COMPARISON                      &lt;/P&gt;&lt;P&gt;  T_DIFFERENCE  = T_DIFFERENCE                      &lt;/P&gt;&lt;P&gt;  T_MESSAGES_TEXT = T_MESSAGES                        &lt;/P&gt;&lt;P&gt;  T_ENDORSER    = T_ENDORSER                        &lt;/P&gt;&lt;P&gt;EXCEPTIONS                                                 PURCHASE_REQ_FIELD_EMPTY = 1                             &lt;/P&gt;&lt;P&gt; NO_PURCHASE_REQ_DATA_FOUND = 2                             &lt;/P&gt;&lt;P&gt;  NO_PURCHASE_ORDER_DATA_FOUND  = 3                             &lt;/P&gt;&lt;P&gt;  FUNCTION_PROBLEM              = 4                             &lt;/P&gt;&lt;P&gt;  CURRENCY_CONVERSION_FAILED    = 5                             &lt;/P&gt;&lt;P&gt;  NO_ENTRY_IN_T024              = 6                             &lt;/P&gt;&lt;P&gt;  NO_VALID_BUYER_FOUND          = 7                             &lt;/P&gt;&lt;P&gt;  QTY_UNIT_CONVERSION_FAILED    = 8&lt;/P&gt;&lt;P&gt;  NOT_ALL_ITEMS_APPROVED        = 9&lt;/P&gt;&lt;P&gt;  ALL_CHANGED_REQ_ITEMS_DELETED = 10&lt;/P&gt;&lt;P&gt;  SEVERAL_PO_ITEMS              = 11.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF SY_SUBRC &amp;lt;&amp;gt; 0.                                                  &lt;/P&gt;&lt;P&gt;  CASE SY_SUBRC.                                               &lt;/P&gt;&lt;P&gt;    WHEN 1.                                                          &lt;/P&gt;&lt;P&gt;      EXIT_RETURN 9001 W_SY-MSGV1 W_SY-MSGV2 W_SY-MSGV3 W_SY-MSGV4.  &lt;/P&gt;&lt;P&gt;    WHEN 2.                                                          &lt;/P&gt;&lt;P&gt;      EXIT_RETURN 9002 W_SY-MSGV1 W_SY-MSGV2 W_SY-MSGV3 W_SY-MSGV4.  &lt;/P&gt;&lt;P&gt;    WHEN 3.                                                          &lt;/P&gt;&lt;P&gt;      EXIT_RETURN 9003 W_SY-MSGV1 W_SY-MSGV2 W_SY-MSGV3 W_SY-MSGV4.  &lt;/P&gt;&lt;P&gt;    WHEN 4.                                                          &lt;/P&gt;&lt;P&gt;      EXIT_RETURN 9004 W_SY-MSGV1 W_SY-MSGV2 W_SY-MSGV3 W_SY-MSGV4.  &lt;/P&gt;&lt;P&gt;    WHEN 5.                                                          &lt;/P&gt;&lt;P&gt;      EXIT_RETURN 9005 W_SY-MSGV1 W_SY-MSGV2 W_SY-MSGV3 W_SY-MSGV4.  &lt;/P&gt;&lt;P&gt;    WHEN 6.                                                          &lt;/P&gt;&lt;P&gt;      EXIT_RETURN 9006 W_SY-MSGV1 W_SY-MSGV2 W_SY-MSGV3 W_SY-MSGV4.  &lt;/P&gt;&lt;P&gt;    WHEN 7.                                                          &lt;/P&gt;&lt;P&gt;      EXIT_RETURN 9007 W_SY-MSGV1 W_SY-MSGV2 W_SY-MSGV3 W_SY-MSGV4.  &lt;/P&gt;&lt;P&gt;    WHEN 8.                                                          &lt;/P&gt;&lt;P&gt;      EXIT_RETURN 9008 W_SY-MSGV1 W_SY-MSGV2 W_SY-MSGV3 W_SY-MSGV4.  &lt;/P&gt;&lt;P&gt;                                                                     &lt;/P&gt;&lt;P&gt;    WHEN 9.                                                          &lt;/P&gt;&lt;P&gt;      EXIT_RETURN 9009 W_SY-MSGV1 W_SY-MSGV2 W_SY-MSGV3 W_SY-MSGV4.  &lt;/P&gt;&lt;P&gt;           &lt;/P&gt;&lt;P&gt;Also at Object's Method level you have to define the exceptions which the method can throw.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now when you select the method in your task level, then exceptions defined at this method level will be shown at Task level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;sksingh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Oct 2006 16:52:58 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-10-13T16:52:58Z</dc:date>
    <item>
      <title>Methods inside object types WORKFLOW</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/methods-inside-object-types-workflow/m-p/1602424#M270469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi workflow gurus &lt;/P&gt;&lt;P&gt;I am trying to implement my own method in a subtyped object type, my requirement is that &lt;/P&gt;&lt;P&gt;if a particular condition is true then a particular outcome should be active.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example&lt;/P&gt;&lt;P&gt;begin_method mymethod changing container.&lt;/P&gt;&lt;P&gt;select * from xxx where fff = ccc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case  xxx-ggg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when 'aaa'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//I want the corresponding outcome to be active&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when 'bbb'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//I want the corresponding outcome to be active&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end_method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;these outcome should show up in my workflow step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can any of the gurus help me out on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Narendiran Rathinavelu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Oct 2006 09:47:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/methods-inside-object-types-workflow/m-p/1602424#M270469</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-13T09:47:12Z</dc:date>
    </item>
    <item>
      <title>Re: Methods inside object types WORKFLOW</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/methods-inside-object-types-workflow/m-p/1602425#M270470</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;I am giving you sample code with which your issue will be resolved. in case if you have any problem please ask.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'Y_WF_PREQ_AUTO_PO_CHG_POSSIBLE'&lt;/P&gt;&lt;P&gt;EXPORTING                                                   P_BANFN   = OBJECT-KEY-PURCHASEREQUISITION    &lt;/P&gt;&lt;P&gt;  P_EKGRP   = OBJECT-KEY-PURCHASINGGROUP        &lt;/P&gt;&lt;P&gt;TABLES                                                      T_EBAN_REDUC  =   T_EBAN_REDUC                      &lt;/P&gt;&lt;P&gt;  T_EKPO_REDUC  = T_EKPO_REDUC                      &lt;/P&gt;&lt;P&gt;  T_COMPARISON  = T_COMPARISON                      &lt;/P&gt;&lt;P&gt;  T_DIFFERENCE  = T_DIFFERENCE                      &lt;/P&gt;&lt;P&gt;  T_MESSAGES_TEXT = T_MESSAGES                        &lt;/P&gt;&lt;P&gt;  T_ENDORSER    = T_ENDORSER                        &lt;/P&gt;&lt;P&gt;EXCEPTIONS                                                 PURCHASE_REQ_FIELD_EMPTY = 1                             &lt;/P&gt;&lt;P&gt; NO_PURCHASE_REQ_DATA_FOUND = 2                             &lt;/P&gt;&lt;P&gt;  NO_PURCHASE_ORDER_DATA_FOUND  = 3                             &lt;/P&gt;&lt;P&gt;  FUNCTION_PROBLEM              = 4                             &lt;/P&gt;&lt;P&gt;  CURRENCY_CONVERSION_FAILED    = 5                             &lt;/P&gt;&lt;P&gt;  NO_ENTRY_IN_T024              = 6                             &lt;/P&gt;&lt;P&gt;  NO_VALID_BUYER_FOUND          = 7                             &lt;/P&gt;&lt;P&gt;  QTY_UNIT_CONVERSION_FAILED    = 8&lt;/P&gt;&lt;P&gt;  NOT_ALL_ITEMS_APPROVED        = 9&lt;/P&gt;&lt;P&gt;  ALL_CHANGED_REQ_ITEMS_DELETED = 10&lt;/P&gt;&lt;P&gt;  SEVERAL_PO_ITEMS              = 11.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF SY_SUBRC &amp;lt;&amp;gt; 0.                                                  &lt;/P&gt;&lt;P&gt;  CASE SY_SUBRC.                                               &lt;/P&gt;&lt;P&gt;    WHEN 1.                                                          &lt;/P&gt;&lt;P&gt;      EXIT_RETURN 9001 W_SY-MSGV1 W_SY-MSGV2 W_SY-MSGV3 W_SY-MSGV4.  &lt;/P&gt;&lt;P&gt;    WHEN 2.                                                          &lt;/P&gt;&lt;P&gt;      EXIT_RETURN 9002 W_SY-MSGV1 W_SY-MSGV2 W_SY-MSGV3 W_SY-MSGV4.  &lt;/P&gt;&lt;P&gt;    WHEN 3.                                                          &lt;/P&gt;&lt;P&gt;      EXIT_RETURN 9003 W_SY-MSGV1 W_SY-MSGV2 W_SY-MSGV3 W_SY-MSGV4.  &lt;/P&gt;&lt;P&gt;    WHEN 4.                                                          &lt;/P&gt;&lt;P&gt;      EXIT_RETURN 9004 W_SY-MSGV1 W_SY-MSGV2 W_SY-MSGV3 W_SY-MSGV4.  &lt;/P&gt;&lt;P&gt;    WHEN 5.                                                          &lt;/P&gt;&lt;P&gt;      EXIT_RETURN 9005 W_SY-MSGV1 W_SY-MSGV2 W_SY-MSGV3 W_SY-MSGV4.  &lt;/P&gt;&lt;P&gt;    WHEN 6.                                                          &lt;/P&gt;&lt;P&gt;      EXIT_RETURN 9006 W_SY-MSGV1 W_SY-MSGV2 W_SY-MSGV3 W_SY-MSGV4.  &lt;/P&gt;&lt;P&gt;    WHEN 7.                                                          &lt;/P&gt;&lt;P&gt;      EXIT_RETURN 9007 W_SY-MSGV1 W_SY-MSGV2 W_SY-MSGV3 W_SY-MSGV4.  &lt;/P&gt;&lt;P&gt;    WHEN 8.                                                          &lt;/P&gt;&lt;P&gt;      EXIT_RETURN 9008 W_SY-MSGV1 W_SY-MSGV2 W_SY-MSGV3 W_SY-MSGV4.  &lt;/P&gt;&lt;P&gt;                                                                     &lt;/P&gt;&lt;P&gt;    WHEN 9.                                                          &lt;/P&gt;&lt;P&gt;      EXIT_RETURN 9009 W_SY-MSGV1 W_SY-MSGV2 W_SY-MSGV3 W_SY-MSGV4.  &lt;/P&gt;&lt;P&gt;           &lt;/P&gt;&lt;P&gt;Also at Object's Method level you have to define the exceptions which the method can throw.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now when you select the method in your task level, then exceptions defined at this method level will be shown at Task level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;sksingh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Oct 2006 16:52:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/methods-inside-object-types-workflow/m-p/1602425#M270470</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-13T16:52:58Z</dc:date>
    </item>
  </channel>
</rss>

