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: 

Clipboard to selection screen

Former Member
0 Kudos

Hi Experts

Can we copy values from clipboard to selection screen of the report at initialisation event?

Thanks in advance.

Giri.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

I have not tried in Initialization event.

But this method will help you to import data from clipboard to internal table


TYPES: BEGIN OF YS_EXCEL,
         LINE(4096)               TYPE C,
         END OF YS_EXCEL.

  DATA: LT_EXCEL_CLP TYPE  YT_EXCEL.


  CALL METHOD CL_GUI_FRONTEND_SERVICES=>CLIPBOARD_IMPORT
     IMPORTING
       DATA                 = LT_EXCEL_CLP
*    LENGTH               =
     EXCEPTIONS
       CNTL_ERROR           = 1
       ERROR_NO_GUI         = 2
       NOT_SUPPORTED_BY_GUI = 3
       OTHERS               = 4
          .

Cheers,

Kothand

1 REPLY 1

Former Member
0 Kudos

Hi,

I have not tried in Initialization event.

But this method will help you to import data from clipboard to internal table


TYPES: BEGIN OF YS_EXCEL,
         LINE(4096)               TYPE C,
         END OF YS_EXCEL.

  DATA: LT_EXCEL_CLP TYPE  YT_EXCEL.


  CALL METHOD CL_GUI_FRONTEND_SERVICES=>CLIPBOARD_IMPORT
     IMPORTING
       DATA                 = LT_EXCEL_CLP
*    LENGTH               =
     EXCEPTIONS
       CNTL_ERROR           = 1
       ERROR_NO_GUI         = 2
       NOT_SUPPORTED_BY_GUI = 3
       OTHERS               = 4
          .

Cheers,

Kothand