<?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: Runtime Modifications during Z table maintenance (screen flow logic) in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-modifications-during-z-table-maintenance-screen-flow-logic/m-p/2442035#M546708</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;    Use select max( field name  (i.e,counter value) ) from database table into counter.&lt;/P&gt;&lt;P&gt;case 'ok_code'.&lt;/P&gt;&lt;P&gt;when 'funct. code.'&lt;/P&gt;&lt;P&gt;then increment the counter assing the incremented counter value to ITAB-fieldname.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;modify itab index sy-tabix.&lt;/P&gt;&lt;P&gt;else &lt;/P&gt;&lt;P&gt;append itab&lt;/P&gt;&lt;P&gt;insert DBtable name from table itab.&lt;/P&gt;&lt;P&gt;refresh itab&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use this method it will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if helpful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Raghavendra.D.S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 30 Jun 2007 05:49:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-30T05:49:52Z</dc:date>
    <item>
      <title>Runtime Modifications during Z table maintenance (screen flow logic)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-modifications-during-z-table-maintenance-screen-flow-logic/m-p/2442033#M546706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I have created a custom t-code for table maintenance of a custom table. This table has a count field which needs to be auto generated during the maintenance (each time a new record is added, the counter is incremented as per the key field value) &lt;/P&gt;&lt;P&gt;Hence I am modifying the PAI of the overview screen to generate the counter value. I have been able to copy the "extract" table into an internal table and modify the count field. But I do not know how to put back these changes to the "extract" table. Any help in this regard would be really helpful.&lt;/P&gt;&lt;P&gt;Below is the module code:&lt;/P&gt;&lt;P&gt;MODULE modify_count INPUT.&lt;/P&gt;&lt;P&gt;  TYPES:&lt;/P&gt;&lt;P&gt;    BEGIN OF t_gtin,&lt;/P&gt;&lt;P&gt;      zzisgtin TYPE zgtinaudit-zzisgtin,&lt;/P&gt;&lt;P&gt;    END OF t_gtin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    BEGIN OF t_count,&lt;/P&gt;&lt;P&gt;      zzisgtin TYPE zgtinaudit-zzisgtin,&lt;/P&gt;&lt;P&gt;      zzcount  TYPE zgtinaudit-zzcount,&lt;/P&gt;&lt;P&gt;    END OF t_count.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA:&lt;/P&gt;&lt;P&gt;   primtab_mod      TYPE REF TO   data               ,&lt;/P&gt;&lt;P&gt;   i_zgtinaudit     TYPE          zgtinaudit OCCURS 0,&lt;/P&gt;&lt;P&gt;   i_gtin           TYPE TABLE OF t_gtin             ,&lt;/P&gt;&lt;P&gt;   i_count          TYPE TABLE OF t_count            ,&lt;/P&gt;&lt;P&gt;   wa_zgtinaudit    TYPE          zgtinaudit         ,&lt;/P&gt;&lt;P&gt;   wa_gtin          TYPE          t_gtin             ,&lt;/P&gt;&lt;P&gt;   wa_count         TYPE          t_count            ,&lt;/P&gt;&lt;P&gt;   v_zzcount        TYPE          zgtinaudit-zzcount ,&lt;/P&gt;&lt;P&gt;   v_okcode         TYPE          sy-ucomm           ,&lt;/P&gt;&lt;P&gt;   v_idx            TYPE          i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  FIELD-SYMBOLS:&lt;/P&gt;&lt;P&gt;    &amp;lt;table_entries&amp;gt; TYPE STANDARD TABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  v_okcode = sy-ucomm.&lt;/P&gt;&lt;P&gt;  CHECK v_okcode EQ 'SAVE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CREATE DATA primtab_mod TYPE TABLE OF (x_header-maintview).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ASSIGN: primtab_mod-&amp;gt;* TO &amp;lt;table_entries&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Move the data in the table control to &amp;lt;table_entries&amp;gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  LOOP AT extract.&lt;/P&gt;&lt;P&gt;    APPEND &amp;lt;vim_extract_struc&amp;gt; TO &amp;lt;table_entries&amp;gt;.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  MOVE &amp;lt;table_entries&amp;gt;[] TO i_zgtinaudit[].&lt;/P&gt;&lt;P&gt;  SORT i_zgtinaudit BY zzisgtin DESCENDING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Store the key field (GTIN) values&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  LOOP AT i_zgtinaudit INTO wa_zgtinaudit.&lt;/P&gt;&lt;P&gt;    wa_gtin-zzisgtin = wa_zgtinaudit-zzisgtin.&lt;/P&gt;&lt;P&gt;    APPEND wa_gtin TO i_gtin.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SORT i_gtin BY zzisgtin.&lt;/P&gt;&lt;P&gt;  DELETE ADJACENT DUPLICATES FROM i_gtin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Select existing data from the table for the GTINs&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  SELECT zzisgtin&lt;/P&gt;&lt;P&gt;         zzcount&lt;/P&gt;&lt;P&gt;  FROM zgtinaudit&lt;/P&gt;&lt;P&gt;  INTO TABLE i_count&lt;/P&gt;&lt;P&gt;  FOR ALL ENTRIES IN i_gtin&lt;/P&gt;&lt;P&gt;  WHERE zzisgtin EQ i_gtin-zzisgtin.&lt;/P&gt;&lt;P&gt;  IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;    SORT i_count BY zzisgtin zzcount DESCENDING.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Generate the counter&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  LOOP AT i_zgtinaudit INTO wa_zgtinaudit.&lt;/P&gt;&lt;P&gt;    v_idx = sy-tabix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF NOT wa_zgtinaudit-zzisgtin IS INITIAL.&lt;/P&gt;&lt;P&gt;      AT NEW zzisgtin.&lt;/P&gt;&lt;P&gt;        CLEAR:&lt;/P&gt;&lt;P&gt;        wa_count,&lt;/P&gt;&lt;P&gt;        v_zzcount.&lt;/P&gt;&lt;P&gt;        READ TABLE i_count INTO wa_count&lt;/P&gt;&lt;P&gt;        WITH KEY zzisgtin = wa_zgtinaudit-zzisgtin.&lt;/P&gt;&lt;P&gt;        IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;          v_zzcount = wa_count-zzcount.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;      ENDAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      v_zzcount = v_zzcount + 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      IF wa_zgtinaudit-zzcount IS INITIAL.&lt;/P&gt;&lt;P&gt;        wa_zgtinaudit-zzcount = v_zzcount.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      IF wa_zgtinaudit-zzisauditusrid IS INITIAL.&lt;/P&gt;&lt;P&gt;        wa_zgtinaudit-zzisauditusrid = sy-uname.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      MODIFY i_zgtinaudit FROM wa_zgtinaudit INDEX v_idx.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  REFRESH &amp;lt;table_entries&amp;gt;[].&lt;/P&gt;&lt;P&gt;  MOVE i_zgtinaudit[] TO &amp;lt;table_entries&amp;gt;[].&lt;/P&gt;&lt;P&gt;ENDMODULE.                 " modify_count  INPUT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jun 2007 11:39:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-modifications-during-z-table-maintenance-screen-flow-logic/m-p/2442033#M546706</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-28T11:39:40Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime Modifications during Z table maintenance (screen flow logic)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-modifications-during-z-table-maintenance-screen-flow-logic/m-p/2442034#M546707</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 think there is no need of dumping data into an internal table you can just read the maximum count value from the extract table as below.&lt;/P&gt;&lt;P&gt;         READ max(zzcount) INTO wa_zzcount FROM extract.       &lt;/P&gt;&lt;P&gt;and then assign it to table field value.&lt;/P&gt;&lt;P&gt;        wa_zzcount = wa_zzcount + 1.&lt;/P&gt;&lt;P&gt;        &amp;lt;table&amp;gt;-zzcount = wa_zzcount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I haven't checked but i think it will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if usefull.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Muthu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jun 2007 12:51:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-modifications-during-z-table-maintenance-screen-flow-logic/m-p/2442034#M546707</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-29T12:51:32Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime Modifications during Z table maintenance (screen flow logic)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-modifications-during-z-table-maintenance-screen-flow-logic/m-p/2442035#M546708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;    Use select max( field name  (i.e,counter value) ) from database table into counter.&lt;/P&gt;&lt;P&gt;case 'ok_code'.&lt;/P&gt;&lt;P&gt;when 'funct. code.'&lt;/P&gt;&lt;P&gt;then increment the counter assing the incremented counter value to ITAB-fieldname.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;modify itab index sy-tabix.&lt;/P&gt;&lt;P&gt;else &lt;/P&gt;&lt;P&gt;append itab&lt;/P&gt;&lt;P&gt;insert DBtable name from table itab.&lt;/P&gt;&lt;P&gt;refresh itab&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use this method it will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if helpful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Raghavendra.D.S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Jun 2007 05:49:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-modifications-during-z-table-maintenance-screen-flow-logic/m-p/2442035#M546708</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-30T05:49:52Z</dc:date>
    </item>
  </channel>
</rss>

