Application Development 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: 

regarding saving data

Former Member
0 Kudos
125

hi Abapers,

i have doubt regarding my set pf satus in my module pool program. i have a screen and from that i have to save data which is entered in text fields . now for activating the default save button i have assigned thru pf -status . but while executing save button its saying this function not possible. can anyone clarify .

Thanks & Regards,

Syam.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
91

HI,

try this.

set pf-status 'ZPF'.

skip.

at user-command.

case sy-ucomm.

when 'SAV'.

message 'ahi' type 'I'.

endcase.

here SAV is the function code assigned to save button in the pf status.

10 REPLIES 10

Former Member
0 Kudos
91

If you are using module pool program u need to activate the PF-Status. Double click on the pf-status and inside you will see the components screen. Here, for save define a function code as SAVC and activate the pf-status.

now, in ur program write Case sy-ucomm.

when 'SAVC'.

write the code...

0 Kudos
91

hello,

i have exactly done like that , but its not working fine.So any more further help .

Thanks & Regards,

Syam.

Former Member
0 Kudos
91

Hi,

Try this.

Check whether you have activated properly.

After giving the pf-status. check the sy-ucomm at the usercommand in the PAI event.

For ex: ur pf-status is 'SAVE'.

if sy-ucomm eq 'SAVE'

< perform the required operation>

endif.

Sharin

Former Member
0 Kudos
92

HI,

try this.

set pf-status 'ZPF'.

skip.

at user-command.

case sy-ucomm.

when 'SAV'.

message 'ahi' type 'I'.

endcase.

here SAV is the function code assigned to save button in the pf status.

0 Kudos
91

Hi...Syam...

1. Check w'ther you are getting that message from your program.

2. Verify the action, which you are doing with that button.

or

Send the sample code which you written for your SAVE button.

Thanks

Naveen.I

0 Kudos
91

Hi Syam....

> goto menu painter-> application keys ->double click on SAVE ->change your function type as SPACE..

May be now its S.

S - System function. <---- which gives above error in your case

SPACE - Normal application function.

Thanks,

Naveen.I

0 Kudos
91

thank u its working , but i do have another small doubt .

in my module program i have to take data from a screen and my database table is LFA1 . and when i press save data should be updated in that table .

Regards,

Syam.

0 Kudos
91

HI...

1. declare internal table t_lfa1 and work area wa for LFA1 table.

2. Here itab , wa1 are you r screen table and its work areas.

3. In PAI event.

> case sy-ucomm.

> when 'SAVE'.

>loop at LFA1 into wa.

>read table itab into wa2 with key <key>'.

> if sy-subrc = 0.

> wa_f1 = wa1-f1.

> wa_f2 = wa1-f2.

> endif.

> modify LFA1 from wa.

> endloop.

>endcase.

Thats it!!! Your table will be updates.

Thanks,

Naveen.I

0 Kudos
91

Hi..

for taking the records which were changed or newly inserted u can use module modify which present in chain ..endchain..(PAI)

there u will get the data which is changed/inserted and then put those records in internal table and using that table update the databse in user command..

regards

vivek

Edited by: vivek jain on Aug 12, 2008 2:06 PM

Former Member
0 Kudos
91

HI,

THANKS A LOT .

SYAM.