|
Written by anon.
|
|
Saturday, 05 July 2008 |
REPORT zprogind.
TYPES: BEGIN OF t_mara, matnr LIKE mara-matnr, END OF t_mara. DATA: it_mara TYPE STANDARD TABLE OF t_mara INITIAL SIZE 0, wa_mara TYPE t_mara. DATA: mara_lines TYPE i, gd_percent TYPE i. START-OF-SELECTION.
SELECT matnr INTO TABLE it_mara FROM mara.
CHECK sy-subrc EQ 0. mara_lines = sy-dbcnt. clear: gd_percent.
LOOP AT it_mara INTO wa_mara. PERFORM progress_bar USING 'Retrieving data...'(001) sy-tabix mara_lines. * WAIT UP TO 2 SECONDS. ENDLOOP. FORM progress_bar USING p_value p_tabix p_nlines.
DATA: w_text(40), w_percentage TYPE p, w_percent_char(3).
w_percentage = ( p_tabix / p_nlines ) * 100. w_percent_char = w_percentage. SHIFT w_percent_char LEFT DELETING LEADING ' '. CONCATENATE p_value w_percent_char '% Complete'(002) INTO w_text.
* This check needs to be in otherwise when looping around big tables * SAP will re-display indicator too many times causing report to run * very slow. (No need to re-display same percentage anyway) if w_percentage gt gd_percent or p_tabix eq 1. CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR' EXPORTING percentage = w_percentage text = w_text. gd_percent = w_percentage. endif. endform. " PROGRESS_BAR
WRITE: /20 'Report is "Complete" OK'. |
|
|
Written by Kevin Wilson
|
|
Wednesday, 11 June 2008 |
|
This program is a utility to flag an Event Handler as deleted or undelete an EH that is already deleted. |
|
Read more...
|
|
|
Written by Kevin Wilson
|
|
Wednesday, 28 May 2008 |
Below is the ABAP code to produce a list of icons including what they look like, name and code. Also see std. SAP program RSTXICON
|
|
Last Updated ( Wednesday, 28 May 2008 )
|
|
Read more...
|
|
|
Written by Kevin Wilson
|
|
Monday, 05 May 2008 |
|
REPORT ZGUI_DIR. call function 'GUI_CREATE_DIRECTORY' exporting dirname = 'C:\TEST' EXCEPTIONS FAILED = 1 OTHERS = 2. if sy-subrc <> 0. WRITE: / 'Error Code ',SY-SUBRC. endif. |
|
|
Written by Anon.
|
|
Monday, 05 May 2008 |
|
|
|
Read more...
|
|
|
Written by Swarna S
|
|
Wednesday, 27 February 2008 |
A simple ALV - Details of Y/Z objects with lists of users/date/time/description during creation or change of the object. |
|
Last Updated ( Wednesday, 27 February 2008 )
|
|
Read more...
|
|
|
Written by SAPDev
|
|
Monday, 25 February 2008 |
The below code demonstrates how to create a simple report which automatically updates itself every 10 seconds and displays the new results on screen. This is without any intervention from the user. |
|
Read more...
|
|
|
Written by Judit Rakovits
|
|
Wednesday, 02 January 2008 |
|
Requirement: Write a program to load a database table from a UNIX file. |
|
Read more...
|
|
|
Written by Anon.
|
|
Saturday, 29 December 2007 |
|
Requirement: Write a program that lists the Vendors and their Accounting documents. Create extract dataset from KDF logical database. Loop through the dataset to create the required report. Don't list those vendors which has no documents |
|
Read more...
|
|
|
Written by Anon.
|
|
Thursday, 27 December 2007 |
|
Requirement: Read a logical database (you must have data in those tables, now LFA1), fill up an internal table. Sort the data by a given field and then display the internal table. |
|
Read more...
|
|
|
Written by Anon.
|
|
Saturday, 21 July 2007 |
When you're looking at the structure of a table, SAP will let you print the structure, but it won't let you save the structure. This can be annoying. This report outputs the table structure to a list. At this point the user can use the System->List->Save->Local file command to save the list to a file. Output Table Fields to a List |
|
Read more...
|
|
|
Written by Amit Khari
|
|
Thursday, 19 July 2007 |
Upload Data From MS Accsess Into an Internal Table |
|
Read more...
|
|
|
Written by Anon.
|
|
Wednesday, 18 July 2007 |
Converts spool request into PDF document and emails it to recipicant. This program can be run in background or online and a spool request will still be created.
|
|
Read more...
|
|
|
Written by Amit khari
|
|
Tuesday, 17 July 2007 |
ABAP code for uploading an Excel document into an internal table. See code below for structures. The code is based on uploading a simple Excel spreadsheet or for an actual Excel file.
There are also a couple of alternatives which use fucntion modules ‘KCD_EXCEL_OLE_TO_INT_CONVERT’ and ‘ALSM_EXCEL_TO_INTERNAL_TABLE’ but the method below is by far the simplest method to use. |
|
Read more...
|
|
|
Written by Anon.
|
|
Monday, 16 July 2007 |
Instead of checking your Purchase Order History one at a time, you can now mass display or print them with this customized abap report. |
|
Read more...
|
|