|
All R/3 business objects (customers, products, invoices, etc) can be displayed with standard transactions in a complete and hence very detailed manner. Often a relevant subset of this data would suffice in day to day situations, and most users would prefer to have simple, direct access to the required information without having to work through several R/3 screens.
With GuiXT, InputAssistant and Viewer it is possible to implement a customized view of the business object, presenting precisely the data that the user needs, reached by a single mouse click, displayed on a single page and in his or her preferred format. The basic technique has already been explained in Designing display transactions with GuiXT Viewer. Here we focus on
We will explain the technique using an example for transaction “Releasing a purchase requisition” (Transaction ME54). Here it is very likely that the person responsible for releasing the requisition would like to see all relevant data on one page. The format that we want to produce looks like this:
With transaction ME53 or ME54 the user would have to navigate through 9 screens in order to get all the data displayed above:
Using GuiXT, InputAssistant and Viewer you can offer an “Overview” button that displays the purchase requisition in the desired form. A further advantage is that the Browser “Print” function can then be used to make a local printout of the purchase requisition. How to proceed: We automate the process to go through the 9 R/3 screens using an InputScript. There we collect all the necessary data and store it into GuiXT variables. At the end we use the “View” command in order to start the browser with an HTML file generated by GuiXT via a template file. In the template file we need html tables, since we do not know the number of requisition items in advance. GuiXT offers a simple and efficient mechanism to fill such tables: In your HTML template you define only one row. In this row you use &-variables with a name containing three #-signs: ###. When generating the HTML file from your template, GuiXT will replace the ### with 1,2,3,…, and then generate new table rows as long as the first GuiXT variable for this row is not empty. In our example (see html coding below) this is &[req_pos_###_item] . Nested tables are also possible (in our example they are needed for the text lines of each item). In this case you need the ### twice in the variable names, e.g &[req_pos_###_text_###]. GuiXT supports only 2 nesting levels (i.e., tables within tables). You can create the HTML template requisition.html with an html editor of your choice (e.g. MS Frontpage), without having to modify or add anything to the generated html coding. The link to GuiXT is established by the text where you use the variable names &[req] or &[req_pos_###_item]. GuiXT replaces each variable by its content, and also adds as many rows as are required in tables in which you use a ###-variable in the template row definition. With the following GuiXT script you create an “Overview” pushbutton in the first screen SAPMM06B.E0105 of transactions ME53 and ME54: // ME53: Display purchase requisition // ME54: Release purchase requisition
You also need the InputScript “requisition.txt” that processes the R/3 screens: // InputScript requisition.txt //Screen SAPMM06B.0105
// Reset index // Reset all req fields // Set req Screen SAPMM06B.0105
// Increase position index // Set position // Set quantity // position left? // Invoke browser Return
endif
// Item detail // Set variables // Display statistics screen // Statistics // Set variables Set V[req_totalvalue] “&[req_totalvalue]” + “&[Total value]“
// Display texts // Texts // Text // More text? // Text Editor // Return from full text screen // Texts The InputScript will handle only those items that are shown on the first table page, without scrolling. In many cases this is all you need. If not, you can use the technique described in Excel download of selected table rows in order to scroll through the whole table.
|