When I create SFC By Using API, Exception Happened!
Hi All
I want create SFC in SDK by Using following API,but an Exception had happened when I get the Service.
CreateSfcServiceInterface createSfcSvc = Services.getService("com.sap.me.production", "CreateSfcService");
CreateSfcRequest d = new CreateSfcRequest();
d.setDateTime(XXXX);//current time
d.setItemRef(XXXX);
d.setOperationRef(XXXX); //First Operation
d.setQuantity(XXXX); // SFC Qty
d.setResourceRef(value); //the resource to the first operation
d.setSfc(XXXX) // gennerated SFC Number
CreateSfcServiceInterface.createSFC(d);
EXCEPTION:
「An exception occurred: com.visiprise.frame.proxy.ServiceInitializationException」
Hi, Ivan
Thank you for answer.
the following is the Exception trace:
Unable to initialize service 'CreateSfcService'
[EXCEPTION]
#1#com.visiprise.frame.proxy.ServiceInitializationException: Unable to initialize service 'CreateSfcService'
at com.visiprise.frame.proxy.ServiceBuilder.getService(ServiceBuilder.java:135)
at com.visiprise.frame.service.ServiceLocator.getService(ServiceLocator.java:44)
at com.sap.me.extension.Services.getService(Services.java:26)
at com.hp.me.app.action.MPC051Action.execute(MPC051Action.java:74)
at com.hp.me.framework.action.DefaultActionInvocation.invoke(DefaultActionInvocation.java:89)
at com.hp.me.framework.interceptor.DefaultInterceptor.interceptor(DefaultInterceptor.java:30)
at com.hp.me.framework.action.DefaultActionInvocation.invoke(DefaultActionInvocation.java:105)
at com.hp.me.framework.interceptor.DefaultInterceptor.interceptor(DefaultInterceptor.java:30)
at com.hp.me.framework.action.DefaultActionInvocation.invoke(DefaultActionInvocation.java:105)
at com.hp.me.framework.controler.DispatchControler.doPost(DispatchControler.java:104)
at com.hp.me.framework.controler.DispatchControler.doGet(DispatchControler.java:56)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.runServlet(FilterChainImpl.java:162)
at com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.doFilter(FilterChainImpl.java:81)
at com.sap.me.alarm.client.RTEDSessionInvalidateFilter.doFilter(RTEDSessionInvalidateFilter.java:66)
at com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.doFilter(FilterChainImpl.java:73)
at com.sap.me.coral.core.filter.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:57)
at com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.doFilter(FilterChainImpl.java:73)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:441)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:291)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:396)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:385)
at com.sap.engine.services.servlets_jsp.filters.DSRWebContainerFilter.process(DSRWebContainerFilter.java:48)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.servlets_jsp.filters.ServletSelector.process(ServletSelector.java:76)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.servlets_jsp.filters.ApplicationSelector.process(ApplicationSelector.java:240)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.WebContainerInvoker.process(WebContainerInvoker.java:78)
at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.ResponseLogWriter.process(ResponseLogWriter.java:60)
at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.DefineHostFilter.process(DefineHostFilter.java:27)
at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.MonitoringFilter.process(MonitoringFilter.java:29)
at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.MemoryStatisticFilter.process(MemoryStatisticFilter.java:43)
at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.DSRHttpFilter.process(DSRHttpFilter.java:42)
at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.server.Processor.chainedRequest(Processor.java:425)
at com.sap.engine.services.httpserver.server.Processor$FCAProcessorThread.process(Processor.java:250)
at com.sap.engine.services.httpserver.server.rcm.RequestProcessorThread.run(RequestProcessorThread.java:45)
at com.sap.engine.core.thread.execution.Executable.run(Executable.java:109)
at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:314)
Caused by: com.visiprise.frame.service.ServiceFactoryException: com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Object not found in lookup of CreateSfcService.
at com.sap.me.frame.service.VMEJBServiceFactory.createService(VMEJBServiceFactory.java:33)
at com.visiprise.frame.service.AbstractPrototypeFactory.getService(AbstractPrototypeFactory.java:35)
at com.visiprise.frame.proxy.ServiceBuilder.getService(ServiceBuilder.java:127)
... 51 more
Caused by: com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Object not found in lookup of CreateSfcService.
at com.sap.engine.services.jndi.implserver.ServerContextImpl.lookup(ServerContextImpl.java:514)
at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:321)
at com.sap.engine.services.jndi.implclient.OffsetClientContext.lookup(OffsetClientContext.java:223)
at com.sap.engine.services.jndi.implclient.OffsetClientContext.lookup(OffsetClientContext.java:242)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at com.sap.me.frame.ServiceLocator.getLocalOrRemoteEJB(ServiceLocator.java:90)
at com.sap.me.frame.EJBFactoryHelper.lookUpEJBService(EJBFactoryHelper.java:27)
at com.sap.me.frame.service.VMEJBServiceFactory.createService(VMEJBServiceFactory.java:30)
... 53 more
Similar Messages
-
I am trying to find out how to assign files with particular extensions to the appropriate software. At the moment when I create a file using Word it is apparently given the extension .docx but Word doesn't recognise its own files. How do I allocate the extension .docx to Word? There used to be a way of doing it, I think under "Preferences" but I can't seem to find it.
Still in the same location:
File > Get Info > Open with (select) > Change All (button) -
HT5544 How do I sync iBooks on iOS devices when I create an ebook using iBooks Author?
How do I sync iBooks on iOS devices when I create an ebook using iBooks Author?
Hello Ottoni1,
Thank you for the question. You can preview the book you created in iBooks Author in iBooks on your iPad using the following steps:
Preview a book or a chapter on iPad
Connect iPad to your Mac.
On the Home screen of your iPad, tap iBooks.
In iBooks Author, do either of the following:
Preview a book: Click the Preview button in the toolbar, or choose File > Preview.
Preview a chapter: Select the chapter you want to preview in the sidebar, then choose File > Preview Current Section Only.
Note: To preview on an iPad running iOS 7 or later, you need iTunes 11.1 or later installed on your Mac.
You can find the full article here:
iBooks Author: Preview a book in iBooks
http://support.apple.com/kb/PH2807
Thank you for using Apple Support Communities.
Best,
Sheila M. -
When Start SFC using SfcStartServiceInterface, Exception happened.
1)I want to start an SFC by using SfcStartServiceInterface. but Exception happened.
code:
SfcStartServiceInterface sfcStartSvc = Services.getService("com.sap.me.production", "SfcStartService");
String sfcCd = "A001";
String operation = "operation_test";
String resource="resoure_test";
StartSfcRequest startSfcRequest = new StartSfcRequest();
startSfcRequest.setSfcRef(sfcCd);
startSfcRequest.setOperationRef(operation);
startSfcRequest.setResourceRef(resource);
//startSfcRequest.setUserRef(logonID);
List<StartSfcRequest> sfcList = new ArrayList<StartSfcRequest>();
sfcList.add(startSfcRequest);
try {
sfcStartSvc.start(sfcList);
} catch (Exception e) {
request.setAttribute("ERROR_MSG", e.toString());
Exception :
com.sap.me.frame.transitionutils.Exceptions$LegacyBusinessException
2) if i call the validateStart(sfcList) in JSP , JSP CompilerException happened.
com.sap.engine.compilation.CompilerException: Compilation Failed! Exit Code=1
what's wrong with my code. pls help me.Hi Wenjun
Try to change this part, because you are using object names like "A001"
String sfcCd = "A001";
String operation = "operation_test";
String resource="resoure_test";
According to the API method names you should use references, for example in the method setSfcRef()
startSfcRequest.setSfcRef(sfcCd);
startSfcRequest.setOperationRef(operation);
startSfcRequest.setResourceRef(resource);
To resolve the operation name to operation reference use the service com.sap.me.productdefinition.OperationConfigurationService and method findOperationConfiguration.
To resolve the resource name to resource reference use the service com.sap.me.plant.ResourceConfigurationService and method FindResourceByKeyFieldsRequest.
Unfortunately API doesn't provide the method to resolve SFC to SFC reference, but you can use the following deprecated workaround:
String sfcRef = (new SFCBOHandle(site,sfc)).toString() -
When am creating the material using the transaction MM01 getting the error
Hi all,
Could you please help me to solve this issue, When I am creating the material using the transaction MM01, am receiving the error message "Express document "Update was terminated" received from author "XXXXXXXX", I checked the in SM13 found error message showing in Z_LGPLA_BIN_POSTING.
Regards,
Muralikrsihna.ST22 Error is : SAPSQL_ARRAY_INSERT_DUPREC, below is full error message
An exception occurred. This exception is dealt with in more detail below
. The exception, which is assigned to the class 'CX_SY_OPEN_SQL_DB', was
neither
caught nor passed along using a RAISING clause, in the procedure
"Z_LGPLA_BIN_POSTING" "(FUNCTION)"
Since the caller of the procedure could not have expected this exception
to occur, the running program was terminated.
The reason for the exception is:
If you use an ABAP/4 Open SQL array insert to insert a record in
the database and that record already exists with the same key,
this results in a termination.
(With an ABAP/4 Open SQL single record insert in the same error
situation, processing does not terminate, but SY-SUBRC is set to 4.)
Regards,
Muralikrishna -
how do I view the photos ? I backed up with iPhoto closed as recommended but when I enter the Time Machine and click on iPhoto library it calculates there is 11gb in there so files must be present but when i click on open with iPhoto nothing happens ? any help welcome please !!??
The external hard drive must connect to your Mac using a USB or FireWire connection.
Note that the hard drive must be formatted in Mac OS Extended (Journaled) to work correctly with the iPhoto Library and be backed up to the Time Capsule and with the backups of your Mac.
We are really talking about iPhoto uses here, so you should post in the iPhoto Support area for more details about this. The link is just below.
iPhoto for Mac -
Error while creating new projects using api
Hello,
I am having error while creating projects using standard api, PA_PROJECT_PUB.CREATE_PROJECTS. The error I am having is as follow.
Source template ID is invalid.
===
My code is as follow:
SET SERVEROUTPUT ON SIZE 1000000
SET VERIFY OFF
define no=&amg_number
DECLARE
-- Variables used to initialize the session
l_user_id NUMBER;
l_responsibility_id NUMBER;
cursor get_key_members is
select person_id, project_role_type, rownum
from pa_project_players
where project_id = 1;
-- Counter variables
a NUMBER := 0;
m NUMBER := 0;
-- Variables needed for API standard parameters
l_commit VARCHAR2(1) := 'F';
l_init_msg_list VARCHAR2(1) := 'T';
l_api_version_number NUMBER :=1.0;
l_return_status VARCHAR2(1);
l_msg_count NUMBER;
l_msg_data VARCHAR2(2000);
-- Variables used specifically in error message retrieval
l_encoded VARCHAR2(1) := 'F';
l_data VARCHAR2(2000);
l_msg_index NUMBER;
l_msg_index_out NUMBER;
-- Variables needed for Oracle Project specific parameters
-- Input variables
l_pm_product_code VARCHAR2(30);
l_project_in pa_project_pub.project_in_rec_type;
l_key_members pa_project_pub.project_role_tbl_type;
l_class_categories pa_project_pub.class_category_tbl_type;
l_tasks_in pa_project_pub.task_in_tbl_type;
-- Record variables for loading table variables above
l_key_member_rec pa_project_pub.project_role_rec_type;
l_class_category_rec pa_project_pub.class_category_rec_type;
l_task_rec pa_project_pub.task_in_rec_type;
-- Output variables
l_workflow_started VARCHAR2(100);
l_project_out pa_project_pub.project_out_rec_type;
l_tasks_out pa_project_pub.task_out_tbl_type;
-- Exception to call messag handlers if API returns an error.
API_ERROR EXCEPTION;
BEGIN
-- Initialize the session with my user id and Projects, Vision Serves (USA0
-- responsibility:
select user_id into l_user_id
from fnd_user
where user_name = 'SSHAH';
select responsibility_id into l_responsibility_id
from fnd_responsibility_tl
where responsibility_name = 'Projects Implementation Superuser';
pa_interface_utils_pub.set_global_info(
p_api_version_number => l_api_version_number,
p_responsibility_id => l_responsibility_id,
p_user_id => l_user_id,
p_msg_count => l_msg_count,
p_msg_data => l_msg_data,
p_return_status => l_return_status);
if l_return_status != 'S' then
raise API_ERROR;
end if;
-- Provide values for input variables
-- L_PM_PRODUCT_CODE: These are stored in pa_lookups and can be defined
-- by the user. In this case we select a pre-defined one.
select lookup_code into l_pm_product_code
from pa_lookups
where lookup_type = 'PM_PRODUCT_CODE'
and meaning = 'Conversion';
-- L_PROJECT_IN: We have to provide values for all required elements
-- of this record (see p 5-13, 5-14 for the definition of the record).
-- Customers will normally select this information from some external
-- source
l_project_in.pm_project_reference := 'AGL-AMG Project &no';
l_project_in.project_name := 'AGL-AMG Project &no';
l_project_in.created_from_project_id := 1;
l_project_in.carrying_out_organization_id := 2864; /*Cons. West*/
l_project_in.project_status_code := 'UNAPPROVED';
l_project_in.start_date := '01-JAN-11';
l_project_in.completion_date := '31-DEC-11';
l_project_in.description := 'Trying Hard';
l_project_in.project_relationship_code := 'Primary';
-- L_KEY_MEMBERS: To load the key member table we load individual
-- key member records and assign them to the key member table. In
-- the example below I am selecting all of the key member setup
-- from an existing project with 4 key members ('EE-Proj-01'):
for km in get_key_members loop
-- Get the next record and load into key members record:
l_key_member_rec.person_id := km.person_id;
l_key_member_rec.project_role_type := km.project_role_type;
-- Assign this record to the table (array)
l_key_members(km.rownum) := l_key_member_rec;
end loop;
-- L_CLASS_CATEGORIES: commented out below should fix the error we get
-- because the template does not have an assigment for the mandatory class
-- 'BAS Test'
l_class_category_rec.class_category := 'Product';
l_class_category_rec.class_code := 'Non-classified';
-- Assign the record to the table (array)
l_class_categories(1) := l_class_category_rec;
-- L_TASKS_IN: We will load in a single task and a subtask providing only
-- the basic fields (see pp. 5-16,5-17,5-18 for the definition of
-- the task record)
l_task_rec.pm_task_reference := '1';
l_task_rec.pa_task_number := '1';
l_task_rec.task_name := 'Construction';
l_task_rec.pm_parent_task_reference := '' ;
l_task_rec.task_description := 'Plant function';
-- Assign the top task to the table.
l_taskS_in(1) := l_task_rec;
-- Assign values for the sub task
l_task_rec.pm_task_reference := '1.1';
l_task_rec.pa_task_number := '1.1';
l_task_rec.task_name := 'Brick laying';
l_task_rec.pm_parent_task_reference := '1' ;
l_task_rec.task_description := 'Plant building';
-- Assign the subtask to the task table.
l_tasks_in(2) := l_task_rec;
-- All inputs are assigned, so call the API:
pa_project_pub.create_project
(p_api_version_number => l_api_version_number,
p_commit => l_commit,
p_init_msg_list => l_init_msg_list,
p_msg_count => l_msg_count,
p_msg_data => l_msg_data,
p_return_status => l_return_status,
p_workflow_started => l_workflow_started,
p_pm_product_code => l_pm_product_code,
p_project_in => l_project_in,
p_project_out => l_project_out,
p_key_members => l_key_members,
p_class_categories => l_class_categories,
p_tasks_in => l_tasks_in,
p_tasks_out => l_tasks_out);
-- Check the return status, if it is not success, then raise message handling
-- exception.
IF l_return_status != 'S' THEN
dbms_output.put_line('Msg_count: '||to_char(l_msg_count));
dbms_output.put_line('Error: ret status: '||l_return_status);
RAISE API_ERROR;
END IF;
-- perform manual commit since p_commit was set to False.
COMMIT;
--HANDLE EXCEPTIONS
EXCEPTION
WHEN API_ERROR THEN
FOR i IN 1..l_msg_count LOOP
pa_interface_utils_pub.get_messages(
p_msg_count => l_msg_count,
p_encoded => l_encoded,
p_msg_index => i,
p_msg_data => l_msg_data,
p_data => l_data,
p_msg_index_out => l_msg_index_out);
dbms_output.put_line('ERROR: '||to_char(l_msg_index_out)||': '||l_data);
END LOOP;
rollback;
WHEN OTHERS THEN
dbms_output.put_line('Error: '||sqlerrm);
FOR i IN 1..l_msg_count LOOP
pa_interface_utils_pub.get_messages(
p_msg_count => l_msg_count,
p_encoded => l_encoded,
p_msg_index => i,
p_msg_data => l_msg_data,
p_data => l_data,
p_msg_index_out => l_msg_index_out);
dbms_output.put_line('ERROR: '||to_char(l_msg_index_out)||': '||l_data);
END LOOP;
rollback;
END;
===
Msg_count: 1
Error: ret status: E
ERROR: 1: Project: 'AGL-AMG Project 1123'
Source template ID is invalid.
PL/SQL procedure successfully completed.I was using a custom Application, which had a id other then 275 (which belongs to Oracle projects)
-
Error while creating Time Card Using API
Hello
I have a requirement to run OTL Interface once day to create/update Time Card in OTL for those datea created on sysdate-1 in Service Module (data will get feeded from Service Module). For example this interface will run on sysdate to create time cards for those data created in the service module on sysdate-1.
I have some sample data and code I am using but it is erroring out with different errors..Can anybody help me on this
My Interface should run as expected below and my time card range will be Monday 24-Dec-2012 to Sunday 30-Dec-2012
Interface Run Date Time Entry to process
25-Dec-2012 24-Dec-2012 Data
26-Dec-2012 25-Dec-2012 Data
CREATE OR REPLACE PROCEDURE main_process (o_errbuf OUT VARCHAR2,
o_ret_code OUT NUMBER,
l_chr_from_date IN VARCHAR2,
l_chr_to_date IN VARCHAR2)
IS
l_chr_skip VARCHAR2 (1);
l_chr_task_exists VARCHAR2 (100);
l_chr_error_msg VARCHAR2 (4000);
l_num_tbb_id NUMBER;
l_num_request_id NUMBER := fnd_global.conc_request_id;
l_num_login_id NUMBER := fnd_global.login_id;
l_num_user_id NUMBER := fnd_global.user_id;
l_num_resp_id NUMBER := fnd_Profile.VALUE ('resp_ID');
l_num_otl_appl_id CONSTANT NUMBER (3) := 809; -- This is the appl_id for OTL, do not change
l_chr_proj_attr1 CONSTANT VARCHAR2 (7) := 'Task_Id';
l_chr_proj_attr2 CONSTANT VARCHAR2 (10) := 'Project_Id';
l_chr_proj_attr3 CONSTANT VARCHAR2 (16) := 'Expenditure_Type';
l_chr_proj_attr4 CONSTANT VARCHAR2 (19) := 'Expenditure_Comment';
l_chr_proj_attr5 CONSTANT VARCHAR2 (23) := 'SYSTEM_LINKAGE_FUNCTION';
i_num_count NUMBER;
i_num_rows_inserted NUMBER := NULL;
l_chr_message fnd_new_messages.MESSAGE_TEXT%TYPE;
l_chr_hdr_eligible VARCHAR2 (5);
l_tbl_timecard_info hxc_self_service_time_deposit.timecard_info;
l_tbl_attributes_info hxc_self_service_time_deposit.app_attributes_info;
l_tbl_messages hxc_self_service_time_deposit.message_table;
l_new_timecard_id NUMBER;
l_new_timecard_ovn NUMBER;
l_num_time_building_block_id hxc_time_building_blocks.time_building_block_id%TYPE;
I NUMBER; --PENDING REMOVE
l_message VARCHAR2 (2000); --PENDING REMOVE
l_time_building_block_id NUMBER; --PENDING REMOVE
CURSOR process_line
IS
SELECT ROWID ROW_ID, a.*
FROM xxpowl.xxpowl_hxt_otl_intf a
WHERE 1 = 1 --a.request_id = l_num_request_id
AND a.status_flag = 'NEW' -- 'VALID'
AND a.error_desc IS NULL
AND a.service_activity_type IS NOT NULL;
BEGIN
FND_FILE.PUT_LINE (
fnd_file.LOG,
'Entered From Date:'
|| (TO_DATE ( (l_chr_from_date), 'YYYY/MM/DD HH24:MI:SS')));
FND_FILE.PUT_LINE (
fnd_file.LOG,
'Entered To Date:'
|| (TO_DATE ( (l_chr_to_date), 'YYYY/MM/DD HH24:MI:SS')));
FND_GLOBAL.APPS_INITIALIZE (user_id => l_num_user_id,
resp_id => l_num_resp_id,
resp_appl_id => l_num_otl_appl_id);
BEGIN
FND_FILE.PUT_LINE (
fnd_file.LOG,
'Inserting the data in the custom table XXPOWL_HXT_OTL_INTF');
INSERT INTO xxpowl.XXPOWL_HXT_OTL_INTF (SR_NUMBER,
PROJECT_TASK_OWNER,
PROJECT_TASK_OWNER_PERSON_ID,
PROJECT_ID,
PROJECT_TASK_ID,
ASSIGNEE,
ASSIGNEE_ID,
ASSIGNEE_PERSON_ID,
ASSIGNEE_SUPERVISOR_PERSON_ID,
TASK_NUMBER,
PARENT_TASK_NUMBER,
DEBRIEF_NUMBER,
DEBRIEF_HEADER_ID,
DEBRIEF_DATE,
TASK_ASSIGNMENT_ID,
DEBRIEF_OBJECT_VERSION_NUMBER,
DEBRIEF_PER_COMPLETE,
DEBRIEF_LINE_ID,
DEBRIEF_PROCESS,
SERVICE_ACTIVITY,
SERVICE_ACTIVITY_TYPE,
INVENTORY_ITEM_ID,
ITEM,
BUSINESS_PROCESS_ID,
DEBRIEF_TRANSACTION_TYPE_ID,
DEBRIEF_UOM_CODE,
DEBRIEF_HOURS,
CONV_DEBRIEF_IN_HOURS,
DEBRIEF_START_TIME,
DEBRIEF_END_TIME,
DEBRIEF_SERVICE_DATE,
NOTES,
OTL_ELIGIBLE_FLAG,
NOTIF_SENT_FLAG,
NOTIF_ELIGIBLE_FLAG,
ERROR_DESC,
STATUS_FLAG,
INITIAL_NOTIF_SENT_DATE,
CREATION_DATE,
CREATED_BY,
LAST_UPDATE_DATE,
LAST_UPDATED_BY,
LAST_UPDATE_LOGIN,
REQUEST_ID,
INITIAL_REQUEST_ID)
(SELECT b.incident_number sr_number,
h.resource_name project_task_owner,
h.source_id project_task_owner_person_id,
b.external_attribute_1 project_id,
b.external_attribute_2 project_task_id,
jtf_task_utl.get_owner (d.resource_type_code, d.resource_id)
assignee,
d.resource_id assignee_id,
jrre.source_id assignee_person_id,
paa.supervisor_id assignee_supervisor_person_id,
c.task_number task_number,
(SELECT task_number
FROM jtf_tasks_b z
WHERE c.parent_task_id = z.task_id)
parent_task_number,
a.debrief_number,
a.debrief_header_id debrief_header_id,
a.debrief_date debrief_date,
a.task_assignment_id task_assignment_id,
a.object_version_number debrief_object_version_number,
a.attribute1 debrief_per_complete,
e.debrief_line_id debrief_line_id,
cbp.name debrief_process,
cttv.name service_activity,
DECODE (cttv.attribute1,
'Y', 'Service-Billable',
'N', 'Service-Non Billable')
service_activity_type,
e.inventory_item_id inventory_item_id, --f.segment1 item,
(SELECT segment1
FROM mtl_system_items_b f
WHERE e.inventory_item_id = f.inventory_item_id
AND f.organization_id = b.inv_organization_id)
item, --241 --Mater Org
e.business_process_id business_process_id,
e.transaction_type_id debrief_transaction_type_id,
e.uom_code debrief_uom_code,
e.quantity debrief_hours,
(g.conversion_rate * e.quantity) conv_debrief_in_hours,
e.labor_start_date debrief_start_time,
e.labor_end_date debrief_end_time,
e.service_date debrief_service_date,
(SELECT note_tl.notes
FROM JTF_NOTES_B NOTE, JTF_NOTES_TL NOTE_TL
WHERE NOTE.JTF_NOTE_ID = NOTE_TL.JTF_NOTE_ID
AND NOTE_TL.LANGUAGE = USERENV ('LANG')
AND NOTE.SOURCE_OBJECT_ID = a.DEBRIEF_HEADER_ID
AND note.jtf_note_id =
(SELECT MAX (note1.jtf_note_id)
FROM JTF_NOTES_B note1
WHERE NOTE1.SOURCE_OBJECT_ID =
a.DEBRIEF_HEADER_ID))
notes,
'Y',
'N',
'X',
NULL,
'NEW',
NULL,
SYSDATE,
l_num_user_id,
SYSDATE,
l_num_user_id,
l_num_login_id,
l_num_request_id,
l_num_request_id
FROM csf_debrief_headers a,
cs_incidents_all_b b,
jtf_tasks_b c,
jtf_task_assignments d,
csf_debrief_lines e, --mtl_system_items_b f,
mtl_uom_conversions g,
jtf_rs_resource_extns_vl h,
cs_business_processes cbp,
cs_transaction_types_vl cttv --, cs_sr_task_debrief_notes_v notes
jtf_rs_resource_extns_vl jrre,
per_all_assignments_f paa
WHERE a.task_assignment_id = d.task_assignment_id
AND d.task_id = c.task_id
AND c.source_object_id = b.incident_id
AND c.source_object_type_code = 'SR'
AND a.debrief_header_id = e.debrief_header_id
AND e.uom_code = g.uom_code
AND g.uom_class = 'Time'
AND b.incident_owner_id = h.resource_id(+)
AND e.business_process_id = cbp.business_process_id
AND e.transaction_type_id = cttv.transaction_type_id
AND d.resource_id = jrre.resource_id
AND jrre.source_id = paa.person_id --= 181
AND TRUNC (SYSDATE) BETWEEN paa.effective_start_date
AND paa.effective_end_date
AND TRUNC (e.last_update_date) BETWEEN TO_DATE (
(l_chr_from_date),
'YYYY/MM/DD HH24:MI:SS')
AND TO_DATE (
(NVL (
l_chr_to_date,
l_chr_from_date)),
'YYYY/MM/DD HH24:MI:SS')
AND NOT EXISTS
(SELECT 1
FROM xxpowl.XXPOWL_HXT_OTL_INTF old
WHERE old.debrief_header_id =
e.debrief_header_id
AND old.task_number = c.task_number
AND TRUNC (old.DEBRIEF_SERVICE_DATE) =
TRUNC (e.SERVICE_DATE)
AND old.DEBRIEF_TRANSACTION_TYPE_ID =
e.TRANSACTION_TYPE_ID
AND old.request_id <> l_num_request_id
AND old.DEBRIEF_UOM_CODE = e.uom_code
AND old.DEBRIEF_HOURS = e.quantity));
i_num_rows_inserted := SQL%ROWCOUNT;
fnd_file.put_line (fnd_file.LOG,
'No of rows Inserted:' || i_num_rows_inserted);
COMMIT;
EXCEPTION
WHEN OTHERS
THEN
l_chr_error_msg :=
l_chr_error_msg
|| 'Error while Inserting debrief lines data into custom table.Error: '
|| SQLERRM
|| '. Exiting the interface without processing further';
fnd_file.put_line (fnd_file.LOG, l_chr_error_msg);
ROLLBACK;
RETURN;
END;
FOR process_line_rec IN process_line
LOOP
l_chr_error_msg := NULL;
l_tbl_timecard_info.delete;
l_tbl_attributes_info.delete;
l_tbl_messages.delete;
l_new_timecard_id := NULL;
l_new_timecard_ovn := NULL;
l_num_time_building_block_id := NULL;
l_chr_message := NULL;
i_num_count := 0;
l_num_tbb_id := NULL;
BEGIN
hxc_timestore_deposit.create_time_entry (
p_measure => process_line_rec.conv_debrief_in_hours,
p_day => TO_DATE ( (process_line_rec.debrief_service_date),
'DD/MM/RRRR'),
p_resource_id => process_line_rec.assignee_person_id,
p_comment_text => process_line_rec.notes
|| '....Remove this notes in the code logic....Request Id:'
|| l_num_request_id, --pending lokesh
p_app_blocks => l_tbl_timecard_info,
p_app_attributes => l_tbl_attributes_info,
p_time_building_block_id => l_num_time_building_block_id);
fnd_file.put_line (
fnd_file.LOG,
'Step#1 completed, TIME_BUILDING_BLOCK_ID:'
|| l_num_time_building_block_id);
EXCEPTION
WHEN OTHERS
THEN
l_chr_error_msg :=
l_chr_error_msg
|| '.Error in INSERT API CALL at Step#1 for the debrief line id: '
|| process_line_rec.debrief_line_id
|| '.Error:'
|| SQLERRM;
END;
BEGIN
-- Classify Time
-- Attribute1
hxc_timestore_deposit.create_attribute (
p_building_block_id => l_num_time_building_block_id,
p_attribute_name => 'Task_Id',
p_attribute_value => process_line_rec.project_task_id,
p_app_attributes => l_tbl_attributes_info);
EXCEPTION
WHEN OTHERS
THEN
l_chr_error_msg :=
l_chr_error_msg
|| '.Error in INSERT API CALL at Step#2 for the debrief line id: '
|| process_line_rec.debrief_line_id
|| '.Error:'
|| SQLERRM;
END;
BEGIN
-- Attribute2
hxc_timestore_deposit.create_attribute (
p_building_block_id => l_num_time_building_block_id,
p_attribute_name => 'Project_Id',
p_attribute_value => process_line_rec.project_id,
p_app_attributes => l_tbl_attributes_info);
EXCEPTION
WHEN OTHERS
THEN
l_chr_error_msg :=
l_chr_error_msg
|| '.Error in INSERT API CALL at Step#3 for the debrief line id: '
|| process_line_rec.debrief_line_id
|| '.Error:'
|| SQLERRM;
END;
BEGIN
-- Attribute3
hxc_timestore_deposit.create_attribute (
p_building_block_id => l_num_time_building_block_id,
p_attribute_name => 'Expenditure_Type',
p_attribute_value => 'Service-Billable',
-- p_attribute_value=> 'Service-Non Billable',
p_app_attributes => l_tbl_attributes_info);
EXCEPTION
WHEN OTHERS
THEN
l_chr_error_msg :=
l_chr_error_msg
|| '.Error in INSERT API CALL at Step#4 for the debrief line id: '
|| process_line_rec.debrief_line_id
|| '.Error:'
|| SQLERRM;
END;
BEGIN
-- Attribute4
hxc_timestore_deposit.create_attribute (
p_building_block_id => l_num_time_building_block_id,
p_attribute_name => 'Expenditure_Comment',
p_attribute_value => 'Expenditure Comment created by API',
p_app_attributes => l_tbl_attributes_info);
EXCEPTION
WHEN OTHERS
THEN
l_chr_error_msg :=
l_chr_error_msg
|| '.Error in INSERT API CALL at Step#5 for the debrief line id: '
|| process_line_rec.debrief_line_id
|| '.Error:'
|| SQLERRM;
END;
BEGIN
-- Attribute5
hxc_timestore_deposit.create_attribute (
p_building_block_id => l_num_time_building_block_id,
p_attribute_name => 'SYSTEM_LINKAGE_FUNCTION',
p_attribute_value => 'ST',
p_app_attributes => l_tbl_attributes_info);
EXCEPTION
WHEN OTHERS
THEN
l_chr_error_msg :=
l_chr_error_msg
|| '.Error in INSERT API CALL at Step#6 for the debrief line id: '
|| process_line_rec.debrief_line_id
|| '.Error:'
|| SQLERRM;
END;
BEGIN
hxc_timestore_deposit.execute_deposit_process (
p_validate => FALSE,
p_app_blocks => l_tbl_timecard_info,
p_app_attributes => l_tbl_attributes_info,
p_messages => l_tbl_messages,
p_mode => 'SAVE', -- p_mode-> 'SUBMIT', 'SAVE', 'MIGRATION', 'FORCE_SAVE' or 'FORCE_SUBMIT'
p_deposit_process => 'OTL Deposit Process',
p_timecard_id => l_new_timecard_id,
p_timecard_ovn => l_new_timecard_ovn);
COMMIT;
hxc_timestore_deposit.log_messages (p_messages => l_tbl_messages);
IF (l_tbl_messages.COUNT <> 0)
THEN
l_chr_error_msg :=
l_chr_error_msg
|| '.Error in INSERT API CALL at Step#7 for the debrief line id: '
|| process_line_rec.debrief_line_id
|| '.Error:'
|| SQLERRM
|| '.API Error messages are:';
i_num_count := l_tbl_messages.FIRST;
LOOP
EXIT WHEN (NOT l_tbl_messages.EXISTS (i_num_count));
l_chr_message :=
fnd_message.get_string (
appin => l_tbl_messages (i_num_count).application_short_name,
namein => l_tbl_messages (i_num_count).message_name);
fnd_file.put_line (
fnd_file.LOG,
(l_tbl_messages (i_num_count).message_name));
l_chr_error_msg := l_chr_error_msg || l_chr_message || '.';
i_num_count := l_tbl_messages.NEXT (i_num_count);
END LOOP;
END IF;
EXCEPTION
WHEN OTHERS
THEN
fnd_file.put_line (
fnd_file.LOG,
'**** Error.....Inside Exception Block in execute_deposit_process');
BEGIN
hxc_timestore_deposit.log_messages (
p_messages => l_tbl_messages);
EXCEPTION
WHEN OTHERS
THEN
fnd_file.put_line (
fnd_file.LOG,
'*****Error....Inside Exception Block in hxc_timestore_deposit.log_messages.Error:'
|| SQLERRM);
END;
l_chr_error_msg :=
l_chr_error_msg
|| 'Error in INSERT API CALL at Step#7 for the debrief line id: '
|| process_line_rec.debrief_line_id
|| '.Error:'
|| SQLERRM
|| '.API Error messages are:';
IF (l_tbl_messages.COUNT <> 0)
THEN
i_num_count := l_tbl_messages.FIRST;
LOOP
EXIT WHEN (NOT l_tbl_messages.EXISTS (i_num_count));
l_chr_message :=
fnd_message.get_string (
appin => l_tbl_messages (i_num_count).application_short_name,
namein => l_tbl_messages (i_num_count).message_name);
l_chr_error_msg := l_chr_error_msg || l_chr_message || '.';
i_num_count := l_tbl_messages.NEXT (i_num_count);
END LOOP;
END IF;
END;
COMMIT;
IF l_chr_error_msg IS NOT NULL OR l_new_timecard_id IS NULL
THEN
fnd_file.put_line (fnd_file.LOG,
'***** Error *****' || l_chr_error_msg);
o_ret_code := 1;
END IF;
BEGIN
fnd_file.put_line (
fnd_file.LOG,
'Updating the status of the record in custom table for debrief_line_id:'
|| process_line_rec.debrief_line_id);
UPDATE xxpowl.XXPOWL_HXT_OTL_INTF
SET status_flag =
DECODE (
l_chr_error_msg,
NULL, DECODE (
l_new_timecard_id,
NULL, 'FAILED',
DECODE (SIGN (l_new_timecard_id),
'1', 'SUCESS',
'FAILED')),
'FAILED'),
time_building_block_id = l_new_timecard_id,
last_update_date = SYSDATE,
request_id = l_num_request_id,
last_updated_by = l_num_user_id,
error_desc = l_chr_error_msg
WHERE ROWID = process_line_rec.row_id;
COMMIT;
EXCEPTION
WHEN OTHERS
THEN
l_chr_error_msg :=
l_chr_error_msg
|| '.Error while updating the status to SUCCESS.Error: '
|| SQLERRM;
END;
END LOOP; --process_line
EXCEPTION
WHEN OTHERS
THEN
FND_FILE.PUT_LINE (
fnd_file.LOG,
'Unknown/Unhandlled Exception Error......' || SQLERRM);
o_ret_code := 2;
END main_process;
SHOW ERR;
Error Messages:
1. Error in INSERT API CALL at Step#7 for the debrief line id: 41011.Error:ORA-00001: unique constraint (HXC.HXC_ROLLBACK_TIMECARDS_PK) violated.
2. Error in INSERT API CALL at Step#7 for the debrief line id: 41011.Error:ORA-00001: unique constraint (HXC.HXC_LATEST_DETAILS_FK) violated
Thanks a lot for the help!Hello
We will get this error message when we run this from application other than "Time and Labor Engine". So try to run this concurrent program (if you registered as a conc. program) from Time and Labor Engine application.
--Lokesh -
Getting error when rasing request in OIM using API
Hi,
I am getting the following error when I am trying to raise a request from outside OIM using OIM API's.
Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/persistence/indirection/ValueHolderInterface
at accesspolicycreation.createRequestWeb.getAttr(createRequestWeb.java:183)
at accesspolicycreation.createRequestWeb.createRequest(createRequestWeb.java:124)
at accesspolicycreation.createRequestWeb.executeCreateRequest(createRequestWeb.java:199)
at accesspolicycreation.createRequestWeb.main(createRequestWeb.java:66)
Caused by: java.lang.ClassNotFoundException: org.eclipse.persistence.indirection.ValueHolderInterface
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:305)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:246)
Please let me know how to fix this issue.
ThanksHi Rajiv,
Thanks for the reply.
I was able to solve the porblem by adding org.eclipse.persistence_1.1.0.0_2-1.jar in the classpath.
Thanks -
How to create Approval Policies using API - OIM 11g R2
Hi,
Could you please let me know how to create the Approval Policies using java API code in OIM 11g R2.
ThanksHi Karthik,
Thanks for sharing the link. Could you please let me know how to specify the rule condition while creating the Approval Policy using the API given in this link. -
Why Dynamic Parameter is not working, when i create report using stored procedure ?
Post Author: Shashi Kant
CA Forum: General
Hi all
Why Dynamic Parameter is not working, when i create report XI using stored procedure ?
Only i shaw those parameters which i used in my stored procedure, the parameter which i create dynamic using stored procedure
is not shown to me when i referesh the report for viewing the results.
I have used the same procedure which i mention below but can not seen the last screen which is shown in this .
============================================================================================
1. Select View > Field Explorer2. Right-click on Parameter Fields and select New from the right-click menu.3. Enter u201CCustomer Nameu201D as the name for your parameter4. Under u201CList of Valuesu201D select u201CDynamicu201D5. Under the Value column, click where is says u201Cclick here to add itemu201D and select Customer Name from the drop-down list. The dialog shown now look like the one shown below in Figure 1. Click OK to return to your report design.
Dynamic Parameter Setup6. Next, select Report > Select Expert, select the Customer Name field and click OK.7. Using the drop-down list beside select u201CIs Equal Tou201D and using the drop-down list, select your parameter field (it should be the first field). 8. Click OK to return to your report design and see the parameter dialog.The parameter dialog will appear and show you a dynamic list of values that is updated each time your run your report. It couldnu2019t be easier! In our next tutorial, we will be looking at how to use this feature to create cascading parameter fields, where the values are filtered by the preceding selection.
Dynamic Parameters in Action
My question is that whether dynamic parameter is working with storedprocedure or not.
When i added one table and try to fetch records using dyanmic prameters. after that i am not be able to find the dynamic parameter option when i referesh my report.
One more thing when i try the static parameter for my report, the option i see when i referesh the screen.
Please reply soon , it's urgent
Regards
shashi kantHi Kishore,
I have tested the issue step by step by following you description, while the first issue works well in my local environment. Based on my research, this can be caused by the lookup expression or it indeed return Male value based on the logic. If you use the
expression below, it will indeed only return the Male record. So please try to double-check the record in the two datasets and the expression in your environment:
=lookup(first(Fields!ProgramID.Value,"DataSet1"),Fields!ProgramID.Value,Fields!Gender.Value,"DataSet2")
As to the second issue, please try to use the following expression:
=Count(Lookup(fields!ProgramID.value,fields!ProgramID.value,fields!Gender.value,"DataSet2"))
Besides, if this issue still exist, in order to trouble shoot this issue more efficiently, could you please post both the .rdl file with all the size properties to us by the following E-mail address? It is benefit for us to do further analysis.
E-mail: [email protected]
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
Purchase Order Workflow event trigered when i create the Schedule Agrrement using ME31l.
Hi expert,
When i create Schedule agreement using me31l it will raise the PO workflow instead of SA Workflows. ? where is the configuration mismatch happen ?HelloTithira,
I'm very sorry to admit that I haven't entirely looked at a running system when talking about the CEKKO. You're absolutely right that the document category type is not part of it and you couldn't proceed with maintaining the classification in that way.
I did mention the BSTYP field, as I was used to have the field available, as I usually add this at the first place when starting a project for PO-releases.
As far as I remember, there's a MOVE-CORRESPONDING statement at one point, where the CEKKO structure is initialized, from the EKKO structure that is available. So when you name an APPEND-field of the CEKKO structure BSTYP having the same type as the EKKO, you should find that field filled, without(!) implementing the CEKKO user exit yourself.
It this doesn't help either, please implement the CEKKO user exit to fill your BSTYP field.
If nothing helps at that point, and you're still stuck, you can enable a "Workflow start condition" for the two events on BUS2012.ReleaseStepCreated and the same for BUS2013, where you check the EKKO-BSTYP of the BOR Business Object types against the corresponding object, i.e.
_EventObject.PurchasingCategory = 'F' (For the event on BUS2012)
Do get the PurchasingCategory, you'll need to subtype and delegate systemwide and create a database field for EKKO table, choosing the field BSTYP. Do this for both the BUS2012 and the BUS2012 or a common super-type if you find so.
With the very best wishes
Florin -
Creation of a Request in OIM 11G using API's
Hi Friends,
I am trying to create a request using OIM 11g API's.
I am trying to do this for EBS Responsibility resource and this resource has a request dataset has EBS-IT-Resource-Instance, application name, responsibility name, start date and security group. Please note application name, responsibility name, start date and security group are in child form.
I am trying to populate the request dataset using the below code.
List<RequestBeneficiaryEntityAttribute> entityAttrList;
RequestBeneficiaryEntity entity = null;
entityAttrList = new ArrayList<RequestBeneficiaryEntityAttribute>();
entity = new RequestBeneficiaryEntity();
tcITResourceInstanceOperationsIntf tcITResourceIntf = Platform.getService(tcITResourceInstanceOperationsIntf.class);
HashMap searchcriteria = new HashMap<String, String>();
searchcriteria.put("IT Resources.Name", "EBSHF-APPS12");
tcResultSet resultSet = tcITResourceIntf.findITResourceInstances(searchcriteria);
long itResourceKey=resultSet.getLongValue("IT Resources.Key");
entityAttrList.add(this.getAttrLong("eBusiness Suite Instance Name",itResourceKey));
entityAttrList.add(this.getAttr("Application Name","3~300"));
entityAttrList.add(this.getAttr("Responsibility Name", "3~300~52281"));
entityAttrList.add(this.getAttr("Security Group", "3~0"));
entity.setEntityKey(getResourceKey("Oracle eBusiness Responsibility"));
entity.setEntityType(RequestConstants.RESOURCE);
entity.setEntitySubType("Oracle eBusiness Responsibility");
entity.setEntityData(entityAttrList);
private RequestBeneficiaryEntityAttribute getAttr(String name, String value)
RequestBeneficiaryEntityAttribute attr = null;
attr = new RequestBeneficiaryEntityAttribute(name, value, RequestBeneficiaryEntityAttribute.TYPE.String);
return attr;
private RequestBeneficiaryEntityAttribute getAttrLong(String name, long value)
RequestBeneficiaryEntityAttribute attr = null;
attr = new RequestBeneficiaryEntityAttribute(name, value, RequestBeneficiaryEntityAttribute.TYPE.Long);
return attr;
My code is working fine and a request is getting created. But when I try to open the request dataset(object form) for the newly created request, I am getting null exceptions.
If I did not populate the fields that are in the child form application name, responsibility name and security group which are highlighted above, then I am able to view the form with the correct IT-Resource-Instance name after request creation.
So, I am thinking I am doing something wrong while populating child form data in the request dataset.
Can you please provide me some code snippet to populate the child using 11G API'S?Hi Bikash,
After referring your code, i made changes in mine. Here is my updated code.
RequestBeneficiaryEntityAttribute parantAttr=null;
List<RequestBeneficiaryEntityAttribute> entityAttrList;
RequestBeneficiaryEntity entity = null;
entity = new RequestBeneficiaryEntity();
parantAttr=this.getAttrLong("eBusiness Suite Instance Name", itResourceKey);
RequestBeneficiaryEntityAttribute mid1 = new RequestBeneficiaryEntityAttribute();
List <RequestBeneficiaryEntityAttribute> childAttributesList = new ArrayList<RequestBeneficiaryEntityAttribute>();
childAttributesList.add(this.getAttr("Application Name", "3~555"));
childAttributesList.add(this.getAttr("Responsibility Name", "3~555~22862"));
childAttributesList.add(this.getAttr("Security Group", "3~0"));
mid1.setChildAttributes(childAttributesList);
mid1.setAction(RequestBeneficiaryEntityAttribute.ACTION.Add);
entityAttrList = new ArrayList<RequestBeneficiaryEntityAttribute>();
entityAttrList.add(parantAttr);
entityAttrList.add(mid1);
But when I try to run this, it is getting failed saying "RequestServiceException: IAM-2050033:Invalid attribute name null. No corresponding reference was found in the data set ProvisionResourceOracle eBusiness Responsibility".
Here is my request data set for your reference.
<AttributeReference name="eBusiness Suite Instance Name" attr-ref="eBusiness Suite Instance Name" type="Long" length="50" widget="itresource-lookup" required="true" available-in-bulk="true" itresource-type="eBusiness Suite UM"/>
<AttributeReference available-in-bulk="true" length="10" widget="text" type="String" attr-ref="UD_EBH_RSCP" name="EBS HR Foundation User Responsibilities">
<AttributeReference name="Application Name" attr-ref="Application Name" type="String" length="256" widget="lookup-query" available-in-bulk="true" required="true">
<lookupQuery lookup-query="select lkv_encoded as Value,lkv_decoded as Description from lkv lkv, lku lku where lkv.lku_key=lku.lku_key and lku_type_string_key='Lookup.EBS.Application' and lkv_encoded like concat('$Form data.eBusiness Suite Instance Name', '~%')" display-field="Description" save-field="Value"/>
</AttributeReference>
<AttributeReference name="Responsibility Name" attr-ref="Responsibility Name" type="String" length="256" widget="lookup-query" available-in-bulk="true" required="true" primary="true">
<lookupQuery lookup-query="select lkv_encoded as Value,lkv_decoded as Description from lkv lkv,lku lku where lkv.lku_key=lku.lku_key and lku_type_string_key='Lookup.EBS.Responsibility' and lkv_encoded like concat('$Form data.Application Name','~%')" display-field="Description" save-field="Value"/>
</AttributeReference>
<AttributeReference name="Security Group" attr-ref="Security Group" type="String" length="256" widget="lookup-query" available-in-bulk="true" required="true">
<lookupQuery lookup-query="select lkv_encoded as Value,lkv_decoded as Description from lkv lkv, lku lku where lkv.lku_key=lku.lku_key and lku_type_string_key='Lookup.EBS.SecurityGroup' and lkv_encoded like concat('$Form data.eBusiness Suite Instance Name', '~%')" display-field="Description" save-field="Value"/>
</AttributeReference>
I am not sure why it is not referencing to the attribute. In your blog, it is saying your code is to set process form. But i am trying to create a request using API's. so, I need some code snippet to populate request dataset. Do you think, this will serve both?
Thanks for your help. -
WebCenter Sites Query Content using API
Hi all,
I have created a asset called "TVLContent" and for this asset, I created 2 attributes: "Question" and "Answer".
I need to create a query search using API, to get any content where "Question" or "Answer" attribute contains "Why".
I'm using the line code below, for searching, but doesn't work.
-----Code
Session ses = SessionFactory.getSession();
Condition c1 =ConditionFactory.createCondition("Question", OpTypeEnum.LIKE, "%Why%");
Condition c2 =ConditionFactory.createCondition("Answer", OpTypeEnum.LIKE, "%Why%" );
Query query = new SimpleQuery( "TVLContent", "FAQs", c1.or(c2) , Arrays.asList("name", "id", "Question", "Answer"));
query.getProperties().setIsBasicSearch(true);
AssetDataManager mgr = (AssetDataManager) ses.getManager(AssetDataManager.class.getName());
List<Long> firstResults = new ArrayList<Long>();
for(AssetData data : mgr.read(query)) {
//read data, e.g. data.getAttributeData("Question").getData()
------Code
If I change the query condition to c1 only, the query works fine,
e.g. Query query = new SimpleQuery( "TVLContent", "FAQs", c1 , Arrays.asList("name", "id", "Question", "Answer"));
If I change the query condition to c2 only, the query works fine.
e.g. Query query = new SimpleQuery( "TVLContent", "FAQs", c2 , Arrays.asList("name", "id", "Question", "Answer"));
But when I create a new condition (c1.or(c2)) doesn't work.
e.g. Query query = new SimpleQuery( "TVLContent", "FAQs", c1.or(c2) , Arrays.asList("name", "id", "Question", "Answer"));
How to fix this?
What's the best way to create this query using API?
See below the attribute definition:
Name: Question
Attribute Type: text
Attribute Editor: TVLTextArea
TVLTextArea XML (
<?XML VERSION="1.0"?>
<!DOCTYPE PRESENTATIONOBJECT SYSTEM "presentationobject.dtd">
<PRESENTATIONOBJECT NAME="TEXTAREA">
<TEXTAREA WRAPSTYLE ="SOFT"></TEXTAREA >
</PRESENTATIONOBJECT>
Name: Answer
Attribute Type: text
Attribute Editor: TVLCKEditor
TVLCKEditor XML (
<?XML VERSION="1.0"?>
<!DOCTYPE PRESENTATIONOBJECT SYSTEM "presentationobject.dtd">
<PRESENTATIONOBJECT NAME="TEXTAREA">
<TEXTAREA WRAPSTYLE ="SOFT"></TEXTAREA >
</PRESENTATIONOBJECT>
}Hello,
Can you share the condition which you are trying to pass?
Try something like this example;
Condition condition = ConditionFactory.createCondition( <ATTRIBUTE NAME>, OpTypeEnum.EQUALS, <ATTRIBUTE VALUE> );
List<String> attributes = new ArrayList<String>();
attributes.add(<ATTRIBUTE NAMES>); // add as many as required
SortOrder sortOrder = new SortOrder(<Attribute Name to sortby>, <ORDER - Ascending or Descending>);
Query query = new SimpleQuery( <Asset Type>, null, condition, attributes, Collections.singletonList(sortOrder));
for( AssetData data : assetDataManager.read( query ) ) {
// get all the data as mentioned here: http://docs.oracle.com/cd/E29542_01/doc.1111/e29634/asset_api_tutorial.htm#WBCSD2395
Note: Import correct classes in your template or CSElement.
Regards,
Guddu -
Create java procedure using jdbc
Hi,
I am trying to create java procedure using jdbc connection, I am using Oracle 11.2. When I create the procedure using sqlplus it works fine. Using jdbcit fails; code sniplet below:
ddl =
"create or replace java source named \"UTLCMD\" as \r\n"+
"import java.lang.Runtime; \r\n"+
"public class execHostCommand \r\n"+
"{ \r\n"+
"public static void execute (String command) \r\n"+
" throws java.io.IOException \r\n"+
" { \r\n"+
" Runtime rt = java.lang.Runtime.getRuntime(); \r\n"+
" rt.exec(command); \r\n"+
" } \r\n"+
statement = conn.createStatement();
statement.executeUpdate(ddl);
I am getting this error:
2013-01-26 12:45:31.835 UTC: ERROR: Exception "java.sql.SQLException: ORA-29536: badly formed source: Encountered "ublic" at line 3, column 1.
Was expecting one of:
"extends" ...
"implements" ...
"<" ...
". Stack dump:Hi,
We can load java class using blob column, for example :
create or replace and compile java class using blob select code from java_code;If class is OK, but resolution of referenced names to other classes failed, statement.execute() will not show any error and we need to 'select from user_errors' view for errors. How can we got the required object name for loaded class?
Maybe you are looking for
-
User based uninstall collections - Dynamic
Hi Guys, I have been looking for sometime at how User based uninstalls are done and I see that mostly people do an Exclude on the collection and deploy an uninstall to basically everyone who DOESNT have the application deployed to them. The issue wit
-
Adobe form -- Issue in Displaying Dynamic text along with Static text
Hi All, I am having an issue when i am displaying a dynamic text along with static text in adobeforms. The dynamic text is slightly coming down and not aligned with the static text. i can see half row it is coming down. how to align both texts to be
-
I can't sign in to my game center after I update it to ios7.
I have a game center account and a appstore account. My game center account only have a username. Two accounts have the same e-mail. After I update my iPhone to ios7 I can't log into my game center. What can I do to get my game center account back? C
-
TS2446 My ID has been disabled
My ID has been disabled and do not know how to fix it. I live in Lebanon which is not listed among the countries for support, can you help?I have tried to change my password but did not help
-
Purchased iTunes movies won't sync
I purchased a couple of movies and an audio book from iTunes. All my music syncs, but when I try to sync the movies and book my iPod crashes (freezes). I have tried the movies and book individually, but each time my iPod crashes. The only thing that