Skip to Content
avatar image
Former Member

loop AT SCREEN ERROR

TABLES: LIKP,LIPS,VTTK.

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-T01.

SELECT-OPTIONS: S_VKORG FOR LIKP-VKORG , "sales org

S_VTWEG FOR LIPS-VTWEG, "dis channel

S_SPART FOR LIPS-SPART, "division

S_ERDAT FOR VTTK-ERDAT, "creation date

S_RERDAT FOR VTTK-ERDAT.

SELECTION-SCREEN SKIP 1 .

PARAMETER: P_INB RADIOBUTTON GROUP RD1 USER-COMMAND UC1,

P_OUT RADIOBUTTON GROUP RD1 DEFAULT 'X' .

SELECTION-SCREEN END OF BLOCK B1.

AT SELECTION-SCREEN OUTPUT.

IF P_OUT = 'X'.

LOOP AT SCREEN.

IF SCREEN-NAME = 's_rerdat'.

SCREEN-INPUT = 0.

SCREEN-INPUT = 0.

SCREEN-INPUT = 1.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

ELSEIF P_INB = 'X'.

LOOP AT SCREEN.

IF SCREEN-NAME = 's_erdat'.

  • SSCRFIELDS-UCOMM = .

SCREEN-INPUT = 0.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

ENDIF.

THE ABOVE CODING IS NOT WORKING PROPERLY.

I WANT TO DIS ENABLE.

REGARDS

PRIYA

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

6 Answers

  • avatar image
    Former Member
    May 29, 2006 at 05:09 AM

    Priya,

    Always give the fields names in uppercase. S_ERDAT.

    Regards,

    Ravi

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 29, 2006 at 05:19 AM

    Change to

    if screen-name = 'S_RERDAT'.

    Thanks,

    Susmitha

    Add comment
    10|10000 characters needed characters exceeded

  • May 29, 2006 at 05:29 AM

    Try this .

    IF P_OUT = 'X'.

    LOOP AT SCREEN.

    IF SCREEN-NAME = 'S_RERDAT'.

    SCREEN-INPUT = 0.

    ENDIF.

    MODIFY SCREEN.

    ENDLOOP.

    ELSEIF P_INB = 'X'.

    LOOP AT SCREEN.

    IF SCREEN-NAME = 'S_ERDAT'.

    SCREEN-INPUT = 0.

    ENDIF.

    MODIFY SCREEN.

    ENDLOOP.

    ENDIF.

    Regards,

    Sriranjani .

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 29, 2006 at 05:35 AM

    HI

    GOOD

    CHECK THE FOLLOWING CODE OF THE LOOP AT SCREEN AND CHECK WITH YOUR CODE

    REPORT demo_dynpro_modify_simple.

    DATA: ok_code TYPE sy-ucomm,

    save_ok TYPE sy-ucomm.

    DATA flag(1) TYPE c.

    CALL SCREEN 100.

    MODULE status_0100 OUTPUT.

    SET PF-STATUS 'SCREEN_100'.

    LOOP AT SCREEN.

    IF screen-group1 = 'MOD'.

    IF flag = ' '.

    screen-input = '0'.

    ELSEIF flag = 'X'.

    screen-input = '1'.

    ENDIF.

    MODIFY SCREEN.

    ENDIF.

    ENDLOOP.

    ENDMODULE.

    MODULE cancel.

    LEAVE PROGRAM.

    ENDMODULE.

    MODULE user_command_0100 INPUT.

    save_ok = ok_code.

    CLEAR ok_code.

    CASE save_ok.

    WHEN 'TOGGLE'.

    IF flag = ' '.

    flag = 'X'.

    ELSEIF flag = 'X'.

    flag = ' '.

    ENDIF.

    ENDCASE.

    ENDMODULE.

    THANKS

    MRUTYUN

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 29, 2006 at 06:13 AM

    Hi priya,

    1. Two minor mistakes.

    2. a) use CAPITAL S_RERDAT

    b) In select-option use CS (instead of =)

    IF SCREEN-NAME CS 'S_RERDAT'.

    (this will include the high,low, label field also)

    3. I just tried your program, with modifications,

    and it works fantastic now.

    (u can also use further SCREEN-INVISIBLE = 1 to make the field invisible)

    4. Just copy paste

    (important code has been marked in BOLD)

    5.

    report abc.

    TABLES: LIKP,LIPS,VTTK.

    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-T01.

    SELECT-OPTIONS: S_VKORG FOR LIKP-VKORG , "sales org

    S_VTWEG FOR LIPS-VTWEG, "dis channel

    S_SPART FOR LIPS-SPART, "division

    S_ERDAT FOR VTTK-ERDAT, "creation date

    S_RERDAT FOR VTTK-ERDAT.

    SELECTION-SCREEN SKIP 1 .

    PARAMETER: P_INB RADIOBUTTON GROUP RD1 USER-COMMAND UC1,

    P_OUT RADIOBUTTON GROUP RD1 DEFAULT 'X' .

    SELECTION-SCREEN END OF BLOCK B1.

    *----


    AT SELECTION-SCREEN OUTPUT.

    IF P_OUT = 'X'.

    LOOP AT SCREEN.

    <b> IF SCREEN-NAME CS 'S_RERDAT'.</b>

    SCREEN-INPUT = 0.

    • SCREEN-INVISIBLE = 1.

    ENDIF.

    MODIFY SCREEN.

    ENDLOOP.

    ELSEIF P_INB = 'X'.

    LOOP AT SCREEN.

    <b> IF SCREEN-NAME CS 'S_ERDAT'.</b>

    SCREEN-INPUT = 0.

    • SCREEN-INVISIBLE = 1.

    ENDIF.

    MODIFY SCREEN.

    ENDLOOP.

    ENDIF.

    regards,

    amit m.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 29, 2006 at 06:15 AM

    it's very simple

    SCREEN-NAME = 's_rerdat-low' and s_rerdat-high .

    it will automatically dis enable.

    thanks for ur helps.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi again,

      1. Yes u are right,

      we can also directly use

      field-low , field-high.

      2. But in case we want to make the

      fields invisible,

      we also need to make invisible

      a) the label which appears on the left

      b) low field

      c) high field

      d) the SQuare button which appears on the right

      (for multi-selection)

      3. Then its better to use

      <b> IF SCREEN-NAME CS 'S_RERDAT'.</b>

      (this will take care of all the four points above.

      regards,

      amit m.