Skip to Content
Former Member
Dec 14, 2011 at 07:39 AM

Query regarding a specific usage of 'ALSM_EXCEL_TO_INTERNAL_TABLE' FM + ALV


HI all,

I am new to ABAP and this is my first project.

I have the following requirement as a part of my object. Kindly help me with the code or atleast snippet of code. The useful responses will be rewarded with points.

An .xls file needs to be uploaded from the user's desktop at the selection screen. and run in 'test run' or 'upload run' mode.

The file has header items from row 6 and the line items from row 10. The number of line items are limited to 999 else an error needs to be thrown to the user incase the file contains from 999 line items.

Also, then there are some validations that need to be performed and then data needs to be posted to SAP using a BAPI 'BAPI_ACC_DOCUMENT_POST'.

Also, after posting, an ALV report needs to be generated displaying the header items row wise and then below it , the successful line items that were processed and then further below, row-wise the unsuccessful line items alongwith the error message for each row.

Can anyone provide some code snippets for each of the above mentioned points and some sequence of logic as well ?

Thanks a lot.

Edited by: Aniket Pallav on Dec 14, 2011 8:41 AM