2007 Dec 26 10:02 AM
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
2007 Dec 26 12:09 PM
hi,
what do u mean by disable? it should be there but not in change mode?
2007 Dec 26 11:11 AM
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
2007 Dec 26 11:25 AM
2007 Dec 26 12:09 PM
hi,
what do u mean by disable? it should be there but not in change mode?
2007 Dec 26 12:11 PM
2007 Dec 26 12:25 PM
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...
2007 Dec 26 12:40 PM
2007 Dec 27 9:02 AM
hi,
define OK_CODE in screen element, and in declaration define data : ok_code like sy-ucomm.
and use case ok_code.
endcase.
2007 Dec 27 9:13 AM
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..
2007 Dec 27 9:39 AM
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...
2007 Dec 27 11:47 AM
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.
2007 Dec 27 11:57 AM
2007 Dec 27 12:05 PM
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.
2007 Dec 27 12:12 PM
2007 Dec 28 3:45 AM
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.