Wednesday, December 29, 2010
REPORT ztest_program .
DATA: it_data TYPE TABLE OF t001.
DATA:check    TYPE char3.
DATA:sy_index TYPE char2.
DEFINE checkbox.
  parameters:&1 as checkbox.
END-OF-DEFINITION.
checkbox:c01,c02,c03,c04,c05,c06,c07,c08,c09,c10,
c11,c12,c13,c14,c15,c16,c17,c18,c19,c20,
c21,c22,c23,c24,c25,c26,c27,c28,c29,c30,
c31,c32,c33,c34,c35,c36,c37,c38,c39,c40.

AT SELECTION-SCREEN OUTPUT.
  DESCRIBE TABLE it_data LINES sy-tfill.
  sy-tfill = 39. "This will be changed based on the itab records. I just hardcoded the value
  sy_index = 1.
  LOOP AT SCREEN.
    CONCATENATE 'C' sy_index INTO check.
    IF screen-name = check.
      IF sy_index GT sy-tfill.
        screen-active = '0'.
        MODIFY SCREEN.
        sy_index = sy_index + 1.
        CONTINUE.
      ENDIF.
      sy_index = sy_index + 1.
    ENDIF.
  ENDLOOP.

0 comments:

Post a Comment

Your useful comments, suggestions are appreciated.Your comments are moderated.

Followers

Contact Form

Name

Email *

Message *

Web Dynpro ABAP Book

An SAP Consultant

Follow US


Want to Contribute ?

If you are interested in writing about the new stuff you learn everyday while working, please write to the.sap.consultants@gmail.com.

Click on Contribution for more details.