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 All,

I created a table for which should be displayed in sales order. It is working fine in VA01 and VA02 tcodes. I am able to select the rows and everything is fine. But in VA03, it is just visible and diplaying data, But i am not able to select the rows and not able to do any operations on that.

Can anybody tell me how to get to select the rows in VA03 also. It should be in display mode only but i have to select the row whatever i want.

Can anybody provide me the logic.

Thanks in advance,

Vivek....

7 REPLIES 7

Former Member
0 Kudos

ya wat u can do is in the pbo that of that screen u can modify the select buuton...

<b>lets say ur select button name is gv_select..

in pbo just write the following code.

loop at screen.

If screen-name = 'GV_SELECT'.

SCREEN-INPUT = 1.

ENDIF.

MODIFY SCREEN.

ENDLOOP.</b>

THIS WILL DEFINATELY SOLVE UR PROBLEM...

IF NOT DO LET ME KNOW.

0 Kudos

Hi Madan,

Thanks for ur reply. But still it is not working.

I am filling the custom table control from an internal table I_CUSTOM. This internal table itself having the select button GV_SELECT. When i write the following code in PBO, Loop at screen, except the GV_BUTTON all the fields are coming in debugging. So it is not activating the button. Can u tell me how to ressolve this.

I have tried the following logic also. Here also same problem is coming.

LOOP AT tc_custom-cols INTO wa_cols1 .

IF wa_cols1-screen-name = 'I_CUSTOM-GV_SELECT'.

wa_cols1-screen-input = 1.

MODIFY tc_custom-cols FROM wa_cols1.

ENDIF.

ENDLOOP.

Can you please provide me some logic.

Thanks,

Vasu...

Vijay
Active Contributor
0 Kudos

hi....

to select ,deselect to work in table control u can refer this sample code.

this should help you.this code should be written in user_command .

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

ok_code = sy-ucomm.

*clearing the sy-ucomm

CLEAR sy-ucomm.

CASE ok_code.

WHEN 'PB_SELECT'.

LOOP AT it_line_items(table control name).

it_line_items-sel_col = 'X'.

MODIFY it_line_items.

ENDLOOP.

WHEN 'PB_DESELECT'.

LOOP AT it_line_items.

it_line_items-sel_col = ''.

MODIFY it_line_items.

ENDLOOP.

WHEN 'PB_DELETE'.

isydatar = sy-datar.

isydatar = 'X'.

CLEAR it_line_items_deleted[].

LOOP AT it_line_items .

IF it_line_items-sel_col = 'X'.

IF g_ok_code = 'PB_CHANGE'.

PERFORM delete_line_items.

ENDIF.

DELETE it_line_items.

ENDIF.

ENDLOOP.

ENDCASE.

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

<b>plz reward pts if helful</b>

regards

vijay

Former Member
0 Kudos

Hi,

It is giving an error

table control does not have a component called "SEL_COL".

Thank you,

Vasu...

Vijay
Active Contributor
0 Kudos

you need to create select column in your table control and sel_col is the name i have given to my selection column.

you can create selection column in the control attributes .

in ctrl attributes there is option to give the selection column name at the bottom.

you should give the name as

internal table name-sel_col.

hope this will help you out.

<b>plz reward pts if helpful</b>

regards

vijay

Former Member
0 Kudos

Hi Vijay,

Select All and Deselect All are working fine in my case. The same logic what you have given only i used. But my issue is only in VA03 i am not able to select the rows. If i do the select all and deselect all then it is working. If i want to select the single row then it is not working. But in VA01 and VA02 it is working fine.

I think now you understood my problem.

Can you help me regarding this.

Thanks for ur response,

Vas......

Former Member
0 Kudos

wat u can do is selct the row and press enter then and then only one row wil get selected otherwise no event will be triggered...

otherwise just send me the code along with snap shot of the screen wat u want then it will be easy for me...