‎2007 Aug 11 5:28 PM
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
‎2007 Aug 13 5:13 PM
Hi Essam
I will give you a general guideline about how to go about this.
1.First create a screen 100.
2. in the Layout create a field with DDIC ref RKPF-RSNUM, that ways you dont have to worry about putting your own text there.
3. in the PBO Give it a PF status.
4, in the PAI code something like this.
If rkpf-rsnum is not initial.
move rkpf-rsnum to t_rsnum.
else.
message e(999) with 'Please enter a valid no'.
endif.
5. then according to the t_rsnum (the screen entry) pick up the corresponding data into 5 fields. use select single into (field1)....
6. Design a table control for screen 200.
Create ur layout acc to ur o/p requiremnt.
define tab con.
controls: tc type tableview using screen 200.
suppose ur itab is i_resb.
In the PBO
MODULE status_0100.
LOOP WITH CONTROL tc.
MODULE fill_table_control.
ENDLOOP.
MODULE fill_table_control OUTPUT.
READ TABLE itab INTO wa_itab INDEX tc-current_line.
ENDMODULE
at PAI
LOOP WITH CONTROL tc.
MODULE read_table_control.
ENDLOOP.
MODULE read_table_control INPUT.
MODIFY itab FROM wa_itab INDEX tc-current_line.
ENDMODULE.
Here wa_itab is ur work area which will have the same type as ur itab.
alt u can use
loop at itab with control tc cursor tc-current_line.
module transfer
endloop.
module transfer.
rseb = i_seb.
endmodule.
This is just a rough guideline. Please follow whichever method suits u the best.
Thanks.
‎2007 Aug 13 3:14 PM
‎2007 Aug 13 5:05 PM
‎2007 Aug 13 5:11 PM
Good.
Asking others to write the code for you is not what these forums are really about.
‎2007 Aug 13 5:31 PM
I agree with you, first give it your best shot, and If you cant succeed we are always there to help, thats the only way to learn, there are no shortcuts
‎2007 Aug 13 5:13 PM
Hi Essam
I will give you a general guideline about how to go about this.
1.First create a screen 100.
2. in the Layout create a field with DDIC ref RKPF-RSNUM, that ways you dont have to worry about putting your own text there.
3. in the PBO Give it a PF status.
4, in the PAI code something like this.
If rkpf-rsnum is not initial.
move rkpf-rsnum to t_rsnum.
else.
message e(999) with 'Please enter a valid no'.
endif.
5. then according to the t_rsnum (the screen entry) pick up the corresponding data into 5 fields. use select single into (field1)....
6. Design a table control for screen 200.
Create ur layout acc to ur o/p requiremnt.
define tab con.
controls: tc type tableview using screen 200.
suppose ur itab is i_resb.
In the PBO
MODULE status_0100.
LOOP WITH CONTROL tc.
MODULE fill_table_control.
ENDLOOP.
MODULE fill_table_control OUTPUT.
READ TABLE itab INTO wa_itab INDEX tc-current_line.
ENDMODULE
at PAI
LOOP WITH CONTROL tc.
MODULE read_table_control.
ENDLOOP.
MODULE read_table_control INPUT.
MODIFY itab FROM wa_itab INDEX tc-current_line.
ENDMODULE.
Here wa_itab is ur work area which will have the same type as ur itab.
alt u can use
loop at itab with control tc cursor tc-current_line.
module transfer
endloop.
module transfer.
rseb = i_seb.
endmodule.
This is just a rough guideline. Please follow whichever method suits u the best.
Thanks.
‎2007 Aug 13 5:36 PM
mr Sameer Ahmed Could u please mail Me ur Email Address.....coz iam facing lots of problems in Module programming....
please mail me ur email right away!
regards
essam