Posts

Showing posts from 2010

POPUP_GET_VALUES_USER_HELP

Image
POPUP_GET_VALUES_USER_HELP FORM F4_Form USING TABNAME FIELDNAME DISPLAY           CHANGING RETURNCODE VALUE . * display F4 help for field TABNAME-FIELDNAME * if DISPLAY is ’X’, values cannot be selected, they are display-only, * e.g. for F4 help for fields which are no ready for input. * RETURNCODE field specifies whether the user cancelled the action * (’A’) or selected a field (SPACE). * VALUE field contains the selected value. Data : lt_return_values LIKE ddshretval OCCURS 0 WITH HEADER LINE . CALL FUNCTION ’F4IF_FIELD_VALUE_REQUEST’ EXPORTING tabname = space fieldname = space searchhelp = ’VKNK’ * dynprofield = ’X’ TABLES return_tab = lt_return_values. READ TABLE lt_return_values WITH KEY fieldname = FIELDNAME. VALUE = lt_return_values-fieldval. ENDFORM . Return Values

How to Read data from Excel File

DATA : i_data2 TYPE STANDARD TABLE OF alsmex_tabline, wg_data2 TYPE alsmex_tabline. DATA : l_b_col TYPE integer VALUE 1 , "Begining Column Position l_e_col TYPE integer VALUE 12 , "Ending Column position l_b_row TYPE integer VALUE 1 , "Begining Row position l_e_row TYPE integer VALUE 60000 . "Ending Row position CALL FUNCTION ’ALSM_EXCEL_TO_INTERNAL_TABLE’ EXPORTING filename = p_p_path i_begin_col = l_b_col i_begin_row = l_b_row i_end_col = l_e_col i_end_row = l_e_row TABLES intern = i_data2 EXCEPTIONS inconsistent_parameters = 1 upload_ole = 2 OTHERS = 3 . IF sy-subrc EQ 0 . LOOP AT i_data2 INTO wg_data2. CASE wg_data2-col . WHEN 1 . wg_data1-pernr = wg_data2- value . WHEN 2 . wg_data1-zname = wg_data2- value . WHEN 3 . wg_data1-emptyp = wg_data2- value . ENDCASE . AT END OF row. APPEND wg_data1 TO i_data1. CLEAR : wg_data1. ENDAT . ENDLOOP . ELSE . * Error Message ENDIF .

How to Change SAP Standard Data Element Text

Image
How to Change SAP Standard Data Element Text Go to Transaction -> CMOD Method 1: Method 2: Add this code Format is as follows DEFINE &BELEG& = ’a <GL: Old Name > New Name </>’ Old Name should be in small letters. Spaces should be replaced by _ (underscore) To get the list of all such modifications

MS Word Editor for Foms

MS Word editor option can be activated using the transaction I18N

How to Measure Execution Time

You can improve the performance of your code by measuring execution time of your program. You can use SAP Standard tools for over all performance of you program. The SAP Standard tools are * Run Time Analysis (SE30) * SQL Trace (ST05) Apart from these tool you can measure your block of code with simple ABAP coding. But you can do it during development phase only. At the end you have to remove the coding. This technique of measuring code can be helpful if you want top tweak your select queries. GET TIME STAMP FIELD t1. *Block of Code ................... GET TIME STAMP FIELD t2. runtime = t2 - t1.