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

Module Pool help req??

hi

Can we make a redio button in the Module pool progm as a default while in the screen painter?

plz tell me,i don't know how to do it?

regds

vipin

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2007 at 05:49 AM

    Hi,

    Use control bar in the left side of the painter window and after that give the fucntion code for the radiobutton.

    While creating the screen,u give the function code for the radio button ...

    In the PAI of that screen.

    If sy-ucomm = 'Fcode of that radio bbutton'.

    loop at screen.

    if screen-name = 'xyz'.(give all the screen names which u want to activate)

    screen-active = '1'.

    modify screen.

    endif.

    endloop.

    endif.

    In the Screen Painter, you can assign a function code (up to 20 characters long) to checkboxes and radio buttons.

    Checkboxes and radio buttons without a function code behave like normal input/output fields. Clicking the object changes the contents of the field, but does not trigger the PAI event. (Clicking a pushbutton, on the other hand, always triggers the PAI event, even if it has an empty function code.)

    When a function code is assigned to a checkbox or radio button, clicking it not only changes the field contents, but also triggers the PAI event and places the function code in the OK CODE field. For further information, refer to Evaluating Function Codes.

    While it is possible to assign an individual function code to each checkbox, you can only assign one function code to all of the radio buttons in a group. When you assign a function code to a radio button in the Screen Painter, the system automatically applies the same function code to all of the other radio buttons in the group.

    You can use checkboxes and radio buttons with function codes as follows:

    · For processing parts of screens (context-sensitive processing). For example, only when a radio button or checkbox is selected is particular data read and placed in the corresponding input/output fields.

    · You can fill fields with patterns depending on checkboxes or radio buttons. A typical example would be formatting settings for letters. The input fields can all be processed separately, but it is possible to fill all input fields simultaneously and consistently by choosing a pattern.

    · You can control dynamic screen modifications directly using checkboxes or radio buttons. For example, you can make sure that an input/output field cannot accept input until the user selects a radio button.

    As when you create pushbuttons, you should ensure when you assign function codes to checkboxes and radio buttons that they do not coincide with function codes from the GUI status.

    PROGRAM demo_dynpro_check_radio.

    DATA: radio1(1) TYPE c, radio2(1) TYPE c, radio3(1) TYPE c,

    field1(10) TYPE c, field2(10) TYPE c, field3(10) TYPE c,

    box TYPE c.

    DATA: ok_code TYPE sy-ucomm,

    save_ok TYPE sy-ucomm.

    CALL SCREEN 100.

    MODULE user_command_0100 INPUT.

    save_ok = ok_code.

    CLEAR ok_code.

    CASE save_ok.

    WHEN 'RADIO'.

    IF radio1 = 'X'.

    field1 = 'Selected!'.

    CLEAR: field2, field3.

    ELSEIF radio2 = 'X'.

    field2 = 'Selected!'.

    CLEAR: field1, field3.

    ELSEIF radio3 = 'X'.

    field3 = 'Selected!'.

    CLEAR: field1, field2.

    ENDIF.

    WHEN 'CANCEL'.

    LEAVE PROGRAM.

    ENDCASE.

    ENDMODULE.

    Thanks,

    Sakthi C

    Message was edited by:

    Sakthi Saravanan C

    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.