Skip to Content

How to create a radio button in SAP Query SQ01/SQ02.

Hi all,

I have created on Query for table RESB.

I want to add one radio button in selection screen of the query called "Pending only".

What i want to do based on this is, i will filter data based on this.

If i select this radio button then system should remove line item with

RESB-KZEAR and RESB-WLOEK = blank.

and if i don't select radio button then it will show all lines.

I don't know how to create radio button at all.

Please help me.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Jul 05, 2013 at 02:31 PM

    Hi Jigar,

    Your requirement is not radio button.

    It is a checkbox.

    This can be done in Infoset itself (SQ02).

    Select the pushbutton labeled Extras. Select the tab labeled Selections, then click on Create icon. On Create Selection popup, enter the name of the field say ' test' and select radiobutton Parameter. On next popup, enter description and selection text. For the format option, enter type C and length 1. For Extras enter "AS CHECKBOX" .
    See this image: Now the code you need to write inthe 'Record Processing' section of the Code tab.

    Save the code.

    Generate Infoset.

    Run transacction SQ01.

    Execute with the query made on this infoset.

    You will find the checkbox in the selection-screen.

    Check this and execute for desired result.

    Jogeswara Rao K



    Capture.JPG (67.5 kB)
    1.JPG (29.7 kB)
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 05, 2013 at 01:06 PM

    hello,

    Try this in SQ02.

    You have to use at selection-screen output event for this purpose here is a sample code try it and you will get the logic.


    PARAMETERS :
    p_flight RADIOBUTTON GROUP r1 ,
    p_book RADIOBUTTON GROUP r1 .

    PARAMETERS :
    w_temp1 RADIOBUTTON GROUP r2 MODIF ID sc1 ,
    w_temp2 RADIOBUTTON GROUP r2 MODIF ID sc1 .

    SELECT-OPTIONS s_carrid FOR sflight-carrid MODIF ID sc1 .
    " Airline Code

    PARAMETERS :
    w_temp01 RADIOBUTTON GROUP r3 MODIF ID sc2 ,
    w_temp02 RADIOBUTTON GROUP r3 MODIF ID sc2 .

    SELECT-OPTIONS s_bookid FOR sbook-bookid MODIF ID sc2 .
    " Airline Code

    *"--------------------------------------------------------------------*
    * AT SELECTION-SCREEN OUTPUT *
    *"--------------------------------------------------------------------*
    AT SELECTION-SCREEN OUTPUT .


    IF p_flight = 'X' .

    fl_flag = 1 .
    LOOP AT SCREEN.
    IF screen-group1 = 'SC2'.
    screen-active = 0 .
    MODIFY SCREEN .
    ENDIF. " IF SCREEN-GROUP1 = 'SC2'
    ENDLOOP. " LOOP AT SCREEN

    ELSEIF p_book = 'X' .

    fl_flag = 2 .
    LOOP AT SCREEN.
    IF screen-group1 = 'SC1'.
    screen-active = 0 .
    MODIFY SCREEN .
    ENDIF. " IF SCREEN-GROUP1 = 'SC1'
    ENDLOOP. " LOOP AT SCREEN
    ENDIF . " IF P_FLIGHT = 'X' .

    Here in this case, There are 2 radio buttons and 2 select options. On clicking the first radio button one of the select option is hidden. If you you just have a single radio button then you can avoid using at selection-screen output and just write your code start-of-selection.

    best regards,

    swanand

    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.