Posts

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.

FI Transaction Codes

OB41 Maintaining Posting Key F-63 Park/Post AP Invoice FV60 Park/Post AP Invoice FB60 Vendor Invoice Posting F-04 Posting with clearing FBN1 Number Ranges for Accounting Documents - Each document type need to have a number range assigned to it. OBA7 Define documents type - Double click on the documents type to view or change the settings. OBU1 Change the default document type and posting keys - Here you can view or change the default document type and posting keys used as per FI transaction. OBBH FI Substitution OB28 FI Validations OB29 Fiscal Year Variant configuration FIBF BTE (Business Transaction Events) FB60 Vendor Invoice F-43 Vendor Invoice F110 Payment Run FBZP Payment Run Configuration DMEE DME COnfiguration FBL1N Vendor Line Item Display...

How to Debug Background Jobs

We can not debug background jobs directly with the breakpoints set inside the program like usually we do during running program in foreground. But this is posibile too !! Go to SM37 - Job monitor Select the specific job you want to analyse (let's a failed job) Use transaction code - JDBG (type the transaction code in transaction code input box - at the top left corner of your screen) It will start ABAP debugger. Continue to debug !!

Sample Program to Create Sales Order – Create Billing Doc – Attach a PDF Document and Release to Accounting

This sample program will create sales order from a data feed from a file, create billing document for those orders, attach a PDF document for these billing document and release those documents to accounting. This program can also be referred to get sample code for following SAP Function modules: SD_SALES_DOCUMENT_INIT SD_SALES_DOCUMENT_COPY SD_SALES_DOCUMENT_SAVE SD_SALESDOCUMENT_CHANGE Though this program uses a Z function module to attach a PDF document to the billing document (invoice) I will share the source code for the same in my next post. border-width:1px;border-color:3C3C3C;border-style:solid;"> *&---------------------------------------------------------------------* *& Report name : Conversion Program - Cost Centre Copy *& Purpose : This program will create invoices from data *& provided through a flat file. This program *& is needed for ePT project - migration of open *& ...