<?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 exit code example? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/search-help-exit-code-example/m-p/970835#M69629</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is not recommended to work the way proposed above (see SAP note 736293). There you can also find the names of function modules that can be used to manipulate the table of results.&lt;/P&gt;&lt;P&gt;If you really want to have the number of displayed columns user-dependent I would rather suggest to have all columns defined as search help parameters and then change their properties in the shlp-fieldprop-table when necessary. (Unfortunately there is no F4UT_-function module to perform this action).&lt;/P&gt;&lt;P&gt;This way is much more robust against changes that may be made in SAPs coding.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Jun 2005 14:24:44 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-06-29T14:24:44Z</dc:date>
    <item>
      <title>Search help exit code example?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/search-help-exit-code-example/m-p/970832#M69626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to develop an authorization check in the search help exit that will drop certain fields from the display based on a user's authorization. It appears that the delivered search help function module provides a result table (as a string). I would just like to blank out characters in the string. The function modules does tell me what the search help name is and the structure but I am in a bind pulling it altogether. Has anyone had any experience doing this? Any good code examples?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jun 2005 21:53:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/search-help-exit-code-example/m-p/970832#M69626</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-28T21:53:53Z</dc:date>
    </item>
    <item>
      <title>Re: Search help exit code example?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/search-help-exit-code-example/m-p/970833#M69627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can have a look into this&lt;/P&gt;&lt;P&gt;Search Help exit(Add new field) &lt;/P&gt;&lt;P&gt;The search help exit allows you to modify functionality of search help. If you add a new field to the &lt;/P&gt;&lt;P&gt;parameter list that is not contained on the selection method you can manually populate it within the search &lt;/P&gt;&lt;P&gt;help exit. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This  would be performed within the &amp;#145;STEP DISP&amp;#146; section. Once within this section all search help &lt;/P&gt;&lt;P&gt;data has been retrieved and is stored in table RECORD_TAB (record_tab-string) as one long string value. &lt;/P&gt;&lt;P&gt;Therefore you need to read table SHLP in-order to locate position of value within string.   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;To find position of personnel number (PERNR) within elemenory search &lt;/P&gt;&lt;P&gt;help M_PREMN you would use the following code:&lt;/P&gt;&lt;P&gt;Loop at record_tab.&lt;/P&gt;&lt;P&gt;	read table shlp-fielddescr into wa_shlp&lt;/P&gt;&lt;P&gt;                                   with key tabname   = 'M_PREMN'&lt;/P&gt;&lt;P&gt;                                            fieldname = 'PERNR'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could then use this information in the following way, for &lt;/P&gt;&lt;P&gt;example, to find a persons organisation unit:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      select  orgeh endda&lt;/P&gt;&lt;P&gt;        up to 1 rows&lt;/P&gt;&lt;P&gt;        from pa0001&lt;/P&gt;&lt;P&gt;        into (ld_orgeh,ld_endda)&lt;/P&gt;&lt;P&gt;       where pernr eq record_tab-string+wa_shlp-offset(8) &lt;/P&gt;&lt;P&gt;                                                  &amp;#147;pernr length is 8 &lt;/P&gt;&lt;P&gt;       order by endda descending.&lt;/P&gt;&lt;P&gt;      endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      select single orgtx&lt;/P&gt;&lt;P&gt;        from t527x&lt;/P&gt;&lt;P&gt;        into ld_orgtxt&lt;/P&gt;&lt;P&gt;       where orgeh eq ld_orgeh and&lt;/P&gt;&lt;P&gt;             sprsl eq sy-langu and&lt;/P&gt;&lt;P&gt;           ( endda ge sy-datum and&lt;/P&gt;&lt;P&gt;             begda le sy-datum ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have added a new field to the end of the parameters list &lt;/P&gt;&lt;P&gt;the next step is to populate it by adding this data to the end of &lt;/P&gt;&lt;P&gt;the record_tab string: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  concatenate record_tab-string ld_orgtxt into record_tab-string.&lt;/P&gt;&lt;P&gt;  modify record_tab.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Reagrds,&lt;/P&gt;&lt;P&gt;Judith.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jun 2005 03:39:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/search-help-exit-code-example/m-p/970833#M69627</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-29T03:39:43Z</dc:date>
    </item>
    <item>
      <title>Re: Search help exit code example?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/search-help-exit-code-example/m-p/970834#M69628</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;based on your authorization check you can filter the output of your search help by modifying the three things namely the field description SHLP-FIELDDESCR, field properties SHLP-FIELDPROP and the recordtab RECORD_TAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically the search help runs for various CALLCONTROL-STEP values like 'SELECT', 'DISP', 'RETURN' etc. Indeed for step value DISP it fetches data from database and displays it. at this venture one can change the record_tab based on the fielddescrip and fieldprop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the below code i have just added a new field to the current field setup and defined its field prop and latter selected the required data for the new field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;The following search help exit is used to modify the existing search&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;help Y_EQUI and so the required customized fields which are not there&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;in the search help can be added and also the output can be alligned.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Check whether the STEP value is DISPLAY as at this point the&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;RECORD_TAB has data being fetched from Database.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;----------------------------------------------------------------------&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  if callcontrol-step eq 'DISP'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Add the new field DEVLOC along with the existing search help fields by&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;specifying the required offset and length.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;----------------------------------------------------------------------&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    clear wa_fielddescr.&lt;/P&gt;&lt;P&gt;    wa_fielddescr-tabname = 'EGERH'.&lt;/P&gt;&lt;P&gt;    wa_fielddescr-fieldname = 'DEVLOC'.&lt;/P&gt;&lt;P&gt;    wa_fielddescr-domname = 'DEVLOC'.&lt;/P&gt;&lt;P&gt;    wa_fielddescr-position = '1'.&lt;/P&gt;&lt;P&gt;    wa_fielddescr-offset = '18'.&lt;/P&gt;&lt;P&gt;    wa_fielddescr-headlen = '30'.&lt;/P&gt;&lt;P&gt;    wa_fielddescr-scrlen1 = '30'.&lt;/P&gt;&lt;P&gt;    wa_fielddescr-scrlen2 = '35'.&lt;/P&gt;&lt;P&gt;    wa_fielddescr-scrlen3 = '40'.&lt;/P&gt;&lt;P&gt;    wa_fielddescr-lfieldname = 'DEVLOC'.&lt;/P&gt;&lt;P&gt;    wa_fielddescr-leng = '30'.&lt;/P&gt;&lt;P&gt;    wa_fielddescr-outputlen = '18'.&lt;/P&gt;&lt;P&gt;    wa_fielddescr-intlen = '30'.&lt;/P&gt;&lt;P&gt;    wa_fielddescr-datatype = 'CHAR'.&lt;/P&gt;&lt;P&gt;    wa_fielddescr-INTTYPE = 'C'.&lt;/P&gt;&lt;P&gt;    wa_fielddescr-fieldtext = 'Device Location'.&lt;/P&gt;&lt;P&gt;    append wa_fielddescr to shlp-fielddescr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Set the fieldproperty for the new field DEVLOC included&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;----------------------------------------------------------------------&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    wa_fieldprop-fieldname = 'DEVLOC'.&lt;/P&gt;&lt;P&gt;    wa_fieldprop-shlpinput = 'X'.&lt;/P&gt;&lt;P&gt;    wa_fieldprop-shlplispos = '02'.&lt;/P&gt;&lt;P&gt;    append wa_fieldprop to shlp-fieldprop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Pass the RECORD_TAB to an internal table and refresh its contents. now&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;select the required data as per the new serach help fields and allign&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;them back to the RECORD_TAB as per the offset being defined in the&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;field description.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;----------------------------------------------------------------------&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    refresh i_recordtab.&lt;/P&gt;&lt;P&gt;    i_recordtab[] = record_tab[].&lt;/P&gt;&lt;P&gt;    refresh record_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    loop at i_recordtab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      ws_equnr = i_recordtab-string+3(18).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      refresh i_egerh.&lt;/P&gt;&lt;P&gt;      select * into table i_egerh&lt;/P&gt;&lt;P&gt;      from egerh&lt;/P&gt;&lt;P&gt;      where equnr = ws_equnr&lt;/P&gt;&lt;P&gt;        and ab le sy-datum&lt;/P&gt;&lt;P&gt;        and bis ge sy-datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      loop at i_egerh.&lt;/P&gt;&lt;P&gt;        clear wa_record.&lt;/P&gt;&lt;P&gt;        concatenate sy-mandt&lt;/P&gt;&lt;P&gt;                    ws_equnr&lt;/P&gt;&lt;P&gt;                    i_egerh-devloc&lt;/P&gt;&lt;P&gt;                    into wa_record-string.&lt;/P&gt;&lt;P&gt;        append wa_record to record_tab.&lt;/P&gt;&lt;P&gt;      endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    endloop.&lt;/P&gt;&lt;P&gt;endif.&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;Jagath.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jun 2005 04:57:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/search-help-exit-code-example/m-p/970834#M69628</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-29T04:57:42Z</dc:date>
    </item>
    <item>
      <title>Re: Search help exit code example?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/search-help-exit-code-example/m-p/970835#M69629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is not recommended to work the way proposed above (see SAP note 736293). There you can also find the names of function modules that can be used to manipulate the table of results.&lt;/P&gt;&lt;P&gt;If you really want to have the number of displayed columns user-dependent I would rather suggest to have all columns defined as search help parameters and then change their properties in the shlp-fieldprop-table when necessary. (Unfortunately there is no F4UT_-function module to perform this action).&lt;/P&gt;&lt;P&gt;This way is much more robust against changes that may be made in SAPs coding.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jun 2005 14:24:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/search-help-exit-code-example/m-p/970835#M69629</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-29T14:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: Search help exit code example?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/search-help-exit-code-example/m-p/970836#M69630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much. I appreciate all the answers. I hope I awarded points correctly for all responders.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jun 2005 20:06:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/search-help-exit-code-example/m-p/970836#M69630</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-29T20:06:22Z</dc:date>
    </item>
  </channel>
</rss>

