|
Users often require additional information about business objects they are dealing with in a transaction. Sometimes the SAP standard system offers these possibilities on a button or in the menu. In other cases the only way to access the additional information is for the user 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 several easier ways to access and handle additional information. The following explains one of these techniques:
This approach has several advantages:
Alternatively you can call the ABAP report via a /O… command (new session), and use the normal SAP display. This is somewhat easier to implement and requires no extra function call, but the advantages of local scrolling and the option of combining several lists into one are sacrificed. |
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 previous sales for the given customer, 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.
|