<?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: help in FM /SDF/CMO_DATETIME_DIFFERENCE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-fm-sdf-cmo-datetime-difference/m-p/8253323#M1631302</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi abhishek1345  ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt; "Why don't you copy function module /SDF/LCMO_COMP_REPOSTOP to Z/SDF/LCMO_COMP_REPOSTOP &lt;/P&gt;&lt;P&gt;Change logic in " perform datetime_difference&lt;/P&gt;&lt;P&gt;          using date1 time1 date2 time2&lt;/P&gt;&lt;P&gt;                datediff timediff earliest. " From  function module  &lt;/P&gt;&lt;P&gt;as per your requirment  .&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;That would be better  or &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Copy code  from  function module and change as per  your requirment  .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Deepak.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;lt;Removed code tags&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Suhas Saha on Oct 24, 2011 10:36 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 22 Oct 2011 05:55:00 GMT</pubDate>
    <dc:creator>deepak_dhamat</dc:creator>
    <dc:date>2011-10-22T05:55:00Z</dc:date>
    <item>
      <title>help in FM /SDF/CMO_DATETIME_DIFFERENCE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-fm-sdf-cmo-datetime-difference/m-p/8253320#M1631299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i am using the function module /SDF/CMO_DATETIME_DIFFERENCE to calculate the days between two dates.&lt;/P&gt;&lt;P&gt;i m getting the output. but what i want is if it does the receives blank as one value( from the two given dates) in  exporting.........then it should show blank as diff days.(importing diff days).&lt;/P&gt;&lt;P&gt;my code is:&lt;/P&gt;&lt;P&gt;I_TAB-ERDAT&lt;/P&gt;&lt;P&gt;I_TAB-GP_DATE&lt;/P&gt;&lt;P&gt;I_TAB-BC_GP.............ALL THESE HAVE BEEN DECLARED IN I_TAB. AND THWY HAVE THEIR VALUES IN DATE FORMAT IN I)TAB.&lt;/P&gt;&lt;P&gt;&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                  = I_TAB-ERDAT&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                  = I_TAB-GP_DATE&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               = I_TAB-BC_GP&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;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO WE HAVE ANY PROVISION IN THIS FM THAT IF THERE IS BLANK SOMEWHERE IN I_TAB-GP_DATE THEN IT SHOULD SHOW&lt;/P&gt;&lt;P&gt;I_TAB-BC_GP AS BLANK. &lt;/P&gt;&lt;P&gt;HOWEVER IT IS RECEIVING VALUE IN ANOTHER EXPORTING PARAMETER THAT IS I_TAB-ERDAT.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Oct 2011 05:05:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-fm-sdf-cmo-datetime-difference/m-p/8253320#M1631299</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-21T05:05:36Z</dc:date>
    </item>
    <item>
      <title>Re: help in FM /SDF/CMO_DATETIME_DIFFERENCE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-fm-sdf-cmo-datetime-difference/m-p/8253321#M1631300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Its a difference generator FM so def .. its gonna subtract the first date from the second one .. &lt;/P&gt;&lt;P&gt;Try using a if condition before it to check whether your field contains initial value or not ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I_TAB-ERDAT is initial or I_TAB-GP_DATE is initial.&lt;/P&gt;&lt;P&gt;I_TAB-BC_GP  = 0.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;call the function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will surely help you !!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Punit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Oct 2011 05:46:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-fm-sdf-cmo-datetime-difference/m-p/8253321#M1631300</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-21T05:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: help in FM /SDF/CMO_DATETIME_DIFFERENCE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-fm-sdf-cmo-datetime-difference/m-p/8253322#M1631301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;dude if i declare i_tab-bc_gp = 0. then i will get i_tab-bc_gp field value as 0. man..m already getting this value.&lt;/P&gt;&lt;P&gt;what i want is a BLANK space whenever it finds null at any of two exporting parameters.&lt;/P&gt;&lt;P&gt;i_tab-bc_gp = "". is not working..showing an error. suggest something to recitify this&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Oct 2011 05:45:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-fm-sdf-cmo-datetime-difference/m-p/8253322#M1631301</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-22T05:45:47Z</dc:date>
    </item>
    <item>
      <title>Re: help in FM /SDF/CMO_DATETIME_DIFFERENCE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-fm-sdf-cmo-datetime-difference/m-p/8253323#M1631302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi abhishek1345  ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt; "Why don't you copy function module /SDF/LCMO_COMP_REPOSTOP to Z/SDF/LCMO_COMP_REPOSTOP &lt;/P&gt;&lt;P&gt;Change logic in " perform datetime_difference&lt;/P&gt;&lt;P&gt;          using date1 time1 date2 time2&lt;/P&gt;&lt;P&gt;                datediff timediff earliest. " From  function module  &lt;/P&gt;&lt;P&gt;as per your requirment  .&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;That would be better  or &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Copy code  from  function module and change as per  your requirment  .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Deepak.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;lt;Removed code tags&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Suhas Saha on Oct 24, 2011 10:36 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Oct 2011 05:55:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-fm-sdf-cmo-datetime-difference/m-p/8253323#M1631302</guid>
      <dc:creator>deepak_dhamat</dc:creator>
      <dc:date>2011-10-22T05:55:00Z</dc:date>
    </item>
    <item>
      <title>Re: help in FM /SDF/CMO_DATETIME_DIFFERENCE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-fm-sdf-cmo-datetime-difference/m-p/8253324#M1631303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;now for any numeric field like integer, decimal the default value is always 0 whether it contains data or not.&lt;/P&gt;&lt;P&gt;So for display purpose you have put this value in a character field and display that field in place of the numeric one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now for eg. &lt;/P&gt;&lt;P&gt;while displaying &lt;/P&gt;&lt;P&gt;use&lt;/P&gt;&lt;P&gt;write i_tab-bc_gp to &amp;lt;char_field&amp;gt;&lt;/P&gt;&lt;P&gt;and display that &amp;lt;char_field&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will resolve !!!&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;Punit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Oct 2011 04:51:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-fm-sdf-cmo-datetime-difference/m-p/8253324#M1631303</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-24T04:51:40Z</dc:date>
    </item>
  </channel>
</rss>

