<?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: time format in SAP SCRIPTS in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-format-in-sap-scripts/m-p/2048099#M421896</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Why you need to print that AM or PM,&lt;/P&gt;&lt;P&gt;if the time is 3.11 PM it will be displayed as 15.11 no?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want you can put a condition such that :&lt;/P&gt;&lt;P&gt;if time+0(2) &amp;gt; 12  concatenate with PM  else AM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if useful&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Mar 2007 12:58:15 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-03-22T12:58:15Z</dc:date>
    <item>
      <title>time format in SAP SCRIPTS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-format-in-sap-scripts/m-p/2048098#M421895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have a small requirement in sap scripts. i have to print the time format as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;03: 11 PM or AM . i am using SET TIME MASK = 'HH: MM'&lt;/P&gt;&lt;P&gt;but i need to print AM OR PM at the same time . which i am unable to do so.&lt;/P&gt;&lt;P&gt;please help me if you know .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;srinivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Mar 2007 12:53:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/time-format-in-sap-scripts/m-p/2048098#M421895</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-22T12:53:17Z</dc:date>
    </item>
    <item>
      <title>Re: time format in SAP SCRIPTS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-format-in-sap-scripts/m-p/2048099#M421896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Why you need to print that AM or PM,&lt;/P&gt;&lt;P&gt;if the time is 3.11 PM it will be displayed as 15.11 no?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want you can put a condition such that :&lt;/P&gt;&lt;P&gt;if time+0(2) &amp;gt; 12  concatenate with PM  else AM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if useful&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Mar 2007 12:58:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/time-format-in-sap-scripts/m-p/2048099#M421896</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-22T12:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: time format in SAP SCRIPTS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-format-in-sap-scripts/m-p/2048100#M421897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Srini,&lt;/P&gt;&lt;P&gt;Here is the code try to put it in the subroutine. before priniting the Time.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Put this code inside your SAP Script before displaying the time&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DEFINE &amp;amp;L_SCH_TIME&amp;amp; = &amp;amp;RM06P-LTIME&amp;amp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PERFORM GET_DATE_FORMAT IN PROGRAM ZW1MEDRUCK_INCLUDE
                              USING    &amp;amp;RM06P-LFTIME&amp;amp;    " This is the actual time
                              CHANGING &amp;amp;L_SCH_TIME&amp;amp;   " This will hold the time with AM/PM
ENDPERFORM&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Put Code Inside your Include ZW1MEDRUCK_INCLUDE&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FORM GET_DATE_FORMAT TABLES IN_TAB STRUCTURE ITCSY
                          OUT_TAB STRUCTURE ITCSY.
DATA: L_TIMFM(10) TYPE C,
          L_TIME2(10) TYPE C,
          L_HOUR TYPE I,
          L_MIN TYPE I.
    READ TABLE IN_TAB WITH KEY 'RM06P-LFDAT'.
    IF SY-SUBRC = 0.
      L_TIME2  =  IN_TAB-VALUE.

      IF L_TIME2+0(2) GT 11.

        L_HOUR = L_TIME2 - 12.
        L_MIN =  L_TIME +3(2).
        CONCATENATE   L_HOUR ':' L_MIN 'PM' INTO L_TIMFM . 
      ELSE.
        CONCATENATE  IN_TAB-VALUE  'PM' INTO  L_TIMFM.
      ENDIF.
  ENDIF.
  READ TABLE OUT_TAB WITH KEY L_SCH_TIME'.
      IF SY-SUBRC = 0.
        OUT_TAB-VALUE = L_TIMFM.
        MODIFY OUT_TAB INDEX SY-TABIX.
     ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Now Put this code to SAP Script to print the time in AM/PM format.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&amp;amp;L_SCH_TIME&amp;amp;   "------&amp;gt;instead of your time variable.....&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward Point if helpfull....................&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Mar 2007 13:16:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/time-format-in-sap-scripts/m-p/2048100#M421897</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-22T13:16:31Z</dc:date>
    </item>
    <item>
      <title>Re: time format in SAP SCRIPTS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-format-in-sap-scripts/m-p/2048101#M421898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thx for your  info........ Issue is resolved......&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jul 2011 13:51:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/time-format-in-sap-scripts/m-p/2048101#M421898</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-25T13:51:54Z</dc:date>
    </item>
  </channel>
</rss>

