Skip to Content
author's profile photo Former Member
Former Member

Pushbutton requirements

Hi,

I have two more requirements:-

a) When I click on my pushbutton-push, I am able to change its description to pull .Now,when I click on pull , I want the description to change back to push again.

b) I have a text-element in my screen which contains 'abc' . When I click on pushbutton push , its description should change to 'xyz'.

Please could you help me with these requirements .

Regards,

Sushanth H.S.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 03, 2007 at 06:21 AM

    when sy-ucomm.

    when 'push'.

    if var = 1.

    text-dip = push.

    else.

    text-dip = pull.

    endif.

    when ''.

    endcase.

    clear sy-ucomm.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 03, 2007 at 07:53 AM

    Hi Karthikeyan,

    Please could you be a little more clear about text-dip and var .

    Regards,

    Sushanth H.S.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Sushant,

      Check this sample code

      REPORT test.
      TABLES sscrfields.
      
      DATA flag.
      
      SELECTION-SCREEN:
          BEGIN OF LINE,
            PUSHBUTTON 2(10) but1 USER-COMMAND cli1,
          END OF LINE.
      
      AT SELECTION-SCREEN OUTPUT.
      
        IF but1 EQ 'PULL'.
          but1 = 'PUSH'.
        ELSEIF but1 = 'PUSH'.
          but1 = 'PULL'.
        ELSE.
          but1 = 'PUSH'.
        ENDIF.
      
      START-OF-SELECTION.

  • author's profile photo Former Member
    Former Member
    Posted on Dec 03, 2007 at 08:04 AM

    Hi,

    write the code in ur pai of ur screen.

    case sy-ucomm or ok_code .

    when 'abc'

    des-id = 'abc'.

    when 'xyz'.

    des-id = 'xyz'.

    endcase.

    where abc and xyz r function codes for the push buttons

    plzz reward points if is useful.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 03, 2007 at 08:14 AM

    if you use push button in selection screen,try below code

    DATA: flag TYPE char1 VALUE 'A'.
    SELECTION-SCREEN PUSHBUTTON 2(15) pb USER-COMMAND ret VISIBLE
    LENGTH 15.
    SELECTION-SCREEN COMMENT 42(28) g_v_cmt.
    AT SELECTION-SCREEN OUTPUT.
      CASE flag.
        WHEN 'A'.
          MOVE 'ABC' TO pb.
          MOVE 'ABC' TO g_v_cmt.
          flag = 'X'.
        WHEN 'X'.
          MOVE 'XYZ' TO pb.
          MOVE 'XYZ' TO g_v_cmt.
          flag = 'A'.
      ENDCASE.
    
    START-OF-SELECTION.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.