<?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 Function module in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/4026218#M962202</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need a function module that would return me the quater basec on the period key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the period key, as 1q08,  or may be 2q07..and the period key may also be in MMYY format....So i want a FM to which passing this value i should get the value 1st quater....2 nd quater....or if its in MMYY format..then January 2008....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have written a  code for this but that doesnt seem to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

*FOR KEY PERIOD FORMATTING
if keyprd+0(2) ca 'q' or keyprd+0(2) ca 'Q'.
  if keyprd+0(2) eq '1q'. mn = 'March'.    endif.
  if keyprd+0(2) eq '2q'. mn = 'June'.     endif.
  if keyprd+0(2) eq '3q'. mn = 'September'.endif.
  if keyprd+0(2) eq '4q'. mn = 'December'. endif.
else.
select single ltx into mn
from t247
where spras = 'EN'
and mnr = keyprd+0(2).
endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Could anybody help me in this.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Jun 2008 09:36:33 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-20T09:36:33Z</dc:date>
    <item>
      <title>Function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/4026218#M962202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need a function module that would return me the quater basec on the period key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the period key, as 1q08,  or may be 2q07..and the period key may also be in MMYY format....So i want a FM to which passing this value i should get the value 1st quater....2 nd quater....or if its in MMYY format..then January 2008....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have written a  code for this but that doesnt seem to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

*FOR KEY PERIOD FORMATTING
if keyprd+0(2) ca 'q' or keyprd+0(2) ca 'Q'.
  if keyprd+0(2) eq '1q'. mn = 'March'.    endif.
  if keyprd+0(2) eq '2q'. mn = 'June'.     endif.
  if keyprd+0(2) eq '3q'. mn = 'September'.endif.
  if keyprd+0(2) eq '4q'. mn = 'December'. endif.
else.
select single ltx into mn
from t247
where spras = 'EN'
and mnr = keyprd+0(2).
endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Could anybody help me in this.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2008 09:36:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/4026218#M962202</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-20T09:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: Function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/4026219#M962203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Runal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am not sure for this specific purpose we have any FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i think you have to modified your code as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;if keyprd+0(2) ca 'q' or keyprd+0(2) ca 'Q'.
  if keyprd+0(2) eq '1q' or if keyprd+0(2) eq '1Q'. mn = 'March'.    endif.
  if keyprd+0(2) eq '2q' or if keyprd+0(2) eq '2Q'. . mn = 'June'.     endif.
  if keyprd+0(2) eq '3q' or if keyprd+0(2) eq '3Q'. . mn = 'September'.endif.
  if keyprd+0(2) eq '4q' or if keyprd+0(2) eq '4Q'. . mn = 'December'. endif.
else.
select single ltx into mn
from t247
where spras = 'EN'
and mnr = keyprd+0(2).
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now it should work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Amit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2008 09:44:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/4026219#M962203</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-20T09:44:43Z</dc:date>
    </item>
  </channel>
</rss>

