<?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 Error : Exceptions in Substep: Rules in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-exceptions-in-substep-rules/m-p/4286602#M1022548</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have written this routine in which I am calculating the difference between 2 days and then calculating how many holidays were there between those dates. The I am subtracting the total difference with the number of holidays to calculate the number of wokign days.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I am loading my data I am getting this error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exceptions in Substep: Rules and it points at this line CALL FUNCTION '/SDF/CMO_DATETIME_DIFFERENCE'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please can someone explain&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the code which i have written.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: no_days type I,&lt;/P&gt;&lt;P&gt;          no_holi type I,&lt;/P&gt;&lt;P&gt;          l_day TYPE /BI0/OICRMPOSTDAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    data: no_holidays type table of ISCAL_DAY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    MOVE SOURCE_FIELDS-CRMPOSTDAT to l_day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION '/SDF/CMO_DATETIME_DIFFERENCE'&lt;/P&gt;&lt;P&gt;     EXPORTING&lt;/P&gt;&lt;P&gt;       DATE1                  = l_day&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  TIME1                  =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;       DATE2                  = sy-datum&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  TIME2                  =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;     IMPORTING&lt;/P&gt;&lt;P&gt;       DATEDIFF               = no_days&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  TIMEDIFF               =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  EARLIEST               =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      INVALID_DATETIME       = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      OTHERS                 = 2&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;              .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'HOLIDAY_GET'&lt;/P&gt;&lt;P&gt;     EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  HOLIDAY_CALENDAR                 = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;       FACTORY_CALENDAR                 = 'GB'&lt;/P&gt;&lt;P&gt;       DATE_FROM                        = l_day&lt;/P&gt;&lt;P&gt;       DATE_TO                          = SY-DATUM&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  YEAR_OF_VALID_FROM               =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  YEAR_OF_VALID_TO                 =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  RETURNCODE                       =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;        HOLIDAYS                         = no_holidays&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FACTORY_CALENDAR_NOT_FOUND       = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  HOLIDAY_CALENDAR_NOT_FOUND       = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  DATE_HAS_INVALID_FORMAT          = 3&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  DATE_INCONSISTENCY               = 4&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OTHERS                           = 5&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;              .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    describe table no_holidays lines no_holi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    RESULT = no_days - no_holi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Aug 2008 16:45:17 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-08-07T16:45:17Z</dc:date>
    <item>
      <title>Error : Exceptions in Substep: Rules</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-exceptions-in-substep-rules/m-p/4286602#M1022548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have written this routine in which I am calculating the difference between 2 days and then calculating how many holidays were there between those dates. The I am subtracting the total difference with the number of holidays to calculate the number of wokign days.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I am loading my data I am getting this error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exceptions in Substep: Rules and it points at this line CALL FUNCTION '/SDF/CMO_DATETIME_DIFFERENCE'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please can someone explain&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the code which i have written.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: no_days type I,&lt;/P&gt;&lt;P&gt;          no_holi type I,&lt;/P&gt;&lt;P&gt;          l_day TYPE /BI0/OICRMPOSTDAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    data: no_holidays type table of ISCAL_DAY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    MOVE SOURCE_FIELDS-CRMPOSTDAT to l_day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION '/SDF/CMO_DATETIME_DIFFERENCE'&lt;/P&gt;&lt;P&gt;     EXPORTING&lt;/P&gt;&lt;P&gt;       DATE1                  = l_day&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  TIME1                  =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;       DATE2                  = sy-datum&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  TIME2                  =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;     IMPORTING&lt;/P&gt;&lt;P&gt;       DATEDIFF               = no_days&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  TIMEDIFF               =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  EARLIEST               =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      INVALID_DATETIME       = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      OTHERS                 = 2&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;              .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'HOLIDAY_GET'&lt;/P&gt;&lt;P&gt;     EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  HOLIDAY_CALENDAR                 = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;       FACTORY_CALENDAR                 = 'GB'&lt;/P&gt;&lt;P&gt;       DATE_FROM                        = l_day&lt;/P&gt;&lt;P&gt;       DATE_TO                          = SY-DATUM&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  YEAR_OF_VALID_FROM               =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  YEAR_OF_VALID_TO                 =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  RETURNCODE                       =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;        HOLIDAYS                         = no_holidays&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FACTORY_CALENDAR_NOT_FOUND       = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  HOLIDAY_CALENDAR_NOT_FOUND       = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  DATE_HAS_INVALID_FORMAT          = 3&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  DATE_INCONSISTENCY               = 4&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OTHERS                           = 5&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;              .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    describe table no_holidays lines no_holi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    RESULT = no_days - no_holi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2008 16:45:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-exceptions-in-substep-rules/m-p/4286602#M1022548</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-07T16:45:17Z</dc:date>
    </item>
    <item>
      <title>Re: Error : Exceptions in Substep: Rules</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-exceptions-in-substep-rules/m-p/4286603#M1022549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Duplicate post. Please close one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2008 17:10:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-exceptions-in-substep-rules/m-p/4286603#M1022549</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-07T17:10:48Z</dc:date>
    </item>
    <item>
      <title>Re: Error : Exceptions in Substep: Rules</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-exceptions-in-substep-rules/m-p/4286604#M1022550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;An easy way to do this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;********************************************************************************&lt;/P&gt;&lt;P&gt;do.&lt;/P&gt;&lt;P&gt;  if date1 ge date2.&lt;/P&gt;&lt;P&gt;    exit.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  date1 = date1 + 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'DATE_CONVERT_TO_FACTORYDATE'&lt;/P&gt;&lt;P&gt;          EXPORTING&lt;/P&gt;&lt;P&gt;                  DATE                       = date1&lt;/P&gt;&lt;P&gt;                  FACTORY_CALENDAR_ID        = calender_id&lt;/P&gt;&lt;P&gt;          IMPORTING&lt;/P&gt;&lt;P&gt;                  WORKINGDAY_INDICATOR       = workday_flag.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; if workday_flag = ' '.    "Day is a workday&lt;/P&gt;&lt;P&gt;  day_count = day_count + 1.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;enddo.&lt;/P&gt;&lt;P&gt;********************************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The variable day_count will have the number of workdays.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;Jerrod Baldauf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2008 20:17:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-exceptions-in-substep-rules/m-p/4286604#M1022550</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-07T20:17:35Z</dc:date>
    </item>
  </channel>
</rss>

