‎2009 Jul 10 5:11 AM
Hi all,
I have wriiten a program to upload data. The program is working fine. But the problem is if the program is executed using a file, after wards when i am trying to execute the program with another file immediately, the data in the previous file also uploading.
I couldn't get the reason . I have put a push button on the seletion screen. and executing the program when user clicks on the push button using at slection-screen.
Please help me to solve the problem?
Thanks,
Aravind.
‎2009 Jul 10 5:17 AM
Hi,
Please refresh the internal table below you upload the data from the local file path.
Perform this upload under START-OF-SELECTION
START-OF-SELECTION.
REFRESH itab.
"call GUI_UPLOAD to upload file into itab
"or use your own method to upload file into itab
Hope this helps you.
Regards,
Tarun
‎2009 Jul 10 5:19 AM
Refresh internal table which you are used to store file content before reading data from tile.
Thanks,
Raj
‎2009 Jul 10 5:19 AM
‎2009 Jul 10 5:20 AM
Hi Aravind,
Please make the doubt a little more clear i.e. where are you uploading the data and from where, so that it would be easy to answer.
Regards,
Amit.
‎2009 Jul 10 5:25 AM
Hi all,
Thanks for the replies.
I am using a push button on the selection-screen.
So i am unable to call GUI_upload under start-of-selection.
Can you help me how to call start-of-selection while using push buttons?
I am clearing the internal table.
I am uploading flat file data into SAP.
Thanks,
Aravind
‎2009 Jul 10 5:29 AM
problem lies with internla table data.
You can even REFRESH internal table content once your upload is successul...
REFRESH itab.
Thanks,
raj
‎2009 Jul 10 5:38 AM
Hi raja,
Thanks for the reply. actually i have already refreshed all the tables except the error record table. So each time it is displaying the previous error records also. Now i have cleared this and problem solved.
Thanks,
Aravind.
‎2009 Jul 10 5:27 AM
Hi:
Use initialization Event.
Within this event, clear/refresh all variables, Internal tables and work areas as well.
Regards
Shashi
‎2009 Jul 10 5:39 AM
Hi,
Interactive report programs provide menus for user interaction. When the user clicks within the start-of-selection section, code under section at user_command. is invoked.
When the user selects a row and clicks a defined PF key (i.e., Shift+F12), code under section at pf24. is invoked. Because most PC keyboards have 12 F keys:
13 = Shift F1
14 = Shift F2
15 = Shift F3
16 = Shift F4
17 = Shift F5
18 = Shift F6
19 = Shift F7
20 = Shift F8
21 = Shift F9
22 = Shift F10
23 = Shift F11
24 = Shift F12
When the user selects a row and clicks the Enter key, code under section at user-command. is invoked.
at user-command.
if sy-ucomm=20 .
call GUI_UPLOAD.
endif.
Thanks.