<?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 Problem in reading screen fields from FM DYNP_VALUES_READ in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-reading-screen-fields-from-fm-dynp-values-read/m-p/5767297#M1305905</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have developed module pool program and in my module pool program I am using two subcscreens, one is  for entry for mateiral/plant, and other is for list of stocks entered in first sub-screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Question is I am using DYNP_VALUES_READ FM for reading subscreen value to validate what user has entered. But it is giving right value at first time Function module execution, at the second time it is not updating screen values and showing old data and I can not validate with current screen value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So Folks Can you suggest me right way to get sub-screen data anytime in my main screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I have to use any other Function module then pls. tell me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks you  !!&lt;/P&gt;&lt;P&gt;PPATEL&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Jun 2009 19:11:42 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-06-18T19:11:42Z</dc:date>
    <item>
      <title>Problem in reading screen fields from FM DYNP_VALUES_READ</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-reading-screen-fields-from-fm-dynp-values-read/m-p/5767297#M1305905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have developed module pool program and in my module pool program I am using two subcscreens, one is  for entry for mateiral/plant, and other is for list of stocks entered in first sub-screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Question is I am using DYNP_VALUES_READ FM for reading subscreen value to validate what user has entered. But it is giving right value at first time Function module execution, at the second time it is not updating screen values and showing old data and I can not validate with current screen value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So Folks Can you suggest me right way to get sub-screen data anytime in my main screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I have to use any other Function module then pls. tell me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks you  !!&lt;/P&gt;&lt;P&gt;PPATEL&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2009 19:11:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-reading-screen-fields-from-fm-dynp-values-read/m-p/5767297#M1305905</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-18T19:11:42Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in reading screen fields from FM DYNP_VALUES_READ</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-reading-screen-fields-from-fm-dynp-values-read/m-p/5767298#M1305906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Patel,&lt;/P&gt;&lt;P&gt;&amp;lt;li&amp;gt;Befor you build DYNPFIELDS table with fields, Clear the internal table. &lt;/P&gt;&lt;P&gt;&amp;lt;li&amp;gt;DYNP_VALUES_READ - read dynpro fields values using this FM&lt;/P&gt;&lt;P&gt;&amp;lt;li&amp;gt;DYNP_VALUES_UPDATE - update dynpro fields using this FM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Venkat.O&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2009 02:32:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-reading-screen-fields-from-fm-dynp-values-read/m-p/5767298#M1305906</guid>
      <dc:creator>venkat_o</dc:creator>
      <dc:date>2009-06-19T02:32:12Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in reading screen fields from FM DYNP_VALUES_READ</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-reading-screen-fields-from-fm-dynp-values-read/m-p/5767299#M1305907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Venkat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am doing same thing here, I am reading dynpro fields from FM DYNP_VALUES_READ and updating it from UPDATE FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But want to know when to use which Function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirement is read dynpro of subscreen in PAI event, as and when User interpret something.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is giving right value at first but when I am clicking second time then in that PAI event it is not giving updated values, still gives old dynpro values. So why it is not updating into table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for help.&lt;/P&gt;&lt;P&gt;Priyank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2009 04:59:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-reading-screen-fields-from-fm-dynp-values-read/m-p/5767299#M1305907</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-19T04:59:14Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in reading screen fields from FM DYNP_VALUES_READ</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-reading-screen-fields-from-fm-dynp-values-read/m-p/5767300#M1305908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Priyank,&lt;/P&gt;&lt;P&gt;Can you please post the code, I will go through .. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Venkat.O&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2009 06:06:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-reading-screen-fields-from-fm-dynp-values-read/m-p/5767300#M1305908</guid>
      <dc:creator>venkat_o</dc:creator>
      <dc:date>2009-06-19T06:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in reading screen fields from FM DYNP_VALUES_READ</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-reading-screen-fields-from-fm-dynp-values-read/m-p/5767301#M1305909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Venki,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can send you code here but can not send you screens, so just giving overview here,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Main screen -&amp;gt; inside that two subscreens,&lt;/P&gt;&lt;P&gt;                   -&amp;gt; one is for data entry&lt;/P&gt;&lt;P&gt;                   -&amp;gt; another is for data retrival&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Main screen has PAI and PBO event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both sub screen has PAI and PBO event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data entry screen(Subscreen 1) has following code for PBO and PAI event&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PBO  event&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;refresh XDYNPREAD.&lt;/P&gt;&lt;P&gt;clear XDYNPREAD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;MOVE 'LFA1-LIFNR' TO XDYNPREAD-FIELDNAME.
  APPEND XDYNPREAD.

  LOC_REPID = SY-REPID.
  LOC_DYNNR = '0107'. " Subscreen 

  CALL FUNCTION 'DYNP_VALUES_READ'
       EXPORTING
            DYNAME               = LOC_REPID
            DYNUMB               = LOC_DYNNR
       TABLES
            DYNPFIELDS           = XDYNPREAD
       EXCEPTIONS
            INVALID_ABAPWORKAREA = 1
            INVALID_DYNPROFIELD  = 2
            INVALID_DYNPRONAME   = 3
            INVALID_DYNPRONUMMER = 4
            INVALID_REQUEST      = 5
            NO_FIELDDESCRIPTION  = 6
            INVALID_PARAMETER    = 7
            UNDEFIND_ERROR       = 8
            OTHERS               = 9.

  CALL FUNCTION 'DYNP_VALUES_UPDATE'
       EXPORTING
            DYNAME               =  LOC_REPID
            DYNUMB               =  LOC_DYNNR
       TABLES
            DYNPFIELDS           =  XDYNPREAD
       EXCEPTIONS
            OTHERS               = 4.

And in PAI event


Reading value from DYNPRO passing to table

refresh XDYNPREAD.
clear XDYNPREAD.

  MOVE 'LFA1-LIFNR' TO XDYNPREAD-FIELDNAME.
  APPEND XDYNPREAD.

  LOC_REPID = SY-REPID.
  LOC_DYNNR = '0107'.

  CALL FUNCTION 'DYNP_VALUES_READ'
       EXPORTING
            DYNAME               = LOC_REPID
            DYNUMB               = LOC_DYNNR
       TABLES
            DYNPFIELDS           = XDYNPREAD
       EXCEPTIONS
            INVALID_ABAPWORKAREA = 1
            INVALID_DYNPROFIELD  = 2
            INVALID_DYNPRONAME   = 3
            INVALID_DYNPRONUMMER = 4
            INVALID_REQUEST      = 5
            NO_FIELDDESCRIPTION  = 6
            INVALID_PARAMETER    = 7
            UNDEFIND_ERROR       = 8
            OTHERS               = 9.

* Update with Zrequest.
   loop at XDYNPREAD.
    if XDYNPREAD-FIELDNAME = LFA1-LIFNR'.

         CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
           EXPORTING
             INPUT              = XDYNPREAD-FIELDVALUE
          IMPORTING
            OUTPUT             = LFA1-LIFNR.
  endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So here no issue I am getting updated value each time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem is in main screen PAI event when I am processing it for data retrieval from subscreen 2, I am reading from suscreen 1 that if user has changed somethign and whatever data came in second screen are with same input or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So at first it is giving right values from screen 1(Sub screen 1), when I am changing some values in that screen again checking in main screen checking logic for updated values from screen1 with FM DYNP_VALUES_READ, it is giving old data not with latest update.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is somehow confusing but I tried to explain you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;PPatel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: PPATEL on Jun 20, 2009 8:45 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: PPATEL on Jun 20, 2009 8:47 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Jun 2009 18:45:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-reading-screen-fields-from-fm-dynp-values-read/m-p/5767301#M1305909</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-20T18:45:41Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in reading screen fields from FM DYNP_VALUES_READ</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-reading-screen-fields-from-fm-dynp-values-read/m-p/5767302#M1305910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi PPatel,&lt;/P&gt;&lt;P&gt;You are using two sybscreen in ur module Pool Program.&lt;/P&gt;&lt;P&gt;Say for Example if you are reading the value of Screen field from Screen number &lt;/P&gt;&lt;P&gt;100 then pass that screen number and Program name in ur function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also check it are you clearing the internal table before you are fetching data for second&lt;/P&gt;&lt;P&gt;time. Do all this thing in debugging mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vipul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2009 06:48:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-reading-screen-fields-from-fm-dynp-values-read/m-p/5767302#M1305910</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-22T06:48:08Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in reading screen fields from FM DYNP_VALUES_READ</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-reading-screen-fields-from-fm-dynp-values-read/m-p/5767303#M1305911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I figure it out on my way and now it is updating at every stage and my validation is working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks you all folks for your reply.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2009 20:08:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-reading-screen-fields-from-fm-dynp-values-read/m-p/5767303#M1305911</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-22T20:08:05Z</dc:date>
    </item>
  </channel>
</rss>

