<?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 user dialog program in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-dialog-program/m-p/3238282#M772767</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?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; requirement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i created a ztable with 4 fields having some data in it.&lt;/P&gt;&lt;P&gt;my requirement is:&lt;/P&gt;&lt;P&gt;create a screen with 4 fields from ur ztable with SAVE and CANCEL as push buttons.&lt;/P&gt;&lt;P&gt;if i enter some data in my fields and select SAVE, a pop-up-box should appear saying whether u want to save the data or not?&lt;/P&gt;&lt;P&gt;if i click 'yes' in my pop-up data should be saved in my ztable&lt;/P&gt;&lt;P&gt;saying 'data is saved successfully'.else if i click 'no' it should come out of the txion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if i select CANCEL it should be in the same screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@@@@@@@@@@@@@@@@@@@@@@@@&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;points will be rewarded if helpful..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 13 Jan 2008 06:26:11 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-13T06:26:11Z</dc:date>
    <item>
      <title>user dialog program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-dialog-program/m-p/3238282#M772767</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?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; requirement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i created a ztable with 4 fields having some data in it.&lt;/P&gt;&lt;P&gt;my requirement is:&lt;/P&gt;&lt;P&gt;create a screen with 4 fields from ur ztable with SAVE and CANCEL as push buttons.&lt;/P&gt;&lt;P&gt;if i enter some data in my fields and select SAVE, a pop-up-box should appear saying whether u want to save the data or not?&lt;/P&gt;&lt;P&gt;if i click 'yes' in my pop-up data should be saved in my ztable&lt;/P&gt;&lt;P&gt;saying 'data is saved successfully'.else if i click 'no' it should come out of the txion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if i select CANCEL it should be in the same screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@@@@@@@@@@@@@@@@@@@@@@@@&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;points will be rewarded if helpful..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Jan 2008 06:26:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-dialog-program/m-p/3238282#M772767</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-13T06:26:11Z</dc:date>
    </item>
    <item>
      <title>Re: user dialog program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-dialog-program/m-p/3238283#M772768</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;You can refer the standard program &lt;STRONG&gt;demo_dynpro_dictionary&lt;/STRONG&gt; to learn that. In addition, for the pop up option you can use the &lt;STRONG&gt;POPUP_TO_CONFIRM&lt;/STRONG&gt; function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Renjith Michael.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2008 05:52:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-dialog-program/m-p/3238283#M772768</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-14T05:52:07Z</dc:date>
    </item>
    <item>
      <title>Re: user dialog program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-dialog-program/m-p/3238284#M772769</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;First you need to create a screen with 4 inputs fields as you mentioned.&lt;/P&gt;&lt;P&gt;To create a screen,follow these steps:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Go to SE80.There you will find two drop down boxes.&lt;/P&gt;&lt;P&gt;Select program in the first list box and give the name of the program you want in the second list bo.&lt;/P&gt;&lt;P&gt;2)Click on SAVE.&lt;/P&gt;&lt;P&gt;3)Right click on the program name and there you will find a small menu.Go to CREATE---&amp;gt;SCREEN.&lt;/P&gt;&lt;P&gt;4)A window would open now.There give a number to the screen and a description to it and press on SAVE.Now the screen is created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now you need to add the input fields in the screen.To do this follow these steps:&lt;/P&gt;&lt;P&gt;1)Click on the layout button which you will finid on the top of the scrren window.This leads you to the screen painter.&lt;/P&gt;&lt;P&gt;2)In the screen painter you will find a list of buttons on the left hand side.&lt;/P&gt;&lt;P&gt;3)Select the button which says input/output field.&lt;/P&gt;&lt;P&gt;4)Now paste the input/output field in the screen.&lt;/P&gt;&lt;P&gt;5)Double click on it and a pop up will open.There you need to give the name of the field.&lt;/P&gt;&lt;P&gt;Here you will have to give the name in this format: &amp;lt;Ztable_name&amp;gt;-&amp;lt;field_name&amp;gt;.&lt;/P&gt;&lt;P&gt;For e.g: ztm09ekko-ebeln.&lt;/P&gt;&lt;P&gt;By giving the name of the field same as the field name in the Ztable,the field will be linked to the Ztable field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Follow the same steps for the rest of the input/output fields creation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now you need to create two push buttons.The steps are:&lt;/P&gt;&lt;P&gt;1)Go to the screen layout again and now select push buttons from the menu on the left hand side.&lt;/P&gt;&lt;P&gt;2)Paste in on the screen.&lt;/P&gt;&lt;P&gt;3)Double click on it and a popup will open.There you need to give the name of the push button.Here you will also find a field by name Fct.Code.This is the field for the function code of the push button.&lt;/P&gt;&lt;P&gt;Give an appropriate function code name like SAVE and CANCEL in your case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After doing all this,you need to activate the screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now to make the push buttons working,you need to write a code for it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To write the code,exit the screen layout and click on the flow logic tab that you will find above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go through this code and you will easily understand how to write it for your requirement.&lt;/P&gt;&lt;P&gt;You can use the same code in your program just by changing the table names.&lt;/P&gt;&lt;P&gt;In this code a function module is called to display the popup.The popup contains three options-Yes,No and Cancel.When selecting Yes,The details present in the input fields will be saved in the Ztables.If NO is selected in the popup,then the transaction will be exited.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the function module,answer holds the user command.&lt;/P&gt;&lt;P&gt;e_answer needs to be created by user.The statement for it is :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA :e_answer type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the function module as you can see, J indicates Yes and N indicates No.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And if you click on the CANCEL push button,&lt;/P&gt;&lt;P&gt;The same screen is retained as per your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the PAI module of that Screen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write this code:&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;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 transaction&lt;/STRONG&gt;****&lt;/P&gt;&lt;P&gt;LEAVE TRANSACTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ELSEIF answer = 'J'.&lt;/P&gt;&lt;P&gt;***The right side of the equation is the name of the input field in the screen.The left hand side of the ****&lt;STRONG&gt;equation is the field name in the ZTable ztm09_ekpo.&lt;/STRONG&gt;**&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ztm09_ekpo-ebeln = ztm09_ekko-ebeln. "ztm09_ekko is the name of the Z Table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY ztm09_ekpo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when CANCEL.&lt;/P&gt;&lt;P&gt;set data hold on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Revert for any querries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2008 06:17:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-dialog-program/m-p/3238284#M772769</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-14T06:17:26Z</dc:date>
    </item>
  </channel>
</rss>

