If you wish to import the contents of the clipboard into SAP, then you can use the function module given below.
SAP ABAP function module to import the windows clipboard contents
CLPB_IMPORT
Find the code below.
REPORT ZEX_CLIPBOARDIMP .
types: ty_tab(200) type c.
Data: wa_tab type ty_tab,
int_tab type table of ty_tab.
CALL FUNCTION 'CLPB_IMPORT'
TABLES
DATA_TAB = int_tab
EXCEPTIONS
CLPB_ERROR = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
types: ty_tab(200) type c.
Data: wa_tab type ty_tab,
int_tab type table of ty_tab.
CALL FUNCTION 'CLPB_IMPORT'
TABLES
DATA_TAB = int_tab
EXCEPTIONS
CLPB_ERROR = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
No comments:
Post a Comment