Accessing BAPI through Tree UI Element
Hi,
I have one Tree Structure where i have to populate one BAPI and display the data on the browser .I have created two tree node elements and finished the binding .The tree is getting diaplayed in the browser.
But i am facing difficulty in populating data from the BAPI into the tree .
I tried to search in web dynpro tutorials regarding this but the exmples for tree are not much useful .
They are populating manually created data and not the data from BAPI .
Can anybody suggest me how to do this.If anybody can suggest some other tutorials for this then it will be very much useful for me .
Thanks.
Hi,
take a look at this:
http://help.sap.com/saphelp_nw04/helpdata/en/13/4cde139306304480e89d815ffcf891/content.htm
here you will find links to create recursive as well as non-recursive tree.
Though the example is of value node, you can extend that to be done from BAPI node. Simply replace the loop of value node by loop which iterate through the BAPI model class' output node.
regards
Similar Messages
-
Strange Runtime error while accessing Bapis through WebDynpro
Hi all,
I have created FlightList WD appl, created a model and done all the required settings. Iam using BAPI_FLIGHT_GETLIST. I have deployed the appl successfully. Then I created the JCo connections for both WD_FLIGHT_MODELDATA_DEST and WD_FLIGHTMODEL_RFC_METADATA_DEST. selected Application for the first one and Dictionary type for the latter.
We have configured Single server connection.
I got this as error when testing my JCo connection for Dictionary type.
please suggest me
regards,
Ganesh
com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: Connect to message server host failed Connect_PM TYPE=B MSHOST=sapsrm GROUP=PUBLIC R3NAME=QN9 MSSERV=sapmsQN9 PCS=1 LOCATION CPIC (TCP/IP) on local host with Unicode ERROR service 'sapmsQN9' unknown TIME Mon Nov 14 13:18:26 2005 RELEASE 640 COMPONENT NI (network interface) VERSION 37 RC -3 MODULE ninti.c LINE 494 DETAIL NiPGetServByName2: service 'sapmsQN9' not found SYSTEM CALL getservbyname_r COUNTER 1hi Ganesh,
I think the problem lies with the SLD configuration. Check out whether you have configured SLD correctly.
The Logon group which you have given as <b>PUBLIC</b> should also be present in R/3. Check out that using
<b>SMLG</b> transaction. If <b>PUBLIC</b> is not there create the logon group there.
what is sld
http://help.sap.com/saphelp_erp2005/helpdata/en/43/01ea90ab24235de10000000a1553f7/frameset.htm
configuring SLD
/message/1648513#1648513 [original link is broken]
regards,
Gopi -
How to retrieve all BAPIs through JCo
Hi All,
i'm currently using JCo to access an SAP server, and just wondering if there's a method to retrieve all BAPIs from the server. From the available online documents, i can only see methods that returns a specific BAPI with a given function name.
If we can't get all BAPIs through JCo, whether there're some system BAPIs that i can call on to process the searching? just like sys procedure in database's context.
Any helps are highly appreciated. ThanksWell, the Repository seems to only expose methods like
getFunctionInterface() & queryFunctionInterface(), both of which certainly don't serve my needs.
The reason why i expect JCo has such built-in "retrieving all func names" services is because i saw some tooling applications, purely written in Java, developed navigator to display all BAPIs of a SAP. I mean it could be some button say "search all BAPIs", and when the user gestures to hit that button, it just populates all BAPIs returned from server.
While since i can't find such methods from the JCO doc, does it mean it can't be achieved through JCo? -
How to access BAPI in enterprise portal perspective?
hi,I am venkat new to the portal.can anyone plz tel me how to access BAPI in enterprise portal perspective?is done through JCo or any other database connection?I hav not seen in System Landscape about BAPI access.plz give guidance about BAPI interface in enterprise portal.Hope u will understand the question and answer the query.
thanx in advance.
Regards:
Venkataramana.Guys,
Herez how you call a BAPI:
public void buildConnection(){
try {
System.out.println("**** DI2 *****");
// Add a connection pool to the specified system
// The pool will be saved in the pool list to be used
// from other threads by JCO.getClient(SID).
// The pool must be explicitely removed by JCO.removeClientPool(SID)
com.sap.mw.jco.JCO.addClientPool( SID, // Alias for this pool
10, // Max. number of connections
"040", // SAP client
"USERNAME", // userid
"PASSWORD", // password
"EN", // language
"IPADDRESS",// host name
"40" );
// Create a new repository
// The repository caches the function and structure definitions
// to be used for all calls to the system SID. The creation of
// redundant instances cause performance and memory waste.
repository = com.sap.mw.jco.JCO.createRepository("MYRepository", SID);
JCO.Client client = null;
client = JCO.getClient(SID);
// Get a function template from the repository
//IFunctionTemplate ftemplate = repository.getFunctionTemplate("BAPI_CUSTOMER_GETDETAIL2");
IFunctionTemplate ftemplate = repository.getFunctionTemplate("YGGLB_BAPI_YGGLB9PRK_PRKDOCU");
// Create a function from the template
JCO.Function function = ftemplate.getFunction();
// Get import (of Function Module) "Parameter list"
JCO.ParameterList input = function.getImportParameterList();
// Set inputs for import parameters
//input.setValue("0000009000", "CUSTOMERNO");
//input.setValue("0248","COMPANYCODE");
// Get import (of Function Module) "Structure list".
//JCO.Structure importStructure = function.getImportParameterList().getStructure("CUSTOMERADDRESS");
JCO.Structure importStructure = function.getImportParameterList().getStructure("IM_DOCUMENTHEADER");
// Set values for import parameters (of Function Module) "Structure list"
importStructure.setValue( "SA", "DOC_TYPE" );
importStructure.setValue( "20080910", "PSTNG_DATE" );
importStructure.setValue( "20080910", "DOC_DATE");
importStructure.setValue( "BHARDWS", "USERNAME" );
importStructure.setValue( "2008", "FISC_YEAR" );
importStructure.setValue( "FRE1", "COMP_CODE" );
// Get import (of Function Module) "Table list - 1".
JCO.Table orderPartners = function.getTableParameterList().getTable("TBL_ACCOUNTGL");
// Set values for import parameters (of Function Module) "Table list - 1"
//Append Row -1
orderPartners.appendRow();
orderPartners.setValue("0000000001", "ITEMNO_ACC" );
orderPartners.setValue("0000400100", "GL_ACCOUNT" );
orderPartners.setValue("H", "DE_CRE_IND" );
orderPartners.setValue( "ANYTHING", "ITEM_TEXT" );
//orderPartners.setValue( "AG", "PROFIT_CTR" );
orderPartners.setValue( "AIG0000007", "COSTCENTER" );
//Append Row -2
orderPartners.appendRow();
orderPartners.setValue("0000000002", "ITEMNO_ACC" );
orderPartners.setValue("0000400100", "GL_ACCOUNT" );
orderPartners.setValue("S", "DE_CRE_IND" );
orderPartners.setValue( "NOTHING", "ITEM_TEXT" );
//orderPartners.setValue( "AG", "PROFIT_CTR" );
orderPartners.setValue( "AIG0000007", "COSTCENTER" );
// Get import (of Function Module) "Table list - 2".
JCO.Table orderItems = function.getTableParameterList().getTable("TBL_CURRENCYAMOUNT");
// Set values for import parameters (of Function Module) "Table list - 2"
//Append Row -1
orderItems.appendRow();
orderItems.setValue("0000000001", "ITEMNO_ACC" );
orderItems.setValue("USD", "CURRENCY" );
orderItems.setValue( "2000", "AMT_DOCCUR" );
//Append Row -2
orderItems.appendRow();
orderItems.setValue("0000000002", "ITEMNO_ACC" );
orderItems.setValue("USD", "CURRENCY" );
orderItems.setValue( "2000", "AMT_DOCCUR" );
// Execute client
client.execute(function);
//******************Start to work on fetching values now********************************
// Get export (of Function Module) "Structure list".
/*JCO.Structure returnStructure = function.getExportParameterList().getStructure("CUSTOMERADDRESS");
JCO.Structure returnStructure2 = function.getExportParameterList().getStructure("CUSTOMERGENERALDETAIL");
returnStructure.getString("NAME");
returnStructure2.getString("ENTERED_BY");*/
// Get export (of Function Module) "Table list"./// Create a new template if fetching table data from a different function module than above
//IFunctionTemplate ftemplateTable = repository.getFunctionTemplate("BAPI_CURRENCY_GETLIST");
//JCO.Function functionTable = ftemplateTable.getFunction();
//client.execute(functionTable);
JCO.Table table_return = function.getTableParameterList().getTable("RETURN");
Vector tbl = new Vector();
Vector row = new Vector();
Vector colNames = new Vector();
//Loop over all rows
do {
//Loop over all columns in the current row and add all those colums values to the current row
for (JCO.FieldIterator e = table_return.fields();
e.hasMoreElements();
JCO.Field field = e.nextField();
row.add(field.getString());
System.out.println(field.getName() + ":\t" + field.getString());
} // end for
//Add this newly built row to the table
tbl.add(row);
} while (table_return.nextRow());
table_return = null;
table_return = function.getTableParameterList().getTable("RETURN");
table_return.nextRow();
for (JCO.FieldIterator e = table_return.fields();
e.hasMoreElements();
JCO.Field field = e.nextField();
colNames.add(field.getName().toString());
//DefaultTableViewModel dtvModel = new DefaultTableViewModel(tbl, colNames);
//beanObj.setModel(dtvModel);
System.err.println("getting value for you from session in Get Data 1:-");
JCO.releaseClient(client);
// return dtvModel;
catch (JCO.Exception ex) {
System.out.println("Caught an exception: \n" + ex.getMessage());
}catch (Exception e){
System.out.println("Final Message" + e.getMessage()); -
BAPI for ""Change Cost Element / Activity Input Planning ""
Hi
Is there any BAPI for ""Change Cost Element / Activity Input Planning "" ( TC KP06) as there is BDC for that but is goes through lot of steps . ( TC OKKS, KP04, KP06 )
So if any one know the BAPI for the same please let me know, and if possible send me your code also it will be really help full.
Regardso OBJECT_INDEX - Index uniquely identifying the row and thus the
object. The index must be greater than zero and may only appear once
in the table. If the index does not exist in INDEXSTRUCTURE, the row
is ignored.
o COSTCENTER - Cost center that includes the activity.
o ACTTYPE - Activity type that includes the activity. You must
fill this together with COSTCENTER. You only need it for an activity
input that is activity-dependent.
o CO_BUSPROC - Business process that includes the activity.
o ORDERID - Order that includes the activity.
o WBS_ELEMENT - WBS element that includes the activity
You may fill one object only,for example COSTCENTER, CO_BUSPROC,
ORDERID, or WBS_ELEMENT. -
My code to "select" an element in the Tree UI element is not consistently working
Hi,
I created a Web Dynpro component that does many things. One feature is do display information in a Tree UI element. I use the TreeNodeType and recursive context node to build a nice tree representing what the customer wants. Since this tree could get very large, I implemented a search feature to help users locate items in the tree. When found, I expand the tree, and call call set_lead_selection passing in the element where found. This seems to generally work fine (and highlights the highlights the desired TreeNodeType), but only when going farther down in the tree. If I change the search so that it should find something "higher up" in the tree, the search still works, and it finds the data, but calling the set_lead_selection does not seem to unhighlight a previously located TreeNodeType. I have added code to loop through all elements in the tree and call set_selected( ABAP_FALSE). This didn't seem to help. If I use the mouse and manually click on the root of the tree, it seems deselect previously highlight TreeNodeTypes, and the highlighting works again (but still just going forward).
I implemented a Find Next feature that starts where the last search left off, and looks farther down the tree. This works more consistent, but still occassionaly seems to "forget" to unhighlight a previously located TreeNodeType/element.
What am I doing wrong?
I am attaching a screen shot.Hi Perry,
Before setting the lead selection of found result, try to clear all the selected elements from context node.
Sample:
data lo_node type ref to if_wd_context_node.
lo_node = wd_context->get_child_node ( name = 'MY_NODE' ).
"Clear the current selection
lo_node->clear_selection( ).
" now, set the lead selection
lo_node->set_lead_selection( .... )
Hope this helps you.
Regards,
Rama -
Can only access emails through OWA after migration from exchange 2007 to 2013
can only access emails through OWA after migration from exchange 2007 to 2013, in other words unable to access mails through outlook or from other Applications services.
needed RCA ... plz help..Hi,
From your description, you can send and receive messages only when you use OWA after migration from Exchange 2007 to Exchange 2013. If I have misunderstood your concern, please let me know.
In your case, I recommend you create a new test mailbox in your Exchange 2013 and check if you can send and receive messages on Outlook. If yes, it is recommended to create a new profile to solve this issue.
Hope this can be helpful to you.
Best regards,
Amy Wang
TechNet Community Support -
I have had a reinstall nightmare getting my loops back they are in the apple library, I can access them through the media browser but I only have a few available through the loop browser, how do I get them all back there again? please help
"Where do I find my hundreds of dollars of downloads I have done since 2005?"
They will only be where you put them If you are doing the very basics, then they will be on your computer and they will be in your backup copy of your computer.
The itunes store is not global at all, never has been. You cannot redownload your content from another country. You can only use the countrys itunes store for the country that you are physically located. -
Since upgrading my iPhone 4 to the new ios6 software I can no longer access itunes through the itunes app. I there a fix for this yet?
Scalesy05 wrote:
I there a fix for this yet?
Why would there be a fix? YOU are having the problem. I'm not, no one I know is having the problem. No fix is needed.
Basic troubleshooting steps clearly outlined in the User Guide are restart, reset, restore from backup, restore as new. Have you been through any, if not all of these troubleshooting steps yet? -
Unable to access Database through DBAdapater
Hi All,
I am using Dbadapter in my SOA Composite application and trying to access that through invoke activity.
I am getting errors in both Jdeveloper and in SOA infra environment (http://localhost:8001/soa-infra).I am unable to proceed with my work.
1) Error in Jdeveloper:
When I click on Dbadapter and it is giving below error stacktrace:
java.lang.NullPointerException
at oracle.tip.adapter.db.ox.AttributeHolder.toString(AttributeHolder.java:82)
at java.lang.String.valueOf(String.java:2826)
at
org.eclipse.persistence.exceptions.DescriptorException.illegalArgumentWhileSettingValueThruMethodAcc
essor(DescriptorException.java:691)
at
org.eclipse.persistence.internal.descriptors.MethodAttributeAccessor.setAttributeValueInObject(Metho
dAttributeAccessor.java:248)
at
org.eclipse.persistence.internal.descriptors.MethodAttributeAccessor.setAttributeValueInObject(Metho
dAttributeAccessor.java:201)
at
org.eclipse.persistence.oxm.mappings.XMLDirectMapping.setAttributeValueInObject(XMLDirectMapping.jav
a:386)
at
org.eclipse.persistence.mappings.DatabaseMapping.readFromRowIntoObject(DatabaseMapping.java:1284)
at
org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildAttributesIntoObject(ObjectBuilder.j
ava:342)
at
org.eclipse.persistence.internal.oxm.XMLObjectBuilder.buildAttributesIntoObject(XMLObjectBuilder.jav
a:376)
at
org.eclipse.persistence.internal.oxm.XMLObjectBuilder.buildObject(XMLObjectBuilder.java:286)
at
org.eclipse.persistence.oxm.mappings.XMLCompositeObjectMapping.buildCompositeObject(XMLCompositeObje
ctMapping.java:435)
at
org.eclipse.persistence.oxm.mappings.XMLCompositeObjectMapping.valueFromRow(XMLCompositeObjectMappin
g.java:540)
at
org.eclipse.persistence.oxm.mappings.XMLCompositeObjectMapping.readFromRowIntoObject(XMLCompositeObj
ectMapping.java:464)
at
org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildAttributesIntoObject(ObjectBuilder.j
ava:342)
at
org.eclipse.persistence.internal.oxm.XMLObjectBuilder.buildAttributesIntoObject(XMLObjectBuilder.jav
a:376)
at
org.eclipse.persistence.internal.oxm.XMLObjectBuilder.buildObject(XMLObjectBuilder.java:286)
at
org.eclipse.persistence.internal.oxm.record.DOMUnmarshaller.xmlToObject(DOMUnmarshaller.java:427)
at
org.eclipse.persistence.internal.oxm.record.DOMUnmarshaller.xmlToObject(DOMUnmarshaller.java:354)
at
org.eclipse.persistence.internal.oxm.record.DOMUnmarshaller.unmarshal(DOMUnmarshaller.java:208)
at org.eclipse.persistence.oxm.XMLUnmarshaller.unmarshal(XMLUnmarshaller.java:476)
at
org.eclipse.persistence.sessions.factories.XMLProjectReader.readObjectPersistenceRuntimeFormat(XMLPr
ojectReader.java:287)
at
org.eclipse.persistence.sessions.factories.XMLProjectReader.read(XMLProjectReader.java:180)
at
org.eclipse.persistence.sessions.factories.XMLProjectReader.read(XMLProjectReader.java:236)
at
oracle.tip.tools.ide.adapters.designtime.adapter.xr.XRAdapterUtil.readTopLinkProjectFiles(XRAdapterU
til.java:492)
at
oracle.tip.tools.ide.adapters.designtime.adapter.xr.XRAdapterSelectTablesPage.<init>(XRAdapterSelect
TablesPage.java:122)
at
oracle.tip.tools.ide.adapters.designtime.adapter.xr.XRAdapterOperationPage$ReAddPagesRunnable.run(XR
AdapterOperationPage.java:844)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178)
at java.awt.Dialog$1.run(Dialog.java:1046)
at java.awt.Dialog$3.run(Dialog.java:1098)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Dialog.show(Dialog.java:1096)
at java.awt.Component.show(Component.java:1563)
at java.awt.Component.setVisible(Component.java:1515)
at java.awt.Window.setVisible(Window.java:842)
at java.awt.Dialog.setVisible(Dialog.java:986)
at oracle.bali.ewt.wizard.WizardDialog.runDialog(WizardDialog.java:382)
at oracle.bali.ewt.wizard.WizardDialog.runDialog(WizardDialog.java:298)
at
oracle.tip.tools.ide.adapters.designtime.adapter.techAdapterWizard.display(techAdapterWizard.java:36
2) Error with testing in soa-infra environment :
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Header/><env:Body><env:Fault><faultcode>env:Server</faultcode><faultstring>Exception occured when binding was invoked.
Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'insert' failed due to: Could not create/access the TopLink Session.
This session is used to connect to the datastore.
Caused by java.lang.NullPointerException.
You may need to configure the connection settings in the deployment descriptor (i.e. DbAdapter.rar#META-INF/weblogic-ra.xml) and restart the server. This exception is considered not retriable, likely due to a modelling mistake.
The invoked JCA adapter raised a resource exception.
Please examine the above error message carefully to determine a resolution.
</faultstring><faultactor/><detail><exception>null</exception></detail></env:Fault></env:Body></env:Envelope>
I am giving proper values for JNDI name in weblogic-ra.xml.
What I observed is We have a connectionfacatory configuration in ra.xml which is "oracle.tip.adapter.db.ManagaedConnectionfactory".
Is there any link with this connectionfactory to the errors that I am getting.
Please guide me on this.
Thanks in advanceHave you updated the "Outbound Connection Pools-" under your soa server ?
http://docs.oracle.com/cd/E23943_01/web.1111/e13732/connect.htm
*7) Give points - it is good etiquette to reward an answerer points (5 - helpful; 10 - correct) for their post if they answer your question.*
Thanks,
Vijay -
Unable to access Workspace through Apache web server
Hi,
I have configured Hyperion 9.3.1. products in windows.
I am getting the following error message when trying to access Workspace through Apache web server(port 19000). But, able to access through Weblogic Application server(port 45000).
please assist me in resolving this issue.
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Apache/2.0.63 (Win32) mod_jk/1.2.8 Server at nasbydapp04 Port 19000
Thanks,
SivaI re-configured the BIPlus components and even now, i am unable to access workspace through Apache web server.
But now, i am getting a different error
Error:
HTTP 404 - File not found
Internet Explorer
Can anyone help me in resolving this issue.
I have updated httpd.conf and HYSL-Weblogic.conf file in Apache server. -
Dynamic tree UI element in the view
Dear All,
Can anyone provide me with the code snippet for Dynamic Tree UI element in the view. I need to show the tree which should be generated dynamically.
Thanks alot in advance!
Points will be rewarded, Please its urgent!
Cheers,
Darshna.Hi ,
sorry for the late reply... here is the code for onActionLoadchildren .. i am sure you wont understand this.. but lets try...
DATA:
element_parent TYPE REF TO if_wd_context_element,
lv_object_key1 type string,
lv_object_type type string.
DATA:
node_root_entry TYPE REF TO if_wd_context_node,
elem_root_entry TYPE REF TO if_wd_context_element,
stru_root_entry TYPE if_structure_view_new=>element_root_entry ,
item_valid_from LIKE stru_root_entry-valid_from,
item_plant LIKE stru_root_entry-plant,
item_equi_key LIKE stru_root_entry-equi_key,
item_object_key LIKE stru_root_entry-object_key,
item_object_type TYPE string,
item_path TYPE string,
item_parent_path TYPE string,
context_node TYPE REF TO if_wd_context_node,
root_entry TYPE if_structure_view_new=>element_selected_entry.
l_ref_componentcontroller TYPE REF TO ig_componentcontroller.
DATA:
node_root_info TYPE REF TO if_wd_context_node,
elem_root_info TYPE REF TO if_wd_context_element,
stru_root_info TYPE if_structure_view_new=>element_root_info .
DATA:
element TYPE REF TO if_wd_context_element,
node_selected_entry TYPE REF TO if_wd_context_node,
elem_selected_entry TYPE REF TO if_wd_context_element.
DATA:
ls_hier_return TYPE rplm_ts_struc_elements,
lt_hier_return TYPE TABLE OF rplm_ts_struc_elements,
ls_hier_return_temp TYPE rplm_ts_struc_elements,
lt_hier_return_temp TYPE TABLE OF rplm_ts_struc_elements,
ls_hier_level TYPE rplm_ts_hier_level,
lt_hier_level TYPE TABLE OF rplm_ts_hier_level,
ls_hier_return_sort TYPE rplm_mt_ts_hier,
lt_hier_return_sort TYPE TABLE OF rplm_mt_ts_hier.
DATA:
temp_hier_level TYPE if_structure_view_new=>element_hier_level,
lt_hier_temp TYPE TABLE OF if_structure_view_new=>element_hier_level,
lt_temp TYPE TABLE OF if_structure_view_new=>element_hier_level.
DATA:
lc_path TYPE string,
lv_object_key TYPE string.
DATA:
lv_hier_lines TYPE i.
DATA:
node_entries TYPE REF TO if_wd_context_node,
node_sub_entries TYPE REF TO if_wd_context_node,
elem_sub_entries TYPE REF TO if_wd_context_element,
stru_sub_entries TYPE if_structure_view_new=>element_sub_entries .
TYPES: BEGIN OF ls_hier_type, "structure for Hierarchy table
object(31) TYPE c, "Objectkey
predecessor(31) TYPE c, "Objectkey Predecessor
data(2000) TYPE c, "Data container
level TYPE i, "level of object in tree
successors(1) TYPE c, "Object has successors: YES/NO/U
display(1) TYPE c, "Object is displayed: YES/NO
selected(1) TYPE c, "Object is selected/marked: YES/NO
index_predec LIKE sy-tabix, "Index predecessor
strno TYPE ilom_strno,"External number for func. loc.
"in BOMs used for top object
END OF ls_hier_type.
DATA:
ls_hier TYPE ls_hier_type,
lt_hier TYPE TABLE OF ls_hier_type WITH DEFAULT KEY,
lt_mat_hier TYPE TABLE OF ls_hier_type WITH DEFAULT KEY.
" For retrieving Material Data Heirarchy
DATA:
lh_stpo_tab TYPE TABLE OF rihstpx ,
lwa_stpo_tab LIKE LINE OF lh_stpo_tab,
check_menge TYPE string ,
check_meins TYPE string ,
lwa_mat_hier LIKE LINE OF lt_mat_hier ,
lt_dup_mat_hier LIKE lt_mat_hier,
lv_len TYPE i,
lv_len_temp TYPE i .
DATA:
lv_equnr TYPE equi-equnr,
lv_tplnr TYPE iflo-tplnr,
lv_matnr TYPE mast-matnr.
DATA:
lv_cnt TYPE i,
lv_index TYPE i.
DATA:
lv_path TYPE string,
lv_parent_path TYPE string,
pos TYPE string,
separator TYPE c VALUE '.',
max_level TYPE i,
temp_level TYPE i,
counter TYPE i VALUE 1.
TYPES: BEGIN OF ls_pred_type, "structure for Hierarchy table
parent(31) TYPE c, "Objectkey Predecessor
path(2000) TYPE c, "Data container
index_predec LIKE sy-tabix, "Index predecessor
END OF ls_pred_type.
DATA:
ls_pred TYPE ls_pred_type,
lt_pred TYPE TABLE OF ls_pred_type WITH DEFAULT KEY.
DATA:
lv_int_obj_key TYPE string,
obj_len TYPE i,
lv_funcloc_ext TYPE ilom_strno,
lv_funcloc TYPE itob-tplnr.
DATA:
lv_level TYPE i,
lv_temp TYPE i,
lt_path_entries TYPE string_table.
DATA:
node_general TYPE REF TO if_wd_context_node,
elem_general TYPE REF TO if_wd_context_element,
stru_general TYPE if_structure_view_new=>element_general ,
item_collapse_visibility LIKE stru_general-collapse_visibility.
DATA:
elem_context TYPE REF TO if_wd_context_element,
stru_context TYPE if_structure_view_new=>element_context ,
item_expand_all LIKE stru_context-expand_all.
lv_path = path.
Get Element whose children shall be loaded
element_parent = wd_context->path_get_element( lv_path ).
element_parent->get_attribute(
EXPORTING
name = `OBJECT_KEY`
IMPORTING
value = LV_object_key ).
element_parent->get_attribute(
EXPORTING
name = `OBJECT_TYPE`
IMPORTING
value = lv_object_type ).
node_root_entry = wd_context->get_child_node( name = wd_this->wdctx_root_entry ).
get element via lead selection
elem_root_entry = node_root_entry->get_element( ).
get single attribute
elem_root_entry->get_attribute(
EXPORTING
name = `VALID_FROM`
IMPORTING
value = item_valid_from ).
elem_root_entry->get_attribute(
EXPORTING
name = `PLANT`
IMPORTING
value = item_plant ).
item_object_type = lv_object_type.
if lv_object_type eq 'EQUI'.
item_object_key = ''.
item_equi_key = lv_object_key.
elseif lv_object_type eq 'FUNCLOC'.
item_object_key = lv_object_key.
item_equi_key = ''.
ELSE.
lv_matnr = lv_object_key.
For BOM, material and Assembly
endif.
IF item_object_type EQ 'EQUI'.
lv_equnr = lv_object_key.
ELSEif item_object_type eq 'FUNCLOC'.
lv_tplnr = lv_object_key.
ELSE.
LV_MATNR = lv_object_key.
exit.
ENDIF.
CALL FUNCTION 'PM_HIERARCHY_CALL'
EXPORTING
datum = item_valid_from
equnr = lv_equnr
tplnr = lv_tplnr
matnr = lv_matnr
levdo = '99'
levup = '00'
sanin = 'X'
select_equi = 'X'
select_iflo = 'X'
select_stpo = 'X'
selmod = 'D'
stkkz = ''
werks = item_plant
with_equi = 'X'
with_equi_hier = 'X'
with_iflo_hier = 'X'
with_btyp = 'X'
with_mara = 'X'
with_ibase_hier = ''
capid = ''
emeng = 0
IMPORTING
et_hier = lt_hier
EXCEPTIONS
no_hierarchy = 1
no_object_defined = 2
no_selection = 3
no_valid_equnr = 4
no_valid_matnr = 5
no_valid_selmod = 6
no_valid_tplnr = 7
OTHERS = 8.
LOOP AT lt_hier INTO ls_hier.
ls_hier_return-object_key = ls_hier-object.
ls_hier_level-object_key = ls_hier-object.
ls_hier_level-predecessor = ls_hier-predecessor.
lv_len = strlen( ls_hier-object ).
IF lv_len GT 1.
lv_len_temp = lv_len - 1.
ELSEIF
lv_len_temp = lv_len.
ENDIF.
ls_hier_level-level = ls_hier-level.
IF ls_hier-object(1) = 'T'.
ls_hier_return-icon = 'ICON_TECHNICAL_PLACE'.
ls_hier_return-object_type = 'FUNCLOC'.
IF ls_hier-successors = 'Y'.
ls_hier_return-is_leaf = abap_false.
ls_hier_return-is_expanded = abap_false.
ls_hier_return-children_loaded = abap_true.
ELSE.
ls_hier_return-is_leaf = abap_true.
ls_hier_return-is_expanded = abap_true.
ls_hier_return-children_loaded = abap_true.
ENDIF.
ELSEIF ls_hier-object(1) = 'E'.
ls_hier_return-icon = 'ICON_EQUIPMENT'.
ls_hier_return-object_type = 'EQUI'.
IF ls_hier-successors = 'Y'.
ls_hier_return-is_leaf = abap_false.
ls_hier_return-is_expanded = abap_false.
ls_hier_return-children_loaded = abap_true.
ELSE.
ls_hier_return-is_leaf = abap_true.
ls_hier_return-is_expanded = abap_true.
ls_hier_return-children_loaded = abap_true.
ENDIF.
ELSEIF ls_hier-object+lv_len_temp(1) = 'M'.
ls_hier_return-icon = 'ICON_MATERIAL'.
ls_hier_return-object_type = 'MATERIAL'.
IF ls_hier-successors = 'Y'.
ls_hier_return-is_leaf = abap_false.
ls_hier_return-is_expanded = abap_false.
ls_hier_return-children_loaded = abap_false.
ELSE.
ls_hier_return-is_leaf = abap_true.
ls_hier_return-is_expanded = abap_true.
ls_hier_return-children_loaded = abap_true.
ENDIF.
ELSEIF ls_hier-object+lv_len_temp(1) = 'X'.
ls_hier_return-icon = 'ICON_SUPPLY_AREA'.
ls_hier_return-object_type = 'MATBOM'.
IF ls_hier-successors = 'Y'.
ls_hier_return-is_leaf = abap_false.
ls_hier_return-is_expanded = abap_false.
ls_hier_return-children_loaded = abap_false.
ELSE.
ls_hier_return-is_leaf = abap_true.
ls_hier_return-is_expanded = abap_true.
ls_hier_return-children_loaded = abap_true.
ENDIF.
ELSEIF ls_hier-object+lv_len_temp(1) = 'A'.
ls_hier_return-icon = 'ICON_MATERIAL_REVISION'.
ls_hier_return-object_type = 'MATERIAL'.
IF ls_hier-successors = 'Y'.
ls_hier_return-is_leaf = abap_false.
ls_hier_return-is_expanded = abap_false.
ls_hier_return-children_loaded = abap_false.
ELSE.
ls_hier_return-is_leaf = abap_true.
ls_hier_return-is_expanded = abap_true.
ls_hier_return-children_loaded = abap_true.
ENDIF.
ENDIF.
*IF ls_hier-predecessor EQ item_object_key OR ls_hier-object EQ item_object_key.
APPEND ls_hier_return TO lt_hier_return.
APPEND ls_hier_level TO lt_hier_level.
*ENDIF.
CLEAR lv_len.
CLEAR lv_len_temp.
ENDLOOP.
lt_hier_return_temp = lt_hier_return.
DESCRIBE TABLE lt_hier LINES lv_hier_lines.
IF lv_hier_lines EQ 0.
elem_selected_entry = wd_context->path_get_element( '1.ENTRIES.1' ).
Get children node
elem_selected_entry->set_attribute(
value = abap_true
name = 'IS_LEAF' ).
ENDIF.
*************************************Deleting Now***********
SORT lt_hier_level BY level DESCENDING.
LOOP AT lt_hier_level INTO ls_hier_level.
max_level = ls_hier_level-level.
EXIT.
ENDLOOP.
SORT lt_hier_level BY level ASCENDING.
LOOP AT lt_hier_level INTO ls_hier_level WHERE level EQ 0.
ls_hier_level-path = '1.ENTRIES.1'.
ls_hier_level-parent_path = '1.ENTRIES.1'.
MODIFY lt_hier_level FROM ls_hier_level.
ENDLOOP.
************************New design to Generate Path and Parent path
lv_cnt = 0.
temp_level = 1.
SORT lt_hier_level BY object_key ASCENDING.
LOOP AT lt_hier_level INTO ls_hier_level WHERE level EQ 1.
lv_cnt = lv_cnt + 1.
lv_parent_path = '1.ENTRIES.1'.
ls_hier_level-parent_path = lv_parent_path.
pos = lv_cnt.
CONCATENATE lv_parent_path separator 'SUB_ENTRIES' separator pos INTO lv_path.
ls_hier_level-path = lv_path.
MODIFY lt_hier_level FROM ls_hier_level.
ENDLOOP.
temp_level = 1.
lv_cnt = 0.
*********************Need to call this for each level ***************************
WHILE temp_level LT max_level.
CLEAR lt_pred.
CLEAR ls_pred.
LOOP AT lt_hier_level INTO ls_hier_level WHERE level EQ temp_level.
ls_pred-parent = ls_hier_level-object_key.
ls_pred-path = ls_hier_level-path.
APPEND ls_pred TO lt_pred.
ENDLOOP.
SORT lt_pred BY parent.
DELETE ADJACENT DUPLICATES FROM lt_pred.
LOOP AT lt_pred INTO ls_pred.
lv_cnt = 0.
LOOP AT lt_hier_level INTO ls_hier_level WHERE predecessor EQ ls_pred-parent.
lv_cnt = lv_cnt + 1.
lv_parent_path = ls_pred-path.
ls_hier_level-parent_path = lv_parent_path.
lv_path = ''.
pos = lv_cnt.
CONCATENATE lv_parent_path separator 'SUB_ENTRIES' separator pos INTO lv_path.
ls_hier_level-path = lv_path.
MODIFY lt_hier_level FROM ls_hier_level.
ENDLOOP.
ENDLOOP.
temp_level = temp_level + 1.
ENDWHILE.
LOOP AT lt_hier_level INTO ls_hier_level.
LOOP AT lt_hier_return INTO ls_hier_return.
IF ls_hier_level-object_key = ls_hier_return-object_key.
MOVE-CORRESPONDING ls_hier_level TO ls_hier_return.
MODIFY lt_hier_return FROM ls_hier_return.
ENDIF.
ENDLOOP.
ENDLOOP.
SORT lt_hier_return BY path ASCENDING.
**************************Delete the extra first character returned by PM_HIERARCHY_CALL******
LOOP AT lt_hier_return INTO ls_hier_return.
IF ls_hier_return-object_key(1) = 'T'.
SHIFT ls_hier_return-object_key BY 1 PLACES.
lv_object_key = ls_hier_return-object_key.
lv_funcloc_ext = lv_object_key.
CALL FUNCTION 'CONVERSION_EXIT_TPLNR_OUTPUT'
EXPORTING
input = lv_funcloc_ext
IMPORTING
output = lv_funcloc.
lv_int_obj_key = lv_funcloc.
ls_hier_return-object_key = lv_int_obj_key.
ELSEIF ls_hier_return-object_key(1) = 'E'.
SHIFT ls_hier_return-object_key BY 1 PLACES.
lv_object_key = ls_hier_return-object_key.
obj_len = strlen( lv_object_key ).
IF obj_len GE 18.
lv_object_key = lv_object_key+0(18).
ENDIF.
wd_comp_controller->conv_ext_2_int(
EXPORTING
iv_object_key_ext = lv_object_key " String
iv_object_type = 'EQUI' " String
IMPORTING
ev_object_key = lv_int_obj_key " String
SHIFT lv_int_obj_key LEFT DELETING LEADING '0'.
ls_hier_return-object_key = lv_int_obj_key.
ELSE.
SHIFT ls_hier_return-object_key BY 1 PLACES.
lv_object_key = ls_hier_return-object_key.
obj_len = strlen( lv_object_key ).
IF obj_len GE 18.
lv_object_key = lv_object_key+0(18).
ENDIF.
SHIFT lv_object_key LEFT DELETING LEADING '0'.
ls_hier_return-object_key = lv_object_key.
ENDIF.
MODIFY lt_hier_return FROM ls_hier_return TRANSPORTING object_key object_key.
ENDLOOP.
LOOP AT lt_hier_level INTO ls_hier_level.
IF ls_hier_level-object_key(1) = 'T'.
SHIFT ls_hier_level-object_key BY 1 PLACES.
lv_object_key = ls_hier_level-object_key.
lv_funcloc_ext = lv_object_key.
CALL FUNCTION 'CONVERSION_EXIT_TPLNR_OUTPUT'
EXPORTING
input = lv_funcloc_ext
IMPORTING
output = lv_funcloc.
lv_int_obj_key = lv_funcloc.
ls_hier_level-object_key = lv_int_obj_key.
ELSEIF ls_hier_level-object_key(1) = 'E'.
SHIFT ls_hier_level-object_key BY 1 PLACES.
lv_int_obj_key = ls_hier_level-object_key.
obj_len = strlen( lv_int_obj_key ).
IF obj_len GE 18.
lv_int_obj_key = lv_int_obj_key+0(18).
ENDIF.
wd_comp_controller->conv_ext_2_int(
EXPORTING
iv_object_key_ext = lv_int_obj_key " String
iv_object_type = 'EQUI' " String
IMPORTING
ev_object_key = lv_int_obj_key " String
SHIFT lv_int_obj_key LEFT DELETING LEADING '0'.
ls_hier_level-object_key = lv_int_obj_key.
ELSE.
SHIFT ls_hier_level-object_key BY 1 PLACES.
lv_int_obj_key = ls_hier_level-object_key.
obj_len = strlen( lv_int_obj_key ).
IF obj_len GE 18.
lv_int_obj_key = lv_int_obj_key+0(18).
ENDIF.
SHIFT lv_int_obj_key LEFT DELETING LEADING '0'.
ls_hier_level-object_key = lv_int_obj_key.
ENDIF.
MODIFY lt_hier_level FROM ls_hier_level TRANSPORTING object_key object_key.
ENDLOOP.
*********************Getinfo if root node else call Get_Children_Info to generate the structure as well*******
IF lv_path EQ '1.ENTRIES.1'.
element = wd_context->path_get_element( lv_path ).
navigate from <ENTRIES> to <SUB_ENTRIES> via lead selection
node_sub_entries = element->get_child_node( name = 'SUB_ENTRIES' ).
element->get_attribute( EXPORTING name = 'OBJECT_KEY'
IMPORTING value = item_object_key ).
element->get_attribute( EXPORTING name = `OBJECT_TYPE`
IMPORTING value = item_object_type ).
****************Get Info of Technical Objects*************
wd_comp_controller->get_children_info(
EXPORTING
iv_lt_list = lt_hier_return " Rplm_Tt_Mt_Struc
iv_path = ''
iv_hier_level = lt_hier_level
IMPORTING
ev_lt_full = lt_hier_return " Rplm_Tt_Mt_Struc
Create the strcuture by binding the entries to Node which is bound to the table
element = wd_context->path_get_element( lc_path ).
Get children node
node_sub_entries = element->get_child_node( 'SUB_ENTRIES' ).
CALL METHOD node_sub_entries->bind_table
EXPORTING
new_items = lt_hier_return
set_initial_elements = abap_true.
@TODO handle not set lead selection
IF ( node_entries IS INITIAL ).
ENDIF.
lv_temp = 1.
***************Sort the LT_HIER_TABLE appropriately ******
LOOP AT lt_hier_return INTO ls_hier_return .
MOVE-CORRESPONDING ls_hier_return TO ls_hier_return_sort.
ls_hier_return_sort-path_length = strlen( ls_hier_return_sort-path ).
APPEND ls_hier_return_sort TO lt_hier_return_sort.
ENDLOOP.
SORT lt_hier_return_sort BY path_length ASCENDING path ASCENDING.
CLEAR lt_hier_return.
LOOP AT lt_hier_return_sort INTO ls_hier_return_sort.
MOVE-CORRESPONDING ls_hier_return_sort TO ls_hier_return.
APPEND ls_hier_return TO lt_hier_return.
ENDLOOP.
*wd_comp_controller->gv_master_data = lt_hier_return.
LOOP AT lt_hier_return INTO ls_hier_return.
lv_path = ls_hier_return-path.
lc_path = ls_hier_return-parent_path.
IF lv_path NE '1.ENTRIES.1'.
element = wd_context->path_get_element( lc_path ).
Get children node
node_sub_entries = element->get_child_node( 'SUB_ENTRIES' ).
Now, create the children elements
element->get_attribute( EXPORTING name = 'OBJECT_KEY'
IMPORTING value = ls_hier_level-predecessor ).
Create the strcuture by binding the entries to Node which is bound to the table
CALL METHOD node_sub_entries->bind_structure
EXPORTING
new_item = ls_hier_return
set_initial_elements = abap_false.
ENDIF.
ENDLOOP.
Only when a new level is reached we create one more child node
else we attach our elements to same child node
element = wd_context->path_get_element( item_path ).
Get children node
element->set_attribute(
value = abap_false
name = 'IS_EXPANDED' ).
ENDIF.
navigate from <CONTEXT> to <GENERAL> via lead selection
node_general = wd_context->get_child_node( name = wd_this->wdctx_general ).
get element via lead selection
elem_general = node_general->get_element( ).
get single attribute
elem_general->set_attribute(
name = `COLLAPSE_VISIBILITY`
value = abap_false ).
node_selected_entry = wd_context->get_child_node( name = if_structure_view_new=>wdctx_selected_entry ).
get element via lead selection
elem_selected_entry = node_selected_entry->get_element( ).
get single attribute
elem_selected_entry->set_attribute(
name = `OBJECT_KEY`
value = '' ).
elem_selected_entry->set_attribute(
name = `OBJECT_TYPE`
value = '' ).
get element via lead selection
elem_context = wd_context->get_element( ).
get single attribute
elem_context->set_attribute(
name = `EXPAND_ALL`
value = abap_false ).
wd_this->enable_buttons(
endmethod. -
Error while accessing data from MS Access DB through Window AD architec
Dear Members,
Iam having a BO 3.0 installation on a standalone PC with the basic tomcat and mysql setup... As a test environment, Now while designing universes i can easily connect to Oracle EBS structure also SQL server DB ... the problem is when iam linking to a MS Access DB through a network drive (its all ok in the designer) but while in Webi while runnning the query, it throws an error of (WIS 10901 .... database error DSN not specified)
I have configured ODBC properly also given appropriate rights for the users and strangely the same universe is running well with my thick client desktop and webi rich client
(so iam sure its not a odbc issue)
Looking forward for any comments on this problempossibly the account running the webi report server doesn't have access to the drive. Is it local system? Try using the same account you are logged into the webi rich client as, but you will most likely need to grant that account local admin on the server so it can run the service.
Regards,
Tim -
I no longer have sound when playing my clips through adobe premiere elements 12. How to I correct this problem? I have checked all audio levels and there is no mute on etc. I updated to 12.1, but still no sound in any clips. Even not on old files which used to work.
bfun
What computer operating system is your Premiere Elements 12/12.1 running on? Can we assume that this audio plays back OK
on the same computer when you are using a computer player independent of Premiere Elements?
What are the properties of these clips that worked before but do not know with regard to sound
For now, I will assume that you are working on Windows 7, 8, or 8.1 64 bit.
Have you checked the Edit Menu/Preferences/Audio Hardware ASIO settings? Do you have any 3rd party audio devices incorporated in your computer environment?
Please delete the Adobe Premiere Elements Prefs file and, if that does not work, then the whole 12.0 Folder in which the Adobe Premiere Elements Prefs file exists. The Windows 7, 8, or 8.1 64 bit path is
Local Disk C
Users
Owner
AppData
Roaming
Adobe
Premiere Elements
12.0
and, in the 12.0 Folder, is the Adobe Premiere Elements Prefs file that you delete. If that does not work, then delete the whole 12.0 Folder in which the Adobe Premiere Elements Prefs file exists. Make sure that you are working with Folder Option "Show Hidden Files, Folders, and Drives" active so that you can see the complete path cited.
Do you have installation files or installation disc with the purchased serial number in case we need to resort to uninstall/reinstall?
We will be watching for your follow up.
ATR -
How to find users machine / IP who is accessing forms through Oracle AS
Dear Gurus
We need to know the users machine / IP who are accessing forms through Oracle 9i Application Server, how can we find that?
thanks in advance
regards
MehmoodMehmood,
Set serverURL=/forms90/f90servlet/session in the Forms Web configuration default section or add it to the URL to start tracing host name and ip-addresses from clients. The output appears in the servlet log file application.log. sessionperf , perf and debug are the other options instead of session.
regards,
Bernhard Jongejan
http://bernhardjongejan.spaces.live.com
Maybe you are looking for
-
How can i create a new album picture in iphone 4g ?
hi to evryone how can i create a new album picture in iphone 4g ?? thanks
-
UIX:train - how to make all links available/enabled
Is there a way that I can default all of the links in a uix:train to be enabled, rather than just the next link after the selected Index? (selectedIndex+1) I tried using the disabled attribute and setting each link to disabled="false", but that doesn
-
Can the standby become the active for the active standby pair
Hi all, Will the standby database take over the duty of the active database when the active database fails? If not is there only a read-only standby database and how high availability of the active stand pair works? Thanks
-
Lb/cluster 사용시 Multicast IP address 에러.. 230.0.0.1에러
* 질문한 사람 : calua * 질문 등록일 : 2001-11-22 14:00:30 * 조회 : 48767 * 답변 : 1건 (jino2002) -- 질문 내용 -- 썬에서 로드발란서1개와 클러스터2개를 뛰어놓고 사용중인데 잘 실행되고 있다가 갑자기 에러가 발생하였습니다. 이유는 모르겠고 로드발란서를 뛰우기 위해 실행시키면 Unable connection 230.0.0.1:2.... 이라고 나오면서 실행이 안되는데요.. 지금은 클러스터 설정화
-
Connecting to iTunes at Starbucks
At Starbucks, my Touch picks up the wifi signal from T-Mobile (though I'm not a subscriber; I'm waiting for them to finish installing AT&T). When I try to get iTunes, though, it won't connect. I thought the Touch would link me with whatever song was