|
Users often need to get additional information about business objects they are dealing with in a transaction. Sometimes the SAP standard system already offers these possibilities, on a button or in the menu. In other cases the only way for the user is to open an additional mode, and to navigate to the right transaction or to call up the right report, and then, in most cases, enter the object keys again.
With InputAssistant and Viewer there are various ways to implement an easy way to additional information. The technique that we want to explain here is as follows:
This approach has several advantages:
An alternative is to call the ABAP report via a /O… command (new session), and to use the normal SAP display. This is somewhat easier to implement, and requires no extra function call. On the other hand, the advantages of local scrolling, and ability of combining several lists into one, are then lost. |
Example: Displaying stock overview and sales summary in VA01
In the order entry transaction VA01, we offer two new buttons in the toolbar: “Sales summary” and “Stock overview”. The first button shows, for the given customer, the sales of the past, using a standard report. The second pushbutton shows the stock overview for all materials on the current table page. It also uses a standard report, produced for each material and then combined into one list.
GuiXT script “SAPMV45A.E4001.TXT” if Q[Transaction=VA01] and Q[Page=Sales] InputScript “SalesSummary.txt” Call “ZZ_GUIXT_CUSTOMER_PAYMENTS” in.KUNNR=”&F[Sold-to party]” table.HTML=htm
// Buld temp filename using Windows TMP environment variable // Write to temp file // Display list (coordinates: for window sizing only) InputScript “StockOverview.txt” // Show stock overview for all materials on this page // del material number table Set V[i] 1
label item label end_of_page
Call “ZZ_GUIXT_STOCK_OVERVIEW” table.TMAT=mat table.HTML=htm
// Buld temp filename using Windows TMP environment variable // Write to temp file // Display list (coordinates: for window sizing only)
Function “ZZ_GUIXT_CUSTOMER_PAYMENTS” FUNCTION ZZ_GUIXT_CUSTOMER_PAYMENTS. * Debugging in RFC mode: data: abaplist like abaplist occurs 1 with header line.
* Add leading 000… * Produce report * get list from memory * and convert to html ENDFUNCTION. Function “ZZ_GUIXT_STOCK_OVERVIEW” FUNCTION ZZ_GUIXT_STOCK_OVERVIEW. * Debugging in RFC mode: data: abaplist like abaplist occurs 1 with header line. DATA: matnr like mara-matnr.
refresh html. * Process all material numbers, append html lists * Add leading 000… * Produce report * get list from memory * and convert to html Append lines of lhtml to html.
endloop.
|