Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

table control in module pool program

Former Member
0 Kudos

i am doing table control in modulepool.my problem is in output i should get data in output table in disabled mode and after that i should be able to enable the row which i select ,the remaining rows should be disabled.i want enable the row only which i have selected.code required if possible.

8 REPLIES 8

naveen_inuganti2
Active Contributor
0 Kudos

Hi..

In the PBO module of that screen you need to write code to disable the table control internal table.

by using loop at screen. input = 0. endloop.

And to enable the perticuler row for user selction..

1. User need to select the record of TC table with selection indicator or check box, which should be one of the tabel control table field.

2. There must be a push button in the screen to activate the row disable to enable.

And then you can write code in PAI event of the screen for the record by checking the codition if row is selected...

Thanks,

Naveen.I

0 Kudos

hai,

it is possible to disable or enable the column,but it cant be enabled or disabled row.

shan.

0 Kudos

Hello sir.

i have a doubt can u clarify me.i have a table control and in one column i have checkboxes.If i select a checkbox that particular line need to be selected.can i know how can i do it.

Former Member
0 Kudos

hai,

loop at itab.

module enable_disable.

endloop.

if u write module within the loop only it will effected in t.control.

Former Member
0 Kudos

Hai,

Kindly remove the check option from the input field of program tab under table control columns attribute but output field option should be in check (tic) mode. So it become disable mode, when you execute. Capture the lead selction value of the table control rows and enable the particular rows using screen-input = 1 under loop at screen coding.

Regards,

Harish

Former Member
0 Kudos

Hi Ramakrishna,

Try this way..

PROCESS BEFORE OUTPUT.

  LOOP AT   <itab>
       INTO <wa>
       WITH CONTROL <table_control>
       CURSOR <table_control>-current_line.

    MODULE activate_table.

  ENDLOOP.

DATA:
  FLAG.

MODULE activate_table OUTPUT.
  IF flag EQ 'X' AND sy-ucomm EQ 'DISPLAY'.

        LOOP AT SCREEN.
          screen-input = '1'.
          MODIFY SCREEN.
        ENDLOOP.

  ENDIF.
ENDMODULE.

FLAG is the line selection variable you give in the screen layout. and in the PF-Status of the screen give DISPLAY so that when you select the line and press DISPLAY you can enable that line

Regards

Indu.

Former Member
0 Kudos

Hi Ramakrishna Apparao,

Add this code in any of the module in between LOOP ... ENDLOOP statement.


  IF SY-UCOMM = 'EDIT' AND
     GW_TC_ITAB-SEL = 'X'.
    LOOP AT SCREEN.
      IF SCREEN-GROUP1 = '1'.
        SCREEN-INPUT = '1'.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ENDIF.

Here,

'EDIT' is the function code given for the PUSH BUTTON throgh which we make it input enabled.

SEL is the field in the internal table and assigned in the 'w/ SelColumn' property of the table control.

Regards,

R.Nagarajan.

Former Member
0 Kudos

hi

loop at itab_item.

IF itab_item-ITEM_CATEG = 'ZFRS' .

IF zsd_tab-current_line = sy-tabix.

loop at screen.

screen-input = 0.

modify screen .

endloop.

endif.

ENDIF.

endloop.