BW 3.0A ABAP Coding 2002. 05. 17. 목차 1.InfoSources. 2.InfoProvider. 3.User Exit for Variables.

Slides:



Advertisements
Similar presentations
CC SQL Utilities.
Advertisements

Databases. A database program can be used to:  sort a file into a different order  Maintain contact with clients  search through the records for a.
1 BW Spex Overview. 2 Contents Objectives General Principle Features Screen Shots.
Visit : Call Us: US: , India:
Visit : Call Us: US: , India:
ABAP/4 PROGRAMMING Internal Table 講 師:呂 昇 燦 2000 年 9 月 26 日.
Introduction to the ABAP Data Dictionary
ABAP Chapter 6 Message Debugging File Transfer Type Group.
Business Knowledge Services Session 304 Open up your BW system using Infospokes A Step-by-Step Approach Pramod Jayam The Scotts Company
Let’s try Oracle. Accessing Oracle The Oracle system, like the SQL Server system, is client / server. For SQL Server, –the client is the Query Analyser.
Maintenance Modifying the data –Add records –Delete records –Update records Modifying the design –Add fields into tables –Remove fields from a table –Change.
307: BW Performance Tuning - Queries / Data Loads
SAP BW Implementation at JoAnn Stores Inc. Session Code 3309 Craig Eick JoAnn Stores Inc.
B UILDING AN A CTUARIAL D ATABASE Do’s and Don’ts.
Chapter 9 Database Management
UNWBW1 – Business Information Warehouse NetWeaver Support Consultant Training Data Loading.
Introduction ABAP Dates. Slide 2 Lecture Overview I go into more depth than your book about how currency and quantity values work.
Database System Concepts and Architecture Lecture # 3 22 June 2012 National University of Computer and Emerging Sciences.
0 UMN 2011 ERP Terapan ABAP Introduction Session # 8.
4-1 INTERNET DATABASE CONNECTOR Colorado Technical University IT420 Tim Peterson.
DATABASE. A database is collection of information that is organized so that it can easily be accessed, managed and updated. It is also the collection.
CRM Analytics Architecture
ABAP/4 Course. General n Workbench n Program maintenance n Screen Painter n Menu Painter n Transactions n ABAP/4 Query n Translation menu.
HAP 709 – Healthcare Databases SQL Data Manipulation Language (DML) Updated Fall, 2009.
Microsoft Access 2013 Design and Create Tables to Store Data Chapter 2.
Lesson 2.  To help ensure accurate data, rules that check entries against specified values can be applied to a field. A validation rule is applied to.
WEEK 11 Database Design. TABLE INSTANCE CHARTS Create Tables.
BW Know-How Call : Performance Tuning dial-in phone numbers! U.S. Toll-free: (877) International: (612) Passcode: “BW”
Discovering Computers Fundamentals Fifth Edition Chapter 9 Database Management.
Microsoft ® Business Solutions–Navision ® 4.0 Development II - C/SIDE Solution Development Day 2.
Ch. 1 데이터베이스시스템 (2). Ch.1 Database System 데이터베이스시스템 2 What to Learn Database System Overview Entity-Relationship diagram Relational Data Model  Structure.
User Dialog Overview. Update Statement TABLES customers. SELECT SINGLE * FROM customers WHERE id = 1. IF sy-subrc = 0. customers-name = ‘John’. UPDATE.
More about Databases. Data Entry through Forms Table View (Data sheet view) is useful for data entry of new records But sometimes customization would.
11 3 / 12 CHAPTER Databases MIS105 Lec15 Irfan Ahmed Ilyas.
ITEC3612 Enterprise Architecture and Resource Planning (Lab) ABAP Programming (2)
ABAP 程式設計 楊子青 D3a-1 Create and Use the Authorization Objects in ABAP n Authorization Check –Authorization Objects are used to manipulate the current user’s.
Database Management System. DBMS A software package that allows users to create, retrieve and modify databases. A database is a collection of related.
Introduction to the SAP IMG Interface. Slide 2 Accessing the IMG Use transaction code SPRO or.
SELECT-OPTIONS. SELECT-OPTIONS Syntax TABLES customers. SELECT-OPTIONS id FOR customers-id. START-OF-SELECTION.
Mantova, September 2015 SAP ECC 6.0 DEVELOPMENT ABAP SAP develop enviroment & Transport organizer.
(SQL - Structured Query Language)
Intermediate Documents (IDOCs) What is an IDoc What is an IDoc An IDoc is simply a data container that is used to exchange information between any two.
SAP DEVELOPMENT BASICS Bohuslav Tesar. TRAINING OVERVIEW Amazing life of ABAP developer ;) SAP introduction ABAP basics ABAP Reporting.
Introduction ABAP Fields and Variables. Slide 2 Fields (Introduction) In ABAP, fields (or data objects) are named locations in memory Variables store.
Change Display of a Key Figure While in the Change Query (Local Definition) Hiding 1.Right click.
A am going to create a table in design view. I am going to create a table in an Access database that contains information about the books that I have on.
Starting with Oracle SQL Plus. Today in the lab… Connect to SQL Plus – your schema. Set up two tables. Find the tables in the catalog. Insert four rows.
Student Financial Assistance. Session 18-2 Session 18 Updates & Tips for the EDExpress 8.2 Pell Module.
Be “GUI ready” developing in RPG by Robert Arce from PrismaTech. Be “GUI ready” developing in RPG-ILE Presented by: Robert Arce.
SAP Business Information Warehouse (SAP BW) PART 3 (Data Staging)
Sap BI/BW online training in usa,uk/free demo classes!JOBS Online | classroom| Corporate Training | certifications | placements| support Contact US: Magnific.
SAP R/3 User Administration1. 2 User administration in a productive environment is an ongoing process of creating, deleting, changing, and monitoring.
SAP Tuning 실무 SK㈜ ERP TFT.
Top 10 SD Userexits David Glessner Product Requirements Planning.
Concepts of Database Management, Fifth Edition Chapter 3: The Relational Model 2: SQL.
0 1. Upgrade 에 따른 File Controlling Issue - SAP 에서는 향후 ‘WS_’ 로 시작하는 기존의 Function Module 들을 사용하지 말고 CL_GUI_FRONTEND_SERVICES Class 의 Method 를 사용할 것을 권고함.
1 SAP BW & BSP Kim Hyun Seok. 2 SAP BW Overview I Phase I : Preparation II Phase III : Reporting III IV Phase II : Modeling.
CTS Change & Transport System. Introduction The Change and Transport System (CTS) is a tool that helps you to organize development projects in the ABAP.
Dept. of Information Systems St. Francis Xavier University
Fundamental of Databases
SQL and SQL*Plus Interaction
The enhancement concept allows you to add your own functionality to SAP's standard business applications without having to modify the original applications.
Databases.
CRM Analytics Architecture
Creating and Managing Database Tables
Design and Create Objects to Store Data Chapter 2
Unit – V Data Controls.
Presentation transcript:

BW 3.0A ABAP Coding

목차 1.InfoSources. 2.InfoProvider. 3.User Exit for Variables.

1. InfoSources  Transfer Structure  Start Routioe.  Transfer Structure  Transfer Rules Routine.  InfoPackage  Data Selection  ABAP Routine.  InfoPackage  External Data  File Routine.

Transfer Structure  Start Routioe  레코드값 추가, 수정, 삭제. Package 단위 Structure 형태. DATA: l_s_datapak_line TYPE transfer_structure. LOOP AT datapak INTO l_s_datapak_line. IF l_s_datapak_line-/bic/zsci_0002 = ' '. l_s_datapak_line-/bic/zsci_0002 = ' '. MODIFY datapak FROM l_s_datapak_line. ENDIF. ENDLOOP. 수정 DATA: l_s_datapak_line TYPE transfer_structure. ** 1. 특정레코드 검색 후 변경사항 수정 후 추가. READ TABLE datapak INTO l_s_datapak_line. WITH KEY /bic/zsci_0002 = ' ' l_s_datapak_line-/bic/zsci_0001 = 'KR12345'. l_s_datapak_line-/bic/zsci_0002 = ' '. l_s_datapak_line-/bic/zsci_0003 = 'Test'. APPEND l_s_datapak_line TO datapak. ** 2. 신규 레코드 추가. l_s_datapak_line-/bic/zsci_0001 = 'KR12345'. l_s_datapak_line-/bic/zsci_0002 = ' '. l_s_datapak_line-/bic/zsci_0003 = 'Test'. APPEND l_s_datapak_line TO datapak. 추가 DATA: l_s_datapak_line TYPE transfer_structure. ** 1. 특정조건 삭제. DELETE datapak WHERE /bic/zsci_0002 = ' '. ** 2. LOOP 돌면서 주어진 조건에 만족하는것 삭제. LOOP AT datapak INTO l_s_datapak_line. IF l_s_datapak_line-/bic/zsci_0002 = ' '. DELETE datapak. ENDIF. ENDLOOP. 삭제 1. InfoSources

Transfer Structure  Transfer Rules Routine 필드 단위.  해당 레코드의 특정필드값을 이용해서 결과값 생성.  특정필드값을 이용해서 현 시스템 테이블에서 값을 Select 해서 결과값 생성.. RESULT = TRAN_STRUCTURE-/BIC/ZSCI_0002(6). * returncode <> 0 means skip this record RETURNCODE = 0. * abort <> 0 means skip whole data package !!! ABORT = InfoSources

InfoPackage  Data Selection  ABAP Routine - 해당 InfoObject Selection 증가. DATA: l_sysdate(10) TYPE n, l_chk_date LIKE sy-datum. EXEC SQL. SELECT to_char(add_months(sysdate, -1), 'YYYYMMDD') INTO :l_sysdate FROM dual ENDEXEC. l_low = l_sysdate(6). read table l_t_range with key fieldname = 'ZENTRY'. l_idx = sy-tabix. l_t_range-sign = 'I'. l_t_range-option = 'EQ'. l_t_range-low = l_low. modify l_t_range index l_idx. p_subrc = InfoSources

InfoPackage  External Data  File Routine 1.Routine  파일이름 Coding 으로 생성할수 있음. 2.Application Server  Log. File Names. - 서버에 있는 파일이름을 특정형식에 따라 가변적으로 가져온다.  Logical File Path Definition  Assignment of physical path to logical path  Logical file name definition, cross-client Log. File Names Create  T-CODE : FILE 1. InfoSources

InfoPackage  External Data  File Routine 1. InfoSources

Log. File Names Create Sample 1. InfoSources Operating system in call R/3 application instance R/3 application name in SY-SYSID Database system in SY-DBSYS R/3 release in SY-SAPRL Host name in SY-HOST Client in SY-MANDT Log on language in SY-LANGU Date in SY-DATUM Year in SY-DATUM, 4-character Year in SY-DATUM, 2-character Month in SY-DATUM Day in SY-DATUM Day of the week in SY-FDAYW Time in SY-UZEIT Hour and minute in SY-UZEIT Hour in SY-UZEIT Minute in SY-UZEIT Seconds in SY-UZEIT T-CODE : FILE

File Name 확인. 1. InfoSources  Function  FILE_GET_NAME. - Logical File Path 명

2. InfoProvider  Update Rules  Start Routioe.  Update Rules  Data Field Calculation Routine.  Update Rules  Key Field Routine.  Update Rules  Formula.

Update Rules  Start Routioe 2. InfoProvider Package 단위 인터널 테이블 형태.  레코드값 추가, 수정, 삭제.  LOOP AT ~ ENDLOOP 가능.  ABAP 명령어 사용해서 레코드 편집. FORM startup TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring DATA_PACKAGE STRUCTURE /BIC/CSZBOND1 USING RECORD_ALL LIKE SY-TABIX SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS CHANGING ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update LOOP AT data_package. ** 수정, 추가, 삭제 등등 루틴 추가. ENDLOOP. * if abort is not equal zero, the update process will be canceled ABORT = 0. ENDFORM.

Update Rules  Data Field Calculation Routine 2. InfoProvider 필드 단위. FORM compute_data_field TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring USING COMM_STRUCTURE LIKE /BIC/CSZBOND1 RECORD_NO LIKE SY-TABIX RECORD_ALL LIKE SY-TABIX SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS CHANGING RESULT LIKE /BIC/AZBOND100-/BIC/ZSCI_0002 ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update ** COMM_STRUCTURE 의 현재 레코드값을 이용해서 ** RESULT 에 값을 생성할수 있음. * result value of the routine RESULT =. * if abort is not equal zero, the update process will be canceled ABORT = 0. ENDFORM.

Update Rules  Key Field Routine 2. InfoProvider 필드 단위. FORM compute_key_field TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring USING COMM_STRUCTURE LIKE /BIC/CSZBOND1 RECORD_NO LIKE SY-TABIX RECORD_ALL LIKE SY-TABIX SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS CHANGING RESULT LIKE /BIC/AZBOND100-/BIC/ZSCI_0001 RETURNCODE LIKE SY-SUBRC ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update ** COMM_STRUCTURE 의 현재 레코드값을 이용해서 ** RESULT 에 값을 생성할수 있음. * result value of the routine RESULT =. * if the returncode is not equal zero, the result will not be updated RETURNCODE = 0. * if abort is not equal zero, the update process will be canceled ABORT = 0. ENDFORM.

Update Rules  Formula 2. InfoProvider  Comm. Struc, Functions, Character Strin, System Fields 등을 이용해서 생성한다.  Functions  해당 Functions 에 가능한 List 가 Comm. Struc 에 표시가 된다.

3. User Exit for Variables  RSR00001 BW: Enhancements for global variables in reporting. RSR00002 BW: Virtual characteristics and key figures in Reportin. RSR00003 BW: Moving characteristic values. RSR00004 BW: RRI Field Mapping.  Variables Customer Exit. Text Variables.  SAP Exit Sample.

How to program a corresponding Include  Call up transaction CMOD in the Admin. Workbench.  Create a Project.  Select Enhancement Components.  Select Enhancement RSR  Double-click on Exit EXIT_SAPLRRS0_001.  Double-click on include ZXRSRU01 within the Exit.  Add or change coding.  Don't forget to activate the Project.  Use the variable in a query. 3. User Exit for Variables

Interface - Importing 3. User Exit for Variables  I_VNAMName of the Variable.  I_VARTYP1: Characteristic Value. 2: Hierarchy node(s). 3: Text. 4: Formula. 5: Hierarchy.  I_IOBJNMName of the InfoObject.  I_S_COB_PROInformation about InfoObject (Dataelement, CheckTable, Length, Number of Decimals,...).  I_S_RKB1DInformation about Reporting-Object; here Query (Queryname, InfoCube,...).  I_PERIVFiscal year variant.  I_T_VAR_RANGETable with all Variables and their values.  I_STEP1: Before Variable Pop up 2: After Variable Pop up.

Interface Exporting 3. User Exit for Variables  E_T_RANGETable to return the values fields: low, high, sign, opt.  E_MEEHTUnit of measure.  E_MEFACNumber of Decimals for Unit.  E_WAERSCurrency Code.  E_WHFACNumber of Decimals for Currency Value.

Call-Sequence 3. User Exit for Variables First Call of the User-exit Pop up to enter values for the variable (if "Ready for Input" = 'X') Second Call of the User-exit if Variable of type "Mandatory variable entry" is not filled if Text-variable is not filled

Variables Sample 3. User Exit for Variables 0CALDAY Characteristic 참조해서 ZCALDAY2 생성.

User Exit Sample 3. User Exit for Variables DATA: l_s_range TYPE rsr_s_rangesid, loc_var_range LIKE rrrangeexit, l_date LIKE sy-datum. CASE i_vnam. WHEN 'ZCALDAY2'. IF i_step = 2. LOOP AT i_t_var_range INTO loc_var_range WHERE vnam = '0I_DAYWT'. CLEAR: l_s_range, l_date. CONCATENATE loc_var_range-low(4) '0331' INTO l_date. l_s_range-low = l_date. l_s_range-sign = 'I'. l_s_range-opt = 'EQ'. APPEND l_s_range TO e_t_range. ENDLOOP. ENDIF. ENDCASE. 0I_DAYWT  Read For Input 이 설정된 Variables.. WHEN 'ZCALDAY1'. IF i_step = 1. CLEAR: l_s_range. l_s_range-low = ' '. l_s_range-sign = 'I'. l_s_range-opt = 'EQ'. APPEND l_s_range TO e_t_range. * CLEAR: l_s_range. * l_s_range-low = ' '. * l_s_range-sign = 'I'. * l_s_range-opt = 'EQ'. * APPEND l_s_range TO e_t_range. ENDIF..

Bex Query Sample 3. User Exit for Variables

Text Variables 3. User Exit for Variables 오른쪽 버튼 EDIT

Text Variables 사용한 Bex Sample 3. User Exit for Variables

SAP Exit Sample. 3. User Exit for Variables 0CALMONTH  SAP Exit List.

Q & A