2007 Aug 12 6:53 AM
First Screen 100 ( single box to enter the reservation no: RKPF-RSNUM)
Based on this reservation design next screen (200) showing the reservation header (Table - RKPF) with 5 fields only (RSNUM, RSDAT, USNAM, BWART, WEMPF) and below that a item (Table RESB) area where all the items shud be displayed in a table control (with the following fields only RSPOS, MATNR, LGORT, BDMNG, MEINS, ENWRT, (a calculated field say x = BDMNG minus ENWRT).
could any1 tell me the complete steps n wht all should i code in pbo n pai?
please write the code.
PLEASE REPLY ASAP.
REGARDS
Essam
essamsaud@yahoo.co.in
2007 Aug 13 7:58 AM
Hi,
I ll give you the basic steps, try using this code .....
*for screen 100
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
PROCESS AFTER INPUT.
MODULE CANCEL AT EXIT-COMMAND.
module user_command_0100.
*for screen 200.
PROCESS BEFORE OUTPUT.
MODULE STATUS_0200.
LOOP AT ITAB2 WITH CONTROL reservation.
ENDLOOP.
PROCESS AFTER INPUT.
MODULE CANCEL1 AT EXIT-COMMAND.
LOOP AT ITAB2.
ENDLOOP.
module user_command_0200.
MODULE status_0100 OUTPUT.
SET PF-STATUS 'SCREEN_100'.
ENDMODULE.
MODULE cancel INPUT.
LEAVE PROGRAM.
ENDMODULE.
MODULE user_command_0100 INPUT.
save_ok = ok_code.
CLEAR ok_code.
CASE save_ok.
WHEN 'DETAIL'.
CALL SCREEN 200.
ENDCASE.
ENDMODULE.
MODULE STATUS_0200 OUTPUT.
SET PF-STATUS 'SCREEN_200'.
select RSNUM RSDAT USNAM BWART WEMPF into table itab1 from
resb where rsnum = p_rsnum.
read table itab1 index 1.
p_rsdat = itab1-rsdat.
p_usnam = itab1-usnam.
p_bwart = itab1-bwart.
p_wempf = itab1-wempf.
select RSPOS, MATNR, LGORT, BDMNG, MEINS, ENWRT into corresponding fields of table itab2 table resb where rsnum = p_rsnum.
loop at itab2.
itab2-x = itab2-BDMNG - itab2-ENWRT.
modify itab2 index sy-tabix.
endloop.
ENDMODULE.
MODULE CANCEL1 INPUT.
LEAVE PROGRAM.
ENDMODULE.
Happy coding ...
Regards,
SJ