09-18-2006 2:00 AM
Hi SDN,
1. Can someone tell me how to delete a row in a table control? i had assigned a name to the table control w/ selcolumn in the table control properties, but how do i read it in my program, i mean to ask how to capture its value?
2. i have 2 table controls in my screen. one is heder and second is item table, in between a drop down whihc contains header list.
when ever i select a header in the drop down i need to display the related items in the second table control. first time its ok, but when i select another header in drop downi can not see the changes in the 2nd table control.
Please help
Thanks to all
Pratyusha
09-18-2006 2:55 AM
Hi Partyu,
1. If you have assigned say SEL as the name in SELCOLUMN in table control properties, then include the logic as follows :-
<b>IN PAI</b>
Loop at it_tab.
if it_tab-SEL = 'X'.
delete it_tab.
endif.
Endloop.
2. It seems that for the change of value in drop down you have given a condition like :
If not V_value is initial.
Display record in 2nd table contorl.
endif.
Instead change the logic as follows :-
if L_prev_value ne v_value.
Logic to fetch and display record in table control 2
I.e. Append wa_tab1 to it_tab2.
l_prev_value = v_value.
Endif.
Best regards,
Prashant
Ps : Please reward all helpful answers
09-18-2006 2:55 AM
Hi Partyu,
1. If you have assigned say SEL as the name in SELCOLUMN in table control properties, then include the logic as follows :-
<b>IN PAI</b>
Loop at it_tab.
if it_tab-SEL = 'X'.
delete it_tab.
endif.
Endloop.
2. It seems that for the change of value in drop down you have given a condition like :
If not V_value is initial.
Display record in 2nd table contorl.
endif.
Instead change the logic as follows :-
if L_prev_value ne v_value.
Logic to fetch and display record in table control 2
I.e. Append wa_tab1 to it_tab2.
l_prev_value = v_value.
Endif.
Best regards,
Prashant
Ps : Please reward all helpful answers
09-18-2006 3:05 AM
Hi Prashanth,
this is my part of code in the USER COMMAND for the item to be deleted, there is a user button to delete the items.so when 'DEL' button is pressed.
when 'DEL'.
loop at IT_RFQSVC into IS_RFQSVC.
if SVC_SEL = 'X'.
delete IT_RFQSVC.
endif.
clear : IS_RFQSVC.
endloop.
the assigned name for the SELCOLUMN is SVC_SEL.
but in debugging i see that the SVC_SEL is not recognised the correct value.
Please help.
09-18-2006 3:09 AM
hi,
declare a field eg: CHK type c in the internal table..
DATA: v_check TYPE c.(selcolumn)
DATA: BEGIN OF it_knbk OCCURS 0,
banks LIKE knbk-banks,
bankl LIKE knbk-bankl,
bankn LIKE knbk-bankn,
bkont LIKE knbk-bkont,
koinh LIKE knbk-koinh,
chk TYPE c,
END OF it_knbk.
in PAI..
MODULE modify INPUT.
IF v_check = 'X'.
it_knbk-chk = 'X'.
MODIFY it_knbk index tc1-current_line.
ELSE.
CLEAR it_knbk-chk .
ENDIF.
v_ucomm = sy-ucomm.
CASE v_ucomm.
WHEN 'DELE'.
DELETE it_knbk where chk eq 'X'.
DESCRIBE TABLE it_knbk LINES tc1-lines.
endcase.
ENDMODULE.
hope this helps,
do reward if it helps,
priya.
09-18-2006 4:09 AM
Hi Priya,
what does this resemble in ur code,
<b>DATA: v_check TYPE c.(selcolumn)</b>
my selcolumn name is SVC_SEL.
and i defined it as
data : svc_sel type c. (same name as of selcolumn)
but while debugging i cud not get the value of SVC_SEL as X at all. its always INITIAL.
how to get its value 'X' when i select a row in tab control
Please help, its very urgent.
Thanks in advance
Pratyusha
09-18-2006 4:21 AM
thanks Prashanth & priya for helping me out i got it.
i assign u points
and can u plz help me in one more thing,
i need a button in one of the tab ctrl column, once the user presees it, i shud get a text editor where the user can enter different texts and append new line
please see IW32 transaction Operation tab -> LT (long text) which leads to a text editor.
Please respond soon
Thanks in advance
Pratyusha
09-18-2006 4:02 AM
Hi,
Please modify the code as below :
when 'DEL'.
loop at IT_RFQSVC into IS_RFQSVC.
<b>if IS_RFQSVC-SVC_SEL = 'X'.</b>
<b>delete IT_RFQSVC from IS_RFQSVC.</b>
endif.
clear : IS_RFQSVC.
endloop.
Best regards,
Prashant
PS : On the left hand side there are radio buttons for points ( 2/6/10). Please reward all helpful answers accordingly.