Skip to Content
0
Jun 20, 2016 at 06:54 AM

how to check z-program used memory/buffer cleared or not after executed the program.

509 Views

Hi Experts,

I have an issue with excel upload, as per my requirement i need to read more then 10K the records from excel. So I copied the ALSM fm(ALSM_EXCEL_TO_INTERNAL_TABLE) into the z-ALSM. Accordingly i have changed the source code in the FM. So now every thing working fine. now i am able to read the records more than 10K from excel.

But the problem is If I run the z-program more (2 or 3) times continuously. upload is failing, even single record also not reading from the excel. I checked the standard code inside the FM. there is clipboard import method is failing to read the records check in below code and previously i thought excel clipboard was not cleared. But the excel clipboard is cleared by the method: cl_gui_frontend_services=>clipboard_export by passing empty excel_tab internal table inside the standard code itself. If i restarted/shutdown my sap gui logon and again i tried to upload the records from excel, it is working fine. Could you please me on this issue. while restarting the sap gui logon which memory/buffer is cleared?. and also while executing /after executed the z-program, is there any possibility to monitor the z-program used memory cleared or not in sap. could you Please help on this issue this is urgent.

* read clipboard into ABAP

CALL METHOD cl_gui_frontend_services=>clipboard_import

IMPORTING

data = excel_tab

EXCEPTIONS

cntl_error = 1

* ERROR_NO_GUI = 2

* NOT_SUPPORTED_BY_GUI = 3

OTHERS = 4.

IF sy-subrc <> 0.

MESSAGE a037(alsmex).

ENDIF.



Thanks & Regards

Suri.