Application Development and Automation 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: 
Read only

Regarding Table Control

Former Member
0 Likes
517

Hi ,

I have created two screens with scrno.100 and 200. In screen 100 ..It will take input and screen 200 will display the list.

So when there is no data in between the range its going to screen 200 but the push buttons r not working.(like back / cancel ).

And also I want to delete a record from list displayed on screen 200. give me that logic also.

Here the code is...

PROGRAM ZBC_MP03 .

Data : s_matnr type mara-matnr ,

p_matnr type mara-matnr.

CONTROLS BC1 TYPE TABLEVIEW USING SCREEN 200.

Types: BEGIN OF TY_MARA,

MATNR TYPE MARA-MATNR,

ERSDA TYPE MARA-ERSDA,

ERNAM TYPE MARA-ERNAM,

CH(1),

END OF TY_MARA.

Data : it_mara type standard table of ty_mara ,

wa_mara type ty_mara.

&----


*& Module USER_COMMAND_0100 INPUT

&----


  • text

----


MODULE USER_COMMAND_0100 INPUT.

CASE SY-UCOMM.

WHEN 'NEXT'.

SELECT MATNR

ERSDA

ERNAM

FROM MARA

INTO TABLE IT_MARA WHERE MATNR BETWEEN S_MATNR AND P_MATNR.

LEAVE TO SCREEN 200.

WHEN 'EXIT'.

LEAVE TO SCREEN 0.

ENDCASE.

ENDMODULE. " USER_COMMAND_0100 INPUT

&----


*& Module USER_COMMAND_0200 INPUT

&----


  • text

----


MODULE USER_COMMAND_0200 INPUT.

CASE SY-UCOMM.

WHEN 'BACK'.

LEAVE TO SCREEN 100.

WHEN 'EXIT'.

LEAVE TO SCREEN 0.

ENDCASE.

===============================================

Thanks in advance.

5 REPLIES 5
Read only

Former Member
0 Likes
489

Hello Vijay Reddy,

Make sure you had activated this Module pool program . If yes you have to debug this issue by putting break point in the PAI on screens 100 and 200.

Hope this helps.

Thanks,

Greetson

Read only

Former Member
0 Likes
489

Hi Vijay,

Do this in PAI of 200 screen, between loop and endloop put a module.

define a push button with ok-code 'DEL'.

module mod.

when 'DEL'.

delete it_vbak index tc-current_line.

endmodule.

Hope this helps,

Thanks,

Keerthi.

Read only

Former Member
0 Likes
489

Hello

Instead of

LEAVE TO SCREEN 200.

you must write CALL SCREEN 200.

Read only

0 Likes
489

Hi,

When There is data in given Range ..push buttons ( Exit and Back ) are working r properly. But when there is no data in the given range those push buttons r not working.

Read only

0 Likes
489

Hello

Check yous query. When there is no data in the given range, the table is initial. Can be in this reason?