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: 

hi

Former Member
0 Kudos

plz can anyone help me..

in table control, when i select a row and click delete button that row should be disabled...?

Edited by: ramya jothi on Dec 26, 2007 11:03 AM

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi,

what do u mean by disable? it should be there but not in change mode?

14 REPLIES 14

Former Member
0 Kudos

Hi

In screen pbo and pai

PROCESS BEFORE OUTPUT.

loop at i_zallocmast with control TABLE_CONTROL.

endloop.

MODULE STATUS_0300.

*

PROCESS AFTER INPUT.

MODULE EXIT AT EXIT-COMMAND.

loop at i_zallocmast.

module check_data_change.

endloop.

MODULE USER_COMMAND_0300.

&----


*& Module check_data_change INPUT

&----


  • text

----


MODULE check_data_change INPUT.

*if save_ok = 'CHAN'.

MODIFY i_zallocmast INDEX table_control-current_line.

perform move_changed_data.

MODIFY zallocmast FROM Wa_zallocmast.

*endif.

ENDMODULE. " check_data_change INPUT

*************************************************************

&----


*& Module STATUS_0300 OUTPUT

&----


  • POB for screen 300

----


MODULE status_0300 OUTPUT.

REFRESH fcode.

*--For display option

case save_ok.

when 'DELE'.

*--For Delete option

PERFORM disable_fields.

DESCRIBE TABLE i_zallocmast LINES table_control-lines.

endcase.

ENDMODULE. " STATUS_0300 OUTPUT

&----


*& Form disable_fields

&----


  • text

----


FORM disable_fields .

LOOP AT SCREEN.

IF screen-name = 'I_ZALLOCMAST-MATNR' OR

screen-name = 'I_ZALLOCMAST-VKBUR' OR

screen-name = 'I_ZALLOCMAST-KUNNR' OR

screen-name = 'I_ZALLOCMAST-GRNO'.

screen-input = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDFORM. " disable_fields

develop on pf-status for delete button.

and take the reference of the above code.

Thanks & Regards

Vijaya

0 Kudos

how to set pf status for delete button.

Former Member
0 Kudos

hi,

what do u mean by disable? it should be there but not in change mode?

0 Kudos

yes.

0 Kudos

ok,

do like this....

USER_COMMAND of PAI, write like this...

MODULE user_command_1000 INPUT.

CASE ok_code.

WHEN 'DEL'.

GET CURSOR LINE lin.

fd = 1.

ENDCASE.

ENDMODULE. " USER_COMMAND_1000 INPUT

and made one modul in PBO between LOOP...ENDLOOP..

LOOP AT itab

INTO itab

WITH CONTROL tab1

CURSOR tab1-current_line.

MODULE disable.

*&SPWIZARD: MODULE TAB1_CHANGE_FIELD_ATTR

ENDLOOP.

MODULE disable OUTPUT.

IF fd = 1.

LOOP AT SCREEN.

IF tab1-current_line = lin.

screen-input = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

ENDMODULE. " disable OUTPUT

here tab1 is my table control name ...

and lin and fd both type I.

reward if usefull...

0 Kudos

i tried with sy-ucomm but still not working

0 Kudos

hi,

define OK_CODE in screen element, and in declaration define data : ok_code like sy-ucomm.

and use case ok_code.

endcase.

0 Kudos

i able to disable a one row , but wen i select another to get disable the 1st row gets enabled automatically

.

could u help me in disabling multiple rows which the user selects..

0 Kudos

hi,

do like this,

take one field flag type c in internal table from which u creating table control...

No need to create table control again as we dont want to display it in table control...

Its for marking purpose....

so u can add this by going to top module....

then in USER_COMMAND in PAI,

MODULE user_command_1000 INPUT.

CASE ok_code.

WHEN 'BACK' OR 'UP' OR 'CANC'.

LEAVE PROGRAM.

WHEN 'SV'.

WHEN 'INFO'.

CALL SCREEN 1001.

WHEN 'PICK'.

GET CURSOR FIELD xblnr VALUE bill_no.

CALL SCREEN 1001.

WHEN 'DEL'.

GET CURSOR LINE lin.

READ TABLE itab INDEX lin.

itab-flag = 'X'.

MODIFY itab INDEX lin.

fd = 1.

ENDCASE.

ENDMODULE. " USER_COMMAND_1000 INPUT

and in PBO. make one module disable, in LOOP...ENDLOOP. ,as i said before.

MODULE disable OUTPUT.

IF fd = 1.

LOOP AT SCREEN.

IF tab1-current_line = lin OR itab-flag = 'X'.

screen-input = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

ENDMODULE. " disable OUTPUT

it will solve ur problem...

reward if useful...

0 Kudos

thank you. next prob is i displayed in primary list checkbox and customer id. but when i select few check box i want the other details corresponding to that selected customer id in secondary list.

can u help me.

i used sy-lisel which display default last customer id detail in secondary list can u help me.

0 Kudos

hi,

u using ALV or Classical?

0 Kudos

no i didnt use alv or class. i m a fresher.

my code is.

wi_cust is an internal table like zcust_master.

chk type c. is my check box.

select * from zcust_master into table wi_cust.

loop at wi_cust.

write : chk as checkbox , wi_cust-custid.

endloop.

at line-selection.

check sy-lsind = 1.

windows starting at5.4.

ending at ...

write : sy-lisel.

loop at wi_cust.

write: .......

endloop.

can u help me.

0 Kudos

hi,

let me try dear

0 Kudos

HI I TRIED THE CODE U GAVE FOR DISABLING THE SELECTED ROW IN TABLE CONTROL BUT ALL THE ROWS GOT DISABLED.

PLZ DO HELP ME.