How to retrieve the data/property value from portalapp.xml
Hi I would like to retrive the some common data from the portalapp.xml file
<application>
<application-config>
<property name="PrivateSharingReference" value="com.sap.portal.htmlb"/>
</application-config>
<components>
<component name="DynZMMGR">
<component-config>
<property name="ClassName" value="DynZMMGR"/>
<property name="SecurityZone" value="DynZMMGR/high_safety"/>
<property name="ComponentType" value="jspnative"/>
<property name="JSP" value="pagelet/DynJspZMMGR.jsp"/>
</component-config>
<component-profile/>
</component>
<component name="dynpagedel">
<component-config>
<property name="ClassName" value="dynpagedel"/>
</component-config>
<component-profile/>
</component>
<component name="VARIANTLIST">
<component-config>
<property name="ClassName" value="com.sap.ep.r3rpts.VARIANTLIST"/>
<property name="SecurityZone" value="com.sap.ep.r3rpts.VARIANTLIST/high_safety"/>
</component-config>
<component-profile/>
</component>
<component name="DynZMM33">
<component-config>
<property name="ClassName" value="DynZMM33"/>
<property name="SecurityZone" value="DynZMM33/high_safety"/>
<property name="ComponentType" value="jspnative"/>
<property name="JSP" value="pagelet/DynJspZMM33.jsp"/>
</component-config>
<component-profile/>
</component>
</components>
<services/>
</application>
The above is my portalapp.xml file .
I want to retrieve the common data across the component.
These datas are common across the components .
I kmow by putting the data inside the
component name="DynZMM33">
<component-config>
<property name="ClassName" value="DynZMM33"/>
<property name="SecurityZone" value="DynZMM33/high_safety"/>
<property name="ComponentType" value="jspnative"/>
<property name="JSP" value="pagelet/DynJspZMM33.jsp"/>
</component-config>
<component-profile>
<property name="UserID" value="userid"/>
<property name="password" value="password"/>
</component-profile>
</component>
this becoms component specific ... which I can retriev the by using
String ClientVal = request.getComponentContext().getProfile().getProperty("Client");
in doContent() method ..
But this way i have to specify these properties in all the component.. which is repetetive in nature.
I would rather put it in common location and want to retrieve the info from the portalapp.xml...
How to achieve this
I am using "AbstractPortalComponent" .
thanks
pkiran
Hi Prashanth,
see Reading another iView's profile personalized values and Validate PCD URI
Anyhow, maybe you should implement a service which returns the values (from the service profile). This would be more clean for accessing global values.
Hope it helps
Detlev
Similar Messages
-
How to retrieve the data from SAP-BAPI by using VB Code
Hi ,
I am new to BAPI.
V have created an application in Visual Basic with the following fields
EmpNo , EmpName, Addr1, Addr2, City and Phone (Only for Test)
We have written the code for SAVING the data into SAP. Already we have
constructed a table with the respective fields in SAP.
For that we ourself created our own BAPI Structure / Function Group /
Function Module/ Business Object - RELEASED related elements.
1)Established the connection successfully.
2)Stored the data into SAP Successfully and v r in need of
3)HOW TO RETRIEVE THE DATA FROM SAP (USING GETLIST.....GETDETAIL....)
Following is the code :
'BAPI Structure : ZBAPIEMP
'Function Group : ZBAPIEMP
'Function Module : ZBAPI_EMP_CREATEFROMDATA
'Business Object : ZBAPIEMP
'Function Module : ZBAPI_EMP_GETLIST
Dim bapictrl As Object
Dim oconnection As Object
Dim boEmp As Object
Dim oZEmp_Header As Object
Dim oImpStruct As Object
Dim oExpStruct As Object
Dim oreturn As Object
Dim x As String
Private Sub Form_Load()
Set bapictrl = CreateObject("SAP.BAPI.1")
Set oconnection = bapictrl.Connection
oconnection.logon
Set boEmp = bapictrl.GetSAPObject("ZBAPIEMP")
Set oZEmp_Header = bapictrl.DimAs(boEmp, "CreateFromData", "EmployeeHeader")
Set oImpStruct = bapictrl.DimAs(boEmp, "GetList", "EmployeeDispStruct")
End Sub
Private Sub cmdSave_Click()
oZEmp_Header.Value("EMPNO") = txtEmpNo.Text
oZEmp_Header.Value("EMPNAME") = txtEmpName.Text
oZEmp_Header.Value("ADDR1") = txtAddr1.Text
oZEmp_Header.Value("ADDR2") = txtAddr2.Text
oZEmp_Header.Value("CITY") = txtCity.Text
oZEmp_Header.Value("PHONE") = txtPhone.Text
boEmp.CreateFromData EmployeeHeader:=oZEmp_Header, Return:=oreturn
x = oreturn.Value("Message")
If x = "" Then
MsgBox "Transaction Completed!..."
Else
MsgBox x
End If
End Sub
Private Sub cmdView_Click()
End Sub
COULD ANYBODY GUIDE ME, HOW TO RETRIEVE THE DATA FROM BAPI, FOR THE WRITTEN CODE.I didn't seen any other answers but here's how it's been done previously in our organization for a custom BAPI. In this example, we give material and language to return the part description. It's not specific to your project but may give you ideas..
-Tim
Option Compare Database
Dim SAPLOGIN As Boolean
Dim FunctionCtrl As Object
Dim SapConnection As Object
Sub SAPLOGOUT()
On Error GoTo LogoutFehler
SapConnection.logoff
SAPLOGIN = False
Exit Sub
LogoutFehler:
If Err.Number = 91 Then
Exit Sub
Else
MsgBox Err.Description, vbCritical, "Fehler-Nr." & CStr(Err.Number) & " bei SAP-Logout"
End If
End Sub
Function SAPLOG() As Boolean
'Verbindungsobjekt setzen (Property von FunctionCtrl)
Set FunctionCtrl = CreateObject("SAP.Functions")
Set SapConnection = FunctionCtrl.Connection
'Logon mit Initialwerten
SapConnection.Client = "010"
SapConnection.Language = "EN"
SapConnection.System = "PR1"
SapConnection.SystemNumber = "00"
'SapConnection.Password = ""
SapConnection.GroupName = "PR1"
SapConnection.HostName = "168.9.25.120"
SapConnection.MessageServer = "168.9.25.120"
If SapConnection.Logon(0, False) <> True Then 'Logon mit Dialog
Set SapConnection = Nothing
DoCmd.Hourglass False
MsgBox "No connection to SAP R/3 !"
SAPLOGIN = False
SAPLOG = False
Exit Function
End If
SAPLOG = True
End Function
Function MatDescr(MatNr As String)
Dim func1 As Object
Dim row As Object, X As Integer, ErsteNr As String
Dim DatensatzZähler As Long
Dim RowField(1 To 50, 0 To 1) As String, RowLine As Long
If Not SAPLOGIN Then
If Not SAPLOG() Then
MsgBox "No connection to SAP !", 16
SAPLOGOUT
Exit Function
End If
End If
' Instanziieren des Function-Objektes
Set func1 = FunctionCtrl.Add("Z_BAPI_READ_MAKT")
' Export-Paramter definieren
func1.exports("MATNR") = MatNr
func1.exports("SPRAS") = "EN"
DoEvents
If Not func1.call Then
If func1.exception <> "" Then
MsgBox "Communication Error with RFC " & func1.exception
End If
DoCmd.Hourglass False
SAPLOGOUT
Exit Function
Else
MatDescr = func1.imports("MAKTX")
End If
If MatDescr = "" Then
MatDescr = "PART NO. NOT FOUND"
End If
End Function -
HT1766 how to retrieve the back up files from the itunes
how to retrieve the back up files from the itunes
What are you trying to do...extract data from your backup? If so, you need something like this:
http://www.iphonebackupextractor.com/ -
How to retrieve the data from SAP database.
Hi Pals,
How to retrieve data from SAP R/3 System to my third party software. I will make my query little bit more clear. There is a list of assets entered and stored in the SAP system. For example 3 mobile phones.
1) Mobile 1- Nokia
2) Mobile 2 - Samsung
3) Mobile 3 u2013 Sony
Now think I do not know what all assets is there. I have to retrieve the data and get it on my third party software. Just display the list of assets. Lets say SAP XI is also there. Now how will I map it and get the details.
Please give me step by step method.
N.B: Just to read the data from SAP database.
Please make the flow clear step by step.
Thanking you
AKHi,
You can use RFC or ABAP Proxy to make synchronous call with SAP.
Under RFC or ABAP Proxy Program you can get the data from SAP tables. Direct access to SAP Database is not preferrable even if its possible.
The better way to go for RFC or PROXY.
You will send the request from Third party system and the it will be as input parameters from RFC/ Proxy it will response based on it.
This got it all..
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5474f19e-0701-0010-4eaa-97c4f78dbf9b
/people/siva.maranani/blog/2005/09/03/invoke-webservices-using-sapxi
/people/stefan.grube/blog/2006/09/21/using-the-soap-inbound-channel-of-the-integration-engine
/people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit - File to RFC
HTTP to RFC - A Starter Kit
/people/community.user/blog/2006/12/12/http-to-rfc--a-starter-kit
Refer
Thanks
Swarup
Edited by: Swarup Sawant on Jun 4, 2008 9:32 AM -
How to retrieve the data from Website and Upload it in SAP table?
Dear ABAPers,
I want to retrieve the data from website and upload the same in SAP Database Table is that possible.Please help me.It is very Urgent.
Thanks & Regards,
Ashok.Dear Abhishek,
Thanks for your reply.But my requirement is not met.
If i execute the program it should retrieve the data from particular website.
Thanks & Regards,
Ashok. -
How to retrieve the data from UME?
Hi All,
I have a problem with retriving data from UME.Here my problem is I have logged a pirticular user that user coming from sales-organization. I got that user But How to retrive the pirticular sales-org from UME.
Please help me for this .
Thanks
Nageswara.Hi All,
I have a problem with retriving data from UME.Here my problem is I have logged a pirticular user that user coming from sales-organization. I got that user But How to retrive the pirticular sales-org from UME.
Please help me for this .
Thanks
Nageswara. -
How to retrieve the data from the RT card after the host rebooted??
Thank you for your answer!
how to design my application to retrieve the data that was collected on RT Series hardware while the host PC was not in communication with the embedded LabVIEW RT application.I rember correctly, that may be one of the more challenging varieties to pull this stunt off.
First, you are going to have to make sure you have enough memory to buffer the data while the host if doing something else.
If you have enough memory you may want explicitly work up a comm scheem between the host and PC (probaly using VI server) that will let the host know there is data avaiailable and it should get it.
So, doe sit seem like we may be getting closer?
Ben
Ben Rayner
I am currently active on.. MainStream Preppers
Rayner's Ridge is under construction -
How to retrieve the date of the itme's version using Ecmascript
Hello, all
I'd like to retrieve the date of minor and major versions using ecmascript. Here is my script so far.
I am getting ID from query string in URL, then passing it to access file.
What I don't understand is to how to instantiate Version class and loop through version to retrieve created date.
Can someone help?
<Sharepoint:ScriptLink name="SP.js" runat="server" OnDemand="true" localizable="false"/>
<pre class="brush: javascript;">
<script language="ecmascript" type="text/ecmascript">
//Get ID of the document
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
var v_id = getParameterByName('ID');
alert(v_id);
var item;
var list;
var file;
function fileMajorandMinorVersion() {
var clientContext = SP.ClientContext.get_current();
if (clientContext != undefined && clientContext != null) {
var webSite = clientContext.get_web();
this.list = webSite.get_lists().getByTitle("List Title");
this.item = list.getItemById(v_id);
this.file = this.item.get_file();
clientContext.load(this.file);
clientContext.executeQueryAsync(Function.createDelegate(this, this.OnLoadSuccess), Function.createDelegate(this, this.OnLoadFailed));
function OnLoadSuccess(sender, args) {
var version = "Major Version: " + this.file.get_majorVersion() + '\n' + "Minor Version: " + this.file.get_minorVersion();
alert(version)
function OnLoadFailed(sender, args) {
alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
</script>
<input id="btnFileMajorandMinorVersion" onclick="fileMajorandMinorVersion()" type="button" value="File Major and Minor Version"/>
vladIn order to loop through the version collection and display last version date here is the script that works for me:
<Sharepoint:ScriptLink name="SP.js" runat="server" OnDemand="true" localizable="false"/>
<script language="ecmascript" type="text/ecmascript">
//Get ID of the document
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
var v_id = getParameterByName('ID');
function convertShortDate(par_date) {
var var_date = new Date(par_date);
var day = var_date.getDate();
var month = var_date.getMonth() + 1;
var year = var_date.getFullYear();
var result_date = month+'/'+day+'/'+year;
return result_date;
var item;
var list;
var file;
var versions;
var _version;
function set_LastCertDate() {
var clientContext = SP.ClientContext.get_current();
if (clientContext != undefined && clientContext != null) {
var webSite = clientContext.get_web();
this.list = webSite.get_lists().getByTitle("Archer Pages");
this.item = list.getItemById(v_id);
this.file = this.item.get_file();
this.versions = this.file.get_versions()
clientContext.load(this.file);
clientContext.load(this.versions)
clientContext.executeQueryAsync(Function.createDelegate(this, this.OnLoadSuccess), Function.createDelegate(this, this.OnLoadFailed));
function OnLoadSuccess(sender, args) {
var output = "";
var certdate = "";
var listItemEnumerator = this.versions.getEnumerator();
// loop through the version items
while (listItemEnumerator.moveNext())
var oVersionItem = listItemEnumerator.get_current();
certdate = oVersionItem.get_created();
$("input[title='CertificateDate']").val(convertShortDate(certdate));
function OnLoadFailed(sender, args) {
alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
document.write("<input name='Button1' type='button' value='Populate Certificate Date' onclick='set_LastCertDate()'/>");
</script>
vlad -
How to pass the check box values from one view to another view
Hi Experts,
I have a selection screen view which consists of check boxes.
WBS System status.
Release Completed Closed as 3 check boxes.
Note : The above ones are check boxes.
Based on the selection made by the user, those values needs to be passed to second view which retrieves the data and
displays the data accordingly.
At the same time if the user does not make any selection, then WBS System status should contain Released, Completed and Closed values and that needs to be sent to Second view.
Kindly advise.
Regards,
Chitrasenhi ,
make a attribute of type WDY_BOOLEAN to achieve this functionality
u need to follow these steps :
1 in side ur component controller , under the ATTRIBUTES tab , make 3 attributes say attr1 , attr2 and attr3 of type WDY_BOOLEAN
2 create a context node , cn_check and 3 context attribute ca_check1 , ca_check2 and ca_check3 in ur first view for
release , complete and close check boxes
3 inside the DOINIT of ur 1st view , set the attributes attr1 , attr2 and attr3 to blank
wd_comp_controller->attr1 = ' '
wd_comp_controller->attr2 = ' '
wd_comp_controller->attr3 = ' '
4 inside the method , where u r validating , if the check boxes are checked or not , read the attributes ca_check1 , ca_check2 and
ca_check3
DATA lo_nd_cn_check TYPE REF TO if_wd_context_node.
DATA lo_el_cn_check TYPE REF TO if_wd_context_element.
DATA ls_cn_check TYPE wd_this->element_cn_check.
DATA lv_ca_check1 LIKE ls_cn_check-ca_check1.
* navigate from <CONTEXT> to <CN_CHECK> via lead selection
lo_nd_cn_check = wd_context->get_child_node( name = wd_this->wdctx_cn_check ).
* get element via lead selection
lo_el_cn_check = lo_nd_cn_check->get_element( ).
* get single attribute
lo_el_cn_check->get_attribute(
EXPORTING
name = `CA_CHECK`
IMPORTING
value = lv_ca_check1 ).
IF lv_ca_check1 EQ 'X' .
wd_comp_controller->attr1 = ' X'
wd_comp_controller->attr2 = 'X '
wd_comp_controller->attr3 = ' X' -
How to retrieve the Last sequence value of a sequence ?
Can anybody help me out regarding how to retrieve the last executed number or value of a sequence ? As dba_sequence.last_number does not show the original picture of that last value ?
Rajesh Lathwal wrote:
Last Number Selected From Sequence :
SELECT sequence_name, last_number
FROM user_sequences;That's wrong, this is taking the CACHE in account :
SQL> create sequence seq ;
Sequence created.
SQL> select seq.nextval from dual;
NEXTVAL
1
SQL> SELECT sequence_name, last_number
2 FROM user_sequences where sequence_name='SEQ';
SEQUENCE_NAME LAST_NUMBER
SEQ 21
SQL> select seq.currval from dual;
CURRVAL
1
SQL>Nicolas. -
How to retrieve the data type of a column of a table?
Hi,
I want to retrieve the data type of a column of a table. At the moment I am querying "OCI_ATTR_DATA_TYPE" attribute but it is returning SQLT_CHR for both varchar2 and nvarchar2 data type columns. I need to distinguish between these two data types columns separately. Is there any API through which I could get the exact data type of a column i.e. "nvarchar2"?
Thanks in advance.
HashimHi,
This is the Oracle C++ Call Interface (OCCI) forum - I'm not sure if you are using OCCI or OCI (Oracle Call Interface - the C interface) since you reference "OCI_ATTR_DATA_TYPE" which is more of an OCI focus than OCCI.
In any case, you might take a look at "OCI_ATTR_CHARSET_FORM" which takes the following values:
#define SQLCS_IMPLICIT 1 /* for CHAR, VARCHAR2, CLOB w/o a specified set */
#define SQLCS_NCHAR 2 /* for NCHAR, NCHAR VARYING, NCLOB */So, if you have a datatype of SQLT_CHR and OCI_ATTR_CHARSET_FORM is SQLCS_IMPLICIT then you have a varchar2 if it is SQLCS_NCHAR then you have an nvarchar2.
If you are using OCCI and not OCI then take a look at MetaData::ATTR_DATA_TYPE and MetaData::ATTR_CHARSET_FORM which expose OCI_ATTR_DATA_TYPE and OCI_ATTR_CHARSET_FORM respectively.
Perhaps that will get you what you want.
Regards,
Mark -
How to retrieve the "date created" of a picture file?
Hi there
How can I retrieve the date of the creation of a file?
It's picture I have scanned, I need to authentify it's date of creation.
Finder doesn't do it
A utility in Photoshope CS3 ( XMP ) doesn't seem reliable.
Is there any way I can retrieve with a utility , the code of the file and its date of creation?
Much help appreciated
PS:I dont have Aperture ( I figured I could ask in this forum)
thanksFinder does do it. Select the file and choose File>>Get Info (command + i)
It will tell you the date created and the date last modified.
DLS -
How to get the 'text' property value of a button in coding?
Hi Experts,
I'm using 10 buttons all are having common action('click'). when i click a button the 'text' value of the button should pass to a function.So the action is same but the passed value will be the 'text' value of the corresponding button. I don't know how to get the 'text' property of a button in coding. Kindly help me to solve this problem.
Thanks and Regards
BasheerHi,
My event is like this.
public void onActionclick(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
String s = ? ; // should get the 'text' property of clicked button
fillInput(s); // function to be called
The called function is,
public void fillInput( java.lang.String id )
String str=wdContext.currentContextElement().getNum();
str = str + id;
wdContext.currentContextElement().setNum(str);
How can i get the 'text' property value of the corresponding button. Click action should be common to all buttons.
Thanks and Regards,
Basheer -
How to filter the data on Reports from collected from differnet Agents
1) I have to write a Plug-in which would fetch the same type of data from 7 Agents. I need to generate the report for each Agent separately,This plug-in will be deployed in various different environment. So I will not know the host name as it will be deployed different environment. Can anyone suggest how to filter the data for each agent from the table. I see one solution of using Bind variable for the Target GUID in PL/SQL file. Can you please suggest if there is any other better way of doing this.????
Also Can you please suggest what are the best ways to debug the OEM Plug-in?
Thanks Anyway.....What I mean filtering data means displaying data for each Agent Seperatly. Assume I have collected Filesystem data from 5 Agents (5 different server). Now I want do display file system data for Agent1 (server 1). How would I fetch it from MGMT$Metric_Current. Currently I use a bind variable
??EMIP_BIND_TARGET_GUID?? to filter the data for a Agent from MGMT$Metric_Current view. I compare Target Name entered while deploying Plug-in with the Target_Name column of specified view.Is there any other way of fetching data from this table for a Agent?
I hope I am prety clear now. My Problem is IO dont want to force user to enter exact Server name while deploying Plug-in.
Thanks...... -
How to retrieve the data stored in BLOB field in MySql using java?
Hi all!
i stored a file content into the MySql database in BLOB field.
and i now want retrieve the data......
Please help me out in doing the task...........
Thanx...........Thrisha..
When u get a result set u can have rs.getBlob() function that will give u a BLOB object that can be captured using Blob interface of javax.sql package...
Blob interface has getBinaryStream, getBytes etc as functions...
i think i cleared u
regards
Shanu
Maybe you are looking for
-
Well, after trying to figure out what was going on with iTunes not opening at all. It turns out that by default for some reason Windows Xp Firewall disables it from opening it. iTunes however is acting like a server for the fact that you exchange dat
-
iTunes will not open. I am using Windows 7, and have had no trouble with iTunes until yesterday. The only think I did yesterday was install an upgrade to the latest Flash player. From then on, even after deleting and reinstalling iTunes, it still
-
Arranging files with in a portfolio for adobe standard 9
I have been trying to figure out a way to arrange and save the files in an order that is not alphbetical with in a portfolio. So far I haven't been able to and renaming them to be alpahbetical isn't condusive to what I am trying to do. Any ideas?
-
In the console, I'm trying to create a new domain to deploy our system in. Is anyone else seeing this one? See below for error. TIA. JohnH An unexpected error was encountered in processing your request. Exception weblogic.management.MBeanCreationExce
-
HT5132 Aperture, MobileMe locking
No matter what I do, the process never completes and Aperture locks up. Oddly, I have no web MobileMe Gallery and never have. Online advice that I found does not solve the problem. How do I totally get rid of MobileMe and get my Aperture back?