SAP---ABAP

Monday, September 17, 2007

TABLE-2



Function to Display All the Columns of any Table Work Area


Advantage :-

This function can be used as a quick write report with very less coding to any passed internal table.

use & enjoy.


Note:-


1. Created quick ALV function to display alv for any internal table passed.
2. Developed dynamic program generation ( we can execute program dynamically without passing request to the production server)
3. Created a dynamic program to display any FOXPRO table into ABAP ALV.

Feel free to contact for your doubts.

Thanks

Calling the function :-

CALL FUNCTION 'ZPREM_QLINE' TABLES zf = internal_table .

**********

create a function & define ZF in the tables parameter name without Type spec.

************source code

FUNCTION ZPREM_QLINE.
FIELD-SYMBOLS: .
DO.
ASSIGN COMPONENT SY-INDEX OF STRUCTURE ZF TO .
IF SY-SUBRC <> 0. EXIT. ENDIF.
if sy-index = 1. write / ' '. endif.
if sy-index = 25. exit. endif.
WRITE : , sy-vline.
ENDDO.
ENDFUNCTION.

No comments: