‎2005 Oct 04 12:16 PM
Hi,
I have a req in which i have six screens in sequence , for each screen there is save button , AFTER SAVING ON EACH SCREEN step by step i reached to sixth screen ,suppose there is any problem on sixth or any screen data saved for any screen should not be update ,if every thing is fine till sixth screen then only data should be saved.
1 save 2save 3save 4save 5save 6save..
if somebody will give me help to findout the appropriate solution defintly i will reward point.
regards
san
‎2005 Oct 04 12:22 PM
hai,
check out this wheather this will will do for what you are looking for.
after each screen before going to next screen,don't save the data but try to export it into memory either using
1.export/import <itab> from/to memory id <id>
2. export/import <itab> from/to indx(ar) id <key>
once when you reach the sixth screen import all the screen values from the memory and then try to update the database tbales if the condition is true. else dont upadte simply delete teh exported values to memory
if this satisfies and any calrification. pls come back
cheers
‎2005 Oct 04 12:31 PM
Hi,
if data should be saved only if the whole process from screen 1 to screen 6 is ok, i 'd collect the data in internal tables.
Finally i'd update DB after screen 6 if every check is ok.
regards Andreas
‎2005 Oct 04 12:25 PM
Check whether all the data got saved if not rollback the update which u did. Else give commit.
‎2005 Oct 04 12:29 PM
Hi,
Just to add on to what Rajani suggested, if all the 6 screens are of the same module pool program then you can just use global varibales/internal tables to store values from each screen. There is no need to even import/export data. On the 6th screen, validate all the data and then save.
This is exactly what we did for one of our clients' MDE (Mobile Data Entry) solution.
/Sagar
‎2005 Oct 04 1:03 PM
Hi
You should use some variables where you store your data when the user push SAVE FROM SCREEN1 TO SCREEN 5, and only in SCREEN6 you should store the data in database when user push SAVE and all is ok.
Max
‎2005 Oct 04 1:42 PM
Hi,
Disable the save butoon in the first 5 screens allowing the users only to save at screen 6. Then Commit Work.
‎2005 Oct 04 2:04 PM
you have following before showing the screen and disable the save button on first 5 screens
data:begin of exclmenu occurs 0,
okcode like sy-ucomm,
end of exclmenu.
exclmenu-okcode = 'SAVE'.
set pf-status '<statusname>' excluding exclmenu
and on the last screen PBO, use as follow
delete from exclmenu where okcode = 'SAVE'.
set pf-status '<statusname>' excluding exclmenu
this is what I have been doing.