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

Dialog Prograamming

Former Member
0 Likes
299

hi to all

Can we paste data in fields of table control which is copied from non-sap (like excel) systems. Could u pls tell me, is it possible to take data from clipborad and paste into table control fields thru coding. If so pls give me the sample code.

thnx

Shubha

hi to all

Can we paste data in fields of table control which is copied from non-sap (like excel) systems. Could u pls tell me, is it possible to take data from clipborad and paste into table control fields thru coding. If so pls give me the sample code.

thnx

Shubha

1 REPLY 1
Read only

Former Member
0 Likes
282

Hi,

Follow these steps:-

1. First U need to upload in excel sheet to an Internal table

- For this u need a I/O field on screen and browse button to locate the excel sheet from drives.

- Write a module in PAI of screen as follows:

Module button_click.

In SE38 program code as follows:

Module button_browse.

if sy-ucomm = 'BROW'. "FCODE for browse button

call function from class cl_gui_frontend_services called file_open_dialog. it requests a file.

After, above function returns the filename and assign this file name to I/O field on screen.

endif.

2. Use one more button called Upload(UPL)

- write code in the above same Module button_click.

if sy-ucomm = 'UPL'.

if I/O field ne ''.

call function gui_upload.

here provide the name of internal table of table control to above function module.

refresh control <table control name> from screen <screen no>.

endif.

Bye

Thats All.