Beruflich Dokumente
Kultur Dokumente
B A P&W E B D Y N P R O A B A P @ A R J U N
IGROWSOFT
There are 4 types of views Database view Projection view Help view Maintenance view
Page 1
IGROWSOFT
A view created on two or more tables using inner join concept is called database view In this view we can only read the data We can provide selections to read the data We cannot maintain the data Ex on database view: Develop a database view on MARA and MAKT tables to display material number, material type, material units, language and description. 1. Go to SE11 2. Provide the view name zdb_view and click on create 3. Select database view 4. Click on copy 5. Provide description 6. Provide the table names and joining condition as below
a.
Page 2
IGROWSOFT
9. Double click on MARA and select MATNR, MTART and MEINS 10. 11. 12. 13. 14. Click on copy Again click on table fields button Double click on MAKT and select SPRAS, MAKTX Click on copy The screen should look as below
Page 3
B A P&W E B D Y N P R O A B A P @ A R J U N
IGROWSOFT
19.
Click on
Projection view: A view created on single table is called projection view. Projection views are mainly used to minimize the database interface (number of fields) and improve the system performance. In simple words, we can hide the unnecessary fields from a single table We can maintain the data in the projection views. We cannot provide any selections in the projection views. Ex on projection view: Go to SE11 Provide the view name zproj_view Click on create, provide description Provide the basis table as mara Click on table fields button Select matnr, mtart, mbrsh and meins
ARJUN.LEARN REAL TIME SCENARIOS DONE BY ME
Page 4
B A P&W E B D Y N P R O A B A P @ A R J U N Click on copy button Save and activate Click on contents and display the view Maintaining the data:
IGROWSOFT
To maintain the data, we have to provide the key fields i.e. mandt, matnr Go to the view and add the first field as mandt
Click on maintenance status tab Select read and change radio button Select display maintenance allowed
Page 5
B A P&W E B D Y N P R O A B A P @ A R J U N
IGROWSOFT
Save, activate and display the data Help view: A view created on two or more tables using outer join concept is called help view. Help view are specially designed for search helps. We cannot execute help views directly, instead we have to include help views inside the search helps. We cannot maintain the data in help views.
Page 6
B A P&W E B D Y N P R O A B A P @ A R J U N
IGROWSOFT
Ex on help views: 1. Go to SE11 2. Provide the view name zhelp_view 3. Click on create 4. Provide description a. Provide the table name as makt OR mara b. and click on relationships button
Page 7
B A P&W E B D Y N P R O A B A P @ A R J U N
IGROWSOFT
c. 5. Click on copy, the join condition will be automatically displayed 6. Click on view fields tab 7. Provide the field names matnr, mtart, meins and maktx by clicking on table fields button 8. Provide the selection condition if required 9. Save and activate 10. 11. We cannot test this help view If we want to test we should create a search help
Page 8
IGROWSOFT
A view created on two or more tables using inner join concept is called maintenance views We can maintain the data in maintenance views Maintenance view are used by SAP for internal purpose In the real time we dont create any maintenance views because the data should be saved or modified in multiple tables which leads inconsistency If we want save or modify the data, we have to use standard SAP transactions or BAPIs Ex on Maintenance views: 1. Go to SE11 2. Provide the view name zmaint_view 3. Click on create 4. Provide description a. Provide the table name as makt OR mara b. and click on relationships button
Page 9
B A P&W E B D Y N P R O A B A P @ A R J U N
IGROWSOFT
c. 5. Click on copy, the join condition will be automatically displayed 6. Click on view fields tab 7. Provide the field names as below
a.
Page 10
B A P&W E B D Y N P R O A B A P @ A R J U N 8. Provide the selection condition if required 9. Provide the maintenance status as below
IGROWSOFT
Save activate. Create a TMG for the view and then maintain the data.
Page 11
B A P&W E B D Y N P R O A B A P @ A R J U N
IGROWSOFT
Page 12
B A P&W E B D Y N P R O A B A P @ A R J U N Ex: Parameters : p_kunnr(10) type c. Parameters : p_matnr(20) type c. Match code object:
IGROWSOFT
It is a keyword which is used to assign a search help to the input fields on the selection screen. By default standard SAP search help will be displayed. If we dont want standard search help then we use match code object to assign our own search help. Syntax: Parameters: <Param.Name> (len) type <dtyp> match code object <sh_name> Or Parameters: <parameter name> type <table-fname> match code object <sh_name>
Ex on elementary search help: Go to SE11 Provide the search help name zel_sh Click on create and provide description Provide the selection method as mara
ARJUN.LEARN REAL TIME SCENARIOS DONE BY ME
Page 13
IGROWSOFT
Save, activate and test it Assigning search help at program-selection screen level: Go to SE38 Create a program by name zsh_prog Write the below code
Page 14