Reading data from a file (presentation server),ABAP Code

REPORT CHAP2604.* Data declarations for later usePARAMETERS FILENAME(128) DEFAULT ‘c:usersdefaulttestfile.dat’LOWER CASE.TABLES CUSTOMERS.DATA ALL_CUSTOMERS LIKE CUSTOMERS OCCURS 100WITH HEADER LINE. CALL FUNCTION ‘WS_UPLOAD’EXPORTINGFILENAME = FILENAMETABLESDATA_TAB = ALL_CUSTOMERSEXCEPTIONSFILE_OPEN_ERROR = 1OTHERS = 2.CASE SY-SUBRC.WHEN 1.WRITE ‘Error when file opened’.EXIT.WHEN 2.WRITE ‘Error during data transfer’.EXIT.ENDCASE.* Display the resultLOOP AT ALL_CUSTOMERS.WRITE: / ALL_CUSTOMERS-NAME,ALL_CUSTOMERS-CITY.ENDLOOP.

Sample program for OLE Automation

*&———————————————————————**& Chapter 28: Sample program for OLE Automation*&———————————————————————*REPORT CHAP2801.* Including OLE typesINCLUDE OLE2INCL.* Tables and variables for later useTABLES: CUSTOMERS.DATA: APPLICATION TYPE OLE2_OBJECT,WORKBOOK TYPE OLE2_OBJECT,SHEET TYPE OLE2_OBJECT,CELLS TYPE OLE2_OBJECT.* Creating an objectCREATE OBJECT APPLICATION ‘excel.application’.IF SY-SUBRC NE 0.WRITE: / ‘Error when opening excel.application’, SY-MSGLI.ENDIF. * Setting propertiesSET PROPERTY OF APPLICATION ‘Visible’ = 1.* Calling methodsCALL … Read more

List of all BAPI available

BAPI_SALESGROUP_GET_DETAIL Sales Group: Display Name BAPI_SALESOFFICE_GET_DETAIL Sales Office: Display Name BAPI_SALESOFFICE_GRP_EXIST Sales Office / Sales Group: Existence Check BAPI_SALESORG_EXIST Sales Organization: Existence Check BAPI_SALESORG_GET_DETAIL Sales Organization: Display Data BAPI_SALESORG_OFFICE_EXIST Sales Organization / Sales Office: Existence Check 0012 Business Object BUS0012 (Cost Center) BAPIs f. BOR obj. BUS4003 (AddrContPart) BAPI_CHARACT_GETLIST BAPI for Characteristics – Find Name … Read more