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: 

Add more records after downloaded internal table usingGUI_DOWNLOAD

Former Member
0 Kudos
189

Hi all,

Greetings!

Here i am posting my problem

I am picking the data from one data base table and i am inserting one record and changing few records values based on the selection screen values. On the selection screen i am providing parameters i.e user can enter only one record. After doing that i am downloading the internal table data to the presentation server. I am not updating the data base table.

For ex: data base contains 10 records

after adding internal table contains 11 records but still database table have only 10 records.

My requirement is i want to add one more record like wise i want to add morethan one record to the existing internal table. After that i want to use that flat file and loaded into few transactions that updates the database table.

Is it possible to add morethan one record after i downloaded the internal table to the presentation server.

Please help me..

Thanking you

Best Regards

shaik

7 REPLIES 7

Former Member
0 Kudos
165

I am not sure if you can append records to a flatfile, using gui_download.

but a there is a way to achieve this.

first upload the old content of the flatfile into a internal table itab, using GUI_UPLOAD or WS_UPLOAD.

now append more new records to itab.

finally download this content of itab using gui_download..so you get a updated file each time.

cheers.

0 Kudos
165

you can append records to file.

using gui_download to download the file with originial records

use gui_download again with append = 'X' and download the new enteries to the same file name.

Regards

Raja

0 Kudos
165

Hi,

Thanks for your valuable suggestions.

If i use gui_download again with append = 'X'.

It will displays the first downloaded contents ((ex:101(new first inserted record) (ex:101(new second inserted record). i.e it will displays 22 records in that 2 newly inserted records and 1010 old database records.

I want to download the contents 10 old records from the data base table and 2 newly inserted records only.

Is it posiible?

Please send any information you needed..

Thanking you

Best Regards

Shaik

0 Kudos
165

two ways you can handle this

1. first download 10 records then with append mode download the new (one) record.

2. first download 10 records then with with CONFIRM_OVERWRITE = 'X' download 11 records to the same file.

Hope this is clear.

Regards

Raja

Reward the helpful answers by clicking the radio buttons and if the question is answered mark it as answered.

0 Kudos
165

Hi,

If you want to add just two records to the internal table after downloading,you can very well use append statement as I suggested before.

*populate the first record in wa[workarea].

*then

append wa to itab.

clear itab.

*populate the second record in wa1.

append wa to itab.

Otherwise, if you are going to download two more records again and you want to append it to the existing file,

you can use gui_download second time with the option append = 'X'.But this time,make sure that the file you are passing should not have old values[only 2 new values].

Kindly reward points by clicking the star on the left of reply,if it helps.

0 Kudos
165

Hi,

If your problem is solved,kindly click blue star against the reply which solved your problem.

If you solved it on our own,then click solved on my own against your question.

If not solved yet,get back for more clarification.

jayanthi_jayaraman
Active Contributor
0 Kudos
165

Hi,

After GUI_download or WS_Download,your internal table itab will have some reocrds.

If you want to add one more record to the itab,you can use insert statement.

insert wa into itab index 1.

wa is the workarea containing the extra record.

Or simply you want to add,

append wa to itab.

KIndly reward points by clicking the star on the left of reply,if it helps.