‎2007 Mar 01 6:25 AM
‎2007 Mar 01 6:27 AM
Hi
You would have been more polite while you are asking .
"Tell me about reports"what reports?
There are classical and interactive reports.
You have ALV(ABAP LIST VIEWER) also.Check for more info in sdn.
Thanks
‎2007 Mar 01 6:28 AM
Hi
total SAP-ABAP can be divided into
FRICE.
FORMS
REPORTS
INTERFACES
CONVERSIONS
ENHANCEMENTS.
Report is nothing but displaying the data in most structured formatt.
This is similar like any general report like G/L Accounts report erc.
Regards,
kumar
‎2007 Mar 01 6:29 AM
Reports are two types.
1 Classical
2 Interactive reports
Classical report is just an output for an input specified.
Interactive report is report where a output is displayed and on events on the output another report is generated .
This are list reports where you write statements
There are reports based on ABAP LIST VIEWER ( ALV) where you use standard function module REUSE_ALV_LIST_DISPLAY OR REUSE_ALV_GRID_DISPLAY this reporst also have diff options and functionality like download to excel ,sorting ,subtotal ,totals ,changing the layout .
PLease reward if useful.
‎2007 Mar 01 6:32 AM
‎2007 Mar 01 6:34 AM
‎2007 Mar 01 6:47 AM
Reports : extracting,collectiing and formating data which is stored in database is done by
report program.
the program which is written to retrieve and display data is report program and the list which is displayed on the screen when you ecectue the program is called as LIST (output of the report.
SAP has provided thousand of preprogrammed reports.User just selects a menu option or just one click here and there and the report is displayed.
you want to display the data which user needs.
for ex: user wants to see the all the employee record who have joined after 13 jan 1998.
in this case you have to pass the information to the system that he needs only those employee where joining date is greater than 13 jan 1998.
SELECTION-CRITERIA : (ACCEPTS INPUT FROM USER).
SELECT-OPTIONS : SMARA FOR MARA-MATNR.
WE HAVE TWO TYPES OF REPORTS:
CLASSICAL REPORTS
INTERACTIVE REPORTS
CLASSICAL REPORTS (EVENTS IN CLASSICAL REPORT).
INITIALIZATION.(TRIGGERED WHEN YOU EXECUTE YOUR PROGRAM FOR FIRST TIME.
AT SELECTION-SCREEN (WHEN USER ENTERS THE VALUES IN THE FIELDS OF SELECTION SCREEN AND CLICK ON EXECUTE BUTTON THIS EVENT IS TRIGGERED.(DATA VALIDITY CHECKING)
AT SELECTION-SCREEN OUTPUT.(SAME,THIS EVENT IS FOR CHECKING INDIVIDUAL FIELDS)
START-OF-SELECTION
TOP-OF-PAGE(ITS TRIGGERED FOR THE FIRST WRITE STATEMENT)
END-OF-PAGE(WHEN YOU REACH END PAGE)
END-OF-SELECTION.
AT SELECTION-SCREEN:
IF SMARA-LOW NE 'LH' AND SMARA-HIGH NE 'SQ'.
HERE SYSTEM WILL NOT PROCEED IF VALUES ENTERED ARE WRONG.
START-OF-SELECTION.
DATA DECLARTION CAN BE DONE,AND ACTUALLY CODING WILL START.
TOP-OF-PAGE : APPLICABLE TO ALL THE PAGES
EX: WRITE THE COMPANY NAME,COLUMN HEADERS FOR ALL THE PAGES)
INTERACTIVE REPORT CONSISTS OF ONE BASIC LIST AND 20 SECONDARY LIST.BASIC LIST IS PRODUCED BY START-OF-SELECTION.
WHEN THE USER DOUBLE CLICKS SECONDARY LIST IS PRODUCED.
INTERACTIVE REPORT
AT LINE SELECTION
AT USER-COMMAND.
atline selection
http://help.sap.com/saphelp_di471/helpdata/EN/9f/dba3ae35c111d1829f0000e829fbfe/content.htm
See this link,
http://help.sap.com/saphelp_di471/helpdata/EN/9f/dba3ae35c111d1829f0000e829fbfe/content.htm
Event in interactive reporting
This event is processed whenever the user chooses a valid line in the list (i.e. a line generated by statements such as WRITE , ULINE or SKIP ) with the cursor and presses the function key which has the function PICK in the interface definition. This should normally be the function key F2 , because it has the same effect as double-clicking the mouse, or single-clicking in the case of a hotspot .
The processing for the event AT LINE-SELECTION usually generates further list output (the details list) which completely covers the current list display. If the latter is still visible (to aid user orientation), this may be due to the key word WINDOW .
In most cases, the information is from the selected line is used to retrieve more comprehensive information by direct reading. When displaying the original list, you store the key terms needed for this in the HIDE area of the output line.
at line selection event is mainly used when u r using a drill down list.
that is,
when u click on the list in the output it triggers or navigates us into another output i.e another list.
consider this code.it can be helpful.
TYPES : BEGIN OF TY_A1,
VBELN TYPE VBAK-VBELN,
ERNAM TYPE VBAK-ERNAM,
ERDAT TYPE VBAK-ERDAT,
NAME1 TYPE KNA1-NAME1,
END OF TY_A1,
BEGIN OF TY_A2,
MATNR TYPE VBAP-MATNR,
MAKTX TYPE MAKT-MAKTX,
CHARG TYPE VBAP-CHARG,
POSNR TYPE VBAP-POSNR,
END OF TY_A2.
&*********************************************************************
&*********************************************************************
DATA : IT_A1 TYPE TABLE OF TY_A1,
IT_A2 TYPE TABLE OF TY_A2.
DATA : WA_A1 TYPE TY_A1,
WA_A2 TYPE TY_A2.
AT LINE-SELECTION.
PERFORM F1.
TOP-OF-PAGE.
ULINE 1(100).
WRITE : 100 SY-VLINE.
WRITE 😕 SY-VLINE, 02 TEXT-000,SY-VLINE,
15 TEXT-001,SY-VLINE,
40 TEXT-002,SY-VLINE,
60 TEXT-003, 100 SY-VLINE.
WRITE :/100 SY-VLINE.
WRITE AT 1(100) SY-ULINE.
WRITE : 100 SY-VLINE.
END-OF-PAGE.
TOP-OF-PAGE DURING LINE-SELECTION.
ULINE 1(100).
WRITE : 100 SY-VLINE.
WRITE 😕 SY-VLINE, 02 TEXT-004,SY-VLINE,
25 TEXT-005, 56 SY-VLINE,
65 TEXT-006,SY-VLINE,
85 TEXT-007,
100 SY-VLINE.
WRITE :/100 SY-VLINE.
WRITE AT 1(100) SY-ULINE.
WRITE : 100 SY-VLINE.
START-OF-SELECTION .
PERFORM F2.
END-OF-SELECTION .
&----
*& Form F2
&----
text
----
FORM F2 .
IF P_DATE-LOW IS NOT INITIAL AND P_DATE-HIGH IS NOT INITIAL.
SELECT VBAK~VBELN
VBAK~ERNAM
VBAK~ERDAT
KNA1~NAME1
FROM VBAK INNER JOIN KNA1
ON VBAKKUNNR = KNA1KUNNR
INTO CORRESPONDING FIELDS OF TABLE IT_A1
WHERE VBAKERDAT > P_DATE-LOW AND VBAKERDAT < P_DATE-HIGH.
ELSEIF P_DATE IS INITIAL.
MESSAGE E000(ZTH_TEST).
ELSEIF P_DATE-LOW IS NOT INITIAL AND P_DATE-HIGH IS INITIAL.
SELECT VBAK~VBELN
VBAK~ERNAM
VBAK~ERDAT
KNA1~NAME1
FROM VBAK INNER JOIN KNA1
ON VBAKKUNNR = KNA1KUNNR
INTO CORRESPONDING FIELDS OF TABLE IT_A1
WHERE VBAK~ERDAT = P_DATE-LOW.
ELSEIF P_DATE-HIGH IS NOT INITIAL AND P_DATE-LOW IS INITIAL.
SELECT VBAK~VBELN
VBAK~ERNAM
VBAK~ERDAT
KNA1~NAME1
FROM VBAK INNER JOIN KNA1
ON VBAKKUNNR = KNA1KUNNR
INTO CORRESPONDING FIELDS OF TABLE IT_A1
WHERE VBAK~ERDAT < P_DATE-HIGH.
ENDIF.
IF SY-SUBRC <> 0.
MESSAGE E001(ZTH_TEST).
ELSE.
*SKIP 2.
LOOP AT IT_A1 INTO WA_A1.
WRITE : / SY-VLINE, 03 WA_A1-VBELN,14 SY-VLINE.
HIDE WA_A1-VBELN. WRITE: 20 WA_A1-ERNAM,34 SY-VLINE,
36 WA_A1-ERDAT,54 SY-VLINE,
60 WA_A1-NAME1,100 SY-VLINE.
ENDLOOP.
WRITE AT 1(100) SY-ULINE.
ENDIF.
ENDFORM. "F2
&----
*& Form F1
&----
text
----
FORM F1.
SELECT VBAP~MATNR
MAKT~MAKTX
VBAP~CHARG
VBAP~POSNR
FROM VBAP INNER JOIN MAKT
ON VBAPMATNR = MAKTMATNR
INTO CORRESPONDING FIELDS OF TABLE IT_A2
WHERE VBAP~VBELN = WA_A1-VBELN AND SPRAS = 'EN'.
*SKIP 2.
LOOP AT IT_A2 INTO WA_A2.
WRITE : / SY-VLINE, WA_A2-MATNR, 14 SY-VLINE,
16 WA_A2-MAKTX, 56 SY-VLINE,
65 WA_A2-CHARG, 78 SY-VLINE,
85 WA_A2-POSNR, 100 SY-VLINE.
ENDLOOP.
WRITE AT 1(100) SY-ULINE.
ENDFORM. "F1
AT USER-COMMAND:
If the user chooses a function code during list processing that is neither processed by the system, or PICK or PF<nn>, the system triggers the event AT USER-COMMAND. For this event, you must define your own GUI status for a list. To react to your own function codes in a program, you must define the following event block:
AT USER-COMMAND.
<statements>.
In this event block, you can use an IF or CASE structure to tell the function codes apart. They are available in the system field SY-UCOMM. There are further system fields that are filled in list events, such as SY-LSIND and SY-PFKEY, that allow you to make further case distinctions.
REPORT Test_program.
START-OF-SELECTION.
SET PF-STATUS 'TEST'.
WRITE: 'Basic list, SY-LSIND =', sy-lsind.
AT LINE-SELECTION.
WRITE: 'LINE-SELECTION, SY-LSIND =', sy-lsind.
AT USER-COMMAND.
CASE sy-ucomm.
WHEN 'TEST'.
WRITE: 'TEST, SY-LSIND =', sy-lsind.
ENDCASE.
With this code double click on 'TEST' and define your own PF status and give user command as TEST and check out this useful programe.
award points if useful.
sri
‎2014 Feb 25 8:03 AM
still I wonder why there is an answer for improper question?
I can see several answers for same question