Need to call DB func on create in ADF BC
Hi OTN,
I have a taskflow for creating new records in some related tables with business components. For key attributes I use DBSequence type. So while creating new records I have temporary negative keys.
For some cases I need to calculate attribute values with a DB function. This function takes a key as a parameter and updates certain attributes.
For this on value change listener I call a ViewObject operation://backingbean value change listener
if(...){
ADFUtils.findOperation("function").execute();
// ViewObjectImpl::function() {
getDBTransaction().createStatement().execute("declare x integer; begin x := func("
+getCurrentRow().getAttribute("IdContentVersion")+");end;");
}But nothing happens as I still have a temporary negative key and function can't find it.
For recieving the real key I trued to use getDBTransaction().postChanes();
But after that line getCurrentRow() returns null and now I don't have a pointer to the row.
I can't use a DB trigger for this.
I also do not want to call this function in doDML as I only need to it on change of one attribute.
Tried saving Row row = getCurrentRow() and calling the function with its key which becomes real and positive after postChanges(), but still no luck.
Seems, DB function can't find the row.
Need your advice, please.
Thanks.
ADF 11.1.1.4
up
Edited by: ILya Cyclone on Sep 30, 2011 2:27 PM
Ilya,
First of all, unless you have committed (or at least posted) the record to the DB, your function is not going to be able to see it, so you will have to get the record at least posted somehow.
Secondly, you can eagerly set the sequence value using a technique shown in [url http://download.oracle.com/docs/cd/E16162_01/web.1112/e16182/bcrules.htm#sthref308]the docs
John
Similar Messages
-
Need to call up a webservice created in external system from SAP
Hi folks,
A web service is created in the external system and I need to access this web service from a BADI. Can you tell me how can I call this web service (the external system is giving me a URL) and how to capture the return value from the web service. Please let me know in detail.
Thanks,
PremHi,
I have the same requirement and have created a new Proxy-Object, uploaded the WSDL file (locally) and Created a Logical port.
In the Logical Port under the tab Call Parameter I've defined the URL of the web-service.
Since I was not able to upload the WSDL by selecting the option URL/HTTP Destination due to error message "HTTP error (return code 400, message "ICM_HTTP_CONNECTION_FAILED")
Message no. SPRX090" so uploaded the file locally.
However, when testing the service, I didn't received a sucess message but:
<CX_AI_SYSTEM_FAULT>
<CODECONTEXT>Local</CODECONTEXT>
<CODE> ERROR_WEBSERVICE_RUNTIME_INIT </CODE>
<ERRORTEXT> Error when instantiating the Web service runtime (Error when initializing SOAP client application: ' error_text' ) </ERRORTEXT>
<LANGUAGE />
</CX_AI_SYSTEM_FAULT>
</cls:CX_AI_SYSTEM_FAULT>
What might be the Problem ?
/Manik -
New to Web Services - need to call a HTTPS web service from PL/SQL
I am new to Web Services and need to call HTTPS web service from PL/SQL program. I am using 10g Database.
I have been reading there are 2 options -
1. UTL_HTTP - with this package its possible to call HTTPS web services
2. UTL_DBWS
Questions -
1. Is it possible to call a HTTPS web service using UTL_DBWS ? I have not been able to find any information on it.
2. Can someone point me to UTL_HTTP and UTL_DBWS examples calling a HTTPS web service ?
3. The HTTPS web service that I need to call needs username/password to connect - how will I incorporate this in the pl/sql code ?
Appreciate the help.
Cheers,
newWebServicesUserHi,
1. UTL_DBWS not work for https from what I understand
2. Here is a sample example:
[http://www.oracle-base.com/articles/9i/ConsumingWebServices9i.php#]
Be careful, you must change http/1.0 IN 1.1 inside package SOAP_API.
Here is an example for a prime number where the SOAP message is already construct:
CREATE OR REPLACE procedure test_ws_2
IS
http_req utl_http.req;
http_resp utl_http.resp;
request_env varchar2(32767);
response_env varchar2(32767);
begin
-- Set proxy details if no direct net connection.
UTL_HTTP.set_proxy('http://<USER>:<PASS>@10.0.2.21:8070', NULL);
UTL_HTTP.set_persistent_conn_support(TRUE);
request_env:='<?xml version="1.0" encoding="utf-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema">'||
'<SOAP-ENV:Body><GetPrimeNumbers xmlns="http://microsoft.com/webservices/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">'||
'<max xsi:type="xsd:int">10</max>'||
'</GetPrimeNumbers></SOAP-ENV:Body></SOAP-ENV:Envelope>';
dbms_output.put_line('Length of Request:' || length(request_env));
dbms_output.put_line ('Request: ' || request_env);
http_req := utl_http.begin_request('http://www50.brinkster.com/vbfacileinpt/np.asmx','POST', utl_http.HTTP_VERSION_1_1);
utl_http.set_header(http_req, 'Content-Type', 'text/xml; charset=utf-8');
utl_http.set_header(http_req, 'Content-Length', length(request_env));
utl_http.set_header(http_req, 'SOAPAction', '"http://microsoft.com/webservices/GetPrimeNumbers"');
utl_http.write_text(http_req, request_env);
dbms_output.put_line('');
http_resp := utl_http.get_response(http_req);
dbms_output.put_line('Response Received');
dbms_output.put_line('--------------------------');
dbms_output.put_line ( 'Status code: ' || http_resp.status_code );
dbms_output.put_line ( 'Reason phrase: ' || http_resp.reason_phrase );
utl_http.read_text(http_resp, response_env);
dbms_output.put_line('Response: ');
dbms_output.put_line(response_env);
utl_http.end_response(http_resp);
end test_ws_2;
Otherwice for testing url, i recommand you to use that function: Re: Error using UTL_HTTP over HTTPS
it's a verry helpful function when you have an error.
wrote:
When testing using UTL_HTTP, you MUST ensure that you open a new session after importing the SSL certificates into your Wallet,
as I've learned (the hard way) that existing sessions point to the wallet contents that were present when the session was opened.
If you don't realise/know this, it can cause a lot of additional frustration during testing, when you keep getting the ORA-29024 exception AFTER
you've imported the SSL certificates................. ;) 3. i think you can use that after the begin_request but not sure :
UTL_HTTP.set_authentication(r => http_req,
username => ,
password => ,
scheme => ,
for_proxy => );
Edited by: Malebodja on Oct 22, 2009 6:53 AM
Edited by: Malebodja on Oct 22, 2009 6:55 AM -
I need to know the Object that created my Object
help needed!!
From inside a method of myclass, I want to call a method of the class that created myclass..
public class BSQL{
private Manager m;
public void BSQL() {
m = new Manager();
public void beeep() {...}
The other class:
public class Manager {
public void x{
!!need to call beeep() from the BSQL that created meTry this....
public class BSQL {
private Manager man;
public BSQL() {
man = new Manager(this);
man.doManagerStuff();
public void doSqlStuff() {
System.out.println("Doing stuff.");
public static void main(String args[]) {
BSQL b = new BSQL();
public class Manager {
private BSQL creator;
public Manager(BSQL creator) {
this.creator = creator;
public void doManagerStuff() {
creator.doSqlStuff();
} -
Calling a css user created method from jspx page in ADF faces
Hi all,
Can anyone help me out to solve an issue calling a css user created method from a jspx page.
Note: The css method is not the default css method. It needs to be called using 'styleClass' attribute in any tag.
Thanks
NehaHi,
I am not an expert in CSS so I don't know what a css method is. However, CSS can be applied to components via EL accessing a managed bean that returns the sytle text
Frank -
CALL FUNCTION func STARTING NEW TASK task
hi,
i developed rfc to extract data and send to xi
as my interface is Async
as per soem documents it was mentioned the syntax
CALL FUNCTION func STARTING NEW TASK task
wat is the task ? in the syntax
and how do i use it
jeffHi suresh,
this is the code of RFC. if i execute without RFCDESTINATION it executes successfully. when i use RFC DESTINATION it shows error
call to messaging system failed: com.sap.aii.af.ra.ms.api.DeliveryException
i created RFC destination using TCP/IP and registered program. same parameters i am mentioning in XI.
FUNCTION z_bank_reconciliation.
""Local interface:
*" IMPORTING
*" VALUE(COMP_CODE) TYPE BUKRS
*" VALUE(HOUSE_BANK) TYPE HBKID
*" VALUE(ACCOUNT_ID) TYPE HKTID
*" TABLES
*" CHQDETAILS STRUCTURE ZPAYR
DATA: itab LIKE payr OCCURS 0 WITH HEADER LINE.
DATA: jtab LIKE payr OCCURS 0 WITH HEADER LINE.
DATA: it_bank LIKE zbankrecon OCCURS 0 WITH HEADER LINE.
DATA: it_bank1 LIKE zpayr OCCURS 0 WITH HEADER LINE.
TYPES : BEGIN OF ty_bseg ,
bukrs LIKE bseg-bukrs,
hbkid LIKE bseg-hbkid,
belnr LIKE bseg-belnr,
zlsch LIKE bseg-zlsch,
kostl LIKE bseg-kostl,
hkont LIKE bseg-hkont,
bzdat LIKE bseg-bzdat,
END OF ty_bseg.
TYPES : BEGIN OF ty_t012 ,
bukrs LIKE t012-bukrs,
bankl LIKE t012-bankl,
bankn LIKE t012k-bankn,
END OF ty_t012.
TABLES : payr, t012, t012k, bseg.
DATA : itpayr LIKE zpayr OCCURS 0 WITH HEADER LINE,
itt012 TYPE STANDARD TABLE OF ty_t012,
itbseg TYPE STANDARD TABLE OF ty_bseg,
wa_itt012 TYPE ty_t012,
wa_itbseg TYPE ty_bseg,
total TYPE n.
SELECT * FROM zbankrecon INTO TABLE it_bank
FOR ALL ENTRIES IN itab
WHERE chequeno EQ itab-chect.
SELECT abukrs abankl b~bankn
INTO CORRESPONDING FIELDS OF TABLE
itt012 FROM t012 AS a
INNER JOIN t012k AS b ON bbukrs = abukrs AND b~hbkid =
house_bank AND b~hktid = account_id
WHERE abukrs = comp_code AND ahbkid = house_bank.
DELETE ADJACENT DUPLICATES FROM itt012.
SELECT zbukr hbkid hktid vblnr gjahr zaldt checf chect znme1 rwbtr
waers zaldt zbnkl FROM payr INTO CORRESPONDING FIELDS OF TABLE itpayr
WHERE ( zbukr = comp_code AND hbkid = house_bank ) AND hktid =
account_id.
SELECT bukrs hbkid belnr zlsch kostl hkont bzdat FROM bseg INTO TABLE
itbseg
WHERE bukrs = comp_code AND hbkid = house_bank.
SORT itt012 BY bankl.
SORT itbseg BY belnr.
READ TABLE itt012 INTO wa_itt012 INDEX 1.
LOOP AT itpayr.
read table itbseg into wa_itbseg with key bukrs = itpayr-zbukr
hbkid = itpayr-hbkid.
if sy-subrc = 0.
itpayr-kostl = wa_itbseg-kostl.
itpayr-hkont = wa_itbseg-hkont.
itpayr-bldat = wa_itbseg-bzdat.
itpayr-zlsch = wa_itbseg-zlsch.
endif.
itpayr-zbnkl = wa_itt012-bankl.
itpayr-zbnkn = wa_itt012-bankn.
MODIFY itpayr.
APPEND itpayr TO chqdetails.
ENDLOOP.
LOOP AT chqdetails.
READ TABLE it_bank WITH KEY chequeno = chqdetails-chect.
IF sy-subrc NE 0.
MOVE chqdetails TO it_bank1.
APPEND it_bank1.
CLEAR it_bank1.
ENDIF.
ENDLOOP.
REFRESH chqdetails.
chqdetails[] = it_bank1[].
LOOP AT it_bank1.
MOVE : it_bank1-chect TO zbankrecon-chequeno,
sy-datum TO zbankrecon-check_date,
sy-uzeit TO zbankrecon-check_time.
INSERT zbankrecon.
CLEAR zbankrecon.
ENDLOOP.
ENDFUNCTION. -
Need to call user defined table in Report
Hi there,
In my report, need to call user defined database table. This table contains 2 columns one for checkbox. After calling this table, user has to check required rows and save changes. can we create transaction code for this table and call from within report? anybody pls suggest how to implement this requirement.
Regards,
Zakir.Zakir,
U can do it in both the ways (TXN or rept).
If rept, use an itab to check and insert rows to the DB tab.
If mod pol, use a table control and update db tab...
Reward if helpful,
Karthik -
Do I need to call AS3_Release
If I create an object in C++ code and return it in ActionScript code should I call AS3_Release before returning it? For example, I have the function in the *.gg file:
public function makeThumbnail(...): Object
AS3_Val objDestByteArray = AS3_New(ByteArray_class, no_params);
int intDestWidth;
int intDestHeight;
// ... make some calculations and set results as object properties
AS3_Val result = AS3_Object("width:IntType, height:IntType, data:AS3ValType", intDestWidth, intDestHeight, objDestByteArray);
// Do I need to call this?
//AS3_Release(objDestByteArray);
//AS3_Release(result);
return result;
Should I call AS3_Release for objDestByteArray and result variables?No you don't on the return.
return automatically "releases" the reference.
but you do need to call it on the
AS3_Release(objDestByteArray);
Basically anything that you create new that is not returned should be released.
-Art -
Need to call Smartform from MB90
Hi All,
Ii need to call the custom smartoform for consignment goods issue ,could anybody please tell me the standard report to configure in nace.
Thanks,
KumarHi Kumar,
Please go through this [MB90|http://wiki.sdn.sap.com/wiki/display/ERPSCM/OutputDeterminationinInventoryManagement+(IM)].
If need you can create a custom form create and assign it.Check and post if there is any issue.
Regards,
Madhu. -
Need to call a configuration dynamically in SAP CRM 2007
Hi,
I need to call one configuration dynamically. In the runtime one configuration should be called upon fulfilling some conditions.
I need your help regarding this.
Points, Guaranteed.
Thanks,
SantoshHi Santosh,
We have made a solution where we call different configurations based on the UI object type. In the IMG entry called "Define UI Object Types" you can create a new custom object type. This you can use when you configure your view in transaction BSP_WD_CMPWB. Here you then copy your standard configuration to a new one. In the new one you set Object type = the object you have created in customizing. And config key you set to the same as you normally use. Then you have two different configurations that can be called depending on your requirements. We call it based on the business role of the users. But you can of course yourself determine on what criteria the method should call one or the other configuration.
In the method you will need to set the variable cv_object_type to the name of your own object type. Then the system will use this key to determine the configuration. After implementation you will see that it uses this object type by clicking F2 button in the UI.
/Anders -
Need two calls to my BPEL/ESB process
Hi !
I'm doing an integration where the source system can't product all data needed in one call.
(They have ready made interfaces)
So step one is to create a call to my process with personal data, such as name, birth date.
Next step is to create a call with employment data with salary data.
How do I create a process like that in the best way. Is it ESB or BPEL.
Is it possible at all ?Hi,
Yes it is possible. Because you are pulling data you will need a caller process. You can not do this in ESB alone because ESB itself is passive, so BPEL would be in place.
I assume the interfaces are already implemented as (a) web service(s) or adapter(s).
Create a BPEL process and in it you create (a) partnerlink(s) for the interfaces. Next, drag 2 invoke activities into the process. The first invoke retrieves the 1st message (personal data), the second invoke retrieves the employment data.
Something like this (assign activities left out for clarity):
|
|
[invoke1] <----- partnerlink to retrieve personal data
|
|
[invoke2] <----- partnerlink to retrieve employment data
|
... -
Reg: PO release notification needs to send to the PR Creater with PO num
HI Gurus,
Iam new to workfow. I have one senario in workflow.
Requirement: when ever PO release notification needs to send to the PR Creater with PO number and corresponding PR number.
Please guide how to do this .
My questions :
1.How can we can get the PR Creater user id to send notification mail
Thanks & Regards
RameshHi Ramesh ,
Which workflow you are using for PO . If it is the standard one , there is a rule used in the worklfow called 20000027.
In this there is an USer exit . In this exit , you can write your code for sending the workitem to the PR creator.
If you are using a custom workflow for this , then create a new rule and in that write the code for fetching the PR Creator and assign the user ro the actor tab. Incluse this rule in ur task .
This will solve your problem. -
Need to call sap transaction when the work item got rejected.
Hi all,
I need to call the ME22n transaction once i reject the Work item. Once i press the rejection button on the work item it should direct to the sap transaction. how can i make this functionality in the decision task. Do i need to implement an ext for this.
Thanks.
Neslin.You simply create a task for executing the SAP transaction (business object TSTC)
you use this task as a dialog step at the rejected outcome of the user decision with the same agent as the user decision and in the details of the workflow step you tick the advance with dialog box.
And... you're done.
Kind regards, Rob Dielemans
Edit: Instead of using BO TSTC it would be better to check the BO normally related to Me22n and see if a dialog maintain method exists
Edited by: Rob Dielemans on Jul 16, 2009 9:55 AM -
Order Import Program Call Oe_Order_Pub.Process_Order to create Orders
Hi All,
I am new to OM.
Can you please clarify me on the below point
===============================
Does Order Import Program(concurrent Program ) Call Oe_Order_Pub.Process_Order to create Orders???
Thanks,Don't have an instance infront of me but you need to loo at the executabe definition for this concurrent program to guarantee this.
cheers
James -
Help needed in calling an Activex
Hi All,
I need a help in calling an Activex from adobe PDF forms. I have created Adobe PDF form using Adobe Acrobat 9 Pro. On click of a button i need to call activex written in C sharp using java script. When i run the pdf and click on that button it is throwing back an error saying "ActiveXObject is not defined".
Below is part of code calling activex.
var x = new ActiveXObject("Application.MatchScanner");
Any help will highly appreciatedThanks for immediate response.
So how can i make a call to a dll from my pdf forms
Maybe you are looking for
-
Premiere Elements 9 won't install
I am on Mac OS 10.6.5 Model Name: iMac Model Identifier: iMac5,1 Processor Name: Intel Core 2 Duo Processor Speed: 2.33 GHz Number Of Processors: 1 Total Number Of Cores: 2 L2 Cache: 4 MB Memory: 2 GB Bus S
-
Is there Any way to pay for faster Upload for DSL?
Keep in mind that I'm ignorant to the way these things work so if it's not possible for a technical reason then I wouldn't know. So yeah, the question, is it possible? 768kbps up is just too slow for me when I upload a lot of gaming HD videos on yout
-
do they have a program where you can go on your home computer from work or any place else. if the do what is the name of it
-
Query for customer classification
we have maintained some data as characteristics in the classes for the customer master, my requirement is to generate the characteristics maintained for the sold to party using the SAP querys. Can some one assist in creating the required query? regar
-
Connecting to my home page is quick...I transfered all my bookmarks (favorites) and settings as suggesetd from internet explorer. I figured this would only happen the first time I opened up games on facebook using Firefox...but it happens every time.