<?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: DYNP_VALUES_READ returning an empty table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynp-values-read-returning-an-empty-table/m-p/5192359#M1201608</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;Use:-&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA : DYNAME LIKE D020S-PROG,
       DYNUMB LIKE D020S-DNUM.

DATA : DYNPFIELDS LIKE STANDARD TABLE OF DYNPREAD WITH HEADER LINE.

DYNAME = SY-REPID,
DYNUMB = SY-DYNNR.

DYNPFIELDS-FIELDNAME = &amp;lt;the name of the parameter you need to find out&amp;gt;
APPEND DYNPFIELDS.

CALL FUNCTION 'DYNP_VALUES_READ'
 EXPORTING
   dyname = DYNAME
   dynumb = DYNUMB
 TABLES
   dynpfields = DYNPFIELDS.

READ DYNPFIELDS INDEX 1.
MOVE DYNPFIELDS-VALUE TO &amp;lt;PARAMETER&amp;gt;.

"here you insert the code to run the search help, and it depends on which search help you need.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tarun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 14 Feb 2009 11:04:01 GMT</pubDate>
    <dc:creator>I355602</dc:creator>
    <dc:date>2009-02-14T11:04:01Z</dc:date>
    <item>
      <title>DYNP_VALUES_READ returning an empty table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynp-values-read-returning-an-empty-table/m-p/5192357#M1201606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi. How can be that the FM DYNP_VALUES_READ returns a table with no rows? The screen is a normal one, and the FM does not return with an exception. This is, more or less, the scenario:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a normal screen with some fields and a table control.&lt;/P&gt;&lt;P&gt;One of the fields in the table control has a customer search help (Z..) attached to the dynpro field&lt;/P&gt;&lt;P&gt;This search help has an exit&lt;/P&gt;&lt;P&gt;Inside the exit it has implemented the SELECT step&lt;/P&gt;&lt;P&gt;In this step, the FM DYNP_VALUES_READ, with &lt;STRONG&gt;proper&lt;/STRONG&gt; dyname and dynumb parameters is called, but returns an empty table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The dyname and dynumb are the same program and dynpro with the table control that called the search help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am I incorrectly understanding how does DYNP_VALUES_READ works?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for any help you can give me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Andres Rodriguez Guapacha on Feb 13, 2009 3:30 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Added the fact that the search help is linked to the dynpro field directly, not via the data element.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Feb 2009 14:22:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynp-values-read-returning-an-empty-table/m-p/5192357#M1201606</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-13T14:22:12Z</dc:date>
    </item>
    <item>
      <title>Re: DYNP_VALUES_READ returning an empty table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynp-values-read-returning-an-empty-table/m-p/5192358#M1201607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andres,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess you need to populate the dynpfield table with the values of the screen fields for which you need to read the value. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a look at the function module documentation. Also have a look at the example code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data: dyname like d020s-prog value 'TESTPROG',&lt;/P&gt;&lt;P&gt;        dynumb like d020s-dnum value '100'.&lt;/P&gt;&lt;P&gt;  data: begin of dynpfields occurs 3.&lt;/P&gt;&lt;P&gt;          include structure dynpread.&lt;/P&gt;&lt;P&gt;  data: end of dynpfields.&lt;/P&gt;&lt;P&gt;  move 'TABNAME' to dynpfields-fieldname.&lt;/P&gt;&lt;P&gt;  append dynpfields.&lt;/P&gt;&lt;P&gt;  move 'FIELDNAME' to dynpfields-fieldname.&lt;/P&gt;&lt;P&gt;  append dynpfields.&lt;/P&gt;&lt;P&gt;  call function 'DYNP_VALUES_READ'&lt;/P&gt;&lt;P&gt;       exporting&lt;/P&gt;&lt;P&gt;             dyname               = dymame&lt;/P&gt;&lt;P&gt;             dynumb               = dynumb&lt;/P&gt;&lt;P&gt;            translate_to_upper   = 'X'&lt;/P&gt;&lt;P&gt;       tables&lt;/P&gt;&lt;P&gt;             dynpfields           = dynpfields&lt;/P&gt;&lt;P&gt;       exceptions&lt;/P&gt;&lt;P&gt;            invalid_abapworkarea = 01&lt;/P&gt;&lt;P&gt;            invalid_dynprofield  = 02&lt;/P&gt;&lt;P&gt;            invalid_dynproname   = 03&lt;/P&gt;&lt;P&gt;            invalid_dynpronummer = 04&lt;/P&gt;&lt;P&gt;             invalid_request      = 05&lt;/P&gt;&lt;P&gt;            no_fielddescription  = 06&lt;/P&gt;&lt;P&gt;            undefind_error       = 07.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Samantak.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Feb 2009 06:20:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynp-values-read-returning-an-empty-table/m-p/5192358#M1201607</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-14T06:20:07Z</dc:date>
    </item>
    <item>
      <title>Re: DYNP_VALUES_READ returning an empty table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynp-values-read-returning-an-empty-table/m-p/5192359#M1201608</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;Use:-&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA : DYNAME LIKE D020S-PROG,
       DYNUMB LIKE D020S-DNUM.

DATA : DYNPFIELDS LIKE STANDARD TABLE OF DYNPREAD WITH HEADER LINE.

DYNAME = SY-REPID,
DYNUMB = SY-DYNNR.

DYNPFIELDS-FIELDNAME = &amp;lt;the name of the parameter you need to find out&amp;gt;
APPEND DYNPFIELDS.

CALL FUNCTION 'DYNP_VALUES_READ'
 EXPORTING
   dyname = DYNAME
   dynumb = DYNUMB
 TABLES
   dynpfields = DYNPFIELDS.

READ DYNPFIELDS INDEX 1.
MOVE DYNPFIELDS-VALUE TO &amp;lt;PARAMETER&amp;gt;.

"here you insert the code to run the search help, and it depends on which search help you need.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tarun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Feb 2009 11:04:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynp-values-read-returning-an-empty-table/m-p/5192359#M1201608</guid>
      <dc:creator>I355602</dc:creator>
      <dc:date>2009-02-14T11:04:01Z</dc:date>
    </item>
    <item>
      <title>Re: DYNP_VALUES_READ returning an empty table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynp-values-read-returning-an-empty-table/m-p/5192360#M1201609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi. Your ideas were of great help, however I found a fastest hack to the variable:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
field-symbols &amp;lt;fs&amp;gt; type matnr. " or any other type
data local_variable type matnr. " or any other type
data external_variable type string value '(program)field'.

assign (external_variable) to &amp;lt;fs&amp;gt;.

local_variable = &amp;lt;fs&amp;gt;.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pretty ugly I know, but it works like a charm. And with all this time constraint... &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help, anyway.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Feb 2009 16:34:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynp-values-read-returning-an-empty-table/m-p/5192360#M1201609</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-16T16:34:27Z</dc:date>
    </item>
  </channel>
</rss>

