<?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: why my program doesnt work - selection screen in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/why-my-program-doesnt-work-selection-screen/m-p/3022141#M714481</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well I reckon ABAP breakpoints are easier than VB, but it's probably what you get used to... when you reach the breakpoint, you can double-click on a single field to show its value... if it's an internal table, just click on the field then the "Table" button to show the contents { depends which ABAP debugger you are running }... or for now you could stick in a few "write" statements to show progress through the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As for "mandt", you can leave it in the internal table, but not bother setting it as SAP will do this for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you still have no luck getting it to work, paste a copy of your latest code here, and I can look tomorrow { use the Code button in the SDN message editor to make it clearer }.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Oct 2007 10:21:45 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-29T10:21:45Z</dc:date>
    <item>
      <title>why my program doesnt work - selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/why-my-program-doesnt-work-selection-screen/m-p/3022136#M714476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Following program is small prog to add data to database.trackid and artist are its fields&lt;/P&gt;&lt;P&gt;REPORT  ZGSCREEN no standard page heading&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;tables :zgtable,sscrfields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:begin of itable occurs 0,&lt;/P&gt;&lt;P&gt;     mandt like zgtable-mandt,&lt;/P&gt;&lt;P&gt;     trackid like zgtable-trackid,&lt;/P&gt;&lt;P&gt;     artist like zgtable-artist,&lt;/P&gt;&lt;P&gt;     end of itable.&lt;/P&gt;&lt;P&gt;selection-screen begin of block block1 with frame title txt1.&lt;/P&gt;&lt;P&gt;parameters:trackid like zgtable-trackid,&lt;/P&gt;&lt;P&gt;           artist like zgtable-artist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection-screen skip 5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection-screen begin of line.&lt;/P&gt;&lt;P&gt;selection-screen pushbutton (20) but1 user-command but1.&lt;/P&gt;&lt;P&gt;selection-screen position 25.&lt;/P&gt;&lt;P&gt;selection-screen pushbutton (8) but2 user-command but2.&lt;/P&gt;&lt;P&gt;selection-screen position 38.&lt;/P&gt;&lt;P&gt;selection-screen pushbutton (10) but3 user-command but3.&lt;/P&gt;&lt;P&gt;selection-screen position 55.&lt;/P&gt;&lt;P&gt;selection-screen pushbutton (10) but4 user-command but4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection-screen end of line.&lt;/P&gt;&lt;P&gt;selection-screen end of block block1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;initialization.&lt;/P&gt;&lt;P&gt;but1 = 'Save to Dbase'.&lt;/P&gt;&lt;P&gt;but2 = 'Clear'.&lt;/P&gt;&lt;P&gt;but3 = 'Update'.&lt;/P&gt;&lt;P&gt;but4 = 'Exit'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move 800 to itable-mandt.&lt;/P&gt;&lt;P&gt;move trackid to itable-trackid.&lt;/P&gt;&lt;P&gt;move artist to itable-artist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append itable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at selection-screen.&lt;/P&gt;&lt;P&gt;if sscrfields-ucomm eq'BUT1'.&lt;/P&gt;&lt;P&gt;  insert zgtable from itable.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sscrfields-ucomm eq 'BUT4'.&lt;/P&gt;&lt;P&gt;leave program.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;****The program is not throwing error but data is not getting saved to database.I dont know why,any idea?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 Oct 2007 20:11:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/why-my-program-doesnt-work-selection-screen/m-p/3022136#M714476</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-28T20:11:21Z</dc:date>
    </item>
    <item>
      <title>Re: why my program doesnt work - selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/why-my-program-doesnt-work-selection-screen/m-p/3022137#M714477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is no syntax error in the code, but the way of coding is wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The logic of population the internal table and updating the databse table should in the event start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at selection.-screen is used for validating the data on the screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After changing the program, check if still the database is not getting updated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If not, then write an explicit COMMIT WORK. statement in your report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Abhishek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 Oct 2007 20:31:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/why-my-program-doesnt-work-selection-screen/m-p/3022137#M714477</guid>
      <dc:creator>former_member195698</dc:creator>
      <dc:date>2007-10-28T20:31:42Z</dc:date>
    </item>
    <item>
      <title>Re: why my program doesnt work - selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/why-my-program-doesnt-work-selection-screen/m-p/3022138#M714478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I changed at-selection screen to start-of-selection...i think the button click even is not getting fired.Help me how to save these two fields to database.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Oct 2007 09:43:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/why-my-program-doesnt-work-selection-screen/m-p/3022138#M714478</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-29T09:43:22Z</dc:date>
    </item>
    <item>
      <title>Re: why my program doesnt work - selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/why-my-program-doesnt-work-selection-screen/m-p/3022139#M714479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As noted above, try putting in a "commit work." ... and perhaps a break-point just before the insert so you can check the logic has reached the right point with the values you expect... also, you have code like "insert XYZ from ABC" but I think you mean "insert XYZ from table ABC"... in addition, you don't need you have "MANDT" in your internal table definition - SAP will take care of this for you based on the current value of sy-mandt (unless you specifically code for "client specified" logic).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Oct 2007 09:56:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/why-my-program-doesnt-work-selection-screen/m-p/3022139#M714479</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-29T09:56:09Z</dc:date>
    </item>
    <item>
      <title>Re: why my program doesnt work - selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/why-my-program-doesnt-work-selection-screen/m-p/3022140#M714480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ok i will try to use breakpoint,but i dont know how to do,it was easy in VB :).Coming to mandt,I used 800 since it was saying 'itable was not long enough'.&lt;/P&gt;&lt;P&gt;Insert XYZ from ABC...where ABC is internal table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Oct 2007 10:02:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/why-my-program-doesnt-work-selection-screen/m-p/3022140#M714480</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-29T10:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: why my program doesnt work - selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/why-my-program-doesnt-work-selection-screen/m-p/3022141#M714481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well I reckon ABAP breakpoints are easier than VB, but it's probably what you get used to... when you reach the breakpoint, you can double-click on a single field to show its value... if it's an internal table, just click on the field then the "Table" button to show the contents { depends which ABAP debugger you are running }... or for now you could stick in a few "write" statements to show progress through the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As for "mandt", you can leave it in the internal table, but not bother setting it as SAP will do this for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you still have no luck getting it to work, paste a copy of your latest code here, and I can look tomorrow { use the Code button in the SDN message editor to make it clearer }.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Oct 2007 10:21:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/why-my-program-doesnt-work-selection-screen/m-p/3022141#M714481</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-29T10:21:45Z</dc:date>
    </item>
    <item>
      <title>Re: why my program doesnt work - selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/why-my-program-doesnt-work-selection-screen/m-p/3022142#M714482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Report  ZGSCREEN                                                    *
*&amp;amp;                                                                     *
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;                                                                     *
*&amp;amp;                                                                     *
*&amp;amp;---------------------------------------------------------------------*

REPORT  ZGSCREEN no standard page heading
.
tables :zgtable,sscrfields.

data:begin of itable occurs 0,
     mandt like zgtable-mandt,
     trackid like zgtable-trackid,
     artist like zgtable-artist,
     end of itable.
selection-screen begin of block block1 with frame title txt1.
parameters:trackid(15) type n, *I changed from trackid like zgtable-trackid
           artist(30) type c.

selection-screen skip 5.

selection-screen begin of line.
selection-screen pushbutton (20) but1 user-command but1.
selection-screen position 25.
selection-screen pushbutton (8) but2 user-command but2.
selection-screen position 38.
selection-screen pushbutton (10) but3 user-command but3.
selection-screen position 55.
selection-screen pushbutton (10) but4 user-command but4.

selection-screen end of line.
selection-screen end of block block1.

initialization.
but1 = 'Save to Dbase'.
but2 = 'Clear'.
but3 = 'Update'.
but4 = 'Exit'.

move 800 to itable-mandt.
move trackid to itable-trackid.
move artist to itable-artist.

append itable.

at selection-screen.
if sscrfields-ucomm eq'BUT1'.

  insert zgtable from itable.
  commit work.
endif.

if sscrfields-ucomm eq 'BUT4'.
leave program.
endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jonathan as you siad I used breakpoints somehow and i clicked the table button.To my suprise the fields doesnt have value,mandt field had 800,trackid had 000000000 and artist field is empty.It mean that data is not added to internal table itself.I dont know why.Hope you will help in clearing it out.One more thing is that is it true that Internet connection and SAP should not be on same OS.So I installed Server 2003 for SAP and XP for internet.I work there and restart,come to XP for forums.Is this the way or any other way where I can use internet and SAP on same OS?I came to know about SAP netweaver server abap trail version in one sap blogs here.Can I download it to XP OS and work in it besides internet connection to same OS(XP).Hope you understood my issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Oct 2007 11:49:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/why-my-program-doesnt-work-selection-screen/m-p/3022142#M714482</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-29T11:49:46Z</dc:date>
    </item>
    <item>
      <title>Re: why my program doesnt work - selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/why-my-program-doesnt-work-selection-screen/m-p/3022143#M714483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just quickly, try moving&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;move 800 to itable-mandt.
move trackid to itable-trackid.
move artist to itable-artist.
append itable.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;into the "at selection-screen" because the "initialization." code will only happen as the program loads thus the values in "trackid" and "artist" at that point are empty... but they will have the values you enter in the selection screen when you reach the event "at selection-screen."... also change "insert zgtable from itable." to be "insert zgtable from table itable.".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You probably want to open the other part of this posting (about the trial edition) as a new thread.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Oct 2007 11:55:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/why-my-program-doesnt-work-selection-screen/m-p/3022143#M714483</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-29T11:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: why my program doesnt work - selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/why-my-program-doesnt-work-selection-screen/m-p/3022144#M714484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jonathan.Its working.Anyhow I got a error,let me put that in next thread.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 11:44:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/why-my-program-doesnt-work-selection-screen/m-p/3022144#M714484</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-30T11:44:29Z</dc:date>
    </item>
  </channel>
</rss>

