‎2008 Jul 01 2:04 PM
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.
‎2008 Jul 01 2:09 PM
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
‎2008 Jul 01 2:11 PM
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.
‎2008 Jul 01 2:12 PM
Hello
Instead of
LEAVE TO SCREEN 200.
you must write CALL SCREEN 200.
‎2008 Jul 01 2:36 PM
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.
‎2008 Jul 01 2:58 PM
Hello
Check yous query. When there is no data in the given range, the table is initial. Can be in this reason?