Free Download SAP ABAP Books,Projects,Reports AndFree Download SAP ABAP Books,Projects,Reports AndABAP ABAP report Interactive Report ALV grid ALV list IDOC User Exit RFC Smartform sapscript ABAP Performance Remote Function Module RFC Function Module Modularization techniques ABAP tools ALV report Generator ABAP Interview Questions BDC BAPI ALE
Articles:
1, 2
Articles
Defining Statistics
2008-02-07 21:04:00 ABAP Query also allows you to define statistics. In contrast to basic lists, the data in statistics and ranked lists is always output in compressed form. For further information, refer to the following sections. More About: Statistics
Generating Statistics
2008-02-07 21:04:00 Below is a statistic showing the sales figures for each airline carrier. For this purpose, you can create a query S1 for the functional area FLBU (flight bookings). After assigning a title, format and note, you then choose the functional groups Flight connections and Flights.The only fields you need are Airline carrier ID and die Total of current bookings. You select these on the next screen and then use the Statistik function to branch to definition of a statistic.Each statistic must have its own title, since there can be several statistics.You can specify the sequence in which you want to output the fields and whether they should be in ascending or descending order.Totals are always calculated for numeric fields. For this reason, you can also determine average values, the number of selected records (summands) and percentages.To calculate average values and percentages, you must sum over currency fields. You must also convert the amounts to one currency - the reference currency. Th... More About: Statistics
Output Positions of Fields
2008-02-07 21:03:00 Until now, we have only specified the output line and the sequence of fields when determining the output position of fields. As already mentioned, however, it is also possible to place fields in a particular place on the screen and to insert texts at desired points in your list. For example, you can format the list of flight connections G1 as follows:After copying the query G1 to G8, you can first change the output lines and the sequence of fields:You then sort by the individual flight connections and specify on the Control levels screen that you want each control level to be displayed in a box. Since no column headers are needed in the new list, you can delete the Header option on the List Line Output Options screen. If you now proceed to the next screen in the sequence, you branch to the Field Output Options screen.You specify a fixed output position for the fields From city, Departure time and Arrival time. Since the fields Airline carrier ID, Departure time and Arrival time requ... More About: Fields
Totals lists
2008-02-07 21:03:00 The sections above described how to define lists which contain control totals. However, it is also possible to generate lists which output only control totals and overall totals.You can always display control totals and overall totals in a secondary list by using the Display totals only function in the list display. Suppose you want the query G7 to generate a list which contains the revenues, i.e. the total bookings, for each airline carrier and flight connection.You first define the sort sequence and the fields to be summed:On the Control levels screen, you specify that you want to output sub-totals for each airline carrier and each flight connection. To do this, you must select the column Total for these control levels and also the column Box for the Airline carrier ID.This definition generates the following list:Totals lists also generate an automatic currency distribution, if the summed field is a currency amount field. In contrast to single item output, however, the currency a... More About: Lists
Changing Control Level Texts
2008-02-07 21:02:00 The previous examples demonstrated how you can design the layout of your list if you select the columns Text, Total and Counter when you are on the Control levels screen.Text If you select the column Text, a (control level) text containing the field contents is output at the start of the control level, that is whenever the contents of the affected field change. Total If you select the column Total, the sub-total for all summed fields is output at the end of the control level. Here again, a (control level) text is also displayed. This describes the control level and contains the contents of the control level field. Counter If you select the column Counter, this displays the number the of times the selected fields appeared in that particular dataset at the end of the control level. Here a text is displayed that describes the control level and contains the contents of the control level field. In the previous examples, the control level and sub-total texts are always the standard ... More About: Changing
Sorting and Sub-totals
2008-02-07 21:02:00 In this example, suppose you want to generate a list which contains booking information for each flight. You want to display a subtotal giving the amounts paid per booking in each case and an overall total at the end of the list.You can use G5 as the basis for this: Copy it and call it G6. Then, change the title and note.You must now extend the field selection by a few fields from the functional group Bookings.On the Basic List Line Structure screen, you extend the definition of the basic list. You also specify which field you want to sum. Since you want to sum the Booking price in foreign currency field, you select the column Total for this field.In order to count the number of bookings, select the checkbox for this entry in the Counter column. If you continue with the normal sequence of screens, you now branch to the screen where you can specify output options for each control level. Since you want to display a sub-total and the number of bookings for each flight, you select the c... More About: Sorting
Defining Multiple Line Basic Lists
2008-02-07 21:01:00 Suppose you want to generate a list showing, for each flight connection, the actual flights together with the date, price and information about occupied and free seats.To do this, you can copy the query G2 and call it G5. Then, change the title of G5 and enter a new note.On the Select Function Group screen, which is displayed next, choose the functional group Flights.This is followed by the Select Field screen where you select the fields which contains the required flight information. You can see these fields in the screen shown below. Now, determine the output lines. To do this, branch to the screen for defining the basic list.In this basic list, two different lines are defined. This means that the list is a two-line basic list. With a two-line basic list, you should cancel the Columns separated by | option. Also, since you want each individual flight connection to be displayed in a box, select the column Box on the next screen for the control level Departure time. You can now exe... More About: Lists , Basic , Line
Output Options for Control Levels
2008-02-07 21:01:00 When you specify a sort sequence, the next screen in the sequence of query screens allows you to define the sort order and the output options for control levels.If, for example, you want to sort in descending order, you must select the column Desc (descending).To specify output of a blank line or a new page, you select the appropriate columns (BlnkLn, NewPg.). You can also display a complete control level, i.e. all the associated lines, in a box. To do this for each of the flight connections between two places in our example, the column Box is selected for the Destination and From city.You now execute the query which generates the following list:Control levels increase the options you have for varying the layout of your list. You can, for example, output a list with the following format:The sort criterion From city no longer appears on one line, but at the beginning of a control level.To generate this list, you first copy the query G2 and call it G3 .You can then change the q... More About: Options
Sorting
2008-02-07 21:00:00 Suppose you want to generate a list of flight connections sorted by das nach Point of departure, Destination and Departure time.To do this, you can use the existing query G1. Copy G1 and assign to it the name G2. You can now change the copy. Enter a note to document the difference to G1, for example: Sorted by point of departure, Destination and Departure time .You can select several functional groups and fields, but the fields already chosen are sufficient for the list you want to generate. On the screen where the basic list line structure is defined, you specify the sort sequence by entering it after the corresponding fields (Point of departure: 1, Destination: 2, Departure time: 3) in the column Sort.This concludes the definition of a sorted list.You can now execute the query. When you have entered your criteria on the selection screen, you can display the list. More About: Sorting
Changing Headers
2008-02-07 20:59:00 On the Basic List Header screen, you can define the page header and the page footer for the pages of the basic list.This screen shows the general structure of the basic list. It contains the header line (page header), the line structure and the footer line (page footer). The header lines include fixed headers and column headers. Column headers are generated for lines for which you selected the column Header on the List Line Output Options screen. Fixed headers Fixed header lines depend on the structure of the query. You can define any number of header lines. On the maintenance screen, the header lines are ready for input and can accept any entries you make. The Edit menu contains functions which allow you to insert or delete lines. Blank header lines are not output in the list.You can define fixed header lines and footer lines so that when you generate the query list, they can receive current values of certain fields (see ). When defining a header line or footer line, this means... More About: Changing
Graphics
2008-02-07 20:59:00 As mentioned in Executing Queries, one-line basic lists, statistics and ranked lists can be displayed in graphical format. On the Graphics , you can define this graphical output depending on the values you choose to display and the graphic type you use. By specifying the Graphic type, you can determine in which format the graphic is to be displayed.Remember that some graphic types (for example pie charts) cannot display negative number values. To generate a graphic, text/value pairs are passed to SAP Business Graphics. When calling the graphic, you choose the values by placing the cursor accordingly (see Executing Queries) and the texts are determined automatically. The text for a particular value derives from the contents of the non-numeric fields in the line of the list where this value occurs.Under No. of displayed values, you specify how many number values you want to display in the graphic. SAP Business Graphics can display up to 32 text/value pairs. All the specifications...
Defining Output Options for Each Line
2008-02-07 20:58:00 On the List Line Output Options screen, you can define output options for each line.The column Color allows you to define an output format for each line. These output formats (colors) are described by terms which identify their purpose according to the SAP standard. You can only change the color for a line with the possible entries key. This shows you the color palette from which you can choose a new format.If you select the column Header, the system makes column headers available for this line. You then see these headers on a subsequent screen and can make changes, if necessary.In order to allow for better layout in basic lists using both diagonal and vertical lines, the new options Slash before/after and Columns with | have been added.The options Slash before and Slash after can be set for each line and determine where a diagonal line is inserted when it is displayed. This function can only be used in conjunction with the Basic list with border (frame) option on the Basic list lin...
Defining Output Options for each Field
2008-02-07 20:58:00 On the Field Output Options screen, you can define output options for individual fields. This allows you to change the layout of your list radically.Beside each field name, ABAP Query displays the standard output length of a field. If you wish to modify this, enter the new output length in the column New. Increasing the output length may be particularly important if you are summing over a field and the output length required by the total is greater than that of the individual field.In the column Pos, you can specify an explicit output position for a field. To determine the correct position, use the ruler provided below in the part of the screen showing the line structure.In the column Unit, you can specify whether you want to output the relevant currency or quantity unit before or after currency amount fields and quantity fields, or not at all.Currency amount fields and quantity fields are numeric fields which each have an assigned currency field or unit field. The correct interpret...
Defining the Line Structure
2008-02-07 20:56:00 On the Basic List Line Structure screen, you specify the lines in which you want to display and the order in which you want the fields to appear.The following basic list contains all the fields on one line. This basic list is also known as a single-line basic list. There are three variants of the Basic List Line Structure screen. The lower part of the screen for each of these variants contains different information:The line structure of the basic list. If you make changes in the upper part of the screen, these are reflected at once below (that is, after you press ENTER). To display the complete list layout, choose Query ® Layout display.The individual options. The field display. By using one of the functions Settings ® With help texts, Settings ® Without help texts or Query ® Line structure and then choosing the appropriate pushbutton on the screen, you can switch between these three screens. All the screens for defining basic lists, statistics and ra...
Debug Smartform
2008-02-05 16:20:00 Question : Subject : Debug Smartform Hello All How do we debug Smartform ? Can we set up debugger as in SapScript ? Answers : Subject : Debug Smartform Hi. In the Smartform, create a Code Node and within the Code Node you can hardcode a normal abapBreak Point.
Calling SMARTFORMS from your ABAP program
More articles from this author:2008-02-05 16:20:00 Calling SMARTFORMS from your ABAP program REPORT ZSMARTFORM. * Calling SMARTFORMS from your ABAP program.* Collecting all the table data in your program, and pass once to SMARTFORMS* SMARTFORMS* Declare your table type in :-* Global Settings -> Form Interface* Global Definintions -> Global Data* Main Window -> Table -> DATA** Written by : SAP Hints and Tips on Configuration and ABAP/4 Program ming* http://sapr3.tripod.com* TABLES: MKPF. DATA: FM_NAME TYPE RS38L_FNAM. DATA: BEGIN OF INT_MKPF OCCURS 0. INCLUDE STRUCTURE MKPF.DATA: END OF INT_MKPF. SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001. SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR. MOVE-CORRESPONDING MKPF TO INT_MKPF. APPEND INT_MKPF. ENDSELECT. * At the end of your program.* Passing data to SMARTFORMS call function 'SSF_FUNCTION_MODULE_NAME' exporting formname = 'ZSMARTFORM'* VARIANT = ' '* DIRECT_CALL = ' ' IMPORTING FM_NAME ... More About: Calling 1, 2 |



