‎2009 Jun 16 9:34 AM
Dear All,
I am having one Ztable with table entries. Just if i am running the zprogram i will be getting the table enteris in excel file. For that program i will be giving the input as a ztable name. After getting the excel file with table entries contents, again i will be editing the records if it is needed, then i need one another Zprogram to upload the table entries in to that corresponding ztable.
so i need 2 z programs for one is downloading the table entries and another one is uploading the table enteries excel file into same ztable.
Thanks,
Sankar M
Edited by: Vijay Babu Dudla on Jun 16, 2009 5:56 AM
‎2009 Jun 16 9:46 AM
Hi,
For this you can do one thing.
First get data into one internal table and display it in an editable ALV.
Change the entries. and on user action you can update the backend table.
Another approach would be,
Use two radio buttons, one for upload and the other for download.
If user selects the radio button import, import data from data base table to the excel file using GUI_DOWNLOAD.
If user selects radio button for upload, call GUI_UPLOAD to read data from excel file to one intrnal table and from thisinternal tbale you can update the backend table.
With regards,
Vamsi
‎2009 Jun 16 9:38 AM
‎2009 Jun 16 9:40 AM
yes of course. If it is possible. <<removed_by_moderator>>
Edited by: Vijay Babu Dudla on Jun 16, 2009 5:59 AM
‎2009 Jun 16 9:44 AM
>
> Helpful answers will be rewarded.
Don't violate forum rules with such statements
I guess you know why your first post was locked
‎2009 Jun 16 9:43 AM
something like fetch the records .. disply in ALV ... Edit it there .. and through a user command action save it to the table
‎2009 Jun 16 10:20 AM
dear,
your meaning is editable alv report is there to do this issue.
‎2009 Jun 16 10:27 AM
ya first pick the data using FM gui_upload ,
Then populate it in editable alv or a table control.
correct the required data,
then save it to the database
‎2009 Jun 16 9:46 AM
Hi,
For this you can do one thing.
First get data into one internal table and display it in an editable ALV.
Change the entries. and on user action you can update the backend table.
Another approach would be,
Use two radio buttons, one for upload and the other for download.
If user selects the radio button import, import data from data base table to the excel file using GUI_DOWNLOAD.
If user selects radio button for upload, call GUI_UPLOAD to read data from excel file to one intrnal table and from thisinternal tbale you can update the backend table.
With regards,
Vamsi
‎2009 Jun 16 9:52 AM
What you can do is....
Firstly, instead of downloading you can simply put the result in ALV....and then allow the fields to be editable...
When you enter the database table name in selection-screen...you can create dynamic internal table to put the entries from the database table..
Then all you have to do is Modify the database table based on the internal table entries...
select *
from (p_dtable)
into table gt_final.
Please search in forum for creation of dynamic internal table...
‎2009 Jun 16 9:57 AM
hi sankar - Forum Points: 1,712 .... and these type of Qn really surprising for me ))
‎2009 Jun 16 10:10 AM
‎2009 Jun 16 10:16 AM
‎2009 Jun 16 10:02 AM
yes it is possible with a single program.
just make two T codes to call same program. Inside the program, execute the code for uploading to or downloading from excel sheet depending on this T code.
use the FMs-
For downloading- depending on your requirement
ALSM_EXCEL_TO_INTERNAL_TABLE
EXT_CONVERT_XLS_TO_SAP
For uploading the data-
gui_upload
take the data into internal tab before updating it into z tab.
you will have decide about data manipulations as to insert update or modify.
Regards,
Sumit Nene.