<?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 How will i get the subcode? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-will-i-get-the-subcode/m-p/5461278#M1251189</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;Please help me for below logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF RDSTDCover = 'ST' do the following:&lt;/P&gt;&lt;P&gt; If PA0001-BURKS='1009' go to Table&lt;/P&gt;&lt;P&gt;Z_LegCode to retrieve previous Company Code Text for PA0002-PERID and send &lt;/P&gt;&lt;P&gt;the corresponding Sub Code according to ST Translation Table 2.&lt;/P&gt;&lt;P&gt;Else if no value is found Lookup &lt;/P&gt;&lt;P&gt;PA0001-BURKS along with Report Number '100525' &lt;/P&gt;&lt;P&gt;and send Sub Code value from ST Translation Table 1 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Else, send blanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF RDSTDCover = 'LT' do the following:&lt;/P&gt;&lt;P&gt;If PA0001-BURKS='1009' go to Table&lt;/P&gt;&lt;P&gt;Z_LegCode  to retrieve previous Company Code Text for &lt;/P&gt;&lt;P&gt;PA0002-PERID and send &lt;/P&gt;&lt;P&gt;the corresponding subcode according to LT Translation Table 2 &lt;/P&gt;&lt;P&gt;Else if If no value is found Lookup &lt;/P&gt;&lt;P&gt;PA0001-BURKS along with Report Number '98340' &lt;/P&gt;&lt;P&gt;and send Payoint value from LT Translation Table 1 &lt;/P&gt;&lt;P&gt;Else, send blanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF RDSTDCover = 'LT' do the following:&lt;/P&gt;&lt;P&gt;If PA0001-BURKS='1009' go to Table&lt;/P&gt;&lt;P&gt;Z_LegCode  to retrieve previous Company Code Text for &lt;/P&gt;&lt;P&gt;PA0002-PERID and send &lt;/P&gt;&lt;P&gt;the corresponding Paypoint according to LT Translation Table 2 &lt;/P&gt;&lt;P&gt;Else if If no value is found Lookup &lt;/P&gt;&lt;P&gt;PA0001-BURKS along with Report Number '98340' &lt;/P&gt;&lt;P&gt;and send Payoint value from LT Translation Table 1 &lt;/P&gt;&lt;P&gt;Else, send blanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was created one translation table(ST Translation Table 1,ST Translation Table 2,LT Translation Table 1,LT Translation Table 2) for above all fileds  &lt;STRONG&gt;ZGTBA_TL_SUBCODE&lt;/STRONG&gt;.The table is having Report number &amp;amp; Company code text &amp;amp; Bukrs &amp;amp; Subcode and paypoint as a fields.&lt;/P&gt;&lt;P&gt;And I was written the code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;if w_MetLife_detail-rdstdcover = u2018STu2019.
        
       if p0001-bukrs = u20181009u2019.
         read table t_ Z_LegCode into w_ Z_LegCode with key perid = p0002-perid.
          if sy-subrc eq 0.
            w_MetLife_detail-rdstdsubcde = ZGTBA_TL_SUBCODE-zsubcode.
          elseif
            select single HIST_BUKRS from ZGTBA_TL_SUBCODE
                                into   l_bukrs
                                where ZREPORTNO  = u2018100525u2019.

            w_MetLife_detail-rdstdsubcde = ZGTBA_TL_SUBCODE-zsubcode.
            else.
            w_MetLife_detail-rdstdsubcde  = ' '.
          endif.
        endif.
      endif.
      if w_MetLife_detail-rdstdcover =u2019STu2019.
        if p0001-bukrs = u20181009u2019.
          read table t_ Z_LegCode into w_ Z_LegCode with key perid = p0002-perid.
          if sy-subrc eq 0.
            w_MetLife_detail-rdstdsubpoint = ZGTBA_TL_SUBCODE-zpaypoint.
          elseif
            select single HIST_BUKRS from ZGTBA_TL_SUBCODE
                                into   l_bukrs
                                where ZREPORTNO  = u2018100525u2019.

            w_MetLife_detail-rdstdsubpoint = ZGTBA_TL_SUBCODE-zpaypoint.
           else.
           w_MetLife_detail-rdstdsubpoint  = ' '.
          endif.
        endif.
      endif.
    endif.
if w_MetLife_detail-rdstdcover = u2018LTu2019.
        if p0001-bukrs = u20181009u2019.
    .          read table t_ Z_LegCode into w_ Z_LegCode with key perid = p0002-perid.
          if sy-subrc eq 0.
            w_MetLife_detail-rdLtdsubcde = ZGTBA_TL_SUBCODE-zsubcode.
          elseif
            select single HIST_BUKRS from ZGTBA_TL_SUBCODE
                                into   l_bukrs
                                where ZREPORTNO  = u201898340u2019.

            w_MetLife_detail-rdLtdsubcde = ZGTBA_TL_SUBCODE-zsubcode.
          endif.
        endif.
      endif.
      if w_MetLife_detail-rdstdcover =u2019LTu2019.
        if p0001-bukrs = u20181009u2019.
          read table t_ Z_LegCode into w_ Z_LegCode with key perid = p0002-perid.
          if sy-subrc eq 0.
            w_MetLife_detail-rdstdsubpoint = ZGTBA_TL_SUBCODE-zpaypoint.
          elseif
            select single HIST_BUKRS from ZGTBA_TL_SUBCODE
                                into   l_bukrs
                                where ZREPORTNO  = u201898340u2019.

            w_MetLife_detail-rdLtdsubpoint = ZGTBA_TL_SUBCODE-zpaypoint.
          endif.
        endif.
      endif.
    endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please suggest me is it correct code?or any changes are required in the code for above requirement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Sujan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Apr 2009 03:47:15 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-04-28T03:47:15Z</dc:date>
    <item>
      <title>How will i get the subcode?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-will-i-get-the-subcode/m-p/5461278#M1251189</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;Please help me for below logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF RDSTDCover = 'ST' do the following:&lt;/P&gt;&lt;P&gt; If PA0001-BURKS='1009' go to Table&lt;/P&gt;&lt;P&gt;Z_LegCode to retrieve previous Company Code Text for PA0002-PERID and send &lt;/P&gt;&lt;P&gt;the corresponding Sub Code according to ST Translation Table 2.&lt;/P&gt;&lt;P&gt;Else if no value is found Lookup &lt;/P&gt;&lt;P&gt;PA0001-BURKS along with Report Number '100525' &lt;/P&gt;&lt;P&gt;and send Sub Code value from ST Translation Table 1 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Else, send blanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF RDSTDCover = 'LT' do the following:&lt;/P&gt;&lt;P&gt;If PA0001-BURKS='1009' go to Table&lt;/P&gt;&lt;P&gt;Z_LegCode  to retrieve previous Company Code Text for &lt;/P&gt;&lt;P&gt;PA0002-PERID and send &lt;/P&gt;&lt;P&gt;the corresponding subcode according to LT Translation Table 2 &lt;/P&gt;&lt;P&gt;Else if If no value is found Lookup &lt;/P&gt;&lt;P&gt;PA0001-BURKS along with Report Number '98340' &lt;/P&gt;&lt;P&gt;and send Payoint value from LT Translation Table 1 &lt;/P&gt;&lt;P&gt;Else, send blanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF RDSTDCover = 'LT' do the following:&lt;/P&gt;&lt;P&gt;If PA0001-BURKS='1009' go to Table&lt;/P&gt;&lt;P&gt;Z_LegCode  to retrieve previous Company Code Text for &lt;/P&gt;&lt;P&gt;PA0002-PERID and send &lt;/P&gt;&lt;P&gt;the corresponding Paypoint according to LT Translation Table 2 &lt;/P&gt;&lt;P&gt;Else if If no value is found Lookup &lt;/P&gt;&lt;P&gt;PA0001-BURKS along with Report Number '98340' &lt;/P&gt;&lt;P&gt;and send Payoint value from LT Translation Table 1 &lt;/P&gt;&lt;P&gt;Else, send blanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was created one translation table(ST Translation Table 1,ST Translation Table 2,LT Translation Table 1,LT Translation Table 2) for above all fileds  &lt;STRONG&gt;ZGTBA_TL_SUBCODE&lt;/STRONG&gt;.The table is having Report number &amp;amp; Company code text &amp;amp; Bukrs &amp;amp; Subcode and paypoint as a fields.&lt;/P&gt;&lt;P&gt;And I was written the code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;if w_MetLife_detail-rdstdcover = u2018STu2019.
        
       if p0001-bukrs = u20181009u2019.
         read table t_ Z_LegCode into w_ Z_LegCode with key perid = p0002-perid.
          if sy-subrc eq 0.
            w_MetLife_detail-rdstdsubcde = ZGTBA_TL_SUBCODE-zsubcode.
          elseif
            select single HIST_BUKRS from ZGTBA_TL_SUBCODE
                                into   l_bukrs
                                where ZREPORTNO  = u2018100525u2019.

            w_MetLife_detail-rdstdsubcde = ZGTBA_TL_SUBCODE-zsubcode.
            else.
            w_MetLife_detail-rdstdsubcde  = ' '.
          endif.
        endif.
      endif.
      if w_MetLife_detail-rdstdcover =u2019STu2019.
        if p0001-bukrs = u20181009u2019.
          read table t_ Z_LegCode into w_ Z_LegCode with key perid = p0002-perid.
          if sy-subrc eq 0.
            w_MetLife_detail-rdstdsubpoint = ZGTBA_TL_SUBCODE-zpaypoint.
          elseif
            select single HIST_BUKRS from ZGTBA_TL_SUBCODE
                                into   l_bukrs
                                where ZREPORTNO  = u2018100525u2019.

            w_MetLife_detail-rdstdsubpoint = ZGTBA_TL_SUBCODE-zpaypoint.
           else.
           w_MetLife_detail-rdstdsubpoint  = ' '.
          endif.
        endif.
      endif.
    endif.
if w_MetLife_detail-rdstdcover = u2018LTu2019.
        if p0001-bukrs = u20181009u2019.
    .          read table t_ Z_LegCode into w_ Z_LegCode with key perid = p0002-perid.
          if sy-subrc eq 0.
            w_MetLife_detail-rdLtdsubcde = ZGTBA_TL_SUBCODE-zsubcode.
          elseif
            select single HIST_BUKRS from ZGTBA_TL_SUBCODE
                                into   l_bukrs
                                where ZREPORTNO  = u201898340u2019.

            w_MetLife_detail-rdLtdsubcde = ZGTBA_TL_SUBCODE-zsubcode.
          endif.
        endif.
      endif.
      if w_MetLife_detail-rdstdcover =u2019LTu2019.
        if p0001-bukrs = u20181009u2019.
          read table t_ Z_LegCode into w_ Z_LegCode with key perid = p0002-perid.
          if sy-subrc eq 0.
            w_MetLife_detail-rdstdsubpoint = ZGTBA_TL_SUBCODE-zpaypoint.
          elseif
            select single HIST_BUKRS from ZGTBA_TL_SUBCODE
                                into   l_bukrs
                                where ZREPORTNO  = u201898340u2019.

            w_MetLife_detail-rdLtdsubpoint = ZGTBA_TL_SUBCODE-zpaypoint.
          endif.
        endif.
      endif.
    endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please suggest me is it correct code?or any changes are required in the code for above requirement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Sujan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2009 03:47:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-will-i-get-the-subcode/m-p/5461278#M1251189</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-28T03:47:15Z</dc:date>
    </item>
    <item>
      <title>Re: How will i get the subcode?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-will-i-get-the-subcode/m-p/5461279#M1251190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2009 04:54:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-will-i-get-the-subcode/m-p/5461279#M1251190</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-24T04:54:04Z</dc:date>
    </item>
  </channel>
</rss>

