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: 

Module Pool Table Control

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

former_member223537
Active Contributor
0 Kudos

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

6 REPLIES 6

former_member223537
Active Contributor
0 Kudos

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

0 Kudos

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.

Former Member
0 Kudos

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.

0 Kudos

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

0 Kudos

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

former_member223537
Active Contributor
0 Kudos

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.