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

at selection-screen output.

HI!

As you will see below I have a checkbox p_cust and a second block with some selection criteria. In the selection screen only the p_cust must be displayed but when p_cust = 'X' then the second block must be displayed too.

I suppose that I have to do something with at selection screen output and loop at screen. Any idea?

_____________________________________________

SELECTION-SCREEN: BEGIN OF BLOCK mad WITH FRAME TITLE text-b01.

parameters: p_cust as checkbox.

SELECTION-SCREEN: END OF BLOCK mad.

SELECTION-SCREEN: BEGIN OF BLOCK cus WITH FRAME TITLE text-b01.

select-options : s_kunnr for kna1-kunnr..

parameters: p_kdkg5 like kna1-kdkg5 default 'Y1'.

SELECTION-SCREEN: END OF BLOCK cus.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    Posted on Jan 18, 2008 at 09:36 AM

    hi,

    modify the following:

    parameters: p_cust as checkbox USER-COMMAND uc01.

    select-options : s_kunnr for kna1-kunnr MODIF ID 001.

    parameters: p_kdkg5 like kna1-kdkg5 default 'Y1' MODIF ID 001.

    add the following:

    AT SELECTION-SCREEN OUTPUT.

    LOOP AT screen.

    IF screen-group1 = '001'.

    IF p_cust IS INITIAL.

    screen-active = '0'.

    ELSE.

    screen-active = '1'.

    ENDIF.

    MODIFY screen.

    ENDIF.

    ENDLOOP.

    hope this helps

    ec

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 18, 2008 at 09:34 AM

    Hi,

    Instead of checkbox you should use radio option, then only it will work as per your requirement.

    See below code :

    TABLES : bsis.

    SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

    PARAMETER : sp_sel radiobutton group rad USER-COMMAND radio DEFAULT 'X',

    sp_all RADIOBUTTON GROUP rad.

    SELECTION-SCREEN END OF BLOCK b1.

    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.

    SELECT-OPTIONS : so_bukrs FOR bsis-bukrs MODIF ID sp1.

    SELECT-OPTIONS : so_hkont FOR bsis-hkont MODIF ID sp2.

    SELECTION-SCREEN END OF BLOCK b2.

    AT SELECTION-SCREEN OUTPUT.

    LOOP AT SCREEN.

    IF sp_sel = 'X'.

    IF screen-group1 = 'SP2'.

    screen-input = '0'.

    screen-invisible = '0'.

    screen-required = '0'.

    MODIFY SCREEN.

    ENDIF.

    elseif sp_all = 'X'.

    IF screen-group1 = 'SP2'.

    screen-input = '0'.

    screen-invisible = '0'.

    screen-required = '0'.

    MODIFY SCREEN.

    ENDIF.

    endif.

    ENDLOOP.

    Thanks,

    Sri.

    Edited by: Sriram Ponna on Jan 18, 2008 3:05 PM

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 18, 2008 at 09:39 AM

    hi,

    loop at screen.

    if p_cust = 'X'.

    if screen-name = 'S_KUNNR'.

    screen-input = 0.

    elseif screen-name = 'p_kdkg5'.

    screen-input = 0.

    modify screen.

    endif.

    endif.

    endloop.

    Regards,

    Nagaraj

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 18, 2008 at 09:41 AM

    TABLES kna1.

    SELECTION-SCREEN: BEGIN OF BLOCK mad WITH FRAME.

    PARAMETERS: p_cust AS CHECKBOX USER-COMMAND rad.

    SELECTION-SCREEN: END OF BLOCK mad.

    SELECTION-SCREEN: BEGIN OF BLOCK cus WITH FRAME TITLE text_1.

    SELECT-OPTIONS : s_kunnr FOR kna1-kunnr MODIF ID run.

    PARAMETERS: p_kdkg5 LIKE kna1-kdkg5 DEFAULT 'Y1' MODIF ID run.

    SELECTION-SCREEN: END OF BLOCK cus.

    &----


    *& At Selection Screen output *

    &----


    AT SELECTION-SCREEN OUTPUT.

    IF p_cust EQ 'X'.

    LOOP AT SCREEN.

    IF screen-group1 EQ 'DIP'.

    screen-active = 0.

    MODIFY SCREEN.

    ENDIF.

    ENDLOOP.

    ELSE.

    LOOP AT SCREEN.

    IF screen-group1 EQ 'RUN'.

    screen-active = 0.

    MODIFY SCREEN.

    ENDIF.

    ENDLOOP.

    ENDIF.

    Regards,

    Sai Ramesh

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 18, 2008 at 09:41 AM

    Hi antonis,

    i worked on same scenario...try this code.

    include this code,

    selection-screen begin of block b2 with frame title text-t02.

    parameter: mtr as checkbox modif id g3 user-command chk1,

    p_matnr type eban-matnr modif id g1,

    sloc as checkbox modif id g3 user-command chk2,

    str_loc type eban-lgort modif id g4.

    selection-screen end of block b2.

    at selection-screen output.

    if mtr = 'X'.

    loop at screen.

    if screen-group1 = 'G1'.

    screen-input = 1 .

    endif.

    modify screen.

    endloop.

    endif.

    if sloc = 'X'.

    loop at screen.

    if screen-group1 = 'G4'.

    screen-input = 1 .

    endif.

    modify screen.

    endloop.

    endif.

    plz reward if helpful.

    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.