<?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: How refresh a Dynpro in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-refresh-a-dynpro/m-p/3288789#M786851</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Salvatore&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a look at my sample report &lt;STRONG&gt;ZUS_SDN_TWO_ALV_GRIDS&lt;/STRONG&gt; in thread [ALV|&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="384685"&gt;&lt;/A&gt;;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the event handler method for DOUBLE_CLICK I call the following method:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CALL METHOD cl_gui_cfw=&amp;gt;set_new_ok_code( 'DETAIL' ).  " not 4.6c compatibe, use instead

CALL METHOD cl_gui_cfw=&amp;gt;set_new_ok_code
   EXPORTING
     okcode = 'DETAIL'
*  IMPORTING
*    rc = 
    .
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This method call triggers that the PAI of the screen is passed and, thereby, PBO of the same screen, too. In the PBO module(s) you can refresh your header.&lt;/P&gt;&lt;P&gt;Please note that normal ALV grid events do &lt;STRONG&gt;NOT&lt;/STRONG&gt; trigger PAI of the screen (similar behaviour like F4 search help).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Jan 2008 19:52:41 GMT</pubDate>
    <dc:creator>uwe_schieferstein</dc:creator>
    <dc:date>2008-01-08T19:52:41Z</dc:date>
    <item>
      <title>How refresh a Dynpro</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-refresh-a-dynpro/m-p/3288788#M786850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm using 2 ALV Grid in a dynpro.&lt;/P&gt;&lt;P&gt;On the top I have a frame with some text fields that I use as header.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I click on the ALV grid I can update the other one but I can't update the header or better ... the sceen does'n refresh.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm tryng using Call Screen and it works but I know that it's not the best solution...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I resfresh the dynpro...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Salvatore&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jan 2008 15:26:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-refresh-a-dynpro/m-p/3288788#M786850</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-08T15:26:33Z</dc:date>
    </item>
    <item>
      <title>Re: How refresh a Dynpro</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-refresh-a-dynpro/m-p/3288789#M786851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Salvatore&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a look at my sample report &lt;STRONG&gt;ZUS_SDN_TWO_ALV_GRIDS&lt;/STRONG&gt; in thread [ALV|&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="384685"&gt;&lt;/A&gt;;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the event handler method for DOUBLE_CLICK I call the following method:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CALL METHOD cl_gui_cfw=&amp;gt;set_new_ok_code( 'DETAIL' ).  " not 4.6c compatibe, use instead

CALL METHOD cl_gui_cfw=&amp;gt;set_new_ok_code
   EXPORTING
     okcode = 'DETAIL'
*  IMPORTING
*    rc = 
    .
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This method call triggers that the PAI of the screen is passed and, thereby, PBO of the same screen, too. In the PBO module(s) you can refresh your header.&lt;/P&gt;&lt;P&gt;Please note that normal ALV grid events do &lt;STRONG&gt;NOT&lt;/STRONG&gt; trigger PAI of the screen (similar behaviour like F4 search help).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jan 2008 19:52:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-refresh-a-dynpro/m-p/3288789#M786851</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2008-01-08T19:52:41Z</dc:date>
    </item>
    <item>
      <title>Re: How refresh a Dynpro</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-refresh-a-dynpro/m-p/3288790#M786852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Salvatore,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Update of Table&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;&lt;STRONG&gt;Implementation in Component Controller for Update&lt;/STRONG&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IPublicTableTransactionComp.ITableNodeElement element;&lt;/P&gt;&lt;P&gt;Zstable table = new Zstable();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;update.setPo_Type("M");&lt;/P&gt;&lt;P&gt;int size = 0;&lt;/P&gt;&lt;P&gt;int sizeMax = wdContext.nodeTableNode().size();&lt;/P&gt;&lt;P&gt;				&lt;/P&gt;&lt;P&gt;for(;size&amp;lt;sizeMax;size++)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;element = wdContext.nodeTableNode().&lt;/P&gt;&lt;P&gt;getTableNodeElementAt(size);&lt;/P&gt;&lt;P&gt;					&lt;/P&gt;&lt;P&gt;		table.setCust_No(element.getCustNo());&lt;/P&gt;&lt;P&gt;		table.setFirst_Name(element.getFirstName());&lt;/P&gt;&lt;P&gt;		table.setLast_Name(element.getLastName());&lt;/P&gt;&lt;P&gt;		table.setPhone_No(element.getPhoneNo());&lt;/P&gt;&lt;P&gt;		table.setOrg_Code(&lt;/P&gt;&lt;P&gt;wdContext.nodeZs_Dislay_Table_Input().&lt;/P&gt;&lt;P&gt;currentZs_Dislay_Table_InputElement().&lt;/P&gt;&lt;P&gt;getPo_Org_Code());&lt;/P&gt;&lt;P&gt;					&lt;/P&gt;&lt;P&gt;		update.addLi_List_Of_Users(table);&lt;/P&gt;&lt;P&gt;	}&lt;/P&gt;&lt;P&gt;try&lt;/P&gt;&lt;P&gt;	{&lt;/P&gt;&lt;P&gt;	&lt;/P&gt;&lt;P&gt;wdContext.nodeZs_Update_Table_Input().&lt;/P&gt;&lt;P&gt;currentZs_Update_Table_InputElement().&lt;/P&gt;&lt;P&gt;modelObject().execute();&lt;/P&gt;&lt;P&gt;					wdContext.nodeOutput_Update().invalidate();&lt;/P&gt;&lt;P&gt;					&lt;/P&gt;&lt;P&gt;		if(!wdContext.nodeOutput_Update().&lt;/P&gt;&lt;P&gt;currentOutput_UpdateElement().&lt;/P&gt;&lt;P&gt;getPo_Success().equals("1"))&lt;/P&gt;&lt;P&gt;						&lt;/P&gt;&lt;P&gt;wdComponentAPI.getMessageManager().&lt;/P&gt;&lt;P&gt;reportWarning("UNSUCCESSFUL UPDATE");&lt;/P&gt;&lt;P&gt;		else&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;			wdComponentAPI.getMessageManager().&lt;/P&gt;&lt;P&gt;reportSuccess("SUCCESSFUL UPDATE");&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;catch(Exception ex)&lt;/P&gt;&lt;P&gt;	{			&lt;/P&gt;&lt;P&gt;wdComponentAPI.getMessageManager().&lt;/P&gt;&lt;P&gt;reportException(ex.toString(),false);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Implementation in View for Update&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. In the &amp;#147;Action&amp;#148; tab of StartView define an action &amp;#147;Update&amp;#148; and associate it with &amp;#147;OnAction&amp;#148; property of Button &amp;#147;Update&amp;#148; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.  In the eventhandler for the button in &amp;#147;Implementation&amp;#148; namely &amp;#147;OnActionUpdate&amp;#148; write the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Executing the Bapi on Click of Update Button&lt;/P&gt;&lt;P&gt;wdThis.wdGetBokApplCompController().executeZs_Update();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Declaration of Method executeChange&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This method is defined to execute actions of updating the table with latest changes. We create method with &amp;#147;Type&amp;#148; as parameter in it. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;	9. Diagram describing Method executeChange and its Type being parameter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;public void executeChange( java.lang.String Type )&lt;/P&gt;&lt;P&gt;  {&lt;/P&gt;&lt;P&gt;    //@@begin executeChange()&lt;/P&gt;&lt;P&gt;      IPublicTableTransactionComp.ITableNodeElement element;&lt;/P&gt;&lt;P&gt;	Zstable table = new Zstable();&lt;/P&gt;&lt;P&gt;	update.setPo_Type(Type);&lt;/P&gt;&lt;P&gt;	&lt;/P&gt;&lt;P&gt;      int size = 0;&lt;/P&gt;&lt;P&gt;	int sizeMax = wdContext.nodeTableNode().size();&lt;/P&gt;&lt;P&gt;		&lt;/P&gt;&lt;P&gt;	for(;size&amp;lt;sizeMax;size++)&lt;/P&gt;&lt;P&gt;	    {&lt;/P&gt;&lt;P&gt;		element =&lt;/P&gt;&lt;P&gt;wdContext.nodeTableNode().&lt;/P&gt;&lt;P&gt;getTableNodeElementAt(size);&lt;/P&gt;&lt;P&gt;			&lt;/P&gt;&lt;P&gt;			table.setCust_No(element.getCustNo());&lt;/P&gt;&lt;P&gt;			table.setFirst_Name(element.getFirstName());&lt;/P&gt;&lt;P&gt;			table.setLast_Name(element.getLastName());&lt;/P&gt;&lt;P&gt;			table.setPhone_No(element.getPhoneNo());&lt;/P&gt;&lt;P&gt;			table.setOrg_Code(element.getOrgCode());&lt;/P&gt;&lt;P&gt;			&lt;/P&gt;&lt;P&gt;			update.addLi_List_Of_Users(table);&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;try&lt;/P&gt;&lt;P&gt;		{	&lt;/P&gt;&lt;P&gt;				&lt;/P&gt;&lt;P&gt;				&lt;/P&gt;&lt;P&gt;		wdContext.nodeZs_Update_Table_Input().&lt;/P&gt;&lt;P&gt;currentZs_Update_Table_InputElement().&lt;/P&gt;&lt;P&gt;modelObject().execute();&lt;/P&gt;&lt;P&gt;			&lt;/P&gt;&lt;P&gt;		wdContext.nodeOutput_Update().invalidate();&lt;/P&gt;&lt;P&gt;			&lt;/P&gt;&lt;P&gt;		if(!wdContext.nodeOutput_Update().&lt;/P&gt;&lt;P&gt;currentOutput_UpdateElement().&lt;/P&gt;&lt;P&gt;getPo_Success().equals("1"))&lt;/P&gt;&lt;P&gt;				&lt;/P&gt;&lt;P&gt;			wdComponentAPI.getMessageManager().&lt;/P&gt;&lt;P&gt;reportWarning("UNSUCCESSFUL ");&lt;/P&gt;&lt;P&gt;		else&lt;/P&gt;&lt;P&gt;					&lt;/P&gt;&lt;P&gt;wdComponentAPI.getMessageManager().&lt;/P&gt;&lt;P&gt;reportSuccess("SUCCESSFUL ");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;		}&lt;/P&gt;&lt;P&gt;	catch(Exception ex)&lt;/P&gt;&lt;P&gt;		{&lt;/P&gt;&lt;P&gt;		wdComponentAPI.getMessageManager().&lt;/P&gt;&lt;P&gt;reportException(ex.toString(),false);&lt;/P&gt;&lt;P&gt;		}&lt;/P&gt;&lt;P&gt;//@@end&lt;/P&gt;&lt;P&gt; }&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>Thu, 10 Jan 2008 08:22:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-refresh-a-dynpro/m-p/3288790#M786852</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-10T08:22:46Z</dc:date>
    </item>
  </channel>
</rss>

