**************************************** **************************************** *********
System field -- struct: syst (2007.09.242007.10.11)**************************************** **************************************** * SY-SUBRC: return Value After statement execution, 0 indicates successful SY-DATUM: current server date SY-UZEIT: current server time SY-ULINE: 255 length horizontal line SY-VLINE: vertical line SY-INDEX: cycles say the number of executions SY-TABIX: number of inner table loops SY-DYNNR: current screen number SY-MANDT: current logged-on client number SY-STEPL: returns the current row number of the screen (Table Control) SY-LOOPC for the current operation: current table control total number of rows on the screen SY-UCOMM: PAI Function Code SY-DYNNR: current screen number SY-MSGID: Message classsy-msgnr: Message numbersy -Msgty: the message TypeSY-MSGV1 ~ 4: Message variantsy-linct: LINE-COUNTSY-LINSZ set in the LINE-SIZESY-SROWS: reprot statement set in the reprot statement: Number of list rows in the current window SY-SCOLS: Number of list columns in the current window SY-PAGNO: page number SY-LINNO for the current page: row number SY-COLNO for the currently selected row: column number SY-LSIND for the currently selected column: Current List Index, level 1 List is 1sy-lilli: select a row cursor row position SY-CUROW: select the position of the cursor column ********************************** **************************************** ***************
Dynpro-se80 (2007.09.252007.10.08)**************************************** **************************************** * ******** 1. in Pai, OK _code needs to assign a value to another variable in time and clear it immediately. Then, case2. screen call (1) set screen next_screen_number: specify the subsequent screen of the current screen. The static subsequent screen specified in PAI will be temporarily overwritten (2) Call screen screen_number: suspend the current screen, enter a new screen or transaction (that is, insert a new screen stream ). Call transaction tcode in the new screen, you can use leave screen to screen 0 to return the pending screen sequence (3) Leave screen: The current screen control flow is not completed and will be transferred to the subsequent screen (4) leave to screen screen_number: Enter the specified screen or transaction leave to transaction tcode (5) set screen 0, leave screen or leave to screen 0: Terminate the current screen 3. module module_name at exit-command: it can only be used in PAI. It is triggered by a function starting with "/E" or Type E (usually back, exit, and cancel. field field_name module module_name: You can run the specified module5. table control data source on the field. If the data source is from multiple tables, you can customize a work area6. to enable table control to have the ability to select rows, you can specify in the navigation bar, ***************************** **************************************** ********************
Report (1)-system report (2007.10.08)**************************************** **************************************** * ******** 1. report Type: reports developed using ABAP and other system tools (such as SQP query) for existing reports in the SAP core system and customization process. 2. quick viewer -- sqvi: Provides unfixed forms of adhoc reports (non-routine business reports). It is a simple report generation tool provided by SAP to the user's final system (1) each system user can only define their own quickviews. Other system users cannot share this list. Because it is not a component in the SAP Transmission System 3. SAP query -- sq01: complicated, involving user groups and functional areas. (1) After the query starts, the SAP system automatically generates an internal program based on the list fields defined in queryies. The program reads the data source, processes and outputs the data (2) SAP query has a management function, which mainly determines the distribution of data sources and user groups, that is, setting functional areas and user groups, and assigning functional areas to various user groups. The functional area indicates the query data source, that is, the database table and its fields, which are often generated by referring to the logical database. If a system user needs to create queries, the user must belong to at least one user group pre-set by the system administrator and can use the functional areas of the user group. An SAP system user can have members of multiple user groups. The functional areas and user groups have many-to-many relationships. Queries is generated in a specific functional area of a specific user group. Therefore, only users in the user group can access queries.
If a user is divided into multiple user groups, the user can switch between user groups. Because queries is always related to the corresponding functional areas, if both user groups contain the same functional area and an authorized user belongs to both user groups, this user can copy the queries from one user group to another. (3) SAP query can generate a list of multiple types: basic list: it can be a single row or multiple rows. Basic multi-row tables can also compress the statistical list and sort the list: the list must contain at least one numeric field, and the number of data rows may be compressed to a local list: a query contains multiple local lists, which can be printed separately (4) some users cannot execute the design to generate an interactive list, but some standard interaction functions are provided during the list process: for example, you can pass the generated list to other tools (such as Excel and ABC Analysis) inside or outside the system, and display the list in graphs or interactive tables. 4. differences between quick viewer and SAP query (1) SAP query can create a list of basic, statistical, and sorting formats, while quckviewer can only create a basic list, does not include statistics, sorting, and other interactions (2) SAP query can be shared by multiple users. You need to set user groups and functional areas and transmit them between systems; quickviewer is a user-related ********************************* **************************************** ****************
Report (2) -- report design overview (2007.10.10)**************************************** **************************************** * ******** 1. report event: initialization: Program initialization, similar to the form constructor start-of-selection in C #: select the start event (default event ), trigger end-of-selection after processing of the selected screen: Select end event, which is triggered after processing of all logical databases. This event is generally used to output List 2. select a screen event (triggered between initialization and start-of-selection): At selection-screen output: select the screen PbO event at selection-screen...: select the pai event on the screen. There are multiple additional items. 3. logical database event (triggered after the start-of-selection event ends, used to select and sort data ): Get node... select get node late from the current data level in the logical database and select data from the previous data source level in the logical database. 4. list events (after all report process events and select screen events, the list events are triggered) Top-of-page: Header, which triggers end-of-page at the beginning of each new page: footer, triggered before the end of the current page at-line-command: Row Selection control, triggered when the user selects a list row at-user-command: user interaction control 5. trigger Process of a general report: (1) Load-of-program is triggered when type 1 starts, the runtime environment allocates the program context and the table data objects in the relevant memory region to the application server. The subsequent program flow will be controlled by the ABAP Runtime Environment (ABAP processor) (2) initialization event trigger (3) if a selection screen exists, at selection-screen output is triggered before each screen output. Environment will select the screen and send it to the display server. If you enter some values in the selection screen and execute some functions, the system will trigger the at selection-screen event and prompt the user with message information. The screen processor interacts with the ABAP processor, and the system automatically switches between them (4) when the user presses the execute button, the system recycles the program control, trigger start-of-selection (5). If a logical database exists, get and get late are triggered. (6) The end-of-selection event will be triggered at the end, and the system runtime environment will be handed over to the Display Server (7) the top-of-page and end-of-page are triggered when the list is output. When you click back to return to the selection screen, load-of-program and initialization will not trigger (8) if the list has an interactive event, it will be triggered when the interaction conditions are met. 6. termination of the event block (the following statement exists in the loop except stop, only jumps out of the loop) (1) Stop. terminate the current event block and jump to end-of-selection. If stop exists in end-of-selection, exit directly. (2) Exit. leave all event blocks and go to the list output page (that is, the content that has been output before exit) (3) Check. if the check condition is false, go to the next event block ********************************** **************************************** ***************
Report (3) -- Select Screen (2007.10.10)**************************************** **************************************** * ******** 1. screen parameter (1) After the initialization event is processed, the screen layout will be sent to the Display Server, and the initial value will be sent to the field with the same name (2) parameters name type | like type | dobj Parameter Variable Length cannot exceed 8 characters parameter format: Default Value, prefill before initialization event, therefore, only the values that have been determined before this event can be used as the default value obligatory: set to a required item low case: Set the parameter to lowercase to pass visible length Len: Set the visible display length, however, you can enter the value of matchcode object s_help that exceeds the displayed length to allocate query help. S_help must have defined value check: Value Check in the data dictionary. Check whether the user input value meets the constraints of this field (Check table, must exist ). No-display: Hide the display. During the submit call process, you can pass parameters through this field or assign values to this field before the custom selection screen is called. However, this field is no longer a screen field. Even if you use modify screen to modify its attributes, you cannot display modif ID key: Memory id pid: use the default memory value on the screen. Assign default values to parameter fields from SAP memory (User-related shared memory). The SPA/GPA parameter is a common basic technology that sap uses to fill initial data with screen elements. PID is a common sap memory ID, up to 20 bytes. You can use set/get to set and read the as checkbox: check box. The type and like options cannot be used. The parameter is a C type with a length of 1, and the value is 'x' (selected) or ''(unselected) radiobutton group Radi: Single-choice button group, the parameter is a C type with a length of 1, and the maximum Radi group name length is 4 (3) Select-options seltab for F variable format is abbc (*) D (*): sign field of the C type with a length of 1. The value is I (include) or E (exclude) B: option field of the C type with a length of 2. If there is no high field, values: eq, NE, GT, le, LT, CP, and NP. The latter two are valid only when wildcard characters (*, +) are used. If a high field exists, you can use the Bt (between) and Nb (not between) C: F Type Low fields to define the lower bound D: F type high fields and define the upper bound parameter format: in addition to the parameter of parameter, there are some other parameters no-Extension: limit a single row of data. Remove the multiple choice button No intervals: single value selection, however, you can still select the multi-value default G [to H] [Option op] [sign s] through the multiple selection button: Set the default value, but only once (4) other screen elements selection-screen skip [N]: NULL n rows (0 <10) Selection-screen uline [[/] pos (LEN)] [modif ID key]: underline a part of a row or line. POs can use one of the two system constants pos_low and pos_high, which respectively represent the position of the select-options statement from and to on the screen,
The last option assigns the underline to a modified group key, which can be used in the at selection-screen output event to modify the screen attribute.. Selection-screen comment [/] pos (LEN) Comm [for field F] [modif ID key]: comm does not need to be declared, however, you need to specify the value in at selection-screen output. If for field F is used, this user requests help (F1) on the annotation of this element F, the help text of field F is displayed. (5) Select a combination of screen elements (temporarily omitted, p277, screen blocks, positions, etc.) 2. screen event (1) at selection-screen output: select the screen PbO event, triggered before each screen selection is called, each screen call will be executed (2) at selection-screen: select the screen Pai event to check whether the user data is correct and all fields are consistent. If an error occurs, all elements can re-enter (3) at selection-screen on field: PAI event for a field. If an error occurs, you can enter this field again. Other elements are dimmed (4) at selection-screen on block: PAI events for an element area. If an error occurs for any element in the domain, re-enter all the elements in the domain. The out-of-domain elements are dimmed (5) at selection-screen on radiobutton group Radi: the single-choice button is checked as a whole, on field (6) at selection-screen on [end of] seltab cannot be used separately: This is triggered when the multi-row selection dialog box is used. On seltab is used for checking after the user inputs row by row, the on end of seltab is used to check the rows after the input of the entire table is completed. (7) At selection-screen on [help | value]-request for field: Poh and POV events, define F1 and f43. if no error occurs for the pai events on the screen, subsequent events will be executed, such as F8, printing, and saving variables. **************************************** **************************************** *********
Report (4)-standard list (2007.10.11)**************************************** **************************************** * ******** 1. output statement: Write [AT/pos (LEN)] f [
]. 2. Output Symbol: Write some_name as [Symbol | icon | Line | checkbox]. You need to use include Or include Include 3. search for symbol or icon: patter-> write-> F4 (symbol or icon) 4. line: uline [AT/pos (LEN)]. <=> write [AT/pos (LEN)] SY-ULINE.WRITE [AT/pos (LEN)] '----'. write [at [/] [ ] SY-VLINE. <=> write [at [/] [ ] '| '. 5. empty row: Skip [N]. set blank lines [ON | off]. write /''. 6. output location: (temporarily omitted, p291) 7. output Format: (temporarily omitted, color, etc., p291) 8. page format: (temporarily omitted, title, page length and width, header and footer, fixed column, line jumping, etc., p292) **************************************** **************************************** *********
Report (5) -- Interactive list (2007.10.11)**************************************** **************************************** * ******** 1. top-of-page | End-of-page during line-selection. when the list is selected, the output header and footer 2. at line-selection and at USER-COMMAND3. you cannot use get or get in the list again... other event blocks such as late 4. hide F. the selected row is stored in the global area (hide area). You can check the hide area to determine that the row is selected correctly. **************************************** **************************************** *********
Report (6) -- save (2007.10.11)**************************************** **************************************** * ******** 1. on the report output screen, choose list> Save> Office | reprot tree | file... you can also save the list at any location through system-> list-> save 2. the list can be saved in sapoffice, work menu, and local machine. file Storage Format unconverted: ASCII document Spreadsheet: MS Excel document Rich Text Format: RTF document HTML: webpage documentation ************************************** **************************************** ***********
Report (7)-basic concepts of formatting a report (2007.10.15)**************************************** **************************************** * ******** 1. basic Steps for formatting a report: (1) define the form format using the sap format generation tool (2) create an ABAP program to sort the data required during the output process. This program is called a data extraction program (3) call the defined format in the program to generate specific text content. If more than one dataset needs to be printed, the call can be made cyclically to achieve batch output. Or, the form interface in the form of an internal table directly transmits batch data, for example, orders that are sent to many customers in the same format but with different data information (4) print each document in a specific form through the form Formatting Function. 2.
PageIt is the canvas of the window, and the window is the container of specific text. The specific data and text should be placed in the window and cannot be output directly on the page. Each layout includes a starting page and any number of subsequent pages. Different layout pages contain different output areas, that is, the page window 3.
WindowIs the output area for formatting the Chinese text and data of a document. There are two types: Main Window and subwindow. A defined window does not belong to a page, so it can be placed on any page of the format document. Each format document contains a main window, that is, the main output window of the body data. If the window requires too much text, the current page cannot be accommodated, and other texts will be output on subsequent pages, the page break is also triggered automatically. · Not every page needs to contain the window. Each format document can contain only one main window. The main windows on all pages must have the same width, but the height can be different. A page that does not contain the main window cannot call itself as a subsequent page, because this will trigger an infinite loop. In this case, the system will automatically end after processing three pages. · In other Windows except the main window, data and text are output in the pre-set area. If these windows are placed on multiple pages, the displayed content is the same. If the data or text content exceeds the window area, it is truncated and cannot be displayed completely.
Text and DataIs the specific content of the window output, which is located in the page window for display. · If the output content can be determined when designing the form, you can directly input text in the form. If the output data can only be determined at runtime, you need to use symbols as placeholders and other methods to describe them in the current format. when calling the application format, use the actual data information passed in from the Program for replacement. 6.
Section character styleSimilar to CSS in web design, you can standardize the paragraph and related fonts and apply them to different pages in similar formats. · Section format-controls the entire section. The content of each section must belong to a paragraph format. The entire form should have a default paragraph format-character format-controls the font and font size of specific text in a paragraph, and the character format cannot control the entire paragraph, however, it can be used to format text blocks inside a paragraph. **************************************** **************************************** *********
Report (8)-sapscript-se71, se72, and so10 (2007.10.112007.10.11)**************************************** **************************************** * ******** 1. sapscript is a text processing system developed by sp. It consists of five components: a text editor in the unit of behavior. To add text to a page window during format creation, the system will automatically enter the style and format settings in the editor-print Layout-a designer used as the central output processing module. Used to prepare text output to the printer and format the information to apply to the text, which comes from the settings in styles and forms tools. The designer is located inside the system and invisible to users. · Program interface, integrating sapscript components with SAP applications, and further controlling the format output in the program · some database tables that store text, style, and Format 2. when creating an element, you should step by step from the basic element to the complex element, that is, set the font and paragraph-> window-> Add the window to the page. 3. character format naming rules: the character format name can only contain two characters at most. The first character must be a subtitle, and the second character can be a subtitle, number, or space, it cannot be another special symbol *********************************** **************************************** **************
Report (9) -- smart forms -- smartforms (2007.10.112007.10.11)**************************************** **************************************** *********
1. Similar to sapscript, smart forms can output Internet pages, printers, faxes, and e-mails. It also comes with core business processing processes (p399) 2. There are interfaces between smart forms and sapscript. You can reference sapscript in smart forms or convert the format. The design process consists of two parts: Layout logic and logical design. Compared with sapscript, smart forms features: · allows you to use simple graphical tools to modify the format and format logic. · a complete process control mechanism is provided, therefore, application data extraction and format logic processing are relatively independent. When form is activated, a function module is generated. During running, the program calls the format through the parameter interface of this module and transmits the output data. · The design can be implemented through graphical tools, and its output logic is displayed through an attribute architecture. · The system provides the ability to create XML output during form processing, so that web Hing can be inserted into static or dynamic tables, table functions include reading unit content cyclically, triggering title rows, total time, and data sorting. You can check whether an error exists in a node or the entire form; the Data Process Analysis Function checks whether all fields have fixed values when being output. You can add background images to the form output document to provide the standard country-related postal address output function. steps for formatting and outputting smart forms: (1) extract application data (2) transmit data to form in Form format and related data interfaces (3) and output data in batches. A form must define one or more pages and an interface for processing data transmitted from a program. Each page can contain windows, standard addresses, and images. (P428) **************************************** **************************************** *********
Background processing-sm36, 37 (2007.10.11)**************************************** **************************************** * ******** 1. during background processing, R/3 can automatically run type 1 Report programs (except for custom screens) or external programs. 2. background processing steps: (1) notify the R/3 system of the work required by the user to process the jobs in the system by planning the background. Set events, programs, variants, and prints. (2) after the specified time is reached, the background processing system starts the job and runs the specified program (3) Later, the user can check whether the job is completed and display the log tracking the job execution, view the background job status. 3. advantages: (1) parallel execution without affecting user operations (2) Regular and automatic repetitive operations, saving manpower (3) execution at night can reduce system load 4. submit a job in ABAP and send the list to spool (offline) system (1) Send the program directly to the background through the function module job_submit (2) use the via job additional item in the submit statement, with additional items, you can submit the selection screen parameter or using selection-set to specify the variant. At the same time, you must specify the and return option submit rep... user user via job number N [... with p1 = F1... | using selection-set vari]... and return5. planned jobs cannot be run before they are released. 6. display job status -- sm37 *********************************** **************************************** **************
Print (2007.10.11)**************************************** **************************************** * ******** 1. only the list generated by the Write statement can be printed by the sap spool system, and the ALV will be converted to the traditional list 2. (for specific print configurations, see p319 ~ 320) 3. the program controls the print request settings. (1) The following statements directly send the generated list to the spool System for printing, new-page print on [New-section] [Params | parameters pripar] [archive parameters arcpar] [No dialog] is not displayed on the screen. parameters: parameter variable. It must comply with the pri_params data dictionary archive parameters: parameter variable. It must comply with the arc_params data dictionary, no dialog: no display of printer configuration screen (2) the following statements cancel spool output are available only when the list is stored in SAP archivelink (you can use the get_print_parameters function module to set the preceding parameters, output the page New-page print off4 again on the screen. Check the print status (system-> service-> Output Controller) the Output controller is used to check the output request. If the output request is not marked with the output immediately field, the Output Controller will not send the output request to the printer before sending the request again. · check the status of the output request, check whether ************************************ has been printed ************************************ **************************************** *************
Message -- se91 (2007.10.08)**************************************** **************************************** * ******** 1. SAP messages are stored in the t100 table, including sprsl (language code), arbgb (Message class), msgnr (three-digit message serial number), and text (text, up to 72 characters. message format: (1) Message Num (ID). If the report rep message-ID has specified a message class, the message can omit the ID item; (2) Message ID type C number num [with F1... f4]. (3) message... [With F1... f4]. the into msgtext and display like C options are valid for the above three (4) Message msgtext type craising exception is valid for the above four, and can only be used in function or method 3. message variable SY-MSGID message class SY-MSGNR message number SY-MSGTY Message Type SY-MSGV1... SY-MSGV4 message parameters 4. message Type PbO Pai (1) I type: Consistent with the S type pop-up dialog box, close and continue (2) S type: Display messages in the status bar with PAI and execute subsequent statements at the same time (3) type E: The program is aborted, and the current screen of the dialog box is displayed. If you skip PbO again and confirm it is output, exit. Only fields in the field and chain statements can be re-entered. (4) type W: the program is not terminated. For example, if the S-type program does not exit the message screen, confirm the message screen and the code after the system executes the message Statement (5) Type A: The same as Pai appears in a dialog box, after confirmation, the program is aborted and returned to the call point (6) X: messages of the same Pai type are not displayed and are aborted in the form of short dump (runtime error, basically, you do not need ************************************** **************************************** ***********
Logical database (LDB)-se36 (2007.10.102007.10.11)**************************************** **************************************** * ******** 1. in addition to open SQL and native SQL, LDB provides the third method to extract data from the database. Note: LDB is not a database used to store data, but a method.
2. advantages compared with traditional SQL reads:
(1)
Pre-set selection screen (what is the purpose ?)
(2) In a program using a logical database, developers can ignore the relationship set between specific data tables through external keywords. Instead, they can use get events to obtain data at the node level.
(3) Improve the filtering efficiency and check the user's database access permissions while filtering data
(4) Maintenance and setup of the logical database can be performed independently of the program. If the data source changes, you can directly modify the logical database without modifying all programs.
3. Structure
(1) Sub-object (LDB node)
· The table (T-type node), database table, and node name must be indicated by the database. The name must comply with the node name requirements (within 14 bytes) and cannot be in a depth structure.
· The ddic type (S-type node) is the structure type or table type in the data dictionary. The type and node name do not need to be consistent and can be in-depth structure.
· Type group (Type C node). The node type must be defined by type. Its name must be the value of the type group field. Generally, you should refer to the ddic type for other applications that use the logical database to access this node (such as SAP query)
· Dynamic node (type A node), which does not have a fixed type and is determined only at runtime
(2)
Collection and database programs (do not understand, p283)4. Events
(1) Get
· You need to specify the LDB name in the program property and link it to the program
· Nodes node: the logical database node must be declared before program anti-counterfeiting.
After the task is declared, the system creates a workspace with the same name and structure as the node, and fills in the event through the get event loop.
· The get event is triggered when the logical database program reads a row of data from the database table: Get node | table [fields F1 F2...]
After an event is triggered, this row of data is provided in the table workspace. You can process the current row of the database table in the fast-moving internal program code. The fields option specifies the table Fields read from the logical database (the table keywords must also be read ).
· Get... the late event is triggered when a table loop ends and the previous database table is returned: Get node | table late [fields F1 F2...], you can implement the data total function in this database node.
· For efficiency, do not use the fields option to specify the required fields to improve program performance.
· If the program does not specify all logical nodes, the system will return to the upper-level node after the program is executed to the specified lowest node. Data in all nodes below the program will not be selected.
(2) abort the LDB event
LDB is a process of circulating databases. In a get event, you can check the currently processed data at any time. If not, you can abort the current data or the entire event.
(3) unconditionally abort the LDB event
· Turn to end-of-selection: Stop
· Turn to the output screen: Exit
· Switch to the next row of the current node: Reject
· Switch to the next line of the dbtab node: reject dbtab
(4) conditional LDB Suspension
Check xxxx
Check select-options. (I don't know what this is about)**************************************** **************************************** *********
ABAP example Program)**************************************** **************************************** * ******** 1. Enter 'Demo' in the input column of the program name in the se38 environment, and then press F4, you can find all the demo examples of SAP. Take a good look and you will learn a lot about the implementation of the ABAP function. 2. Run "abapdocu" T-cdoe. You can see the ABAP document and sample programs. 3. In the se38 environment, enter 'bcalv * 'in the program name input column and press F4. you can find many ALV sample programs. Take a look.