0% found this document useful (0 votes)
64 views4 pages

Executable Program On Alv

This document contains sample code for creating an interactive ALV report in ABAP. It defines internal tables and function modules for column headings, event handling, and output display. The code selects sales order data, displays it in an interactive popup table, and allows the user to drill down to order details in a second ALV grid based on their selection.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
0% found this document useful (0 votes)
64 views4 pages

Executable Program On Alv

This document contains sample code for creating an interactive ALV report in ABAP. It defines internal tables and function modules for column headings, event handling, and output display. The code selects sales order data, displays it in an interactive popup table, and allows the user to drill down to order details in a second ALV grid based on their selection.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 4

****EXECUTABLE PROGRAM ON ALV**** REPORT Y_MALVPOV . ****TABLE WORK AREA TABLES:KNA1,VBAK.

***SELECTION SCREEN*** PARAMETERS:P_KUNNR LIKE KNA1-KUNNR DEFAULT 1001. SELECT-OPTIONS:S_VBELN FOR VBAK-VBELN. ****DEFINE INTERNAL TABLE*** DATA:BEGIN OF IT_ITAB OCCURS 0, VBELN LIKE VBAK-VBELN, END OF IT_ITAB. ***DEFINE INTERNAL TABLE WITH HEADER LINE**** DATA:IT_JTAB LIKE VBAK OCCURS 0 WITH HEADER LINE. ****PROVIDE TYPE GROUP*** TYPE-POOLS:SLIS. ***MAINTAIN REPORT ID*** DATA:REPID LIKE SY-REPID, ****DEFINE COLUMN HEADING**** VBAK_B TYPE SLIS_T_FIELDCAT_ALV, ****EVENT*** EVENTS_B TYPE SLIS_T_EVENT. ****VARIABLE FOR STORING VALUE*** DATA:IDEX TYPE I. ***FUNCTION MODULE COLUMN HEADINGS**** CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE' EXPORTING I_STRUCTURE_NAME = 'VBAK'

CHANGING Ct_fieldcat = VBAK_B. ****REPORT ID SYSTEM VARIABLE**** REPID = SY-REPID. ****AT SELECTION SCREEN **** AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_VBELN-LOW. *****FUNCTION MODULE FOR ADDING ZEROS AND DELETING THE ZEROS*** CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT' EXPORTING input = P_KUNNR IMPORTING OUTPUT = P_KUNNR. ****SELECT STATEMENT FOR OUTPUT DISPLAY*** SELECT VBELN FROM VBAK INTO TABLE IT_ITAB. ****FUNCTION MODULE FOR OUPUT DISPLAY*** CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY' EXPORTING endpos_col = 30 endpos_row = 30 startpos_col = 10 startpos_row = 10 titletext = 'SALES DETAILS' IMPORTING CHOISE = IDEX tables valuetab = IT_ITAB. READ TABLE IT_ITAB INDEX IDEX. S_VBELN-LOW = IT_ITAB-VBELN. IF SY-SUBRC <> 0. LEAVE. ENDIF.

****START-OF-SELECTION EVENT*** START-OF-SELECTION. SELECT * FROM VBAK INTO TABLE IT_JTAB WHERE VBELN = S_VBELN-LOW. ****FUNCTION MODULE OUTPUT DISPLAY*** CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY' EXPORTING I_CALLBACK_PROGRAM = REPID IT_FIELDCAT = VBAK_B IT_EVENTS = EVENTS_B TABLES t_outtab = IT_JTAB. ****END OF PROGRAM**** RELATED POSTS ALV INTERACTIVE REPORT SAMPLE CODE INTERACTIVE REPORT SAMPLE CODE 2 ALV SAMPLE CODE OUTPUT TO EXCEL SHEET ALV LIST OBJECT ORIENTED STYLE ALV SAMPLE CODE COLOURING ALV SIMPLE REPORT SAMPLE CODE ALV DOUBLE CLICK SAMPLE CODE ALV INTERACTIVE REPORT SAMPLE CODE ALV FOR CHECK BOXES SAMPLE CODE ALV BLOCK REPORT SAMPLE CODE ALV LAYOUT DISPLAY SAMPLE CODE ALV LIST DISPLAY SAMPLE CODE ALV HIRARCHICAL REPORT SAMPLE CODE REPLACE COMMENTARY WITH ALV REPORT SAMPLE CODE FOR DATA BASE ACCESSING FROM UNIX FILE ALV SAMPLE CODE CONTACT RENUAL DETAILS

SAP Financial Part Three Assets and LiabilitiesProfit and LossClosing ProcessASAP Implementation Road MapASAP Project implementation and RealizationOrganizational StructureMaster Data Depreciation AreasAsset AllocationInformation System Legacy Data Transfer Support this blog with Your Google Vote here @ Labels: ABAP ALV REPORTS SAMPLE CODES

0 comments: Post a Comment

You might also like