<?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: Extracting data from two fields in a input parameter in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/extracting-data-from-two-fields-in-a-input-parameter/m-p/12142872#M1976149</link>
    <description>&lt;P&gt;Same answer as Michael, but saying it simply with code and without explanation. NB: if you prefer to do it in a complex way, use F4IF_INT_TABLE_VALUE_REQUEST.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PARAMETERS bukrs TYPE t012t-bukrs.
PARAMETERS hbkid TYPE t012t-hbkid.
PARAMETERS hktid TYPE t012t-hktid.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Nothing else.&lt;/P&gt;&lt;P&gt;Run it, press F4 no HKTID field, choose and the selected line will fill all input fields :&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1784521-t012t-search-help.png" /&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 28 Feb 2020 07:23:23 GMT</pubDate>
    <dc:creator>Sandra_Rossi</dc:creator>
    <dc:date>2020-02-28T07:23:23Z</dc:date>
    <item>
      <title>Extracting data from two fields in a input parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/extracting-data-from-two-fields-in-a-input-parameter/m-p/12142866#M1976143</link>
      <description>&lt;P&gt;Input Parameters for House bank and Account ID business want description.&lt;/P&gt;
  &lt;P&gt;Table - T012T&lt;/P&gt;
  &lt;P&gt;House bank - HBKID + Text1&lt;/P&gt;
  &lt;P&gt;Account ID + Text1&lt;/P&gt;
  &lt;P&gt;Suppose there is Account ID input parameter and at runtime for search help we want the account Id data plus description of it which means two fields in one input parameter&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2020 05:48:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/extracting-data-from-two-fields-in-a-input-parameter/m-p/12142866#M1976143</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-02-28T05:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting data from two fields in a input parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/extracting-data-from-two-fields-in-a-input-parameter/m-p/12142867#M1976144</link>
      <description>&lt;P&gt;Hi Nidhi,&lt;/P&gt;&lt;P&gt;If I have understood your question correctly. You would like to get F4 help for two fields 1) House bank (HBKID) and Account ID (HKTID). For both the fields you would like to have T012T-TEXT1 along with HBKID or HKTID.&lt;/P&gt;&lt;P&gt;If so follow the below steps for your requirement, ( I have shown for HBKID, follow the same approach for other filed too)&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;    SELECT HBKID,
           TEXT1,
      FROM T012T
      INTO TABLE @DATA(lt_houbk_f4).

    IF NOT lt_houbk_f4[] IS INITIAL.
          CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
            EXPORTING
              retfield        = 'HBKID'
              dynpprog        = sy-repid
              dynpnr          = '1000'
              dynprofield     = 'S_HBKID' ( Considering this Select option name )
              value_org       = 'S'
            TABLES
              value_tab       = lt_houbk_f4
              return_tab      = lt_return
            EXCEPTIONS
              parameter_error = 1
              no_values_found = 2
              OTHERS          = 3.
          IF lt_return[] IS NOT INITIAL.
            READ lt_return INTO DATA(ls_return) INDEX 1.
	    IF sy-subrc = 0.	
                s_auskt-low = ls_return-fieldval.
	    ENDIF.
         ENDIF.
   ENDIF.                            
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 28 Feb 2020 06:22:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/extracting-data-from-two-fields-in-a-input-parameter/m-p/12142867#M1976144</guid>
      <dc:creator>Velu</dc:creator>
      <dc:date>2020-02-28T06:22:32Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting data from two fields in a input parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/extracting-data-from-two-fields-in-a-input-parameter/m-p/12142868#M1976145</link>
      <description>&lt;P&gt;but what if the two fields are from two different tables?&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2020 06:25:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/extracting-data-from-two-fields-in-a-input-parameter/m-p/12142868#M1976145</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-02-28T06:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting data from two fields in a input parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/extracting-data-from-two-fields-in-a-input-parameter/m-p/12142869#M1976146</link>
      <description>&lt;P&gt;If you check Table T012T, the used search help for field &lt;STRONG&gt;H_T012K&lt;/STRONG&gt; for field HKTID with the possible input parameters BUKRS, HBKID and HKTID does this already for you giving also the TEXT1 as output.&lt;/P&gt;&lt;P&gt;So, in case you have created a Z-Report, you need to use the above search help to help choose the right account id.&lt;/P&gt;&lt;P&gt;1. As a PARAMETER:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PARAMETERS pa_acc TYPE hktid MATCHCODE OBJECT H_T012K.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;2. As a SELECT-OPTIONS:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TABLES t012t.
SELECT-OPTIONS so_acc FOR t012t-hktid.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;3. If you need the BUKRS and HBKID also automatically filled by the choice of the account:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TABLES t012t.
SELECT-OPTIONS so_buk for t012t-bukrs. " NO-EXTENSION NO INTERVALS "NO-DISPLAY. 
SELECT-OPTIONS so_bnk for t012t-hbkid. " NO-EXTENSION NO INTERVALS "NO-DISPLAY.
SELECT-OPTIONS so_acc for t012t-hktid. " NO-EXTENSION NO INTERVALS. 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;You can make the select-options for BUKRS and HBKID either non-visible (option NO-DISPLAY), or with reduced select-options (NO-EXTENSION, NO INTERVALS) or only readable if you dont want the user to mess around with invalid combinations of the three, see the following for coding:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;INITIALIZATION.
  LOOP AT SCREEN.
    IF screen-name CP 'SO_BNK*'
    OR screen-name CP 'SO_BUK*'
      screen-input = '0'.
      MODIFY SCREEN.
      EXIT.
    ENDIF.
  ENDLOOP. &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Search help H_T012K:&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1784520-search-help-bank-account.png" /&gt;&lt;/P&gt;&lt;P&gt;Let me know if this already solves your problem, of whether you have a different setup.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2020 06:45:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/extracting-data-from-two-fields-in-a-input-parameter/m-p/12142869#M1976146</guid>
      <dc:creator>michael_piesche</dc:creator>
      <dc:date>2020-02-28T06:45:20Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting data from two fields in a input parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/extracting-data-from-two-fields-in-a-input-parameter/m-p/12142870#M1976147</link>
      <description>&lt;P&gt;First, prepare an internal table with data from both tables. And the use the FM F4IF_INT_TABLE_VALUE_REQUEST for F4 help.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2020 06:48:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/extracting-data-from-two-fields-in-a-input-parameter/m-p/12142870#M1976147</guid>
      <dc:creator>Velu</dc:creator>
      <dc:date>2020-02-28T06:48:49Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting data from two fields in a input parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/extracting-data-from-two-fields-in-a-input-parameter/m-p/12142871#M1976148</link>
      <description>&lt;P&gt;What means "two fields in one input parameter"?&lt;/P&gt;&lt;P&gt;The key of table T012T is company, bank, account (and language of course), why do you ignore the company as the codes are company-dependent?&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2020 07:19:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/extracting-data-from-two-fields-in-a-input-parameter/m-p/12142871#M1976148</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-02-28T07:19:53Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting data from two fields in a input parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/extracting-data-from-two-fields-in-a-input-parameter/m-p/12142872#M1976149</link>
      <description>&lt;P&gt;Same answer as Michael, but saying it simply with code and without explanation. NB: if you prefer to do it in a complex way, use F4IF_INT_TABLE_VALUE_REQUEST.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PARAMETERS bukrs TYPE t012t-bukrs.
PARAMETERS hbkid TYPE t012t-hbkid.
PARAMETERS hktid TYPE t012t-hktid.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Nothing else.&lt;/P&gt;&lt;P&gt;Run it, press F4 no HKTID field, choose and the selected line will fill all input fields :&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1784521-t012t-search-help.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2020 07:23:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/extracting-data-from-two-fields-in-a-input-parameter/m-p/12142872#M1976149</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-02-28T07:23:23Z</dc:date>
    </item>
  </channel>
</rss>

