Friday, November 23, 2007

Function to Display All the Columns of any Table Work Area in sap abap

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:

Blog Archive