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

Problem while executing the report?

Former Member
0 Likes
945

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.

9 REPLIES 9
Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
912

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

Read only

Former Member
0 Likes
912

Refresh internal table which you are used to store file content before reading data from tile.

Thanks,

Raj

Read only

alex_m
Active Contributor
0 Likes
912

REFRESH your internal table before populating..

Read only

Former Member
0 Likes
912

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.

Read only

0 Likes
912

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

Read only

0 Likes
912

problem lies with internla table data.

You can even REFRESH internal table content once your upload is successul...

REFRESH itab.

Thanks,

raj

Read only

0 Likes
912

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.

Read only

Former Member
0 Likes
912

Hi:

Use initialization Event.

Within this event, clear/refresh all variables, Internal tables and work areas as well.

Regards

Shashi

Read only

Former Member
0 Likes
912

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.