<?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: PAI CODE......plz  urgent in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/pai-code-plz-urgent/m-p/3286154#M786067</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nani,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are using the code that you provided,then the names of the fileds in the screen should have the same name as that of the internal tablei.e.,&lt;/P&gt;&lt;P&gt;itab-name. &lt;/P&gt;&lt;P&gt;itab-id.&lt;/P&gt;&lt;P&gt;itab-salary.&lt;/P&gt;&lt;P&gt;itab-designation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Because in the code that you provided for YES option, you are moving the values from the internal table ITAB to ZDIALOG.But ITAB is not holding the data from the screen.So you need to give the field names in the screen also with the internal table names like the format as above.&lt;/P&gt;&lt;P&gt;By doing so,the field name in the screen will be directly linked to the internal table fields.So when you enter some data in the screen,they will be saved in the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and I dont think there will be a need of the select querry in the YES option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the code will be like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF answer = '1'. " YES.&lt;/P&gt;&lt;P&gt;LOOP AT itab. "internal table name is itab&lt;/P&gt;&lt;P&gt;zdialog-name = itab-name. "zdialog is the Ztable .&lt;/P&gt;&lt;P&gt;zdialog-id = itab-id.&lt;/P&gt;&lt;P&gt;zdialog-salary = itab-salary.&lt;/P&gt;&lt;P&gt;zdialog-designation = itab-designation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*****&lt;STRONG&gt;Update the entries into item table&lt;/STRONG&gt;*****&lt;/P&gt;&lt;P&gt;INSERT zdialog CLIENT SPECIFIED FROM TABLE itab .&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Revert for any other querries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if helpfull.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kashyap&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Jan 2008 18:15:18 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-14T18:15:18Z</dc:date>
    <item>
      <title>PAI CODE......plz  urgent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pai-code-plz-urgent/m-p/3286153#M786066</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;i am new to ABAP.&lt;/P&gt;&lt;P&gt;CAN anyone help me with this code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CODE IN PAI after using popup_to_confirm. function module&lt;/P&gt;&lt;P&gt;i have to insert the itab data from screen to ztable .this is module pool program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF answer = '1'. " YES.&lt;/P&gt;&lt;P&gt;        SELECT name&lt;/P&gt;&lt;P&gt;                 id&lt;/P&gt;&lt;P&gt;                 salary&lt;/P&gt;&lt;P&gt;                 designation&lt;/P&gt;&lt;P&gt;                 FROM zdialog&lt;/P&gt;&lt;P&gt;                 INTO TABLE itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        LOOP AT itab.    "internal table name is itab&lt;/P&gt;&lt;P&gt;          zdialog-name = itab-name.        "zdialog is the Ztable .&lt;/P&gt;&lt;P&gt;          zdialog-id = itab-id.&lt;/P&gt;&lt;P&gt;          zdialog-salary = itab-salary.&lt;/P&gt;&lt;P&gt;          zdialog-designation = itab-designation.&lt;/P&gt;&lt;P&gt;          &lt;/P&gt;&lt;P&gt;*****&lt;STRONG&gt;Update the entries into item table&lt;/STRONG&gt;*****&lt;/P&gt;&lt;P&gt;          INSERT zdialog CLIENT SPECIFIED FROM TABLE itab .&lt;/P&gt;&lt;P&gt;        ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;          MESSAGE s000(0) WITH 'data saved successfully'.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      ELSEIF answer = '2'. " NO&lt;/P&gt;&lt;P&gt;        LEAVE TO SCREEN 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      ELSEIF answer = 'A'. " CANCEL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        LEAVE PROGRAM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2008 17:28:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pai-code-plz-urgent/m-p/3286153#M786066</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-14T17:28:22Z</dc:date>
    </item>
    <item>
      <title>Re: PAI CODE......plz  urgent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pai-code-plz-urgent/m-p/3286154#M786067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nani,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are using the code that you provided,then the names of the fileds in the screen should have the same name as that of the internal tablei.e.,&lt;/P&gt;&lt;P&gt;itab-name. &lt;/P&gt;&lt;P&gt;itab-id.&lt;/P&gt;&lt;P&gt;itab-salary.&lt;/P&gt;&lt;P&gt;itab-designation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Because in the code that you provided for YES option, you are moving the values from the internal table ITAB to ZDIALOG.But ITAB is not holding the data from the screen.So you need to give the field names in the screen also with the internal table names like the format as above.&lt;/P&gt;&lt;P&gt;By doing so,the field name in the screen will be directly linked to the internal table fields.So when you enter some data in the screen,they will be saved in the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and I dont think there will be a need of the select querry in the YES option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the code will be like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF answer = '1'. " YES.&lt;/P&gt;&lt;P&gt;LOOP AT itab. "internal table name is itab&lt;/P&gt;&lt;P&gt;zdialog-name = itab-name. "zdialog is the Ztable .&lt;/P&gt;&lt;P&gt;zdialog-id = itab-id.&lt;/P&gt;&lt;P&gt;zdialog-salary = itab-salary.&lt;/P&gt;&lt;P&gt;zdialog-designation = itab-designation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*****&lt;STRONG&gt;Update the entries into item table&lt;/STRONG&gt;*****&lt;/P&gt;&lt;P&gt;INSERT zdialog CLIENT SPECIFIED FROM TABLE itab .&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Revert for any other querries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if helpfull.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kashyap&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2008 18:15:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pai-code-plz-urgent/m-p/3286154#M786067</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-14T18:15:18Z</dc:date>
    </item>
    <item>
      <title>Re: PAI CODE......plz  urgent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pai-code-plz-urgent/m-p/3286155#M786068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi kashyap,&lt;/P&gt;&lt;P&gt;thanks for the reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have copied ans pasted the same thing .but internal table fields are not inserting into database table.my Ztable and itab is having the same structure.but still the problem arises.when i insert the fields (example:name as AAAA,id as 1,salary as 1000,designation as CLERK),the data inserting in the ztable is (name as   empty,id as 0000,salary as empty and designation as empty)&lt;/P&gt;&lt;P&gt;my version is 4.6c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can u help me.here i m copying the whole code i have done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  zdialog1                      .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES:zdialog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:itab TYPE TABLE OF zdialog WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Module  USER_COMMAND_1000  INPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE user_command_1000 INPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CASE sy-ucomm.&lt;/P&gt;&lt;P&gt;    WHEN 'SAVE'.&lt;/P&gt;&lt;P&gt;      DATA:answer TYPE c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      CALL FUNCTION 'POPUP_TO_CONFIRM'&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  TITLEBAR                    = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  DIAGNOSE_OBJECT             = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          text_question               = 'would u like to save data?'&lt;/P&gt;&lt;P&gt;          text_button_1               = 'YES'(001)&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   ICON_BUTTON_1               = '1'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          text_button_2               = 'NO'(002)&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   ICON_BUTTON_2               = '2'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;     default_button              = '1'&lt;/P&gt;&lt;P&gt;          display_cancel_button       = 'X'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  USERDEFINED_F1_HELP         = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  START_COLUMN                = 25&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  START_ROW                   = 6&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  POPUP_TYPE                  =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        IMPORTING&lt;/P&gt;&lt;P&gt;          answer                      = answer&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PARAMETER                   =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;       EXCEPTIONS&lt;/P&gt;&lt;P&gt;         text_not_found              = 1&lt;/P&gt;&lt;P&gt;         OTHERS                      = 2&lt;/P&gt;&lt;P&gt;                .&lt;/P&gt;&lt;P&gt;      IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;IF answer = '1'. " YES.&lt;/P&gt;&lt;P&gt;        LOOP AT itab. "internal table name is itab&lt;/P&gt;&lt;P&gt;zdialog-name = itab-name. "zdialog is the Ztable .&lt;/P&gt;&lt;P&gt;zdialog-id = itab-id.&lt;/P&gt;&lt;P&gt;zdialog-salary = itab-salary.&lt;/P&gt;&lt;P&gt;zdialog-designation = itab-designation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*****&lt;STRONG&gt;Update the entries into item table&lt;/STRONG&gt;*****&lt;/P&gt;&lt;P&gt;INSERT zdialog CLIENT SPECIFIED FROM TABLE itab .&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;          MESSAGE s000(0) WITH 'data saved successfully'.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      ELSEIF answer = '2'. " NO&lt;/P&gt;&lt;P&gt;        LEAVE TO SCREEN 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      ELSEIF answer = 'A'. " CANCEL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        LEAVE PROGRAM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;  ENDCASE.&lt;/P&gt;&lt;P&gt;ENDMODULE.                 " USER_COMMAND_1000  INPUT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2008 20:27:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pai-code-plz-urgent/m-p/3286155#M786068</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-14T20:27:48Z</dc:date>
    </item>
    <item>
      <title>Re: PAI CODE......plz  urgent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pai-code-plz-urgent/m-p/3286156#M786069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nani,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your Itab and Zdialog are of identical structure, then just&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;INSERT zdialog CLIENT SPECIFIED FROM TABLE itab&lt;/STRONG&gt;  will do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need not loop the itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vinodh Balakrishnan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2008 20:50:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pai-code-plz-urgent/m-p/3286156#M786069</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-14T20:50:32Z</dc:date>
    </item>
    <item>
      <title>Re: PAI CODE......plz  urgent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pai-code-plz-urgent/m-p/3286157#M786070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nani,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;STRONG&gt;Insted of using INSERT zdialog CLIENT SPECIFIED FROM TABLE itab .&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Use MODIFY zdialog.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i guess this should be helpfull.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Revert for any other querries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kashyap&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jan 2008 08:35:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pai-code-plz-urgent/m-p/3286157#M786070</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-15T08:35:53Z</dc:date>
    </item>
    <item>
      <title>Re: PAI CODE......plz  urgent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pai-code-plz-urgent/m-p/3286158#M786071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi kashyap,&lt;/P&gt;&lt;P&gt;thanks for answering my question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but still my problem remains the same.&lt;/P&gt;&lt;P&gt;can u help me?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is there any other way for solving this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jan 2008 17:16:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pai-code-plz-urgent/m-p/3286158#M786071</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-15T17:16:47Z</dc:date>
    </item>
    <item>
      <title>Re: PAI CODE......plz  urgent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pai-code-plz-urgent/m-p/3286159#M786072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nani,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Remove the loop and endloop if only a single entry is being passed into the ITAB.&lt;/P&gt;&lt;P&gt;Loop....endloop are used when more than one enttry is to be inserted into ZTable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this code once again:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT zdialog1 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES:zdialog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:itab TYPE TABLE OF zdialog WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Module USER_COMMAND_1000 INPUT&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;text &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;MODULE user_command_1000 INPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CASE sy-ucomm.&lt;/P&gt;&lt;P&gt;WHEN 'SAVE'.&lt;/P&gt;&lt;P&gt;DATA:answer TYPE c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'POPUP_TO_CONFIRM'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TITLEBAR = ' ' &lt;/P&gt;&lt;P&gt;DIAGNOSE_OBJECT = ' ' &lt;/P&gt;&lt;P&gt;text_question = 'would u like to save data?'&lt;/P&gt;&lt;P&gt;text_button_1 = 'YES'(001)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ICON_BUTTON_1 = '1' &lt;/P&gt;&lt;P&gt;text_button_2 = 'NO'(002)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ICON_BUTTON_2 = '2' &lt;/P&gt;&lt;P&gt;default_button = '1'&lt;/P&gt;&lt;P&gt;display_cancel_button = 'X'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;USERDEFINED_F1_HELP = ' ' &lt;/P&gt;&lt;P&gt;START_COLUMN = 25 &lt;/P&gt;&lt;P&gt;START_ROW = 6 &lt;/P&gt;&lt;P&gt;POPUP_TYPE = &lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;answer = answer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES &lt;/P&gt;&lt;P&gt;PARAMETER = &lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;text_not_found = 1&lt;/P&gt;&lt;P&gt;OTHERS = 2&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;IF sy-subrc 0.&lt;/P&gt;&lt;P&gt;&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;P&gt;IF answer = '1'. " YES.&lt;/P&gt;&lt;P&gt;zdialog-name = itab-name. "zdialog is the Ztable .&lt;/P&gt;&lt;P&gt;zdialog-id = itab-id.&lt;/P&gt;&lt;P&gt;zdialog-salary = itab-salary.&lt;/P&gt;&lt;P&gt;zdialog-designation = itab-designation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*****&lt;STRONG&gt;Update the entries into item table&lt;/STRONG&gt;*****&lt;/P&gt;&lt;P&gt;   &lt;STRONG&gt;INSERT INTO ZDIALOG VALUES ZDIALOG.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;MESSAGE s000(0) WITH 'data saved successfully'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ELSEIF answer = '2'. " NO&lt;/P&gt;&lt;P&gt;LEAVE TO SCREEN 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ELSEIF answer = 'A'. " CANCEL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LEAVE PROGRAM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;ENDMODULE. " USER_COMMAND_1000 INPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the above code is still not working,create a WORK AREA of the same structure as ZDIALOG.&lt;/P&gt;&lt;P&gt;Move the values of ITAB into that WORK AREA and append the values of the WORK AREA into ZDIALOG. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also check if the function module that you are using is meets your requirement or not.&lt;/P&gt;&lt;P&gt;And the options for yes and no in the function module are correct or not i.e., 1 , 2 and A.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the problem is with fucntion module,then use this function module:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : answer type c.&lt;/P&gt;&lt;P&gt;***&lt;STRONG&gt;Call funtion to display popup asking for save or not&lt;/STRONG&gt;*****&lt;/P&gt;&lt;P&gt;        CALL FUNCTION 'C14A_POPUP_SAVE_WITH_CANCEL'&lt;/P&gt;&lt;P&gt;          IMPORTING&lt;/P&gt;&lt;P&gt;            e_answer = answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      IF answer = 'N'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***&lt;STRONG&gt;Leaving the program&lt;/STRONG&gt;****&lt;/P&gt;&lt;P&gt;        LEAVE PROGRAM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      ELSEIF answer = 'J'.&lt;/P&gt;&lt;P&gt;****&lt;STRONG&gt;Holding the data on the screen when YES is selected&lt;/STRONG&gt;****&lt;/P&gt;&lt;P&gt;            set hold data on.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here in the function module, N is for No and J is for Yes.&lt;/P&gt;&lt;P&gt;You can put your code for Yes and  No respectively.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if helpfull.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Revert for any other querries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kashyap Ivaturi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jan 2008 07:19:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pai-code-plz-urgent/m-p/3286159#M786072</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-16T07:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: PAI CODE......plz  urgent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pai-code-plz-urgent/m-p/3286160#M786073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kashyap,&lt;/P&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;it helped me a lot.&lt;/P&gt;&lt;P&gt;I rewarded full poins to u.&lt;/P&gt;&lt;P&gt;if u don't mind can u send me ur phone number or ur e-mail id to my personal mail id at aaishu17@yahoo.co.in&lt;/P&gt;&lt;P&gt;Thank you once again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jan 2008 14:34:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pai-code-plz-urgent/m-p/3286160#M786073</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-16T14:34:41Z</dc:date>
    </item>
  </channel>
</rss>

