<?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: search help with dynamic Selection method in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/search-help-with-dynamic-selection-method/m-p/1382035#M186369</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT  ZTEST_F4HELP                              .


parameters: p_vbeln type vbak-vbeln,
            p_posnr type vbap-posnr.

at selection-screen on value-request for p_posnr.


  data: begin of help_item occurs 0,
          posnr type vbap-posnr,
          matnr type vbap-matnr,
          arktx type vbap-arktx,
        end of help_item.

  data: dynfields type table of dynpread with header line.


  dynfields-fieldname = 'P_VBELN'.
  append dynfields.

  call function 'DYNP_VALUES_READ'
       exporting
            dyname               = sy-cprog
            dynumb               = sy-dynnr
            translate_to_upper   = 'X'
       tables
            dynpfields           = dynfields
       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
            double_conversion    = 9
            stepl_not_found      = 10
            others               = 11.


  read table dynfields with key fieldname = 'P_VBELN'.

  p_vbeln = dynfields-fieldvalue.


  call function 'CONVERSION_EXIT_ALPHA_INPUT'
       exporting
            input  = p_vbeln
       importing
            output = p_vbeln.

  select posnr matnr arktx into table help_item
                 from vbap
                      where vbeln = p_vbeln.



  call function 'F4IF_INT_TABLE_VALUE_REQUEST'
       exporting
            retfield    = 'POSNR'
            dynprofield = 'P_POSNR'
            dynpprog    = sy-cprog
            dynpnr      = sy-dynnr
            value_org   = 'S'
       tables
            value_tab   = help_item.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Jun 2006 14:48:39 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-06-29T14:48:39Z</dc:date>
    <item>
      <title>search help with dynamic Selection method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/search-help-with-dynamic-selection-method/m-p/1382032#M186366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;there's a way to select dynamic Selection method in &lt;/P&gt;&lt;P&gt;search help ? ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jun 2006 05:44:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/search-help-with-dynamic-selection-method/m-p/1382032#M186366</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-29T05:44:53Z</dc:date>
    </item>
    <item>
      <title>Re: search help with dynamic Selection method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/search-help-with-dynamic-selection-method/m-p/1382033#M186367</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;When you create a search help (In transaction SE11), in the selection method you can define a table or view, but this definition is static. There isn't a way to do a dynamic selection method (SE11).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alejandro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Alejandro López&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jun 2006 14:28:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/search-help-with-dynamic-selection-method/m-p/1382033#M186367</guid>
      <dc:creator>alejandro_lpez</dc:creator>
      <dc:date>2006-06-29T14:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: search help with dynamic Selection method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/search-help-with-dynamic-selection-method/m-p/1382034#M186368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want full control over a search help, you can build it at runtime.  See the example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0001 .

tables: t001.

data: begin of it001 occurs 0,
      bukrs type t001-bukrs,
      butxt type t001-butxt,
      ort01 type t001-ort01,
      land1 type t001-land1,
      end of it001.

select-options s_bukrs for t001-bukrs.

initialization.

  select bukrs butxt ort01 land1 into table it001 from t001.

  sort it001 ascending by bukrs.
  delete adjacent duplicates from it001 comparing bukrs.

at selection-screen on value-request for s_bukrs-low.

  call function 'F4IF_INT_TABLE_VALUE_REQUEST'
       exporting
            retfield    = 'BUKRS'
            dynprofield = 'S_BUKRS'
            dynpprog    = sy-cprog
            dynpnr      = sy-dynnr
            value_org   = 'S'
       tables
            value_tab   = it001.

start-of-selection.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jun 2006 14:31:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/search-help-with-dynamic-selection-method/m-p/1382034#M186368</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-06-29T14:31:15Z</dc:date>
    </item>
    <item>
      <title>Re: search help with dynamic Selection method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/search-help-with-dynamic-selection-method/m-p/1382035#M186369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT  ZTEST_F4HELP                              .


parameters: p_vbeln type vbak-vbeln,
            p_posnr type vbap-posnr.

at selection-screen on value-request for p_posnr.


  data: begin of help_item occurs 0,
          posnr type vbap-posnr,
          matnr type vbap-matnr,
          arktx type vbap-arktx,
        end of help_item.

  data: dynfields type table of dynpread with header line.


  dynfields-fieldname = 'P_VBELN'.
  append dynfields.

  call function 'DYNP_VALUES_READ'
       exporting
            dyname               = sy-cprog
            dynumb               = sy-dynnr
            translate_to_upper   = 'X'
       tables
            dynpfields           = dynfields
       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
            double_conversion    = 9
            stepl_not_found      = 10
            others               = 11.


  read table dynfields with key fieldname = 'P_VBELN'.

  p_vbeln = dynfields-fieldvalue.


  call function 'CONVERSION_EXIT_ALPHA_INPUT'
       exporting
            input  = p_vbeln
       importing
            output = p_vbeln.

  select posnr matnr arktx into table help_item
                 from vbap
                      where vbeln = p_vbeln.



  call function 'F4IF_INT_TABLE_VALUE_REQUEST'
       exporting
            retfield    = 'POSNR'
            dynprofield = 'P_POSNR'
            dynpprog    = sy-cprog
            dynpnr      = sy-dynnr
            value_org   = 'S'
       tables
            value_tab   = help_item.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jun 2006 14:48:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/search-help-with-dynamic-selection-method/m-p/1382035#M186369</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-29T14:48:39Z</dc:date>
    </item>
  </channel>
</rss>

