<?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 with Loop at Screen in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-loop-at-screen/m-p/5995038#M1343277</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PUT all your code in at selection-screen ouput.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check the sy-ucomm,&lt;/P&gt;&lt;P&gt;and pass values accordingly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;your code looks fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Aug 2009 20:29:22 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-08-21T20:29:22Z</dc:date>
    <item>
      <title>Problem with Loop at Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-loop-at-screen/m-p/5995032#M1343271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am doing a report : where  when we trigger execute button the event have to trigger in selection-screen itself.&lt;/P&gt;&lt;P&gt;Os I have used : sscrfields-ucomm, AT SELECTION-SCREEN , AT SELECTION-SCREEN OUTPUT (  Loop at screen )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: I am not using modulepool, Just used select-options , paramters and ModifID then Loop at Screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose my Selection-screen looks like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Personal No:       1245   
Emplayee name     :       XYZ 
Posting date          :       01.01.2009

Eligible amount      :   2000           "this will fetched from Z table  
Amount paid         :   500             " manully entered by user --&amp;gt; then saved to z table
Balance amount   :   1500           " Eligible amount  - Amount paid

Eligible amount1    :   2000          " this will fetched from Z table 
amount paid1        :   750             " manully entered by user --&amp;gt; then saved to z table
Balance amount1  :   1500           " Eligible amount  - Amount paid&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next time when the user open the T-code and check for Personal No: 1245  &lt;/P&gt;&lt;P&gt;my screen should look like.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Personal No:       1245   
Emplayee name     :        XYZ 
Posting date          :        01.01.2009

Eligible amount      :   1500            "this will fetched from Z table  
Amount paid         :                       " manully entered by user --&amp;gt; then saved to z table
Balance amount    :   1500            " Eligible amount  - Amount paid

Eligible amount1    :   1500           " this will fetched from Z table 
amount paid1        :                      " manully entered by user --&amp;gt; then saved to z table
Balance amount1  :   1500           " Eligible amount  - Amount paid&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please advice,&lt;/P&gt;&lt;P&gt;R.Karthik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Aug 2009 16:26:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-loop-at-screen/m-p/5995032#M1343271</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-21T16:26:58Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Loop at Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-loop-at-screen/m-p/5995033#M1343272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what is the problem?&lt;/P&gt;&lt;P&gt;you need code for this??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Aug 2009 16:36:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-loop-at-screen/m-p/5995033#M1343272</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-21T16:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Loop at Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-loop-at-screen/m-p/5995034#M1343273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Karthik&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry, i am not clear with the Requirement can you please explain it more clear way, and past your code if possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Faisal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Aug 2009 16:38:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-loop-at-screen/m-p/5995034#M1343273</guid>
      <dc:creator>faisalatsap</dc:creator>
      <dc:date>2009-08-21T16:38:28Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Loop at Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-loop-at-screen/m-p/5995035#M1343274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, else please give some idea !!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Aug 2009 16:41:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-loop-at-screen/m-p/5995035#M1343274</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-21T16:41:39Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Loop at Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-loop-at-screen/m-p/5995036#M1343275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Faisal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am pasting my a pinch of my code :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;AT SELECTION-SCREEN.

  CLEAR: ZSCHOOL.

  SELECT * FROM ZABC INTO CORRESPONDING FIELDS OF TABLE ITAB
                                    WHERE PERNR EQ S_PERNR.

  SELECT SINGLE * FROM PA0001 WHERE PERNR EQ S_PERNR
                                 AND  ENAME NE ' '.

  MOVE PA0001-ENAME TO S_NAME.

  CLEAR: NAME3,GBDAT3,NEWAMT3,PAID3.
  LOOP AT ITAB.

    IF SY-TABIX EQ 1.

      MOVE ITAB-NAME TO NAME1.
      MOVE ITAB-GBDAT TO GBDAT1.
      MOVE ITAB-NEWAMT TO NEWAMT1.
      MOVE ITAB-ELGI TO ELGI1.
      MOVE ITAB-PAID TO PAID1.

    ELSEIF SY-TABIX EQ 2.

      MOVE ITAB-NAME TO NAME2.
      MOVE ITAB-GBDAT TO GBDAT2.
      MOVE ITAB-ELGI TO ELGI2.
      MOVE ITAB-NEWAMT TO NEWAMT2.
      MOVE ITAB-PAID TO PAID2.

    ELSEIF SY-TABIX EQ 3.

      MOVE ITAB-NAME TO NAME3.
      MOVE ITAB-GBDAT TO GBDAT3.
      MOVE ITAB-ELGI TO ELGI3.
      MOVE ITAB-NEWAMT TO NEWAMT3.
      MOVE ITAB-PAID TO PAID3.

    ENDIF. 

  ENDLOOP.

AT SELECTION-SCREEN OUTPUT.

  LOOP AT SCREEN.

    IF SCREEN-GROUP1 = 'TH1'.
      SCREEN-INPUT = '1'.
    ENDIF.
    MODIFY SCREEN.
  ENDLOOP.

  LOOP AT SCREEN.

    IF SCREEN-GROUP1 = 'TH2'.
      SCREEN-INPUT = '1'.
    ENDIF.
    MODIFY SCREEN.
  ENDLOOP.

  LOOP AT SCREEN.

    IF SCREEN-GROUP1 = 'TH3'.
      SCREEN-INPUT = '1'.
    ENDIF.
    MODIFY SCREEN.
  ENDLOOP.

  LOOP AT SCREEN.

    IF SCREEN-GROUP1 = 'TH4'.
      SCREEN-INPUT = '1'.
    ENDIF.
    MODIFY SCREEN.
  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please advice&lt;/P&gt;&lt;P&gt;Karthik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Aug 2009 16:49:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-loop-at-screen/m-p/5995036#M1343275</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-21T16:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Loop at Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-loop-at-screen/m-p/5995037#M1343276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Karthik&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry, Still your requirement is not clear &lt;SPAN __jive_emoticon_name="sad"&gt;&lt;/SPAN&gt; can you Please explain, i think no one will understand what exactly you want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please Reply with more explanation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Faisal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Aug 2009 17:01:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-loop-at-screen/m-p/5995037#M1343276</guid>
      <dc:creator>faisalatsap</dc:creator>
      <dc:date>2009-08-21T17:01:43Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Loop at Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-loop-at-screen/m-p/5995038#M1343277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PUT all your code in at selection-screen ouput.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check the sy-ucomm,&lt;/P&gt;&lt;P&gt;and pass values accordingly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;your code looks fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Aug 2009 20:29:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-loop-at-screen/m-p/5995038#M1343277</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-21T20:29:22Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Loop at Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-loop-at-screen/m-p/5995039#M1343278</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;Use this code... this will surely help you... Have just modified certain lines....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

DATA : w_flag TYPE c.

AT SELECTION-SCREEN.
 
  CLEAR: ZSCHOOL.
 
  SELECT * FROM ZABC INTO CORRESPONDING FIELDS OF TABLE ITAB
                                    WHERE PERNR EQ S_PERNR.
 
  IF SY-SUBRC = 0.                    "  Added Code
    W_FLAG = 'X'
  ENDIF.

  SELECT SINGLE * FROM PA0001 WHERE PERNR EQ S_PERNR
                                 AND  ENAME NE ' '.
 
  MOVE PA0001-ENAME TO S_NAME.
 
  CLEAR: NAME3,GBDAT3,NEWAMT3,PAID3.
  LOOP AT ITAB.
 
    IF SY-TABIX EQ 1.            
 
      MOVE ITAB-NAME TO NAME1.
      MOVE ITAB-GBDAT TO GBDAT1.
      MOVE ITAB-NEWAMT TO NEWAMT1.
      MOVE ITAB-ELGI TO ELGI1.
      MOVE ITAB-PAID TO PAID1.
 
    ELSEIF SY-TABIX EQ 2.
 
      MOVE ITAB-NAME TO NAME2.
      MOVE ITAB-GBDAT TO GBDAT2.
      MOVE ITAB-ELGI TO ELGI2.
      MOVE ITAB-NEWAMT TO NEWAMT2.
      MOVE ITAB-PAID TO PAID2.
 
    ELSEIF SY-TABIX EQ 3.
 
      MOVE ITAB-NAME TO NAME3.
      MOVE ITAB-GBDAT TO GBDAT3.
      MOVE ITAB-ELGI TO ELGI3.
      MOVE ITAB-NEWAMT TO NEWAMT3.
      MOVE ITAB-PAID TO PAID3.
 
    ENDIF. 
 
  ENDLOOP.
 
AT SELECTION-SCREEN OUTPUT.
 
IF W_FLAG = 'X'.           " Added Code 
  LOOP AT SCREEN.
 
    IF SCREEN-GROUP1 = 'TH1'.
      SCREEN-INPUT = '1'.
    ENDIF.
     
    ELSEIF SCREEN-GROUP1 = 'TH2'.         " Modified
      SCREEN-INPUT = '1'.
    ENDIF.
 
    ELSEIF SCREEN-GROUP1 = 'TH3'.         " Modified
      SCREEN-INPUT = '1'.
    ENDIF.
  
    ELSEIF SCREEN-GROUP1 = 'TH4'.         " Modified
      SCREEN-INPUT = '1'.
    ENDIF.
    MODIFY SCREEN.
  ENDLOOP.

ENDIF.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Siddarth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Aug 2009 21:02:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-loop-at-screen/m-p/5995039#M1343278</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-21T21:02:11Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Loop at Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-loop-at-screen/m-p/5995040#M1343279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sidhu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot !!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have not checked ur code yet, but I need some more clarification.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My actual requirement is :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the user enters &lt;STRONG&gt;personal Number&lt;/STRONG&gt; and executes  all the other &lt;/P&gt;&lt;P&gt;information should display  in the same screen except the  &lt;STRONG&gt;PAID AMOUNT&lt;/STRONG&gt;  ( as it is manualy entered )&lt;/P&gt;&lt;P&gt;When User enters &lt;STRONG&gt;Paid amount&lt;/STRONG&gt; and click a button , calculation should happen&lt;/P&gt;&lt;P&gt;i.e &lt;STRONG&gt;Balance amount = Eligible amount - Paid Amount&lt;/STRONG&gt;. Then User click &lt;STRONG&gt;Save&lt;/STRONG&gt; button &lt;/P&gt;&lt;P&gt;then the details will go and save in Z table...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is when next time when the user enters the Personal Number and executes it&lt;/P&gt;&lt;P&gt;the previous &lt;STRONG&gt;Balance amount&lt;/STRONG&gt; should be the &lt;STRONG&gt;Eligible amount&lt;/STRONG&gt; this time...like wise till&lt;/P&gt;&lt;P&gt;the eligible amount become '0'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please advice if I need to create another Z table for this&lt;/P&gt;&lt;P&gt;Karthik&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Karthik R on Aug 22, 2009 12:33 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Aug 2009 06:59:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-loop-at-screen/m-p/5995040#M1343279</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-22T06:59:34Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Loop at Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-loop-at-screen/m-p/5995041#M1343280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Faisal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have explianed my requirement above, please advice me if u have any idea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Karthik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Aug 2009 07:04:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-loop-at-screen/m-p/5995041#M1343280</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-22T07:04:27Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Loop at Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-loop-at-screen/m-p/5995042#M1343281</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;No need to create another ztable. You add the paid amount, balance amount and eligible amount fields to the ztable. You do the necessary calculations and update the ztable using MODIFY statement. Now you can use the balance amount as the eligible amount when you execute next time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Aug 2009 07:10:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-loop-at-screen/m-p/5995042#M1343281</guid>
      <dc:creator>sridhar_meesala</dc:creator>
      <dc:date>2009-08-22T07:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Loop at Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-loop-at-screen/m-p/5995043#M1343282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Karthik&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Following is my Sample Table Definition You need to create a table like to following one with name &lt;STRONG&gt;ZTEST&lt;/STRONG&gt; to test the bellow Sample Code. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;MANDT	MANDT	CLNT	3	0	Client
PERNR	PERSNO	NUMC	8	0	Personnel number
EA		DEC	10	0	Eligible amount
BA		DEC	10	0	Balance Amount
PA		DEC	10	0	Paid Amount &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;                                                           &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample Program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT  zfsl_sdn_test.
TABLES: ztest.
DATA: it_ztest LIKE STANDARD TABLE OF ztest WITH HEADER LINE.

PARAMETERS: ppernr LIKE ztest-pernr,
            pea    LIKE ztest-ea MODIF ID cha,
            ppa    LIKE ztest-pa.
SELECTION-SCREEN PUSHBUTTON:  54(24) bt1_save   USER-COMMAND sav VISIBLE LENGTH 3.
PARAMETERS: pba    LIKE ztest-ba MODIF ID cha.

INITIALIZATION.
  CALL FUNCTION 'ICON_CREATE'
    EXPORTING
      name                  = 'ICON_SYSTEM_SAVE'
      add_stdinf            = 'X'
    IMPORTING
      RESULT                = bt1_save.

AT SELECTION-SCREEN.

  IF pea IS INITIAL.
    SELECT * FROM ztest INTO CORRESPONDING FIELDS OF ztest WHERE pernr = ppernr. ENDSELECT.
    IF sy-subrc = 0.
      pea = ztest-ea.
      pba = ztest-ba.
    ENDIF.
  ENDIF.

  IF sy-ucomm = 'SAV'.
    IF ppa IS NOT INITIAL.
      ztest-ba = ztest-ba - ppa.
      ztest-ea = ztest-ba.
      IF ztest-ba &amp;gt;= 0 OR ztest-ea &amp;gt;= 0.
        MODIFY ztest FROM ztest.
        pba = ztest-ba.
      ELSE.
        MESSAGE 'Some Amount Less than Zero' TYPE 'I'.
      ENDIF.
    ENDIF.
  ENDIF.

AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    IF screen-group1 = 'CHA'.
      screen-input = 0.
    ENDIF.
    MODIFY SCREEN.
  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Please Reply in case of any Confusion&lt;/STRONG&gt; you just need to place some records in &lt;STRONG&gt;DB Table&lt;/STRONG&gt; and these the program giving that Personal Numbers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope will help you to solve out your problem,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Faisal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Aug 2009 08:59:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-loop-at-screen/m-p/5995043#M1343282</guid>
      <dc:creator>faisalatsap</dc:creator>
      <dc:date>2009-08-22T08:59:12Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Loop at Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-loop-at-screen/m-p/5995044#M1343283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Faisal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank U !!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Aug 2009 15:56:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-loop-at-screen/m-p/5995044#M1343283</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-24T15:56:15Z</dc:date>
    </item>
  </channel>
</rss>

