Quantcast
Channel: SCN : All Content - All Communities
Viewing all 3238 articles
Browse latest View live

How-to: Use the Analyze Sentiments OData service in your app

$
0
0

Introduction

 

'Analyze Sentiments' is a Fiori app that helps you perform Sentiment Analysis on the topics that interest you. To learn more about the app, please go check out these links:

 

 

Quick integration of Sentiment Analysis powered by Analyze Sentiments into your app

Ready to get your feet wet?!

 

Here are a few steps to add a chart control into a UI5 control that supports aggregations (like sap.m.List, etc) and to connect the OData service to this chart.

When you run the app, you will be able to see nice little charts added into each item in the aggregation that shows sentiment information.

 

Follow these steps to quickly integrate Sentiment Analysis capability into your already existing UI5 app:

 

1) Insert the chart into the appropriate location in your app. In the sample code below, the chart is embedded into a custom list item:

<List id="main_list" headerText="Vendors">  <items>        <CustomListItem>            <HBox justifyContent="SpaceAround">                  <ObjectHeader title="playstation" />                  <viz:VizFrame vizType="bar" uiConfig="{applicationSet:'fiori'}" height="250px" width="250px"> </viz:VizFrame>            </HBox>        </CustomListItem>  ...

2) In the controller code on initialization, add the following code to fill data in the chart that we added into the UI in the previous step:

 

//Get the reference to the Odata service
var oModel = new sap.ui.model.odata.ODataModel("http://localhost:8080/ux.fnd.snta/proxy/http/lddbvsb.wdf.sap.corp:8000/sap/hba/apps/snta/s/odata/sntmntAnlys.xsodata/", true);
//Get the reference of the control where you want the charts embedded
var oList = this.getView().byId("main_list");
//This code gets the Subjectname from the control in which the chart is going to get embedded. You can see that the subjectname is extracted from the Title of the items in the list
for (var i = 0; i < oList.getItems().length; i++) {    var oChart = oList.getItems()[i].getContent()[0].getItems()[1];    var sItemName = oList.getItems()[i].getContent()[0].getItems()[0].getTitle();
//Now we set the data for each item in the list as per the subject that we extracted from the listitem.    oModel.read('/SrchTrmSntmntAnlysInSoclMdaChnlQry(P_SAPClient=\'' + self.sSAPClient + '\')/Results', null, ['$filter=SocialPostSearchTermText%20eq%20\'' + sItemName + "\' and " + "SocialPostCreationDate_E" + " ge datetime\'" + '2014-06-14' + '\'' + '&$select=Quarter,Year,SearchTermNetSntmntVal_E,NmbrOfNtrlSoclPostVal_E,NmbrOfNgtvSocialPostVal_E,NmbrOfPstvSocialPostVal_E'], false, function(oData, oResponse) {        oChart.setVizProperties({            interaction: {                selectability: {                    mode: "single"                }            },            valueAxis: {                label: {                    formatString: 'u'                }            },            legend: {                title: {                    visible: false                }            },            title: {                visible: false            },            plotArea: {                dataLabel: {                    visible: true                },                colorPalette: ['sapUiChartPaletteSemanticNeutral', 'sapUiChartPaletteSemanticBad', 'sapUiChartPaletteSemanticGood']            }        });        var oChartDataset = new sap.viz.ui5.data.FlattenedDataset({            measures: [{                name: "Neutral",                value: '{NmbrOfNtrlSoclPostVal_E}'            }, {                name: "Negative",                value: '{NmbrOfNgtvSocialPostVal_E}'            }, {                name: "Positive",                value: '{NmbrOfPstvSocialPostVal_E}'            }],            data: {                path: "/results"            }        });        oChart.setDataset(oChartDataset);        var oDim1 = new sap.viz.ui5.data.DimensionDefinition({            name: "Year",            value: '{Year}'        });        var oDim2 = new sap.viz.ui5.data.DimensionDefinition({            name: "Quarter",            value: '{Quarter}'        });        var oDataset = oChart.getDataset();        oDataset.addDimension(oDim1);        oDataset.addDimension(oDim2);        var oChartModel = new sap.ui.model.json.JSONModel(oData);        oChart.setModel(oChartModel);        oChart.setVizProperties({            valueAxis: {                title: {                    visible: true,                    text: "Mentions"                }            },            categoryAxis: {                title: {                    visible: true,                    text: "Quarter"                }            }        });        var feedValueAxis = new sap.viz.ui5.controls.common.feeds.FeedItem({            'uid': "valueAxis",            'type': "Measure",            'values': ["Neutral", "Negative", "Positive"]        });        var feedCategoryAxis = new sap.viz.ui5.controls.common.feeds.FeedItem({            'uid': "categoryAxis",            'type': "Dimension",            'values': [new sap.viz.ui5.controls.common.feeds.AnalysisObject({                    'uid': "Year",                    'type': "Dimension",                    'name': "Year"                }),                new sap.viz.ui5.controls.common.feeds.AnalysisObject({                    'uid': "Quarter",                    'type': "Dimension",                    'name': "Quarter"                })            ]        });        oChart.addFeed(feedCategoryAxis);        oChart.addFeed(feedValueAxis);    }, function() {        sap.m.MessageBox.show("Odata failed", sap.m.MessageBox.Icon.ERROR, "Error", [            sap.m.MessageBox.Action.CLOSE        ]);    });
}

PS: Depending on how you add the chart into your app, the above chunk of code will have to be adjusted to get the subjectname and pass it to the chart.

 

In the above sample code, you can find that the chart in each custom list item is bound to data in a loop. If you have added the chart in a similar control with an aggregation, you would have to modify the lines highlighted above to get the list control and to get the chart reference and searchterm.

 

 

What else can you do with the Analyze Sentiments Odata services?

Here’s some more information on our existing Odata services for Analyze Sentiments and some ideas how you can use it in your apps.

 

Collection

What information it gives out

SocialMediaChannelsQuery

List of Channels (code and name)

SocialPostSearchTermsQuery

List of Searchterms (code and name)

SrchTrmSntmntAnlysInSoclMdaChnlQry

List of (number of mentions, number of positive, negative & neutral mentions, ‘netsentiment value’) for a searchterm given out in daily/weekly/monthly/quarterly/yearly period granularity

SrchTrmSntmntAnlysSclPstDtlsQry

List of socialposts for a searchterm in a period

SrchTrmSntmntTrendInSoclMdaChnlQry

Net sentiment trend in percentage for a searchterm over a specified period.


PS: The last three services retrieves data for all subjects when filter is not applied on searchterms.

 

 

Calculations used:

 

Net sentiment  = P - N

P = sum of weights of positive posts. The weight could be +1(good), +2(very good)

N = sum of weights of negative posts. The weight can be -1(bad), -2(very bad)

 

Net sentiment trend percentage = (Net sentiment in last n days – Net sentiment in previous n days) / Net sentiment in previous n days.

 

So on the whole, we have the following information:

i) Number of positive, negative, neutral, total mentions about a Subject

ii) Net sentiment about a subject

iii) Net sentiment trend about a subject which is a percentage.

 

Here are some sample ways in which the external apps can right away start using our Odata assets:

 

Use

Control that can be used

Collection to be used

Show the numbers (total, positive, negative neutral mentions or netsentiment) related to a subject

Label

SrchTrmSntmntAnlysInSoclMdaChnlQry

Show the socialposts related to a subject

Table, list, etc

SrchTrmSntmntAnlysSclPstDtlsQry

Show the net sentiment trend of a subject

Label

SrchTrmSntmntTrendInSoclMdaChnlQry

Show chart/graph with the numbers over a period

Chart

SrchTrmSntmntAnlysInSoclMdaChnlQry

 

 

 

Related links:


Error ' no rfc authorization for function module get_system_name '

$
0
0

Hello All,

 

I am facing an Error ' no rfc authorization for function module get_system_name ' while trying to create a Single role in NWBC in AC 10.1

 

This error is being popped up when I am clicking on ' Maintain Authorizations ' tab.

 

Can anyone please help me out with the Authorizations which are to be provided to avoid such an error.

 

Image-1.jpg

Please suggest.

 

Regards,

Rahul Muni

UDF for replace Null

$
0
0

Hi,

 

I have to write an UDF

 

some times source fields are passing this value format like ex: "VALIDTO: 2015-08-19 12:35:24" instead of normal data

 

If this type of values comes to PI then PI should replace to null value. can you please guide me about to write UDF?

 

 

 

Thank you

Sateesh

Cache update fails in PI, says "Unable to notify Integration Server affected by data changes"

$
0
0

Dear Experts,

 

All of a sudden, I couldn't push a test message to my PI QA server, found that Recevier Determination is not updated to Cache. When i try to update the Receiver determination, cache doesn't get updated and could see below mentioned error.

 

Error:

Unable to notify Integration Server affected by data changes

HTTP connection to http://xxxx:xx000/sap/xi/cache?sap-client=200 returns status code '401' (Unauthorized) in response

 

I realize that its an authorization issue, but which user should i check for this? PIUSER?

 

I already did a full cache refresh on server.

 

Please help. Thanks in advance.

 

 

Regards,

Kumaran

Dump While Activating Account Assignment & Global FM Function (PSM-FM)

$
0
0

Hi Experts,

 

While trying to Activate Account Assignments & Global Funds Management Functions,  i am facing below dumps:

 

Global Functions.PNG

Acc Assigment.PNG

Can anyone please guide me, am i missing activation of any Business Function?

 

 

I am attaching screen shot of some business functions which are not activated in our system please guide if i need to activate anyone from these;

 

Business Function.PNG

 

Regards,

Zain Bashir

Field Profit Ctr is required field for G/L during service order settlement

$
0
0

Hi All ,

 

During the period end settlement of the service orders , we receive the below error message in the log , during the background run .

 

The message number is KI235 and the error message is " Field Profit Ctr is a required field for the G/L account  .. " . However the documents are getting posted from the settlement.

 

Does anyone know why this error message is raised by the system and how to rectify this..

 

Thanks

 

Kris

how to download SNOTE

$
0
0

hi,

 

 

while download the SNOTE it give the error.

 

"error in remote connection destination SAPOSS"

 

How to resolve that error?

Error While Running Package Archive Audit Data

$
0
0

Hi All,

 

     I am getting this error while running package "Archive Audit Data".

 

The operation not complete successfully due to database error


Database returned the SQL code 2,055. Error text: maximum number of rows per table or partition reached:

 

Can you help me out in this why is this error is coming.


Storage of Images in BOE for Design Studio

$
0
0

Hi Friends,

  

Hope eveyone doing well.

  

I wanted to understand that how to work with images on Design Studio?

 

We want to place all images on BOE server and call in DS instead of putting in one folder on Launchpad, do you know how that is done?

 

I lookup online and found that for WebI there is an image directory on BOE server, which is accessed via boeimg:<image name> command. Is there something similar for DS?

  

Thanks in advance,

Ashish

How to change style class of td in table

$
0
0

Hi Experts,

In SAPUI5, there is no APIs to change anything of the table cell itself.

The following code is aimed to modify the style of the td cell and control in the cell, but both of them adds style class to the control, not td cell.

Could anyone indicate how to change td cell style in a table?

editableFormatter:function(v, control){

   if(sap.ui.getCore().byId("btnEdit").getText()==="Edit"){

     control.getParent().getCells()[2].addStyleClass('readonly');

     control.addStyleClass('readonly');

  }

}

The top one is what I need by modifying html in debug tool.

The bottom one is current implementation.

td vs control.png

 

B.R.

Mingquan

Kernel up-gradation ..

$
0
0

Hello to All,

 

Greetings...!!

 

I am facing some issue while uncompressed the .SAR files(SAPEXE.SAR and SAPEXEDB.SAR).

I download these two files successfully from SAP marketplace and paste these files into /usr/sap/trans folder.

 

When i uncompressed these file with SAPCAR command following error comes :-

"'SAPCAR' is not recognized as an internal or external command,operable program or batch file ".

 

Please help me into this regard.

 

 

Regards,

Junaid

Web IDE (local) - problem testing (running) application.

$
0
0

Hello:

 

I have successfully installed a 'local version' of the SAP Web IDE and configured the destination file to communicate with my ECC (ABAP) back end (this seems to be working).  I have also installed and configured the HCM ERP Fiori apps (wave 7?) and they are working.

 

My problem is that I want to extend the 'My TimeSheet' Fiori app. but can't test it as all I get is a blank browser screen (both IE and Firefox).

 

Here are the details:

 

In the web IDE, I choose File / New / Extension Project.  Click the Remote button, Select SAPUI5 ABAP Repository, provide my credentials, select HCM_TSH_MAN as my application, click OK, click Next, click Finish.  I select the index.html file, and click Run.  Again, it asks me for my credentials, then displays the following blank screen.  The credentials I supply are the same for the user/developer.

 

Anyone have any idea's?  I hope I'm not missing the obvious.

 

Thanks in advance for any help.

 

 

Update:

I can extend and run 'Time Approval' no problem.  In the Orion console (for 'My Time Sheet') I am getting the message:

Mar 18, 2015 2:00:01 PM com.sap.ui5.resource.ResourceServlet serveResource

WARNING: [404] "/resources/sap/ui/layout/FixFlex.js": Service=0ms, Find=0ms

  Reason: Resource could not be found!

 

 

 

 

 

 

 

I cant Active Any Business Functions

$
0
0

Hi

 

I Try Active Business Functions On Sfw5 ,

 

why I cant Active Any BF on My D Server?

 

thanks

Access 2007 UNX issue in DS 1.5 SP0

$
0
0

Hi All,

 

I am unable to access the data source based on a UNX universe on MS Access 2007 in DS 1.5 SP0 when I execute the application from BI Launchpad, no issues when executed in the local client. There is no issue with a SQL universe in local or Launchpad.

 

Cannot load InfoProvider "DSL/<Universe CUID>" (data provider "DS_1": Exception occurred during creation)

 

I have tried a solution to adjust the configuration of APS hosting the Analysis Application Service to add the command line for Connection server, it did not fix the issue.

 

Any help would be appreciated. Thank you!

 

Cheers

Siva

enabled database environment error - sybase

$
0
0

Dear all,

 

I´m facing this error here when trying to install the EHP7 for ERP 6.0 on Windows 2012 r2 with Sybase. I have installed sybase 15 before starting the erp setup.

 

The error is:

 

The installer is started with enabled database environment variables, which is not supported.). You can now: ...


Someone already posted a similar issue but without any answer: http://scn.sap.com/message/15573410#15573410


regards,


Fiori Order from Requisitions: Limitations and Filters

$
0
0

All,

 

 

Are there any restrictions/limitations/filters on the Fiori App, Order from Reqs?  i.e. Are only Standard Reqs and Orders allowed to be processed in this app?  I keep getting the following errors when trying to process Manual Orders/Reqs:

 

 

PO could not be simulated..PNG

 

 

Overall, it's been pretty frustrating trying to find basic knowledge about these Fiori Apps.  I've looked through Notes, the Fiori Apps Library, Discussions, Blogs, and Technical Documentation. 

 

 

Masayuki Sekihara - SCN Member of the Month December 2014:  Have you seen this before?

 

 

Thanks!

Change version is not getting created for SRM contract using BAPI

$
0
0


Hi Team,

 

Change version is not getting created after updation of SRM contract. I have used below BAPI to updated contract price and MPN.

 

BBP_PROCDOC_GET_CHANGE_VERSION

BBP_PD_CTR_GETDETAIL

BBP_PD_CTR_UPDATE

BAPI_TRANSACTION_COMMIT

 

 

fields are getting updating in BBP_PD and SRM portal as well but change version is not getting created.

 

Please can you help us to resolve this issue.

 

Thanks in advance

Dipak

UDF Help required

$
0
0

Dear Experts,

 

 

I am working on a mapping logic where i will get the input data in the string , i need to generate a new field for every 5 characters.

 

My source structure :

 

 

MT_Source:

<config>

      <product>

         <feature id="BAYAADWAA9IDBA9ABCD3"/>

      </product>

 

</config>



Desired Target structure


MT_Target

<config>

      <product>

         <feature id="BAYAA"/>

         <feature id="DWAA9"/>

         <feature id="IDBA9"/>

         <feature id="ABCD3"/>

      </product>

   </config>

 

 

Please provide your valuable inputs.

 

Thanks,

Pavan T

Issue with SAP GUI Installation server option "Compress to Single File Installer"

$
0
0

Hi All,

 

We are performing SAPGUI upgrade to version 730 patch 10 along with BEx 3.5 and BI 7.0 in the same package. We have used “SAP Installation Server tool” to create a self-installation package with all these components.

 

From this package when we execute the installation package, we are asked to check the package to be installed. Even if we don't check the component, installer doesn't fail. It just continues and doesn't install anything. (attached the screenshot for your reference)

 

Is there a way, to make this checkbox selected by default? Any script can be written?

Even with the silent installation, it fails as this checkbox is not selected. Please advice.

 

Regards,

SriCharan


Reg:Licence for UDO

$
0
0

Hi Experts,

 

I need some information regarding licence for UDO.

 

1. Is it possible to use the User Defined Object without having standard licence.

2. What is the use of Addon Access users.

 

 

 

Thanks.

Viewing all 3238 articles
Browse latest View live


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