<?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: step by step code for dialog program in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/step-by-step-code-for-dialog-program/m-p/3237491#M772620</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;&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;&lt;STRONG&gt;You can use the same code in your program just by changing the table names.&lt;/STRONG&gt;&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 helpfull.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 13 Jan 2008 15:47:29 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-13T15:47:29Z</dc:date>
    <item>
      <title>step by step code for dialog program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/step-by-step-code-for-dialog-program/m-p/3237490#M772619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Jan 2008 00:01:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/step-by-step-code-for-dialog-program/m-p/3237490#M772619</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-13T00:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: step by step code for dialog program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/step-by-step-code-for-dialog-program/m-p/3237491#M772620</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;&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;&lt;STRONG&gt;You can use the same code in your program just by changing the table names.&lt;/STRONG&gt;&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 helpfull.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Jan 2008 15:47:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/step-by-step-code-for-dialog-program/m-p/3237491#M772620</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-13T15:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: step by step code for dialog program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/step-by-step-code-for-dialog-program/m-p/3237492#M772621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi vishnu,&lt;/P&gt;&lt;P&gt;Thank u so much for ur reply.&lt;/P&gt;&lt;P&gt;but i got some doubt.&lt;/P&gt;&lt;P&gt;i m not understanding the below code.&lt;/P&gt;&lt;P&gt;can u plz write it briefly.&lt;/P&gt;&lt;P&gt;&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Jan 2008 22:32:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/step-by-step-code-for-dialog-program/m-p/3237492#M772621</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-13T22:32:28Z</dc:date>
    </item>
    <item>
      <title>Re: step by step code for dialog program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/step-by-step-code-for-dialog-program/m-p/3237493#M772622</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;according to the piece of code you have provided,if u give the answer 'J' then the value on the input field which is on the screen is inserted into the ztable ztm09_ekpo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;sravanthi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2008 05:13:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/step-by-step-code-for-dialog-program/m-p/3237493#M772622</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-14T05:13:30Z</dc:date>
    </item>
    <item>
      <title>Re: step by step code for dialog program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/step-by-step-code-for-dialog-program/m-p/3237494#M772623</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;The answer here is a variable which stores the action which you have taken on the pop-up window. Here the pop-up window contains three options &lt;/P&gt;&lt;P&gt;1. Yes &lt;/P&gt;&lt;P&gt;2. No&lt;/P&gt;&lt;P&gt;3 Cancel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whenever you click the "yes" push button on the pop-up window then the function module returns J to the variable "answer" so when you press yes then the data should get saved. so as soon as you click on yes then the data from the screen gets loaded into your ztable.&lt;/P&gt;&lt;P&gt;                        Here the variable on the right hand side of the equation is the name of the input field which you have given while defining it and the variable on the left hand side of the equation indicates your ztable field. And when you give the modify statement the values are updated in your ztable. Revert back in case of any queries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards &lt;/P&gt;&lt;P&gt;Kaushik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2008 06:07:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/step-by-step-code-for-dialog-program/m-p/3237494#M772623</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-14T06:07:38Z</dc:date>
    </item>
  </channel>
</rss>

