Quantcast
Channel: SCN: Message List - SAP HANA Developer Center
Viewing all 9165 articles
Browse latest View live

Create view for a SAP HANA System Table

$
0
0

Hi everyone,

 

I would like create a view for SYS.M_TABLES (System Table) or create an oData Service that access directly the M_Tables, I have tried to consume the M_Tables view using  this code:

service {  "SYS"."M_TABLES"  as "Table" keys ("SCHEMA_NAME");
}

but when there is a schema with multiple tables, I get this error:

"Multiple resources found. Inconsistency between data model and service description found.", which is somehow related to aggregation issue or something, I also can't use the aggergates always, as it is row table object not a view.

 

Would you please advise ?

 

Thank you,

Regards,

Shady


Re: Create view for a SAP HANA System Table

$
0
0

Dear

System Tables and Monitoring Views The following public system tables and monitoring views are available:

AUDIT_POLICIES - Defined audit policies
AUTHORIZATION_GRAPH - Represents authorization dependencies of complex database objects
CONSTRAINTS - Constraints defined for tables
CS_BO_VIEWS - Business object views for column store join views
CS_FREESTYLE_COLUMNS - Freestyle search columns for column store join views
CS_JOIN_CONDITIONS - Join conditions defined for column store join views
CS_JOIN_CONSTRAINTS - Join constraints defined for column store join views
CS_JOIN_PATHS - Join paths defined for column store join views
CS_JOIN_TABLES - Physical tables referred by column store join views
CS_KEY_FIGURES - Key figures defined for column store join views
CS_VIEW_COLUMNS - Columns defined for column store join views
DATA_TYPES - Available SQL data types
EFFECTIVE_PRIVILEGES - Privileges of the current user
EXPLAIN_PLAN_TABLE - SQL query plan explanation result
FULLTEXT_INDEXES - Fulltext indexes on table columns
FUNCTIONS - Available functions
FUNCTION_PARAMETERS - Parameters of functions
GRANTED_PRIVILEGES - Privileges granted to users and roles
GRANTED_ROLES - Roles granted to users or other roles
INDEXES - Indexes on tables
INDEX_COLUMNS - Columns of indexes
INVALID_CONNECT_ATTEMPTS - Number of invalid connect attempts for a user between two successful connects
M_ATTACHED_STORAGES - Information about currently attached devices
M_BACKUP_CATALOG - Common data for all backup catalog entries
M_BACKUP_CATALOG_FILES - Location information of all backup catalog entries
M_BACKUP_CONFIGURATION - Backup configuration statistics
M_BLOCKED_TRANSACTIONS - Transaction list waiting for locks
M_CACHES - Shows aggregated information on caches
M_CACHES_RESET - Shows aggregated information on caches
M_CACHE_ENTRIES - Cache entry information
M_CATALOG_MEMORY - Memory usage information by catalog manager
M_CE_CALCSCENARIOS - All available CalculationScenarios
M_CE_CALCVIEW_DEPENDENCIES - All views that are referencing a CalculationScenario
M_CE_DEBUG_INFOS - Debug information after execution of a CalculationScenario
M_CE_DEBUG_JSONS - All available JSONS (original, instantiated, optimized) of a scenario for a concrete query
M_CE_DEBUG_NODE_MAPPING - Node mapping between CalculationNodes and RuntimeNodes after execution
M_CE_PLE_CALCSCENARIOS - All available CalculationScenarios created by the PlanningEngine
M_CLIENT_VERSIONS - Versions of all supported client applications
M_COMPACTION_THREAD - Compaction thread statistics
M_CONDITIONAL_VARIABLES - Semaphore statistics
M_CONDITIONAL_VARIABLES_RESET - Semaphore statistics
M_CONFIGURATION - Configuration parameters
M_CONNECTIONS - Detailed information on connections between a client and database. Information includes connection status, client information, connection type, resource utilization
M_CONNECTION_STATISTICS - Detailed statistics on each connection between an application and database
M_CONTAINER_DIRECTORY - ContainerDirectory statistics
M_CONTAINER_NAME_DIRECTORY - ContainerNameDirectory statistics
M_CONTEXT_MEMORY - Memory allocator statistics
M_CONTEXT_MEMORY_RESET - Memory allocator statistics
M_CONVERTER_STATISTICS - Converter statistics
M_CONVERTER_STATISTICS_RESET - Converter statistics
M_CS_ALL_COLUMNS - Runtime information of all columns of column tables, inclusive internal ones
M_CS_COLUMNS - Runtime information of columns of column tables
M_CS_PARTITIONS - Partition information of column tables
M_CS_TABLES - Runtime data of column tables
M_CS_UNLOADS - A history of column unloads
M_DATABASE - Database information
M_DATABASE_HISTORY - Installation version history
M_DATA_VOLUMES - DataVolume statistics
M_DATA_VOLUME_PAGE_STATISTICS - Page usage statistics on data volumes
M_DATA_VOLUME_PAGE_STATISTICS_RESET - Page usage statistics on data volumes
M_DATA_VOLUME_SUPERBLOCK_STATISTICS - FreeBlockManager Superblock statistics
M_DELTA_MERGE_STATISTICS - Table delta merge statistics
M_DISKS - Disk configuration and utilization of the host machine
M_ERROR_CODES - Error codes with descriptions
M_EVENTS - Internal events
M_EXPENSIVE_STATEMENTS - All statements with duration longer than a threshold
M_EXPORT_BINARY_STATUS - Export status information for current session
M_EXTRACTORS - Direct extractor connection (DXC) status information
M_FEATURES - All supported features
M_FULLTEXT_QUEUES - Fulltext index queue status
M_GARBAGE_COLLECTION_STATISTICS - Garbage collection/history manager statistics
M_GARBAGE_COLLECTION_STATISTICS_RESET - Garbage collection/history manager statistics
M_HEAP_MEMORY - Memory allocator statistics
M_HEAP_MEMORY_RESET - Memory allocator statistics
M_HISTORY_INDEX_LAST_COMMIT_ID - Last commit ID of history index for each session
M_HOST_INFORMATION - Host information such as machine, OS configuration
M_HOST_RESOURCE_UTILIZATION - Host resource utilization, CPU time is in milliseconds and added across all cores since system start
M_IMPORT_BINARY_STATUS - Import status information for current session
M_INIFILES - All configuration files
M_INIFILE_CONTENTS - Configuration information from inifiles
M_JOB_PROGRESS - Current long running system operations
M_LANDSCAPE_HOST_CONFIGURATION - Host roles in a distributed landscape
M_LICENSE - Information on the currently valid license (if any) installed on this system
M_LICENSE_USAGE_HISTORY - Information on the maximum resource consumption per time period, used for validity check of license installed on this system (if any)
M_LIVECACHE_CONTAINER_STATISTICS - LiveCache container statistics
M_LIVECACHE_CONTAINER_STATISTICS_RESET - LiveCache container statistics
M_LIVECACHE_LOCKS - Detailed information on the Object Management System (OMS) locks
M_LIVECACHE_LOCK_STATISTICS - LiveCache lock statistics
M_LIVECACHE_LOCK_STATISTICS_RESET - LiveCache lock statistics
M_LIVECACHE_OMS_VERSIONS - Detailed information on the OMS versions that currently exists
M_LIVECACHE_PROCEDURE_STATISTICS - LiveCache procedure statistics
M_LIVECACHE_PROCEDURE_STATISTICS_RESET - LiveCache procedure statistics
M_LIVECACHE_SCHEMA_STATISTICS - LiveCache schema statistics
M_LIVECACHE_SCHEMA_STATISTICS_RESET - LiveCache schema statistics
M_LOCK_WAITS_STATISTICS - Accumulated lock wait count and duration for record lock, table lock and metadata lock for all available services from DB startup until now
M_LOG_BUFFERS - Log buffer statistics
M_LOG_BUFFERS_RESET - Log buffer statistics
M_LOG_PARTITIONS - Log partition statistics
M_LOG_PARTITIONS_RESET - Log partition statistics
M_LOG_SEGMENTS - Log segment statistics
M_LOG_SEGMENTS_RESET - Log segment statistics
M_MEMORY_OBJECTS - Memory object statistics
M_MEMORY_OBJECTS_RESET - Memory object statistics
M_MEMORY_OBJECT_DISPOSITIONS - Disposition specific memory object statistics. The statistics are calculated and reading them may take a while.
M_MERGED_TRACES - Contains the merged content of the server trace files for all of the SAP HANA processes
M_MONITORS - Available monitoring views
M_MONITOR_COLUMNS - All the columns in the monitoring views
M_MUTEXES - Mutex statistics
M_MUTEXES_RESET - Mutex statistics
M_MVCC_TABLES - Statistics of row-store Multiversion Concurrency Control (MVCC) manager
M_OBJECT_LOCKS - Status of currently acquired locks on objects with detailed information such as lock acquisition time, lock mode
M_OBJECT_LOCK_STATISTICS - Lock contention statistics - lock wait count, wait time, failed count for each objects
M_OBJECT_LOCK_STATISTICS_RESET - Lock contention statistics - lock wait count, wait time, failed count for each objects
M_PAGEACCESS_STATISTICS - PageAccess statistics
M_PAGEACCESS_STATISTICS_RESET - PageAccess statistics
M_PASSWORD_POLICY - Configuration values concerning password policy
M_PERFTRACE - Current PerfTrace state
M_PERSISTENCE_MANAGERS - Persistence manager statistics
M_PERSISTENCE_MANAGERS_RESET - Persistence manager statistics
M_PREPARED_STATEMENTS - Prepared statements list
M_READWRITELOCKS - Read/Write lock statistics
M_READWRITELOCKS_RESET - Read/Write lock statistics
M_RECORD_LOCKS - Record lock status
M_REORG_ALGORITHMS - Landscape redistribution algorithms
M_REPO_TRANSPORT_FILES - All repository transport files
M_RS_INDEXES - Statistics of B-tree and CPB-tree indexes
M_RS_TABLES - Information on row tables: detailed table sizes and record count
M_RS_TABLE_VERSION_STATISTICS - Information on row table versions: detailed version counts and used sizes
M_SAVEPOINTS - Current and historical savepoint statistics
M_SAVEPOINT_STATISTICS - Savepoint statistics
M_SAVEPOINT_STATISTICS_RESET - Savepoint statistics
M_SEMAPHORES - Semaphore statistics
M_SEMAPHORES_RESET - Semaphore statistics
M_SERVICES - Status of all services
M_SERVICE_COMPONENT_MEMORY - Service-specific memory usage by logical component
M_SERVICE_MEMORY - Detailed information on memory utilization by services
M_SERVICE_NETWORK_IO - Service network I/O statistics
M_SERVICE_REPLICATION - Information about replicated services
M_SERVICE_STATISTICS - Statistics on active services
M_SERVICE_THREADS - Detailed information on threads created by services
M_SERVICE_THREAD_CALLSTACKS - Stack frame information for service threads
M_SERVICE_TRACES - Configured trace components for each service type
M_SERVICE_TYPES - Service types
M_SESSION_CONTEXT - Session variables for each connection.
M_SHARED_MEMORY - Shared memory usage information by SAP HANA indexserver
M_SNAPSHOTS - Existing snapshots
M_SQL_PLAN_CACHE - Statistics of an individual execution plan
M_SQL_PLAN_CACHE_OVERVIEW - Overall statistics of evicted and cached plans
M_SQL_PLAN_CACHE_RESET - Statistics of an individual execution plan
M_SYSTEM_INFORMATION_STATEMENTS - System information statements
M_SYSTEM_LIMITS - System limits information
M_SYSTEM_OVERVIEW - Overview of system status including important resource usage information and alerts
M_TABLES - Information on row and column tables
M_TABLE_LOB_FILES - All LOB files that belong to a table
M_TABLE_LOCATIONS - Tables and their logical location. Physical locations are shown in M_TABLE_PERSISTENCE_LOCATIONS
M_TABLE_PERSISTENCE_LOCATIONS - Column store tables and their physical data locations
M_TABLE_PERSISTENCE_STATISTICS - Persistence virtual file summary statistics for tables
M_TABLE_VIRTUAL_FILES - All virtual files that belong to a table
M_TEMPORARY_TABLES - Temporary tables
M_TEMPORARY_TABLE_COLUMNS - Columns of temporary tables
M_TEMPORARY_VIEWS - Temporary views
M_TEMPORARY_VIEW_COLUMNS - Columns of temporary tables
M_TENANTS - Available tenant information
M_TEXT_ANALYSIS_LANGUAGES - List of supported languages
M_TEXT_ANALYSIS_MIME_TYPES - List of supported mime types
M_TOPOLOGY_TREE - SAP HANA nameserver topology content
M_TRACEFILES - All trace files
M_TRACEFILE_CONTENTS - SAP HANA information from trace files
M_TRANSACTIONS - All transactions created by users or database
M_UNDO_CLEANUP_FILES - Information about undo files and cleanup files
M_VERSION_MEMORY - Memory usage of row-store Multiversion Concurrency Control (MVCC) manager
M_VOLUMES - Volumes used by SAP HANA servers
M_VOLUME_FILES - Information about volume files
M_VOLUME_IO_PERFORMANCE_STATISTICS - File performance statistics
M_VOLUME_IO_PERFORMANCE_STATISTICS_RESET - File performance statistics
M_VOLUME_IO_STATISTICS - File access statistics
M_VOLUME_IO_STATISTICS_RESET - File access statistics
M_VOLUME_SIZES - Volume sizes used by SAP HANA servers
M_WORKLOAD - Database workload collected every minute
M_XS_APPLICATIONS - Applications deployed and running in SAP HANA XS
M_XS_APPLICATION_ISSUES - Issues related to applications in SAP HANA XS
OBJECTS - Available objects
OBJECT_DEPENDENCIES - Dependencies between objects, for example, views which refer to a specific table
OWNERSHIP - Ownership of available objects when users create any object in other users' schemas
PRIVILEGES - Available privileges
PROCEDURES - Available stored procedures
PROCEDURE_OBJECTS - Contains results of the system procedure GET_PROCEDURE_OBJECTS
PROCEDURE_PARAMETERS - Parameters of stored procedures
QUERY_PLANS - Plans how to handle query execution
REFERENTIAL_CONSTRAINTS - Referential constraints
REORG_OVERVIEW - Overview of landscape redistributions
REORG_PLAN - Current plan for landscape reorganization
REORG_PLAN_INFOS - Additional informations about current landscape reorganization plan
REORG_STEPS - Details of landscape redistribution
ROLES - Shows available roles
SAML_PROVIDERS - Shows available SAML provider
SAML_USER_MAPPINGS - Shows the SAML providers known for each user
SCHEMAS - Shows available schemas
SEQUENCES - Available sequences
SQLSCRIPT_TRACE - Contains the names of the local temporary tables created by the SQLScript TRACE operator
STATISTICS - Stores a histogram of tables. The histogram can be used by query optimizer to calculate size of an intermediate result
STRUCTURED_PRIVILEGES - Available structured privileges
SYNONYMS - Available synonyms
TABLES - Available tables
TABLE_COLUMNS - Available table columns
TABLE_COLUMNS_ODBC - Available table columns
TABLE_GROUPS - Overview of table groups relations
TRANSACTION_HISTORY - Committed transactions and their users
TRIGGERS - Triggers defined for tables
USERS - All users
USER_PARAMETERS - All parameters and their values, which have been assigned to users in the system (using CREATE USER ... SET PARAMETER or ALTER USER ... SET PARAMETER)
VIEWS - Available views
VIEW_COLUMNS - Available view columns

 

Regards

Re: Create view for a SAP HANA System Table

$
0
0

Dear Rajendra,

 

Many thanks for your help.

 

Yes, I am trying to use M_TABLES view, however if you open its definition, you will find that it is a row table not a view, and when I try to access it using oData Service, I get this error of "Multiple resources found. Inconsistency between data model and service description found." if there are more than one entry, so what I am trying to do is whether to create a view for the M_Tables "row table" understand overpass the error I am getting when I try to access it using oData Service.

 

Thank you so much for your support,

Regards,

Shady

Re: Create view for a SAP HANA System Table

$
0
0

Hi Shady,

 

Without dig into your service the key is wrong.

It can't be only schema_name.

 

Regards, Fernando Da Rós

Re: Create view for a SAP HANA System Table

$
0
0

Hi Fernando Da Rós,


M_Tables.png

That is the structure of the table, I have thought the same and I have tried to add "Table_Name" as a key but it did not work. So far SCHEMA_NAME is the only key I know of in this table.

 

Thank you so much for your support,

Regards,

Shady

Re: ERROR: Request execution failed due to missing privileges

$
0
0

Hello Wenjun, good morning, I cannot see the activated roles under the security/ roles section in the system.

 

but when i run the

 

select * from "HCP"."HCP_ACTIVATED_ROLES"

 

i can see the roles

 

ROLE_NAME

 

p1940932600trial.newtrialinstance.Excercise02.roles::Excercise02User01

p1940932600trial.newtrialinstance.shine.SHINE.roles::Admin

p1940932600trial.newtrialinstance.shine.SHINE.roles::User

p1940932600trial.newtrialinstance.shine.SHINE.roles::shineAdmin

p1940932600trial.newtrialinstance.shine.SHINE.roles::shineUser

Re: Error while import schema in HANA DB

$
0
0

Folks, I am running into the same issue. What I figure out was the following:

1) I turn off the autocommit

2) I run the import for the first time

import "<SCHEMA_NAME>"."*" as binary from '<location>' with replace;
rollback;

3) I get the error as described

SAP DBTech JDBC: [2048]: column store error: table import failed:  [30117] Binary import failed (cannot execute drop statement) 

4) I run this import once again and commit and surprisingly the error is gone and the import is successful.

import "<SCHEMA_NAME>"."*" as binary from '<location>' with replace;
commit;

Re: Error while import schema in HANA DB

$
0
0

Hi Raval,

 

Before Importing U have to clear sys_repo system  In content using SQL command

 

Regards,

V@li


HANA Instr function to check for numbers?

$
0
0

Hi,

 

I am trying to create a calculated column to check the validity of another field for the presence of numbers in the string.

 

For example

 

Partner     Tel_number     Valid

 

1               1flowers          Yes

2               Telephone       No 

3               6046060543    Yes

 

My Expected result would be for partner 1 and 2 to return valid results and partner 2 to be invalid.

 

What is the correct syntax for instr to do this?

 

I've already tried the following:

 

IF(INSTR("TEL_NUMBER",IN(0,1,2,3,4,5,6,7,8,9)),0,1)

IF(INSTR("TEL_NUMBER",'1' OR '2' ...... ),0,1)

 

Thanks!

John

Implementing HCM PA and OM on HANA

$
0
0

I am working on technical team implementing SAP HCM using HANA for PA and OM modules.We have been challenged to utilized HANA on HR ABAP. Looking for some pointers on ways we can utilized HANA while developing RICEF objects.Any ideas with help.

Re: MAX funtionality in HANA

$
0
0

Thanks for all the valuable inputs and guidance lars. I am trying the same in SQL and I wrote SQL as below-

 


(select "BILL_VBELN","BILL_FKDAT","BILL_KVGR1_1","BILL_FIL_PROFORMA_INV","BILL_KUNRG","BILL_KTGRD_1","BILL_VKORG_VBRK","BILL_INCO1","BILL_INCO2","BILL_PRCTR","BILL_POSNR","ROUTE","BILL_AUPOS","GET_DAYS","BILL_DATE_FY","BILL_DATE_FP","TO_DATE_EUDAT","TO_DATE_WADAT","DEL_DATE_CALC","TRAN_TIME","CA_BILL_REP_NETWR_COMP_CURR","CA_BILL_REP_WAVWR_COMP_CURR","NEW_DEL_DATE"

from "_SYS_BIC"."pk-sample.productmanagement/CV_REVENUE_RECOG_CUTOFF_PVP" t1

where  "BILL_VBELN" = '9043128697' AND  "BILL_AUPOS" = '001710'

            
INNER JOIN

 

select "BILL_VBELN","BILL_AUPOS",  MAX("NEW_DEL_DATE") AS "NEW_DEL_DATE"

 

from "_SYS_BIC"."pk-sample.productmanagement/CV_REVENUE_RECOG_CUTOFF_PVP"

where  BILL_VBELN = '9043128697' AND  BILL_AUPOS = '001710'
group by "BILL_VBELN" , "BILL_AUPOS" t2

 

on (t1."bill_vbeln" = t2."bill_vbeln" AND t1."bill_aupos" = t2."bill_aupos")


I am still getting the below error. I was trying to search for the template to get this working but I did nt find one with INNER JOIN on select query...

 

 

error:

 

sql syntax error: incorrect syntax near "INNER": line 6 col 2 (at pos 526)

 


Please guide...

 

Thanks

How to check retention period of the application log

$
0
0

Hello

 

I want to know how to check retention period of the application log and Initial setting of the retention period of application log.

R and Hana integration

$
0
0

Hi all,

 

in the R integration guide you can see that SAP had tested the installation with the R version 2.15. Now it is possible to download R version 3.1.0.

Have you any experience (problems, versions which should not be used, etc.) with a newer version than 2.15. Our Hana system is based on SAP ERP 6.0, EHP7 SPS 05 Revision 81.


Thanks a lot for your help.

 

Kind regards,

Florian

SAP HANA scripted view vs stored procedure

$
0
0

All,

 

I have an expensive scripted view which runs but it takes a very long time to execute (about 30 mins) the same script was placed in a stored procedure and it ran in 3 minutes. I am not sure what would make this big difference. when looking at the execution plan it seems like the stored proc caches the queries in the script and therefore runs much faster. is there a configuration setting that can be applied to the view itself to make this a faster processing from the scripted view to mimic the execution from the stored procedure?  what else should I be looking at when creating these db objects. again, the same script was placed on both (scripted view and stored procedure)

 

 

thank you in advance

HDBSQL connection failed when the password have special characters

$
0
0

Hello Experts

 

I have an error with HDBSQL connection. I need to connect an user that has a password with special character (customer policies) but it shows an error: the username or password is incorrect.

 

please, Can any one help me to resolve this problem?

 

Thanks,

Juan Sebastian Salazar


Re: HANA equivalent of oracle's sql%rowcount to get affected rows.

$
0
0

This should be documented somewhere. I did not find it.

 

By the way, I am not sure since which version, but the much simpler syntax

 

L_C := ::ROWCOUNT;

 

is also possible. I see select from dummy used frequently, however I really prefer using the assignment operator where it is possible.

 

Cheers,

Martin

Re: HDBSQL connection failed when the password have special characters

$
0
0

what special character you are using ?

SAP Business One on HANA migration

$
0
0

Im a trying to migrate a 120 GB SAP Business One SQL database to HANA, However, after 48 hours of process using the SAP migration tool it was stuck in migration check. Is this normal?

How to hide sidebar from VizContainer?

$
0
0

Hi all,

 

I'm working on VizContainer and I didnt find how to hide the sidebar from that. Could you please help me?

 

 

I'm not sure if its name is sidebar or not but i mean these things

Untitled.png

Untitled2.png

 

The codes are as you know in the below link:

https://sapui5.netweaver.ondemand.com/sdk/#test-resources/sap/viz/demokit/VIZContainer.html#

 

 

(function(){

  // Prepare business data

  var oModel = new sap.ui.model.json.JSONModel({

  businessData : [ {

  Country : "Country1",

  profit : -141.25

  }, {

  Country : "Country2",

  profit : 133.82

  }, {

  Country : "Country3",

  profit : 348.76

  }, {

  Country : "Country4",

  profit : 217.29

  }, {

  Country : "Country5",

  profit : 117.00

  }, {

  Country : "Country6",

  profit : 609.16

  } ]

  });

 

  // A Dataset defines how the model data is mapped to the chart

  var oDataset = new sap.viz.ui5.data.FlattenedDataset({

  // a Bar Chart requires exactly one dimension (x-axis)

  dimensions : [ {

  axis : 1, // must be one for the x-axis, 2 for y-axis

  name : 'Country',

  value : "{Country}"

  } ],

  // it can show multiple measures, each results in a new set of bars in a new color

  measures : [

  // measure 1

  {

  name : 'Profit', // 'name' is used as label in the Legend

  value : '{profit}' // 'value' defines the binding for the displayed value

  } ],

  // 'data' is used to bind the whole data collection that is to be displayed in the chart

  data : {

  path : "/businessData"

  }

  });

 

  // create a VizContainer

  var oVizContainer = new sap.viz.ui5.VizContainer({

  'uiConfig' : {

  'layout' : 'horizontal',

  'enableMorphing' : true

  },

  'width': '100%',

  'height': '100%'

  });

 

  // oVizContainer.

  // attach the model to the chart and display it

  oVizContainer.setVizData(oDataset)

  oVizContainer.setModel(oModel);

 

  // set feeds

  var aobjCountry = new sap.viz.ui5.controls.common.feeds.AnalysisObject({

uid : "Country_id",

  name : "Country",

  type : "Dimension"

  }), aobjProfit = new sap.viz.ui5.controls.common.feeds.AnalysisObject({

uid : "Profit_id",

  name : "Profit",

  type : "Measure"

  });

  var feedPrimaryValues = new sap.viz.ui5.controls.common.feeds.FeedItem({

uid : "primaryValues",

  type : "Measure",

  values : [ aobjProfit ]

  }), feedAxisLabels = new sap.viz.ui5.controls.common.feeds.FeedItem({

uid : "axisLabels",

  type : "Dimension",

  values : [ aobjCountry ]

  });

 

  oVizContainer.addFeed(feedPrimaryValues);

  oVizContainer.addFeed(feedAxisLabels);

 

  oVizContainer.addAnalysisObjectsForPicker(aobjCountry);

  oVizContainer.addAnalysisObjectsForPicker(aobjProfit);

  oVizContainer.addAnalysisObjectsForPicker(new sap.viz.ui5.controls.common.feeds.AnalysisObject({

uid : "Revenue_id",

  name : "Revenue",

  type : "Measure"

  }));

  oVizContainer.addAnalysisObjectsForPicker(new sap.viz.ui5.controls.common.feeds.AnalysisObject({

uid : "Population_id",

  name : "Population",

  type : "Measure"

  }));

  oVizContainer.addAnalysisObjectsForPicker(new sap.viz.ui5.controls.common.feeds.AnalysisObject({

uid : "Gender_id",

  name : "Gender",

  type : "Dimension"

  }));

 

  // Below compressed code is to fetch the data bindding logic.

  ut={};ut.du={cd:{},vizContainer:null,};ut.du.createAnalysisObjectsForDataPicker=function(e){var d=e;ut.du.cd.dataset=d;ut.du.cd.category={};

  var b=d[0];var c=b.length;var j=[];for(var f=0;f<c;f++){var g=b[f].type;var a=b[f].name;var h=new sap.viz.ui5.controls.common.feeds.AnalysisObject({uid:a+"_id",name:a,type:g});j.push(h);

  ut.du.cd.category[a]=f}return j};ut.du.onFeedsChange=function(b,d){ut.du.resetFeeding(b);

  var c=new sap.viz.ui5.data.FlattenedDataset({dimensions:ut.du.cd.dimensions,measures:ut.du.cd.measures,data:{path:"/rawData"}});d.vizUpdate({data:c,feeds:b});var a=new sap.ui.model.json.JSONModel();

  a.setData({rawData:ut.du.rebuildDataset(),});d.setModel(a)};ut.du.resetFeeding=function(f){var e=f.length;var h=0;var b=0;ut.du.cleanDataset();for(var d=0;d<e;d++){var l=f[d];var g=l.getType();

  var k=l.getValues();var a=k.length;if(g=="Dimension"&&a){h++}else{if(g=="Measure"&&a){b++}}for(var c=0;c<a;c++){if(g=="Measure"){ut.du.addMeasure(k[c].getName(),b)}else{

  if(g=="Dimension"){if(k[c].getName()==""&&k[c].getType()=="mnd"){h--;continue}else{ut.du.addDimension(k[c].getName(),h)}}}}}};ut.du.cleanDataset=function(){

  ut.du.cd.dimensions=[];ut.du.cd.dn=[];ut.du.cd.measures=[];ut.du.cd.measureNames=[]};ut.du.addMeasure=function(c,b){var a={group:b,name:c,value:"{"+c+"}"};

  ut.du.cd.measures.push(a);ut.du.cd.measureNames.push(c)};ut.du.addDimension=function(a,b){var c={axis:b,name:a,value:"{"+a+"}"};ut.du.cd.dimensions.push(c);

  ut.du.cd.dn.push(a)};ut.du.rebuildDataset=function(){var g=[];var f=ut.du.cd.dataset;var e=ut.du.cd.category;for(var a=1;a<f.length;a++){var c={};var d=f[a];

  for(var b=0;b<ut.du.cd.measureNames.length;b++){c[ut.du.cd.measureNames[b]]=d[e[ut.du.cd.measureNames[b]]]}for(var b=0;b<ut.du.cd.dn.length;b++){c[ut.du.cd.dn[b]]=d[e[ut.du.cd.dn[b]]]}g.push(c)}

  if(ut.du.cd.dn.length==0){g=[ut.du.aggregateMeasures(g)]}return g};

 

  var loadDataSet = function(dataset) {

  var anaObjs = ut.du.createAnalysisObjectsForDataPicker(dataset);

  oVizContainer.destroyAnalysisObjectsForPicker();

  for (var i = 0; i < anaObjs.length; i++) {

  oVizContainer.addAnalysisObjectsForPicker(anaObjs[i]);

  }

  };

 

  var data = [[{"name":"Country","type":"Dimension"},{"name":"Quater","type":"Dimension"},{"name":"Profit","type":"Measure"}, {"name":"Revenue","type":"Measure"}],

  ["Country1","Q1" -141.25, 35],

  ["Country1","Q2", 41, 25],

  ["Country2", "Q1", 133.82, 45],

  ["Country2", "Q2", 33.82, 89],

  ["Country3","Q1" , 348.76, 90],

  ["Country3", "Q2", 48.76, 23],

  ["Country4", "Q1" ,217.29, 43],

  ["Country4","Q2", 17.29, 23],

  ["Country5","Q1" , 117.00, 11],

  ["Country5", "Q2",17.00, 34],

  ["Country6","Q1" , 609.16, 343],

  ["Country6","Q2", 209.16, 34],

  ];

  loadDataSet(data);

 

  // attach event listener for feedschange

  oVizContainer.attachEvent('feedsChanged', function(e) {

  $('#horizontal_sample')

  .height(oVizContainer.$().height() + 'px')

  .width(oVizContainer.$().width() + 'px');

  ut.du.onFeedsChange(e.mParameters.feeds, oVizContainer);

  });

 

  oVizContainer.placeAt("horizontal_sample");

  })();

Re: How to hide sidebar from VizContainer?

$
0
0

instead of VizContainer, you could have used corresponding VizCharts . I think that will serve purpose here

Viewing all 9165 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>