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

module pool

Former Member
0 Likes
346

*requirement.-:* i created one table (ztable) and used all the fields on screen of my module pool program. during the execution of my program when i am my making entries in all fields and pressing save pushbutton all the data should be store in data base table (ztable).

if possible write some code to store the data in database table.

3 REPLIES 3
Read only

Former Member
0 Likes
332

hi,

do u have table control or simple I/O field on screen?

if I/O field then in user_command module of PAI,

write like this

MODULE user_command_1000 INPUT.

CASE ok_code.

WHEN 'SAVE' OR 'SV'.

itab_mast-clnt = sy-mandt.

itab_mast-srno = srn.

itab_mast-comp_code = zform_track_mast-comp_code.

itab_mast-form_type = ifmtp-form_type.

itab_mast-form_series = form_series.

itab_mast-form_no = form_no.

itab_mast-form_date = zform_track_mast-form_date.

itab_mast-rcvd_issu = 'I'.

itab_mast-form_amt = form_amt.

INSERT INTO zform_track_mast VALUES itab_mast.

CLEAR ok_code.

CLEAR zform_track_mast-comp_code.

CLEAR zform_track_mast-form_date.

CLEAR ifmtp-form_type.

CLEAR form_series.

CLEAR form_no.

CLEAR form_amt.

CLEAR itab_mast.

REFRESH itab_mast.

ENDCASE.

ENDMODULE. " USER_COMMAND_1000 INPUT

reward if usefull.......

Edited by: Dhwani shah on Mar 10, 2008 12:23 PM

Read only

Former Member
0 Likes
332

Hi

You can use following statement

INSERT

MODIFY

L.Velu

Read only

Former Member
0 Likes
332

Hi Prakash,

Declare data types as

data : itab type standard table of mara,

wa type mara,

okcode type syucomm.

in layout for the following fields , give the names of the screen fields as

field1 '1001' ( insert this values)

field2 'FERT' (insert this values)

process after input .

refresh itab.

case okcode.

when 'SAVE'.

wa-matnr = Field1.

wa-mtart = Field2.

append wa to itab.

clear wa.

endcase.

INSERT ZMARA FROM TABLE itab.

this will work,

reward points