This document provides steps to create a view cluster in SAP. It begins by explaining that a view cluster groups objects like views, reports and tables related to a business function. The data can be arranged hierarchically or non-hierarchically. It then outlines the steps to create a view cluster transaction that edits cross-table data in the view cluster. The steps include creating the view cluster, defining the structure and relationships between objects, and assigning authorization objects to control access.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
183 views40 pages
SAP ABAP Data Dictionary
This document provides steps to create a view cluster in SAP. It begins by explaining that a view cluster groups objects like views, reports and tables related to a business function. The data can be arranged hierarchically or non-hierarchically. It then outlines the steps to create a view cluster transaction that edits cross-table data in the view cluster. The steps include creating the view cluster, defining the structure and relationships between objects, and assigning authorization objects to control access.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40
Comparison of Transparent, Pool and Cluster tables
By YSP, Defiance technologies
Transparent Pool Cluster Contain a single table. Used to store master data They are used to hold a large number of very small tables(stores customizing data or system data) They are used to hold data from a few number of large tables.(stores system data) It has a one-to-one relationship with a table in the database It has a many-to-one relationship with a table in the database It has a many-to-one relationship with table in the database or each transparent table there is one associated table in the database It is stored with other pooled tables in a single table called table pool in the database !any cluster tables are stored in a single table in the database called a table cluster The database table has the same name" same number of fields and the fields have the same names The database table has different name" different number of fields and fields have different names The database table has different name" different number of fields and fields have different names There is only a single table Table pools contain more tables than table clusters Contains less tables than table pools #ingle table can have one or more primary $ey %rimary $ey of each table does not begin with same fields or fields %rimary $ey of each table begins with same fields or fields #econdary inde&es can be created #econdary inde&es cannot be created #econdary inde&es cannot be created They can be accessed using open and native #'( They can be accessed using open #'( only They can be accessed using open #'( only U#)* They are used to hold master data e.g. Table vendors or table of customers. )&le of transaction data is orders placed by customers U#)* They reduce the amount of database resources needed when many small tables have to be opened at the same time U#)* They would be used when the tables have primary $ey in common and data in these tables are all accesses simultaneously Adding new values in Standard Domain +pen any domain in which you want to add new values. In !enu" ,oto--i&ed .alues /ppend and clic$ +0 for information message. ,ive /ppend 1ame and o$. Then add new values in the value append. #ave and /ctivate it. If you go bac$ to 2omain" you can view your values. Creation of a table pool and pool table In this Tutorial" we create a Table pool first and then create3 (add a table to Table pool) a %ooled Table. #tep 4* ,o to transaction #)44. ,o to Utilities +ther 2ictionary +b5ects
#tep 6* #elect 7adio button Table pool3Cluster ,ive table %ool 1ame* 8T9(:%++(. Then press ; or choose Create.
Then you go to maintain %oll #creen there give #hort 2escription.
#tep ;* Then go to Technical settings.
#tep >* In the ?!aintain technical #ettings@ screen %rovide #ize category. #ave and activate the table %ool. ,o bac$ to #)44. #tep A* ,o to #)44 /9/% 2ictionary* Initial #creen. Create a 8 table.
#tep B* !aintain 2elivery and !aintenance attributes for the 8 table.
/dd fields to the 8 table. !aintain Technical settings and )nhancement Category.
#tep C* Then ,o to )&tras Change table category
#tep 4D* Choose Table type. In our )&le it is %ooled table.
#tep 44* ,o bac$ to 2elivery and !aintenance tab and provide %ool3Cluster value.
Ee have successfully created Table pool and %ooled table. Row level locking of database table Normally if a person opens table maintenance generator and tries to maintain the table, no one else can maintain the same table at the same time. This is because of table level lock by default in SP. !nly one user can maintain any table at a time through S"#$ or any transaction that calls table maintenance generator. %n the tutorial belo& &e &ill see ho& to remove table level lock and apply ro& level lock. This &ay any number of users can modify the table at same time. But any particular ro& can be modified by only one user at a time. 'e &ill create a transaction for this purpose. The transaction &ill call our custom report. This custom report &ill call the table maintenance generator of the table after deleting table level lock. In current e&le letFs create following* 7eport* 87)%:#GU0#< Transaction* 8T)#T:#GU0#< Table* 8T)#T:#GU0#< with table maintenance generator. Using transaction 8T)#T:#GU0#< we will delete the table level loc$ and put row level loc$ so that multiple users can maintain table at same time. 7ows loc$ed by one user will not be editable by other user. 4. Create table 8T)#T:#GU0#<. 6. Create table maintenance generator for the table. Ee will ma$e single screen maintenance for this table. #ave it. #o finally we have table maintenance code automatically generated in function group 8T)#T:#GU0#<. <. Create loc$ ob5ect )HT##:)=<<#G in #)44. ,ive it name as )8T)#T:#GU0#<.
1ow save and activate the (oc$ ob5ect. #/% creates two function modules corresponding to loc$ ob5ect for enIueue and deIueue of the table.
=. 1ow create a report 87)%:#GU0#< and transaction code 8T)#T:#GU0#< to call this report. This tcode will call table maintenance generator of table 8T)#T:#GU0#< . ;. 1ormally if a person opens table maintenance generator and tries to maintain the table" no one else can maintain table at the same time. This is because of table level loc$ by default in #/%. +nly one user can maintain any table at a time. In report 87)%:#GU0#< we will delete the table level loc$ and put row level loc$ so that multiple users can maintain table at same time. 7ows loc$ed by one user will not be editable by other user. Chec$ the report and comments given below. JK---------------------------------------------------------------------J JK 7eport 87)%:#GU0#< JK JK--------------------------------------------------------------------- JK /uthor * #wetabh #hu$la JK 2ate * D;36636DDC JK 2escription * To delete table level loc$ from table. JK---------------------------------------------------------------------J 7)%+7T zrep:shu$s<. JJ#election range for view maintenance 2/T/* 9),I1 + sele$ttab +CCU7# 4. L#ele$tionsbereich I1C(U2) #T7UCTU7) vimsellist. 2/T/* )12 + sele$ttab" JJTable of inactive CU/ functions for view maintenance 9),I1 + e&cl:cua:funct +CCU7# 4. Lina$tive CU/-$t bei .iew-%flege I1C(U2) #T7UCTU7) vime&clfun. 2/T/* )12 + e&cl:cua:funct. 2/T/* lt:enI:del TH%) #T/12/72 T/9() + seIg<" lt:enI:read TH%) #T/12/72 T/9() + seIgA" lw:enI:read TH%) seIgA" lw:enI:del TH%) seIg<" lv:subrc TH%) sy-subrc. J7ead all the loc$ details in system C/(( U1CTI+1 M)1'U):7)/26M )N%+7TI1, gclient O sy-mandt gname O M M guname O MJM T/9()# enI O lt:enI:read. JEe will search entry for table level loc$ for our table (++% /T lt:enI:read I1T+ lw:enI:read EG)7) gname )' M7#T/9()M /12 garg C# M8T)#T:#GU0#<M. !+.)-C+77)#%+12I1, lw:enI:read T+ lw:enI:del. /%%)12 lw:enI:del T+ lt:enI:del. )12(++%. J2elete table level loc$ entry for our table C/(( U1CTI+1 M)1'U):2)()T)M )N%+7TI1, chec$:upd:reIuests O 4 I!%+7TI1, subrc O lv:subrc T/9()# enI O lt:enI:del. J1ow call the table maintenace generator. C/(( U1CTI+1 M.I)E:!/I1T)1/1C):C/((M )N%+7TI1, action O MUM view:name O M8T)#T:#GU0#<M show:selection:popup O MNM T/9()# dba:sellist O sele$ttab e&cl:cua:funct O e&cl:cua:funct. >. Pust one more change in table maintenance screen. 1ow open table maintenance function group(8T)#T:#GU0#<) in #)BD.Ee $now for table maintenance #/% automatically creates code in the function group. 1ow we will ma$e some modification in that e&isting code to change the behavior. +pen the screen you created through table maintenance and add one module.
+pen the screen DDD4 and add one module in %9+ of the screen as shown in figure below. Chec$ the code below to be added in the module m:change:loc$ing. !+2U() m:change:loc$ing +UT%UT. JCall the function module corresponding to the loc$ ob5ect we created C/(( U1CTI+1 M)1'U)U):)8T)#T:#GU0#<M )N%+7TI1, matnr O ztest:shu$s<-matnr wer$s O ztest:shu$s<-wer$s )NC)%TI+1# foreign:loc$ O 4 system:failure O 6 +TG)7# O <. I sy-subrc 1) D. J row is loc$ed..hence gray.. (++% /T #C7))1. screen-input O D. !+2IH #C7))1. )12(++%. )12I. )12!+2U(). L m:change:loc$ing +UT%UT A. 1ow we are ready for testing. Call the transaction once and ma$e some entries in table. In below screenshot I have entered some random values. #ince we have not maintained any chec$ tables etc" so values may be invalid. That can be ta$en care in real scenario.
#ave data. (etFs call two sessions of the transaction 8T)#T:#GU0#<. Session 1 In first session we will call the transaction 8T)#T:#GU0#< and try to open some e&isting values for table maintenance.
(etFs open an e&isting value material O !/T4 and %lant O D>AB.
#o the entry opens in change mode. 1ow open a second session of the transaction and see. 1ow the same material and plant combination can not be changed by any other user or session. Session 2 +pen transaction 8T)#T:#GU0#<
#o we can see that our transaction is able to achieve a row level loc$ing and has removed table level loc$ing. Creation of a View cluster By T.N.S&apna View Cluster / view cluster is the set of ob5ects" such as views" reports or tables" which belong to one business function. The data can be arranged either hierarchically or non-hierarchically in view cluster. / view- cluster transaction edits the comple& cross-table data in a view cluster. The transaction navigation bo& shows the comple& business ob5ect with its components or sub ob5ects. Example: (et us create a .iew Cluster on !aterial 2etails. The view cluster would include three tables namely" !/7/" !/7C and !/72. Ee need to create maintenance views for each of these tables. Maintenance view for Table MARA To create maintenance view for the table !/7/ follow the procedure below. ,o to transaction #)44. ,ive a view name say 8!!:.:!/7/ and clic$ on QCreateF. ,ive a short description" enter the table name as !/7/ and clic$ on the tab .iew fields. 9y default all the $ey fields would be added. Ee can add more fields by clic$ing on the button Table fields. 1ow #ave and activate the view. Maintenance view for Table MARC ollow the same procedure as above. In the Tab .iew fields" give Q#F in the column Q%F for the fields !/12T and !/T17 as shown in the screen shot below* This is because the fields !/12T and !/T17 would be filled in the view for !/7/ and thus they act as subsets and appear as header data when we create entries in view cluster. Maintenance view for Table MARD ollow the same procedure as above. In the Tab .iew fields" give Q#F in the column Q%F for the fields !/12T" !/T17 and E)70# as shown in the screen shot below* This is because the fields !/12T" !/T17 and E)70# would be filled in the view for !/7C and thus they act as subsets and appear as header data when we create entries in view cluster. Table Maintenance Generator for ZMMVMARA 1ow" for each view we need to create a table maintenance generator" which has to be done as follows* The table maintenance screen appears. Gere give the details as in the screen shot below. This table maintenance is for the view 8!!:.: !/7/. 9efore creating a table maintenance generator" create a function group say 8,:!/T)7I/( from the transaction #)BD. /fter the function group is successfully created" enter the function group name as shown in the screen shot. /lso select !aintenance type as Q+ne #tepF and give the !aintenance #creen no. as Q4F in the +verview screen and clic$ on the button QCreateF. #imilarly" create the Table maintenance ,enerators for the views 8!!:.:!/7C and 8!!:.:!/72. The screen shots for these views would be as follows* Table Maintenance Generators for ZMMVMARC an! ZMMVMARD
1ote that the +verview screen numbers would change for each view. It would be Q6F for the view 8!!:.:!/7C and it would be Q<F for the view 8!!:.:!/72. Creatin" view cluster The pre-reIuisites for creating the .iew Cluster are now ready. ,o to transaction #);= and select the button Q)dit .iew ClusterF. )nter the view cluster name as say Q8!!:.C:!/T)7I/(F and clic$ on QCreateF. /n information message would pop up saying Continue by pressing Q)nterF. The following screen appears. ,ive a short description and clic$ on Q+b5ect #tructureF as shown in the screen shot below* +n Clic$ing the Q+b5ect #tructureF the following screen appears. #elect the Q1ew )ntriesF button to enter the maintenance views created to form a cluster. )nter the values as shown below* The entries would be entered in a hierarchical manner. The short te&t is the description of the view. The Q%redecessF column specifies the predecessor of that view. #o in this case" the predecessor of 8!!:.:!/7/ is 8!!:.:!/7/ itself. The predecessor of 8!!:.:!/7C is 8!!:.:!/7/ and the predecessor of 8!!:.:!/72 is 8!!:.:!/7C. The Q2)%F column e&plains whether the entry is a Geader entry or a 2ependent entry. It is Q7F for the view 8!!:.:!/7/" because it is a header entry and does not depend on any other view. Ehereas" it is Q#F for 8!!:.:!/7C and 8!!:.:!/72" because 8!!:.:!/7C is dependent on 8!!:.:!/7/ and 8!!:.:!/72 is dependent on 8!!:.:!/7C. The column Q%+#F specifies the seIuence of the views. In the column Q#tartF select the radio button against the entry for 8!!:.:!/7/ as it comes first in the hierarchy. /fter entering the above entries" press Q)nterF. Three pop-ups for each view would appear as shown below. %roceed further by clic$ing on Q)nterF $ey. 1ow select each line and clic$ on Qield-dependenceF button. / pop-up appears saying Qield dependencies successfully generatedF. ,enerate the field dependence for the views 8!!:.:!/7C and 8!!:.:!/72 in the same way. 1ow" save the entries and go bac$ to QGeader )ntryF folder. /ctivate the view cluster. / pop-up appears as shown below. Clic$ on QHesF. The view cluster is now created successfully. #ote: 4. The view cluster can be created on the tables whose data has to be stored in a hierarchical manner. 6. +ne has to chec$ whether proper foreign $ey relationships are maintained between the tables appearing in the cluster. #ometimes while generating the ield-dependencies" errors may occur if the foreign $eys are not maintained properly. Testin" t$e View Cluster rom the initial screen of the transaction Q#);=F give the view cluster name and clic$ on QTestF.
#ince we have created the view cluster on standard tables !/7/" !/7C and !/72 we observe that all the e&isting entries would appear. The screen shot below shows all the e&isting entries of the table !/7/. In order to see the corresponding %lant details for the material" 5ust select an entry and double clic$ on %lant details as shown below.
The plant details &ould appear. %n the same &ay for the corresponding storage location details, select an entry and double click on Storage details as sho&n belo&.
In the above screen shot the material selected in the !aterial details view would appear as a header entry. The storage location details are as follows*
In the above screen shot the material selected in the !aterial details view and the plant selected in the %lant details view would appear as header entry. Creating Search elps !"lementar# and Secondar#$ By (ikram )hellappa, "ouri Tech Solutions ,o To #)44 T-code.
#elect the radio button of search help.
%rovide the search help name. #elect the create button.
#elect )()!)1T/7H search help.
%ress )nter. %rovide the short description" the selection method. %rovide the fields. #ave it" Chec$ It K /ctivate it. Then e&ecute it. Ee can see the screen li$e this" and then press = in this page. Then press = .iew the output li$e this. This is the output for elementary search help. The Collective #earch Gelp is li$e this. ,oto T-Code #e44. %rovide name. #elect collective search help button. %ress enter. %rovide the .alues #elect include search help. Then provide search help name" which is already define by the same fields. Then save it" activate it K e&ecute it. %ress = we can see the output li$e this.
2iff 9etween Elementar% searc$ helps K Collective searc$ helps 4) )lementary search helps describe a search path. The elementary search help must define where the data of the hit list should be read from (selection method)" how the e&change of values between the screen template and selection method is implemented (interface of the search help) and how the online input help should be defined (online behavior of the search help). 6) Collective search helps combine several elementary search helps. Collective search help thus can offer several alternative search paths. <) /n elementary search help defines the standard flow of an input help. =) / collective search help combines several elementary search helps. The user can thus choose one of several alternative search paths with collective search help. ;) / collective search help comprises several elementary search helps. It combines all the search paths that are meaningful for a field. >) 9oth elementary search helps and other search helps can be included in a collective search help. If other collective search helps are contained in collective search help" they are e&panded to the level of the elementary search helps when the input help is called. Creating a secondar# inde% &# 'eha (apoor There are t&o types of inde*es+ Primary inde* and secondary inde*. Primary inde* is automatically created using the primary keys defined. #econdary inde& could be created as per the user reIuirement. This article discusses about creating a secondary inde&. ,o to transaction #)44.
or our demo purpose" we have considered the table 8/UTG+7. To $now if there are any secondary inde&es available" clic$ on ,oto Inde&es
ollowing popup appears*
rom the above screenshot" it is evident that there are no secondary inde&es already created. Clic$ on Create Create Inde&
)nter the name of the inde&.
ill in the details R #hort description and the fields in the inde&.
#ave and activate. 1ow you can observe the inde& created above in the list now*
!a&imum number of secondary inde&es we can have are C. Gow to ma$e #)()CT statement to ma$e use of any particular secondary inde&S )onsider the follo&ing e*ample+ S,-,)T . /0!" SP/-% 123%NTS !0)-, 4%ND,567SP/-%7 7SP/-%8$$97:4 ....... ,NDS,-,)T. %n the above e*ample, $$9 is the secondary inde* of the table SP/-%. %t4s a ℓkno&n fact that the efficient &ay of retrieving data from the database tables is by using secondary inde*es. "any database vendors provide the optimi<er hints for the same. /rom SP= v>.?, optimi<er hints can be provided by the 123%NTS parameter. This is dependent on the database systems that support optimi<er hints. The point to be noted here is these optimi<er hints are not standardi<ed by the S@- standards. ,ach database vendor is free to provide the optimi<er hints. No& to kno& &hich inde* to use for our table+ 9. Ao to S,99 and there specify the table name B. No& from the menu, goto ;;C inde*es #. select the reDuired inde*. No& suppose that the identifier $$9 represents a non;uniDue secondary inde* comprising of the columns )%TY/0!" and )%TYT!. The inde* name should be defined as+ EtablenameC8E%nde* %dentifierC like SP/-%8$$9 in the above e*ample. The seDuence of fields in the '3,0, condition is of no relevance in using this optimi<ers inde*. %f you specify hints incorrectly, BP T" ignores them but doesn4t return a synta* error or runtime error. The code &as &ritten in 0F# >.G). Code )onsider the follo&ing e*ample+ 0,P!0T Suresh2test. TB-,S+ spfli. DT + t2spfli -%H, spfli !))I0S $ '%T3 3,D,0 -%N,. S,-,)T . /0!" spfli %NT! TB-, t2spfli 123%NTS !0)-, 4%ND,567SP/-%7 7SP/-%8$$97:4. -!!P T t2spfli. '0%T, +F t2spfli. ,ND-!!P.