<?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: CODE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/code/m-p/3288509#M786773</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;     U can add an extra field in the internal table.increment tht value and store it in tht internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thn in the fieldcatalog u can arraange this field and u can display it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data :begin of itab.&lt;/P&gt;&lt;P&gt;inculde structure dbtablename.&lt;/P&gt;&lt;P&gt;data : incr type i.&lt;/P&gt;&lt;P&gt;data : end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if useful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Jan 2008 07:43:50 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-21T07:43:50Z</dc:date>
    <item>
      <title>CODE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code/m-p/3288505#M786769</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;I want to display BSIK-DMBTR field contents using ALV also&lt;/P&gt;&lt;P&gt;I want to display total = bsik-dmbtr + 1 using alv..&lt;/P&gt;&lt;P&gt;my final output list should contain&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DMBTR           TOTAL&lt;/P&gt;&lt;P&gt;______           ___________&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;100                101&lt;/P&gt;&lt;P&gt;200                201&lt;/P&gt;&lt;P&gt;.                      .&lt;/P&gt;&lt;P&gt;.                      .&lt;/P&gt;&lt;P&gt;.                      .&lt;/P&gt;&lt;P&gt;.                      .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pls let me know how to display the above...&lt;/P&gt;&lt;P&gt;the following is the same program without logic..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;________________________________________&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report zalv.&lt;/P&gt;&lt;P&gt;tables : bsik.&lt;/P&gt;&lt;P&gt;type-pools : slis.&lt;/P&gt;&lt;P&gt;DATA: it_fldcat TYPE slis_t_fieldcat_alv.&lt;/P&gt;&lt;P&gt;DATA: wa_fldcat TYPE slis_fieldcat_alv.&lt;/P&gt;&lt;P&gt;DATA : it_sort TYPE slis_t_sortinfo_alv.&lt;/P&gt;&lt;P&gt;DATA : wa_sort TYPE slis_sortinfo_alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;dmbtr like bsik-dmbtr.&lt;/P&gt;&lt;P&gt;total type i,&lt;/P&gt;&lt;P&gt;end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bld_fcat 1 'DMBTR' 13 'Amt Document Curr' 'L'.&lt;/P&gt;&lt;P&gt;bld_fcat 2 'TOTAL' 20 'Total amount' 'L'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'   "Displaying data in grid format&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_callback_program                = sy-repid&lt;/P&gt;&lt;P&gt;      it_fieldcat   = it_fldcat     "fieldcatalog&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     it_sort       = it_sort[]     "Sort&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     it_events     = it_events&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      t_outtab      = itab    "internal table to output&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      program_error = 1&lt;/P&gt;&lt;P&gt;      OTHERS        = 2.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jan 2008 07:33:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code/m-p/3288505#M786769</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-21T07:33:16Z</dc:date>
    </item>
    <item>
      <title>Re: CODE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code/m-p/3288506#M786770</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;before the ALV call:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT itab.&lt;/P&gt;&lt;P&gt;itab-total = itab-dmbtr + 1.&lt;/P&gt;&lt;P&gt;MODIFY itab.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;ec&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jan 2008 07:35:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code/m-p/3288506#M786770</guid>
      <dc:creator>JozsefSzikszai</dc:creator>
      <dc:date>2008-01-21T07:35:30Z</dc:date>
    </item>
    <item>
      <title>Re: CODE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code/m-p/3288507#M786771</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;You can do as below :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once everything is done and before passing the internal table to ALV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at gt_final.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gt_final-total = gt_final-dmbtr + 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;modify gt_final.&lt;/P&gt;&lt;P&gt;clear gt_final.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sriram Ponna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jan 2008 07:38:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code/m-p/3288507#M786771</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-21T07:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: CODE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code/m-p/3288508#M786772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Malika,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before populating in to the final internal table just add 1 to the total field.&lt;/P&gt;&lt;P&gt;ie + 1 to your total field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;DVNS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jan 2008 07:38:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code/m-p/3288508#M786772</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-21T07:38:50Z</dc:date>
    </item>
    <item>
      <title>Re: CODE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code/m-p/3288509#M786773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;     U can add an extra field in the internal table.increment tht value and store it in tht internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thn in the fieldcatalog u can arraange this field and u can display it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data :begin of itab.&lt;/P&gt;&lt;P&gt;inculde structure dbtablename.&lt;/P&gt;&lt;P&gt;data : incr type i.&lt;/P&gt;&lt;P&gt;data : end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if useful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jan 2008 07:43:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code/m-p/3288509#M786773</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-21T07:43:50Z</dc:date>
    </item>
    <item>
      <title>Re: CODE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code/m-p/3288510#M786774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why can't you have an additonal field "TOTAL" in your output table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when you calculate DMBTR then in that piece of code , next line you can derive TOTAL as :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;itab-DMBTR = gw_dmbtr.&lt;/P&gt;&lt;P&gt;itab-TOTAL =  gw_dmbtr + 1.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;append itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else you will have to unnecessarily make an additional loop on table itab and calculate DMBTR as suggested by other guys ont he forum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jan 2008 07:47:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code/m-p/3288510#M786774</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-21T07:47:06Z</dc:date>
    </item>
  </channel>
</rss>

