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

graying the input field

hi,

-


selection-screen begin of block a with frame title text-001.

selection-screen skip.

parameters:z like vbak-vbeln,l like oigs-shnumber.

selection-screen skip.

selection-screen begin of block b with frame title text-002.

selection-screen skip.

parameters:sales radiobutton group g default 'X',

trans radiobutton group g.

selection-screen end of block b.

selection-screen skip.

selection-screen pushbutton 10(12) pu_text user-command CANC.

selection-screen pushbutton 30(12) qu_text user-command STAT.

selection-screen end of block a.

Initialization.

pu_text = 'Cancel Order'.

qu_text = 'Status'.

-


please see the code and send me code for

when i selcect the radiobutton of sales the corresponding field that is first field only present and the second input field have to be grayed and viceversa.

it is urgent..............

thanks in advance.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jul 03, 2007 at 11:36 AM

    selection-screen begin of block a with frame title text-001.

    selection-screen skip.

    parameters:z like vbak-vbeln,l like oigs-shnumber.

    selection-screen skip.

    selection-screen begin of block b with frame title text-002.

    selection-screen skip.

    parameters:sales radiobutton group g default 'X' USER-COMMAND 'UCOM',

    trans radiobutton group g.

    selection-screen end of block b.

    selection-screen skip.

    selection-screen pushbutton 10(12) pu_text user-command CANC.

    selection-screen pushbutton 30(12) qu_text user-command STAT.

    selection-screen end of block a.

    Initialization.

    pu_text = 'Cancel Order'.

    qu_text = 'Status'.

    AT SELECTION-SCREEN OUTPUT.

    LOOP AT SCRREN.

    IF sales EQ 'X'.

    IF SCREEN-NAME = 'FIRST FIELDNAME'.

    SCREEN-INPUT = 1

    MODIFY SCREEN.

    ELSEIF SCREEN-NAME = 'SECOND FIELDNAME'.

    SCREEN-INPUT = 0.

    ENDIF.

    ENDLOOP.

    Any further help please revert.

    Regards,

    A.Singh

    MODIFY SCREEN.

    -


    please see the code and send me code for

    when i selcect the radiobutton of sales the corresponding field that is first field only present and the second input field have to be grayed and viceversa.

    it is urgent..............

    thanks in advance.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 03, 2007 at 11:32 AM

    Hi Sudarashan,

    write one event like,

    at selection-screen output.

    loop at screen.

    if sales = 'X' and name = 'Z' (parameter).

    screen-INPUT = '0'.

    endif.

    modify screen.

    endloop.

    Reward if useful!

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 03, 2007 at 11:31 AM

    hi

    <b>copy paste the code</b>

    TABLES: eban,

    SSCRFIELDS.

    SELECTION-SCREEN BEGIN OF SCREEN 100 TITLE title.

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

    PARAMETER:rad1 RADIOBUTTON GROUP rad USER-COMMAND frad1 DEFAULT 'X',

    rad2 RADIOBUTTON GROUP rad .

    SELECTION-SCREEN END OF BLOCK b1.

    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.

    SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-t03.

    SELECT-OPTIONS: matnr1 FOR eban-matnr MODIF ID g2.

    SELECTION-SCREEN END OF BLOCK b3.

    SELECTION-SCREEN PUSHBUTTON /20(10) name USER-COMMAND UCOM.

    SELECTION-SCREEN END OF SCREEN 100.

    name = 'FETCH'.

    title = 'Test Report'.

    CALL SELECTION-SCREEN '100'.

    TYPE-POOLS slis.

    • declaration of internal tables and work areas to be used

    DATA: BEGIN OF it_pr OCCURS 0,

    banfn TYPE eban-banfn,

    bnfpo TYPE eban-bnfpo,

    loekz TYPE eban-loekz,

    statu TYPE eban-statu,

    ekgrp TYPE eban-ekgrp,

    matnr TYPE eban-matnr,

    werks TYPE eban-werks,

    lgort TYPE eban-lgort,

    preis TYPE eban-preis,

    peinh TYPE eban-peinh,

    END OF it_pr.

    DATA: BEGIN OF it_mat OCCURS 0,

    matnr TYPE eban-matnr,

    END OF it_mat.

    *DATA:BEGIN OF ITAB1 OCCURS 0,

    DATA: l_answer.

    DATA: it_fieldcat TYPE slis_t_fieldcat_alv,

    wa_fieldcat LIKE LINE OF it_fieldcat,

    it_event TYPE slis_t_event,

    wa_event TYPE slis_alv_event.

    • declaration of variables to be used

    DATA: r_ucomm TYPE sy-ucomm,

    mat_no TYPE eban-matnr,

    len TYPE i VALUE 1,

    count TYPE i VALUE IS INITIAL,

    iflag TYPE i VALUE IS INITIAL,

    iflag1 TYPE i VALUE 0.

    DATA :pr_id TYPE sy-repid,

    rt_extab TYPE slis_t_extab.

    INITIALIZATION.

    AT SELECTION-SCREEN OUTPUT.

    IF rad1 = 'X'.

    LOOP AT SCREEN.

    IF screen-group1 = 'G1' OR screen-group1 = 'G4'.

    screen-active = '1'.

    screen-input = 0.

    ELSEIF screen-group1 = 'G2'.

    screen-active = '0'.

    ENDIF.

    MODIFY SCREEN.

    ENDLOOP.

    ELSEIF rad2 = 'X'.

    LOOP AT SCREEN.

    IF screen-group1 = 'G1' OR screen-group1 = 'G4' OR screen-group1 = 'G3' OR screen-group1 = 'G5'.

    screen-active = '0'.

    ELSEIF screen-group1 = 'G2'.

    screen-active = '1'.

    ENDIF.

    MODIFY SCREEN.

    ENDLOOP.

    ENDIF.

    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.

    clear sy-ucomm.

    • iflag = 1.

    • endif.

    <b> it will solve ur purpose</b>

    regards

    ravish

    <b>plz dont forget to reward points if helpful</b>

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 03, 2007 at 11:31 AM

    Hi

    you can loop at screen and when the field comes make the input field as 0.

    ex :

    • when the radio button is selected

    loop at screen.

    *if first radio button is selected

    if screen-name = z

    screen-input = 0.

    endif.

    if screen-name = l

    screen-input = 1.

    endif.

    *if second radio button is selected

    if screen-name = l

    screen-input = 0.

    endif.

    if screen-name = z

    screen-input = 1.

    endif.

    endloop.

    hope this is helpful

    regards,

    Prasanth

    • reward all helpful answers

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 03, 2007 at 11:31 AM

    Hi,

    See the Following code

      LOOP AT SCREEN.
        IF screen-group1 = 'g' AND sales= 'X'.
          screen-output = 0.
          screen-active = 0.
          screen-input = 0.
        ELSEIF screen-group1 = 'g' AND sales= ' '.
          screen-output = 0.
          screen-active = 0.
          screen-input = 0.
        ENDIF.
        MODIFY SCREEN.
      ENDLOOP.
    
    

    Regards,

    Nandha

    Reward if it helps

    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.