<?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: Problem is okcode. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-is-okcode/m-p/4250234#M1014507</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;  Thanx for ur reply..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Aug 2008 13:51:39 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-08-06T13:51:39Z</dc:date>
    <item>
      <title>Problem is okcode.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-is-okcode/m-p/4250227#M1014500</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 have developed a mod-pool prg with pop-up&lt;/P&gt;&lt;P&gt; tab control .. i am entreing in mod-pool first then in&lt;/P&gt;&lt;P&gt;in pop-up tab control..&lt;/P&gt;&lt;P&gt;my requirement is to save at last after entering in TC.&lt;/P&gt;&lt;P&gt;when i press save ..data in mod-pool is saveed..&lt;/P&gt;&lt;P&gt;But the data in Table-cont is not been ablae to save..&lt;/P&gt;&lt;P&gt;This is multiple-line item mood-pool.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i save both  data at once..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2008 15:18:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-is-okcode/m-p/4250227#M1014500</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-04T15:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: Problem is okcode.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-is-okcode/m-p/4250228#M1014501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ABAPER,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;see this logic:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;report ztest  message-id sabapdocu.
 
data: begin of itab occurs 10,
        mark,
        col1 type i,
        col2 type i,
      end of itab.
 
 
data ok_code type sy-ucomm.
data ok_save type sy-ucomm.
data tab_lines type i.
data step_lines type i.
data offset type i.
 
controls table type tableview using screen 100.
 
call screen 100.
 
module init output.
  set pf-status 'BASIC'.
endmodule.
 
module fill_itab output.
  describe table itab lines tab_lines.
  if tab_lines = 0.
    do 40 times.
      itab-col1 = sy-index.
      itab-col2 = sy-index ** 2.
      append itab.
    enddo.
    describe table itab lines tab_lines.
    table-lines = tab_lines.
  endif.
endmodule.
 
module transp_itab output.
  read table itab index table-current_line.
endmodule.
 
module lines output.
  step_lines = sy-loopc.
endmodule.
 
module exit input.
  leave program.
endmodule.
 
module check_pai input.
  ok_save = ok_code. clear ok_code.
  message s888 with 'TOP_LINE: ' table-top_line
                    ', LINES: '  step_lines.
endmodule.
 
module check_table input.
  case ok_save.
    when 'MARK'.
      if itab-mark = 'X'.
        message i888 with 'Zeile' table-current_line 'markiert'.
      endif.
    when 'SETM'.
      modify itab index table-current_line.
  endcase.
 
endmodule.
 
module check_all input.
  case ok_save.
    when 'ALLM'.
      loop at itab.
        if itab-mark = 'X'.
          message i888 with 'Zeile' sy-tabix 'markiert'.
        endif.
      endloop.
    when 'DELE'.
      loop at itab.
        if itab-mark = 'X'.
          itab-mark = ' '.
          modify itab.
        endif.
      endloop.
  endcase.
endmodule.
 
module scroll input.
  case ok_save.
    when 'PGDO'.
      offset = table-lines - step_lines.
      if table-top_line lt offset.
        table-top_line = table-top_line + step_lines.
      endif.
    when 'PGUP'.
      offset = step_lines.
      if table-top_line gt offset.
        table-top_line = table-top_line - step_lines.
      else.
        table-top_line = 1.
      endif.
    when 'PGLA'.
      table-top_line = table-lines - step_lines + 1.
    when 'PGTO'.
      table-top_line = 1.
  endcase.
endmodule.



And flow logic of screen will be like this:



process before output.
  module  init.
  module fill_itab.
  loop with control table.
    module transp_itab.
    module lines.
  endloop.
 
process after input.
  module exit at exit-command.
  module check_pai.
  loop with control table.
    module check_table.
  endloop.
  module check_all.
  module scroll.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2008 15:26:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-is-okcode/m-p/4250228#M1014501</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-04T15:26:39Z</dc:date>
    </item>
    <item>
      <title>Re: Problem is okcode.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-is-okcode/m-p/4250229#M1014502</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;Is it possible to triger two function code at once...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Aug 2008 06:46:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-is-okcode/m-p/4250229#M1014502</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-05T06:46:33Z</dc:date>
    </item>
    <item>
      <title>Re: Problem is okcode.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-is-okcode/m-p/4250230#M1014503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Abaper786,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  When you are entering the values in table control automatically the internal table is also filled at the same time(You are created the table control for this internal table). Just do one this update the database table with the internal table values when your function code is &lt;STRONG&gt;Save&lt;/STRONG&gt; then automatically the values are saved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;if sy-ucomm eq 'SAVE'.
  loop at itab into fs_itab.
    updata dtab from fs_itab ( If you want to insert new entries you can write insert statement here)
  endloop.
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Mahi&lt;/STRONG&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Aug 2008 06:51:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-is-okcode/m-p/4250230#M1014503</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-05T06:51:58Z</dc:date>
    </item>
    <item>
      <title>Re: Problem is okcode.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-is-okcode/m-p/4250231#M1014504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try giving the same function code name two both the buttons...so same one will be triggered wen u will press any of the buttons...Later u can put validations inside the module pool program as per ur requirement&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Aug 2008 07:02:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-is-okcode/m-p/4250231#M1014504</guid>
      <dc:creator>former_member195383</dc:creator>
      <dc:date>2008-08-05T07:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: Problem is okcode.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-is-okcode/m-p/4250232#M1014505</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 have use same function code for both&lt;/P&gt;&lt;P&gt;save in include of mod-pool &amp;amp;  in inculde of pop-up&lt;/P&gt;&lt;P&gt;table control .but the function code of pop-up tc is not&lt;/P&gt;&lt;P&gt;been able to triger...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can any one help..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Aug 2008 11:30:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-is-okcode/m-p/4250232#M1014505</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-05T11:30:54Z</dc:date>
    </item>
    <item>
      <title>Re: Problem is okcode.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-is-okcode/m-p/4250233#M1014506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;in side the PAI , you have used &lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;inside the loop and endloop ,you have fill the internal table content which are all of input field(dynamically filled by user) use module fill_itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in that module write codings like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;module fill_itab.&lt;/P&gt;&lt;P&gt;itab-field1 =  screen-field1.(screen field name in the table control )&lt;/P&gt;&lt;P&gt;itab-field2 =  screen-field2.(screen field name in the table control )&lt;/P&gt;&lt;P&gt;modify itab.&lt;/P&gt;&lt;P&gt;endmodule&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Aug 2008 11:40:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-is-okcode/m-p/4250233#M1014506</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-05T11:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: Problem is okcode.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-is-okcode/m-p/4250234#M1014507</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;  Thanx for ur reply..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Aug 2008 13:51:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-is-okcode/m-p/4250234#M1014507</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-06T13:51:39Z</dc:date>
    </item>
  </channel>
</rss>

