Application Development 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: 

Custom Transaction for maintence of custom table

Former Member
0 Kudos

hi friends,

i have created a custom table. and for it i need to have a custom maintenence transactions.the custom transaction should consits of insert, copy a row and upload....

but i dont think we have an upload feature in SM30,

now my doubt is how can I solve this,,, by any other method & dilaog program being my last priority.

Please let me know if u guys get some idea

Thanks in advance

Tina

8 REPLIES 8

laxmanakumar_appana
Active Contributor
0 Kudos

Hi,

use FM : GUI_UPLOAD to upload data into table , you can do this with normal report programming. for insert,copy and delete use SM30 functionality.

create a tansaction for table maintenance and call this transaction from report , implement the upload code also in that report.

Laxman

Former Member
0 Kudos

Upload? What does that do. Do you want to upload an entry into a table?

Sudha

0 Kudos

yes sudha,

need to upload the data into the table.And user requirement is he wants all of them to be in a same transaction screen.

Even though I create a custom transaction and refer it for SM30 ,,, i need to upload a file and make entries in to the table....

Any idea of how do we need to implement it?

0 Kudos

any body could help?

0 Kudos

Tina,

Looks like you have not seen my answer, doesn't that work for you.

Regards,

Ravi

0 Kudos

Hi

U can use the fm GUI_UPLOAD to read and store the file in internla table, after transfer the data from internal table to database table. This is an example:

PARAMETERS: P_FILE(120).

DATA: FILENAME TYPE STRING.

DATA: T_FILE LIKE TABLE OF <ZTABLE>.

START-OF-SELECTION.

FILENAME = P_FILE.

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

FILENAME = FILENAME

TABLES

DATA_TAB = T_FILE.

INSERT <ZTABLE> FROM T_FILE.

You can use this program only if the file have the same structure of Z-TABLE, otherwise you have to elaborate the data of T_FILE before inserting in the database.

Max

Former Member
0 Kudos

You can do this using a report program which will display the data in a ALV Grid.

For the upload functionality add a custom button and code it to accept a file and update the internal table there by updating the display.

Take a look at BCEDIT programs for a editable ALV grid.

Finally when you hit the save button you can update the database table and commit the work

Regards,

Ravi

Note : Please mark the helpful answers

Message was edited by: Ravikumar Allampallam

former_member181962
Active Contributor
0 Kudos

Hi Tina,

In case you have missed Ravi's post, here is a skeleton of the logic.

1) Have a button on a screen for upload.

2) In the PAI section of that scren, on the click of the button

case sy-ucomm.

when '<FCODE for buuton>;.

call function 'GUI_UPLOAD'

exporting filename = p_filename

tables data_tab = itab

endcase.

4)do a bdc for the custom trsnaction

5) Use call transaction/bdc session for the upload.

Regards,

ravi