Few Pointers -
HIDE - The values to be passed into the next level should be put in this statement.
SY-LSIND - The level of the list that is being displayed
You can drill down to 20 levels.
Sample Report -
tables: kna1, vbak, vbap.
select-options: s_kunnr for kna1-kunnr.
data: begin of itab occurs 0,kunnr like kna1-kunnr,name like kna1-name1,end of itab.
data: begin of jtab occurs 0,vbeln like vbak-vbeln,netwr like vbak-netwr,end of jtab.
data: begin of ktab occurs 0,posnr like vbap-posnr,matnr like vbap-matnr,end of ktab.
data: v_fnam(10), v_fval(10).
start-of-selection.
select kunnr name1 from kna1 into table itab where kunnr in s_kunnr.
loop at itab.write:/ itab-kunnr hotspot, itab-name.hide itab-kunnr.endloop.
at line-selection.
case sy-lsind.
when 1.select vbeln netwr from vbak into table jtab where kunnr = itab-kunnr.
loop at jtab.write:/ jtab-vbeln hotspot, jtab-netwr.hide jtab-vbeln.endloop.
when 2.
select posnr matnr from vbap into table ktab where vbeln = jtab-vbeln.
loop at ktab.write:/ ktab-posnr, ktab-matnr hotspot.endloop.
when 3.get cursor field v_fnam value v_fval.set parameter id 'MAT' field v_fval.call transaction 'MM02'.
endcase.
top-of-page.write:/ 'Custom Deatils Report'.
top-of-page during line-selection.
case sy-lsind.
when 1.write:/ 'Sales Details Report'.
when 2.write:/ 'Item Details Report'.
endcase.
Monday, January 31, 2011
Events in Reports
Classical Reports generates the Basic List and Interactive reports generates the Up to 20 Secondary Lists.
Sequence of events -
INTIALIZATION
AT SELECTION-SCREEN OUTPUT
AT SELECTION-SCREEN ON
AT SELECTION-SCREEN
START-OF-SELECTION
END-OF-SELECTION
TOP-OF-PAGE
END-OF-PAGE
AT USER-COMMAND
AT PF()
AT LINE-SELECTION
Initialization: is the event to get assign the value as a default(nothing but the initialization of the variable). It is the first event to trigger but if your program contains parameters or Select Options it trigger but not show the output on the list.
AT SELECTION-SCREEN OUTPUT -PBO for selection screen, just before displaying the screen
AT SELECTION-SCREEN ON- PAI on field
AT SELECTION-SCREEN - PAI of the selection screen
Top-of-page: is the event to design the header of the list. It is the only the event trigger after the initialization. Fist the control goes to Start-of-selection and then system(driver program ) searches for the Top-of-page envent if it has declared, immediatly control goes to that event and print the data whatever you given under that event.
Start-of-Selection: is the event to picking up the data from the database and for generating the Basic list data. It triggers after the top-of-page event. By defualt system declares this event, if you forget to declare in your report.
End-of-Selection: is the event that let to know the system program has just completed the execution of the Start-of-Selection event. it triggers after the Start-of-selection event.
End-of-page: is the event to display the Total Calculations or Page No.s and Footer Headings.
At PF: is the event to generate the GUIs(Graphical User Interface) like tool bars, application bar, title bar, Menu bar etc.,
At User-Command: used for generates the Push Buttons , Command Buttons etc., These events will trigger when the user perform some actions like pressing the command button .
At Line-Selection: is the event to geneartes the Secondary Lists, it will trigger when the user double click or press F2 key on the list contents. for generating the Secondary list sap provided predifined statements: SY-LIST,SY-LILLY,etc.,for entire record ,if you double click anywhere on the record it generates same secondary list. if you want to generate the secondary list based on the field you can go for GET CURSOR FIELD fieldname VALUE fieldvalue.
Top-of-page During Line-Selection: is the event to generate the Headers during on the Secondary List. You can generate different page headers for secondary lists
Sequence of events -
INTIALIZATION
AT SELECTION-SCREEN OUTPUT
AT SELECTION-SCREEN ON
AT SELECTION-SCREEN
START-OF-SELECTION
END-OF-SELECTION
TOP-OF-PAGE
END-OF-PAGE
AT USER-COMMAND
AT PF()
AT LINE-SELECTION
Initialization: is the event to get assign the value as a default(nothing but the initialization of the variable). It is the first event to trigger but if your program contains parameters or Select Options it trigger but not show the output on the list.
AT SELECTION-SCREEN OUTPUT -PBO for selection screen, just before displaying the screen
AT SELECTION-SCREEN ON
AT SELECTION-SCREEN - PAI of the selection screen
Top-of-page: is the event to design the header of the list. It is the only the event trigger after the initialization. Fist the control goes to Start-of-selection and then system(driver program ) searches for the Top-of-page envent if it has declared, immediatly control goes to that event and print the data whatever you given under that event.
Start-of-Selection: is the event to picking up the data from the database and for generating the Basic list data. It triggers after the top-of-page event. By defualt system declares this event, if you forget to declare in your report.
End-of-Selection: is the event that let to know the system program has just completed the execution of the Start-of-Selection event. it triggers after the Start-of-selection event.
End-of-page: is the event to display the Total Calculations or Page No.s and Footer Headings.
At PF: is the event to generate the GUIs(Graphical User Interface) like tool bars, application bar, title bar, Menu bar etc.,
At User-Command: used for generates the Push Buttons , Command Buttons etc., These events will trigger when the user perform some actions like pressing the command button .
At Line-Selection: is the event to geneartes the Secondary Lists, it will trigger when the user double click or press F2 key on the list contents. for generating the Secondary list sap provided predifined statements: SY-LIST,SY-LILLY,etc.,for entire record ,if you double click anywhere on the record it generates same secondary list. if you want to generate the secondary list based on the field you can go for GET CURSOR FIELD fieldname VALUE fieldvalue.
Top-of-page During Line-Selection: is the event to generate the Headers during on the Secondary List. You can generate different page headers for secondary lists
Saturday, January 29, 2011
FAQS
Following infotypes cannot be enhanced - 0000, 0302, Time infotypes (2xxx), Applicant Actions (4000)
Time Constraints
Time Constraint 1 - No gaps and No Overlap Ex - infotype 0001
Time Constraint 2 - Gaps are allowed but no overlap Ex: 0021 ( Spouse and Divorced )
Time Constraint 3 - Gaps and overlaps allowed - Ex - 0014 - Recurring payment
Time Constraint A - One record in the system begin date 1/1/1800 - 12/31/9999, cannot be deleted - Ex - infoype 0003
Time Constraint B - One record in the system with begin date 1/1/1800 - 12/31/9999, can be deleted - Ex - 0031
Time Constriant T - Varies according to subtype - Ex - 0009
Time Constrain Z - For Time management infotypes. Based on time constraint class table and collision table
Time Constriants in OM - 0, 1, 2.
0 - One record in the system
1 - without gaps
2 - with gaps
3 - as often as required
Time Constraint 2 - Gaps are allowed but no overlap Ex: 0021 ( Spouse and Divorced )
Time Constraint 3 - Gaps and overlaps allowed - Ex - 0014 - Recurring payment
Time Constraint A - One record in the system begin date 1/1/1800 - 12/31/9999, cannot be deleted - Ex - infoype 0003
Time Constraint B - One record in the system with begin date 1/1/1800 - 12/31/9999, can be deleted - Ex - 0031
Time Constriant T - Varies according to subtype - Ex - 0009
Time Constrain Z - For Time management infotypes. Based on time constraint class table and collision table
Time Constriants in OM - 0, 1, 2.
0 - One record in the system
1 - without gaps
2 - with gaps
3 - as often as required
Subscribe to:
Posts (Atom)