<?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: How to input text from pushbutton into input field in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-input-text-from-pushbutton-into-input-field/m-p/12256270#M1986692</link>
    <description>&lt;P&gt;Ok, thanks a lot now I understand how it works and how to do but the last thing I want to know Is how "in real time" put those values into input field because now I am clicking buttons and when I click execute button I see result. &lt;/P&gt;</description>
    <pubDate>Fri, 04 Dec 2020 14:30:21 GMT</pubDate>
    <dc:creator>tkasperski1</dc:creator>
    <dc:date>2020-12-04T14:30:21Z</dc:date>
    <item>
      <title>How to input text from pushbutton into input field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-input-text-from-pushbutton-into-input-field/m-p/12256264#M1986686</link>
      <description>&lt;P&gt;For example, I have 3 pushbuttons and one input field.&lt;/P&gt;
  &lt;P&gt;Pushbuttons, 1,2,+&lt;BR /&gt;&lt;BR /&gt;And now I want to click 1 then + then 2.&lt;/P&gt;
  &lt;P&gt;After that I want to have on my input text: "1+2".&lt;/P&gt;
  &lt;P&gt;How Can I do that?&lt;/P&gt;</description>
      <pubDate>Fri, 04 Dec 2020 13:19:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-input-text-from-pushbutton-into-input-field/m-p/12256264#M1986686</guid>
      <dc:creator>tkasperski1</dc:creator>
      <dc:date>2020-12-04T13:19:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to input text from pushbutton into input field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-input-text-from-pushbutton-into-input-field/m-p/12256265#M1986687</link>
      <description>&lt;P&gt;Hello  &lt;SPAN class="mention-scrubbed"&gt;tkasperski&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;Something like this?&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;AT USER-COMMAND.
  CASE sy-ucomm.
    WHEN 'BTN_1'.
      gv_expression = |{ gv_expression }1|.
    WHEN 'BTN_2'.
      gv_expression = |{ gv_expression }2|.
    WHEN 'BTN_+'.
      gv_expression = |{ gv_expression }+|.
    WHEN 'BTN_CLR'.
      CLEAR gv_expression.
  ENDCASE.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;You could also make it like this.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;AT USER-COMMAND.
  CASE sy-ucomm.
    WHEN 'BTN_CLR'.
      CLEAR gv_expression.
    WHEN OTHERS.
      gv_expression = |{ gv_expression }{ sy-ucomm+4(1) }|.
  ENDCASE.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Mateusz&lt;/P&gt;</description>
      <pubDate>Fri, 04 Dec 2020 13:29:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-input-text-from-pushbutton-into-input-field/m-p/12256265#M1986687</guid>
      <dc:creator>MateuszAdamus</dc:creator>
      <dc:date>2020-12-04T13:29:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to input text from pushbutton into input field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-input-text-from-pushbutton-into-input-field/m-p/12256266#M1986688</link>
      <description>&lt;P&gt;Hi, thanks for your answer. I don't understand how to use it. I mean to use the user selection screen. Add 3 buttons and input on the user selection screen for example&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: input TYPE i.

SELECTION-SCREEN:&lt;BR /&gt; BEGIN OF SCREEN 500 AS WINDOW TITLE title,&lt;BR /&gt; PUSHBUTTON 2(10) text-001 USER-COMMAND cli1,&lt;BR /&gt; PUSHBUTTON 12(30) text-002 USER-COMMAND cli2,
 PUSHBUTTON 12(30) text-003 USER-COMMAND cli3&lt;BR /&gt;  VISIBLE LENGTH 10,&lt;BR /&gt; END OF SCREEN 500.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;For example &lt;BR /&gt;text-001 = 1&lt;BR /&gt;text-002 = 2&lt;BR /&gt;text-003 = +&lt;BR /&gt;&lt;BR /&gt;I click cli1(button) then cli3(button) then cli2(button) and as a result I have 1 + 2 on my input.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Dec 2020 13:52:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-input-text-from-pushbutton-into-input-field/m-p/12256266#M1986688</guid>
      <dc:creator>tkasperski1</dc:creator>
      <dc:date>2020-12-04T13:52:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to input text from pushbutton into input field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-input-text-from-pushbutton-into-input-field/m-p/12256267#M1986689</link>
      <description>&lt;P&gt;You need to use AT SELECTION-SCREEN event in this case.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA:
  gv_expression TYPE string.


" create push buttons
SELECTION-SCREEN PUSHBUTTON /2(40) text-001 USER-COMMAND btn_1,
SELECTION-SCREEN PUSHBUTTON /2(40) text-002 USER-COMMAND btn_2.
SELECTION-SCREEN PUSHBUTTON /2(40) text-003 USER-COMMAND btn_+.
SELECTION-SCREEN PUSHBUTTON /2(40) text-004 USER-COMMAND btn_clr.

" handle a button being pushed
AT SELECTION-SCREEN.
  CASE sscrfields.
    WHEN 'BTN_CLR'.
      CLEAR gv_expression. " clear the expression
    WHEN OTHERS.
      gv_expression = |{ gv_expression } { sscrfields+4(1) }|. " add next character to the expression
  ENDCASE.

  WRITE gv_expression.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Not tested in the system, though. Might have some typos.&lt;/P&gt;&lt;BR /&gt;Kind regards,&lt;BR /&gt;Mateusz</description>
      <pubDate>Fri, 04 Dec 2020 14:03:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-input-text-from-pushbutton-into-input-field/m-p/12256267#M1986689</guid>
      <dc:creator>MateuszAdamus</dc:creator>
      <dc:date>2020-12-04T14:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to input text from pushbutton into input field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-input-text-from-pushbutton-into-input-field/m-p/12256268#M1986690</link>
      <description>&lt;P&gt;Ok, now I understand but how to put values from text-001 etc. into input field?&lt;/P&gt;</description>
      <pubDate>Fri, 04 Dec 2020 14:11:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-input-text-from-pushbutton-into-input-field/m-p/12256268#M1986690</guid>
      <dc:creator>tkasperski1</dc:creator>
      <dc:date>2020-12-04T14:11:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to input text from pushbutton into input field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-input-text-from-pushbutton-into-input-field/m-p/12256269#M1986691</link>
      <description>&lt;P&gt;If you want to do it that way.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  CASE sscrfields.
    WHEN 'BTN_CLR'.
      CLEAR gv_expression. " clear the expression
    WHEN 'BTN_+'.
      gv_expression = |{ gv_expression } { text-003 }|. 
    WHEN 'BTN_1'.
      gv_expression = |{ gv_expression } { text-001 }|. 
    WHEN 'BTN_2'.
      gv_expression = |{ gv_expression } { text-002 }|. 
  ENDCASE.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;Kind regards,&lt;BR /&gt;Mateusz</description>
      <pubDate>Fri, 04 Dec 2020 14:17:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-input-text-from-pushbutton-into-input-field/m-p/12256269#M1986691</guid>
      <dc:creator>MateuszAdamus</dc:creator>
      <dc:date>2020-12-04T14:17:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to input text from pushbutton into input field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-input-text-from-pushbutton-into-input-field/m-p/12256270#M1986692</link>
      <description>&lt;P&gt;Ok, thanks a lot now I understand how it works and how to do but the last thing I want to know Is how "in real time" put those values into input field because now I am clicking buttons and when I click execute button I see result. &lt;/P&gt;</description>
      <pubDate>Fri, 04 Dec 2020 14:30:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-input-text-from-pushbutton-into-input-field/m-p/12256270#M1986692</guid>
      <dc:creator>tkasperski1</dc:creator>
      <dc:date>2020-12-04T14:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to input text from pushbutton into input field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-input-text-from-pushbutton-into-input-field/m-p/12256271#M1986693</link>
      <description>&lt;P&gt;Add the input field to the screen.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PARAMETER: p_input TYPE char20.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;After the expression is updated, update the field.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;p_input = gv_expression.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;You could also concatenate the expression to the input field directly.&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;Mateusz</description>
      <pubDate>Fri, 04 Dec 2020 14:32:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-input-text-from-pushbutton-into-input-field/m-p/12256271#M1986693</guid>
      <dc:creator>MateuszAdamus</dc:creator>
      <dc:date>2020-12-04T14:32:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to input text from pushbutton into input field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-input-text-from-pushbutton-into-input-field/m-p/12256272#M1986694</link>
      <description>&lt;P&gt;Hello &lt;A href="https://answers.sap.com/users/1134195/tkasperski.html"&gt;Tomasz Kasperski&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Make sure to upvote and accept &lt;A href="https://answers.sap.com/users/233743/mateuszadamus.html"&gt;Mateusz Adamus&lt;/A&gt; answer as a token of appreciation. He's not only answer, he is providing a crash ABAP course here too ;))&lt;/P&gt;&lt;P&gt;BR, Dominik Tylczynski&lt;/P&gt;</description>
      <pubDate>Fri, 04 Dec 2020 15:47:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-input-text-from-pushbutton-into-input-field/m-p/12256272#M1986694</guid>
      <dc:creator>Dominik_Tylczynski</dc:creator>
      <dc:date>2020-12-04T15:47:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to input text from pushbutton into input field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-input-text-from-pushbutton-into-input-field/m-p/12256273#M1986695</link>
      <description>&lt;P&gt;Hello, &lt;SPAN class="mention-scrubbed"&gt;3a9e4ce873a94034b33dc62b0ce600ee&lt;/SPAN&gt;I upvoted, accepted, and liked every comment. Thank you Mateusz Adamus for outstanding help and patience &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/P&gt;</description>
      <pubDate>Fri, 04 Dec 2020 17:21:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-input-text-from-pushbutton-into-input-field/m-p/12256273#M1986695</guid>
      <dc:creator>tkasperski1</dc:creator>
      <dc:date>2020-12-04T17:21:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to input text from pushbutton into input field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-input-text-from-pushbutton-into-input-field/m-p/12256274#M1986696</link>
      <description>&lt;P&gt;No worries. Cheers.&lt;/P&gt;Kind regards,&lt;BR /&gt;Mateusz</description>
      <pubDate>Fri, 04 Dec 2020 17:25:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-input-text-from-pushbutton-into-input-field/m-p/12256274#M1986696</guid>
      <dc:creator>MateuszAdamus</dc:creator>
      <dc:date>2020-12-04T17:25:02Z</dc:date>
    </item>
  </channel>
</rss>

