Method CMD_EI_API MAINTAIN does not commit
Hi gurus,
I tried to use the method MAINTAIN in the class CMD_EI_API to create a new customer, I tried both from transaction se24 and from a report to call it. No error message and a new customer number generated but when a look for it in transaction XD03 I get the error message: Customer 10002 has not been created.
Any help will be appreciate
Leo
Hi ABAPers,
this is my example code for updating two KNVV-fields of a single customer.
As you might notice, one of the fields is a ZZ-field, which requires to do some additional
work to get it updated (Refer to my post at [CMD_EI_API usage together with KNVV append;).
Regards
Daniel Klein
DATA is_master_data TYPE cmds_ei_main.
DATA: es_master_data TYPE cmds_ei_main.
DATA: es_error TYPE cvis_message.
DATA: wa_customers TYPE cmds_ei_extern.
DATA: lt_sales TYPE cmds_ei_sales_t.
DATA: wa_sales LIKE LINE OF lt_sales.
* Check obligatory fields for KNVV
CHECK gp_vkorg IS NOT INITIAL AND gp_vtweg IS NOT INITIAL
AND gp_spart IS NOT INITIAL.
* Control parameters
wa_customers-header-object_instance-kunnr = '0006206900'. "customer number
wa_customers-header-object_task = 'U'. "update customer
APPEND wa_customers TO is_master_data-customers.
* Read customer
cmd_ei_api_extract=>get_data( EXPORTING is_master_data = is_master_data
IMPORTING es_master_data = es_master_data ).
* Change the read-data
CLEAR is_master_data.
is_master_data = es_master_data.
READ TABLE is_master_data-customers INDEX 1 INTO wa_customers.
DELETE is_master_data-customers INDEX 1.
lt_sales = wa_customers-sales_data-sales.
READ TABLE lt_sales WITH KEY data_key-vkorg = gp_vkorg
data_key-vtweg = gp_vtweg
data_key-spart = gp_spart
INTO wa_sales .
wa_sales-data-kvgr1 = 'BB'. "new field value
wa_sales-datax-kvgr1 = abap_true. "flag: change this field
wa_sales-data-zzbemerkung = 'MAINTAIN-Bemerkung'. "new field value
wa_sales-datax-zzbemerkung = abap_true. "flag: change this field
wa_sales-task = 'U'. "Maintaining-mode: update
CLEAR wa_customers-sales_data-sales.
APPEND wa_sales TO wa_customers-sales_data-sales.
APPEND wa_customers TO is_master_data-customers.
* Testing update on customer
cmd_ei_api=>maintain( EXPORTING is_master_data = is_master_data
IMPORTING es_error = es_error ).
IF es_error-is_error IS INITIAL.
* No errors? Commit work
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = abap_true.
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
ENDIF.
Edited by: D. Klein [GER] on Nov 18, 2011 3:16 PM + Rollback
Similar Messages
-
I deployed an EJB Stateless and Container_Managed into 8i 8.1.7.
The bean contains a method with a simple SQLJ insert statement and works fine, except for no commit is triggered by the Bean Container when method call is finished.
I can see that the insert was done, because the counter for my table is increased!
So the fault has to be that there is no commit!
Why does the Bean Container not commit, as it states in the EJB Online Documentation??Is it NT or solaris 8.1.7 ?
On solaris it should have worked. On NT it wouldn't work, unless you explicitly lookup
the datasource and do a ds.getConnection(), the container doesn't know what to commit. In general, hereafter, the bean code needs to explicitly lookup datasources and call getConnection() on the datasource so that the datasource is enlisted. Using the default kprb connection isn't going to work unless you explicitly set default-enlist tag to true in the XML deployment descriptor. -
Call to concurrent program in a pl/sql block does not COMMIT data to table
I have the following PL/SQL block.
apps.create_po(x_org_id,x_document_num,x_agent_name,x_vendor_id,x_vendor_site_id,x_ship_to_location,x_bill_to_location,x_creation_date,new_isbn,new_print_key,new_unit_setup_cost,new_unit_run_cost,x_item,x_category_id,x_item_description,x_unit_of_measure,x_quantity,x_unit_price,x_ship_to_org_id,x_promise_date,x_qty_rcv_tolerance, x_deliver_to_location,x_destination_org_id, x_destination_subinventory,x_segment2,x_segment4);
COMMIT;
FND_GLOBAL.APPS_INITIALIZE(v_user_id,v_resp_id,201);
v_po_req_id := apps.fnd_request.submit_request('PO','POXPOPDOI',NULL,NULL,NULL,
NULL,'STANDARD',NULL,'Y',NULL,'APPROVED',NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL
DBMS_OUTPUT.PUT_LINE('Request ID is:' || v_po_req_id);
IF v_po_req_id <> 0 THEN
dbms_lock.sleep(60);
dbms_output.Put_line('Sleep executed');
COMMIT;
select PHASE_CODE,STATUS_CODE INTO v_phase_code,v_status_code
FROM FND_CONCURRENT_REQUESTS
WHERE REQUEST_ID = v_po_req_id;
dbms_output.put_line('After commit Phase and status codes are = '||v_phase_code || v_status_code);
ELSE
ROLLBACK;
END IF;
dbms_output.put_line('New Po is' || x_document_num);
dbms_output.put_line('Quantity Is'|| x_quantity);
apps.receive_po(x_document_num,x_quantity);
v_rcv_req_id := apps.fnd_request.submit_request('PO','RVCTP',NULL,NULL,NULL,
'BATCH',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL
DBMS_OUTPUT.PUT_LINE('Request ID is:' || v_rcv_req_id);
IF v_rcv_req_id <> 0 THEN
COMMIT;
DBMS_OUTPUT.PUT_LINE('COMMITED RECEIVING');
ELSE
ROLLBACK;
END IF;
Presently when this block runs, i can see the new PO number created. Commit is also successfully executed. The last output for the program is
New Po is 20651
Quantity Is 450
But due to some reason, the receiving program(receive_po) cannot retrieve the same PO from the base table.
But once this pl/sql block is complete, and i call the receving procedure from a different session, the Po is retrieved and receiving against the PO is executed successfully.
Can someone please suggest a work around ? Is the code missing something ? Since POXPOPDOI is a concurrent program which is executed as an asyncronous process, the commit statement after the call to concurent program does not work but the commit is executed only after it exits the pl/sql block.Thanks for responding.
receive_po() program just inserts the data into RCV_HEADERS_INTERFACE and RCV_TRANSACTIONS_INTERFACE tables based on the PO that is created in the previous step. So basically the new PO created has to be received and the receive_po() just inserts data into the interface tables so that RVCTP can be called after that for receiving.
Here is the code for the procedure.
SET SERVEROUTPUT ON;
--FND_GLOBAL.APPS_INITIALIZE(3,20707,201);
--Procedure for receiving interface to load data to RCV_HEADERS_INTERFACE and RCV_TRANSACTIONS_INTERFACE
CREATE OR REPLACE PROCEDURE receive_po (x_ponum IN VARCHAR2,x_quantity IN NUMBER) AS
v_vendor_site_id NUMBER;
v_vendor_id NUMBER;
v_agent_id NUMBER;
v_ship_to_organization_id NUMBER;
v_item_id NUMBER;
v_uom_code varchar2(25);
v_subinventory varchar2(25);
v_ship_to_location_id NUMBER;
BEGIN
--header information in variables
dbms_output.put_line('Entering Receiving Insert Procedure');
dbms_output.put_line('Po number ='||x_ponum||'$');
dbms_output.put_line('Quantity is ='||x_quantity||'$');
select pvsa.vendor_site_id into v_vendor_site_id
FROM po_headers_all pha,po_vendors pv, po_vendor_sites_all pvsa
where pha.vendor_id = pv.vendor_id
and pv.vendor_id = pvsa.vendor_id
and pha.segment1 = x_ponum;
dbms_output.put_line('Vendor Site ID is' ||v_vendor_site_id);
select pv.vendor_id into v_vendor_id
FROM po_headers_all pha,po_vendors pv, po_vendor_sites_all pvsa
where pha.vendor_id = pv.vendor_id
and pv.vendor_id = pvsa.vendor_id
and pha.segment1 = x_ponum;
dbms_output.put_line('Vendor ID is' ||v_vendor_id);
select plla.SHIP_TO_ORGANIZATION_ID into v_ship_to_organization_id
from PO_HEADERS_ALL pha, PO_LINE_LOCATIONS_ALL plla
where pha.PO_HEADER_ID = plla.PO_HEADER_ID
and pha.segment1 = x_ponum;
dbms_output.put_line('Ship to org is' ||v_ship_to_organization_id);
select agent_id into v_agent_id
FROM po_headers_all
WHERE segment1 = x_ponum;
dbms_output.put_line('Agent ID is' ||v_agent_id);
--printing header table information
dbms_output.put_line('vendor id is:'||v_vendor_id);
dbms_output.put_line('vendor site id is:'||v_vendor_site_id);
dbms_output.put_line('agent id is:'||v_agent_id);
dbms_output.put_line('ship to organization id is:'||v_ship_to_organization_id);
--line information in variables
--derive item id
select pla.item_id into v_item_id
from po_headers_all pha, po_lines_all pla
where pha.po_header_id = pla.po_header_id
and pha.org_id = pla.org_id
and pha.segment1 = x_ponum;
--derive uom
select pla.unit_meas_lookup_code into v_uom_code
from po_headers_all pha, po_lines_all pla
where pla.po_header_id = pha.po_header_id
and pla.org_id = pha.org_id
and pha.segment1 = x_ponum;
--derive subinventory
select pda.destination_subinventory into v_subinventory
from po_headers_all pha, po_lines_all pla,po_distributions_all pda
where pha.po_header_id = pla.po_header_id
and pla.po_header_id = pda.po_header_id
and pla.po_line_id = pda.po_line_id
and pha.org_id = pla.org_id
and pla.org_id = pda.org_id
and pha.segment1 = x_ponum;
--derive ship to location id
select ship_to_location_id into v_ship_to_location_id
from po_headers_all
where segment1 = x_ponum;
--printing transaction table details
dbms_output.put_line('item id is:'||v_item_id);
dbms_output.put_line('UOM is:'||v_uom_code);
dbms_output.put_line('subinventory is:'||v_subinventory);
dbms_output.put_line('ship to location id is:'||v_ship_to_location_id);
--insert data into the receiving interface header table
INSERT INTO RCV_HEADERS_INTERFACE
HEADER_INTERFACE_ID ,
GROUP_ID ,
PROCESSING_STATUS_CODE ,
RECEIPT_SOURCE_CODE ,
TRANSACTION_TYPE ,
LAST_UPDATE_DATE ,
LAST_UPDATED_BY ,
LAST_UPDATE_LOGIN,
CREATION_DATE ,
CREATED_BY ,
VENDOR_ID ,
VENDOR_SITE_ID ,
SHIP_TO_ORGANIZATION_ID ,
EXPECTED_RECEIPT_DATE ,
EMPLOYEE_ID ,
VALIDATION_FLAG
SELECT
RCV_HEADERS_INTERFACE_S.NEXTVAL,
RCV_INTERFACE_GROUPS_S.NEXTVAL,
'PENDING',
'VENDOR',
'NEW', -- 'CANCEL',
sysdate,
3,
3,
sysdate,
3,
v_vendor_id,
v_vendor_site_id,
v_ship_to_organization_id,
sysdate+5,
v_agent_id,
'Y'
FROM DUAL;
commit;
--insert data into the interface transaction table
for i in 1..1 loop
INSERT INTO RCV_TRANSACTIONS_INTERFACE
(INTERFACE_TRANSACTION_ID ,
HEADER_INTERFACE_ID ,
GROUP_ID ,
LAST_UPDATE_DATE ,
LAST_UPDATED_BY ,
CREATION_DATE ,
CREATED_BY ,
LAST_UPDATE_LOGIN,
TRANSACTION_TYPE ,
TRANSACTION_DATE ,
PROCESSING_STATUS_CODE ,
PROCESSING_MODE_CODE ,
TRANSACTION_STATUS_CODE ,
QUANTITY ,
UNIT_OF_MEASURE ,
ITEM_ID ,
AUTO_TRANSACT_CODE ,
RECEIPT_SOURCE_CODE ,
SOURCE_DOCUMENT_CODE ,
SUBINVENTORY ,
DOCUMENT_NUM ,
SHIP_TO_LOCATION_ID ,
VALIDATION_FLAG
SELECT
RCV_TRANSACTIONS_INTERFACE_S.NEXTVAL,
RCV_HEADERS_INTERFACE_S.CURRVAL,
RCV_INTERFACE_GROUPS_S.CURRVAL,
SYSDATE,
3,
SYSDATE,
3,
3,
'RECEIVE', --'RECEIVE', -- 'SHIP', --'06-JAN-1998',--question here
sysdate,
'PENDING',
'BATCH',
'PENDING',
x_quantity,
v_uom_code,
v_item_id,
'DELIVER', -- 'RECEIVE', --'DELIVER',
'VENDOR',
'PO',
v_subinventory,
x_ponum,
v_ship_to_location_id,
'Y'
FROM DUAL;
end loop;
commit;
END receive_po;
I am really stuck and looking out for work arond. Please help.
Thanks,
Natasha -
Command button does not commit unless hit twice
I'm using ADF/BC, 10.1.3.2 jdev. I have the following code in my backing bean:
public String cardLost() {
inputText12.setValue("1");
BindingContainer bindings = getBindings();
OperationBinding operationBinding =
bindings.getOperationBinding("Commit");
Object result = operationBinding.execute();
if (!operationBinding.getErrors().isEmpty()) {
return null;
return null;
The command button is defined as follows:
<af:commandButton
text="Save" disabled="false"
binding="#{find_student_mb.commandButton4}"
id="commandButton4"
action="#{find_student_mb.cardLost}"
immediate="false"/>When I hit the Save button the first time, the input text field (inputText12) changes to 1, but the data does not get commited to the database. (I have verified this in the database) If I hit the Save button again, the data gets committed.
Is there a way to update the field and commit the data with one button?
Thanks,
BobHi,
commit doesn't execute before a field is submitted. So what you do is you submit a page then update the field (which then is not yet reflected in the submit) an call commit, which basically executes on no new data. In the second call you now submit the data shown in the field that then also gets commited. To get it commited on the first button press, set the field value to the binding layer (attribute binding or iterator binding )
Frank -
I'm trying to query a document folder for all of its containing documents. Its a basic query like this:
IPortletContext PortletContext = PortletContextFactory.CreatePortletContext(Request,Response);IRemoteSession PTSession;PTSession = PortletContext.GetRemotePortalSession();IDocumentManager documentManager = PTSession.GetDocumentManager();
IDocumentQuery documentQuery = documentManager.CreateQuery(FolderID); documentQuery.SetSortProperty(ObjectProperty.Name);IObjectQuery queryResults = documentQuery.Execute();
When I'm logged into the portal as an administrator, everything works fine. However if I'm logged in as a "regular" user, I get this exception when calling the Execute() method:
Plumtree.Remote.PRC.PortalException: Exception of type Plumtree.Remote.PRC.PortalException was thrown. ---> System.Web.Services.Protocols.SoapException: Server was unable to process request. --> Access denied: Current user does not have edit permission
I'm sending the Login Token to the portlet. Now I've tried giving the user Edit rights on the document folder as well as Edit the Knowledge Directory rights in the Activity Manager, but neither gets rid of the exception. I'm not sure what other "Edit" permissions to check. I don't even see why the user would need "Edit" permission to anything in the first place since the Execute() method simply returns an IObjectQuery that doesn't have any ability to make changes to any objects. I know that I could use the SearchFactory interface, but I wanted the results to be real time. Any help would be much appreciated. Thanks!
JimmyThe problem here is that the query is created with default settings to show unapproved documents -- only users with edit access can see unapproved documents. Add the bold line to your code and it will work.
IDocumentManager docManager = prcSession.GetDocumentManager();IDocumentQuery docQuery = docManager.CreateQuery(iFolderID);docQuery.SetShowUnapproved(false);IObjectQuery queryResults = docQuery.Execute() -
On implementingthe paint method, the panel does not up
Hi,
I have a panel over which i am adding a second panel.
the second panel appears but when i implement the paintmethod() of second panel, it does not show...
what can be the reason???
deepakhi!
i included the statement super.paint(g); in the paint method and now i can see the panel.
Following is the paint() method i have written, the on;y problem left is that i can't see the images i had drawn...otherwise line and rectangles are coming fine
super.paint(g);
if(showImage)
Point pe0 = new Point(180, 110);
Point pe1 = new Point(180, 280);
Point p0 = new Point(138, 182);
Point ce0 = new Point(120, 75);
Point ce2 = new Point(240, 75);
Point ce1 = new Point(120, 380);
Point ce3 = new Point(240, 380);
g.drawImage(verticalCloudImage, (int)p0.getX() - 20, (int)p0.getY() - 85, this);
g.drawImage(peImage, (int)pe0.getX(), (int)pe0.getY(), this);
g.drawImage(peImage, (int)pe1.getX(), (int)pe1.getY()+35, this);
g.drawImage(cloudImage, (int)ce0.getX()-88, (int)ce0.getY()-52, this);
g.drawImage(ceImage, (int)ce0.getX(), (int)ce0.getY(), this);
g.drawImage(cloudImage, (int)ce2.getX(), (int)ce2.getY()-45, this);
g.drawImage(ceImage, (int)ce2.getX(), (int)ce2.getY(), this);
g.drawImage(cloudImage, (int)ce1.getX()-88, (int)ce1.getY()-22, this);
g.drawImage(ceImage, (int)ce1.getX(), (int)ce1.getY(), this);
g.drawImage(cloudImage, (int)ce3.getX(), (int)ce3.getY()-22, this);
g.drawImage(ceImage, (int)ce3.getX(), (int)ce3.getY(), this);
int ceHeight = ceImage.getHeight(this);
int ceWidth = ceImage.getWidth(this);
int peHeight = peImage.getHeight(this);
int peWidth = peImage.getWidth(this);
int pHeight = pImage.getHeight(this);
int pWidth = pImage.getWidth(this);
g.drawLine((int)ce0.getX() + ceWidth/2, (int)ce0.getY() + ceHeight,
(int)pe0.getX() + peWidth/2, (int)pe0.getY());
g.drawLine((int)ce2.getX() + ceWidth/2, (int)ce2.getY() + ceHeight,
(int)pe0.getX() + peWidth/2, (int)pe0.getY());
g.draw3DRect((int)pe0.getX() + peWidth/2 - 3, (int)pe0.getY() + peHeight - 1,
5, (int)p0.getY() - (int)pe0.getY() - peHeight - 2+23, true);
g.draw3DRect((int)p0.getX() + pWidth/2 - 10, (int)p0.getY() + peHeight - 1+20,
5, (int)pe1.getY() - (int)p0.getY() - peHeight + 2+15, true);
g.fill3DRect((int)pe0.getX() + peWidth/2 - 3, (int)pe0.getY() + peHeight - 1,
5, (int)p0.getY() - (int)pe0.getY() - peHeight - 2+23, true);
g.fill3DRect((int)p0.getX() + pWidth/2 - 10, (int)p0.getY() + peHeight - 1+20,
5, (int)pe1.getY() - (int)p0.getY() - peHeight + 2+15, true);
g.drawLine((int)ce1.getX() + ceWidth/2, (int)ce1.getY(),
(int)pe1.getX() + peWidth/2, (int)pe1.getY() + peHeight+35);
g.drawLine((int)ce3.getX() + ceWidth/2, (int)ce3.getY(),
(int)pe1.getX() + peWidth/2, (int)pe1.getY() + peHeight+35); -
EF6 does not commit changes to Database
Hey Guys.
Actually it looks quite simple, but I won't get it right.
I try to save changes made to an object from an project-included DB using EntityFramework 6. the changes are correctly updated in the local objects instance and the EnitityEntry - State is set to "modified", but after calling Entities.SaveChanges()
(which does return 1 for one affected row, which is right) does not persist it to the DB, because after Project relaunch the Updated Data is gone. Please can you help me.
Thanks in advance.
Thomas
if (!HasEmptyFields())
Constants.ATLAS_ENTITIES.Entry(Selected).State = System.Data.Entity.EntityState.Modified;
else
Constants.ATLAS_ENTITIES.Entry(Selected).State = System.Data.Entity.EntityState.Added;
int result = Constants.ATLAS_ENTITIES.SaveChanges();
//result = 1 after execution which should be rightHi Stocki44,
According to your description, the issue can be caused by that the setting of the Copy to Output Directory is not configured properly. I recommend you choose the appropriate option according to the following link. Also you can review this
FAQ to troubleshoot this issue.
How to: Manage Local Data Files in Your Project:
http://msdn.microsoft.com/en-us/library/ms246989.aspx
Thanks,
Lydia Zhang -
Hi experts.
I have a problem with jco. I made a jsp page including jco that calls a CBO function module(RFC). When I run the page with debug mode, commit work is executed. But it's not work non-debug mode even though I execute 'BAPI_TRANSACTION_COMMIT' on the page. I don't know why it's not work. Below code is mine.
public String fileDocTest(String doc, String doctype) {
JCO.Client client = null;
JCO.Repository rep = null;
JCO.Function function = null;
JCO.Function function_comm = null;
String rstring = "";
String docnum ="";
String temp = "1";
String temp1 = "SAP-SYSTEM";
try
client = SAPConnectionPool.getInstance().getConnection();
rep = new JCO.Repository(repositoryName, client);
CreateFunction crtFnc = new CreateFunction(rep);
CreateFunction crtFnc2 = new CreateFunction(rep);
function_comm = crtFnc.createFunction("BAPI_TRANSACTION_COMMIT");
function = crtFnc2.createFunction("Z_1EH_UPLOAD_DOC_2");
JCO.setMiddlewareProperty("jco.middleware.allow_start_of_programs","ftp;sapftp;sapftpa;sapkprotp;http;saphttp;saphttpa");
JCO.Structure imp_f_table_00 = function.getImportParameterList().getStructure("DOCUMENTDATA");
imp_f_table_00.setValue("CPD","DOCUMENTTYPE");
imp_f_table_00.setValue("CFPDOC","DESCRIPTION");
JCO.Table imp_f_table_01 = function.getTableParameterList().getTable("DOCUMENTDESCRIPTIONS");
imp_f_table_01.appendRow();
imp_f_table_01.setValue("EN","LANGUAGE");
imp_f_table_01.setValue("CfPDoc","DESCRIPTION");
JCO.Table imp_f_table_02 = function.getTableParameterList().getTable("DOCUMENTFILES");
imp_f_table_02.appendRow();
imp_f_table_02.setValue( "1","ORIGINALTYPE");
imp_f_table_02.setValue( "SAP-SYSTEM","STORAGECATEGORY"); imp_f_table_02.setValue(doc,"DOCPATH");
imp_f_table_02.setValue(doctype,"WSAPPLICATION");
client.execute(function);
client.execute(function_comm);
JCO.ParameterList exp_f_table = function.getExportParameterList();
catch (Exception ex)
ex.printStackTrace();
System.out.println("Caught an exception: \n" + ex);
finally
JCO.releaseClient(client);
return docnum;
FM Z_1EH_UPLOAD_DOC_2 calls a standard FM API_DOCUMENT_MAINTAIN2.
If you have any inforamtion about JCO commit error, please let me know.
Regards.Hi Nils.
Frankly I say, I try to commit in the source code of 'Z_1EH_UPLOAD_DOC_2" fucntion like below.
CALL FUNCTION 'API_DOCUMENT_MAINTAIN2'
EXPORTING: pf_transaction = 'CV01'
documentdata = documentdata
hostname = hostname
change_number = docbomchangenumber
valid_from = docbomvalidfrom
revision_level = docbomrevisionlevel
pf_ftp_dest = pf_ftp_dest
pf_http_dest = pf_http_dest
CAD_MODE = CAD_MODE
IMPORTING: documenttype = documenttype
documentnumber = documentnumber
documentpart = documentpart
documentversion = documentversion
return = return
TABLES: characteristicvalues = characteristicvalues
classallocations = classallocations
documentdescriptions = documentdescriptions
objectlinks = objectlinks
documentstructure = documentstructure
documentfiles = documentfiles
longtext = longtexts
components = components.
if return-type is initial or return-type = 'S'.
commit work.
if sy-subrc = 0.
if return-type is initial.
return-type = 'S'.
return-message = documentnumber.
endif.
else.
call function 'BAPI_TRANSACTION_COMMIT'
exporting
wait = 'X'.
if sy-subrc = 0.
return-type = 'S'.
return-message = documentnumber.
endif.
endif.
else.
return-type = 'E'.
endif.
But, it's not work too. So, I tried to commit at JCO code. Is there any kind of problem? -
I have a JDBC transaction that is not committing to the database, but is also not throwing an error.
The scenario is this:
JMS message arrives on transactional queue
Message processed by MDB
MDB calls several Sybase ASE stored procedures
JDBC transaction is rolled back, JMS message is not.
I believe this to be specific to WLS 8.1. I set up two test environments where everything was the same except for the WLS version.
Same OS (windows), same JDBC driver, same database, same application code. WLS 8.1 SP4 and SP5 do not work. WLS 9.1 works.
I tried using JTS debugging, and the log says it commits the transaction. A query just prior to the MDB exiting confirms that the data is in the database and correct, but as soon as the MDB exits the data rolls back, despite the JTS commit message.
The biggest roadblock here is that I am unable to upgrade our production environment to WLS 9.1, so I need to get this working on WLS 8.1.
Can anyone offer some insight into this? I'd really appreciate it.
CraigFurther testing has revealed that I can get it to work on WLS 8.1 by <i>disabling</i> connection testing in the pool.
<p/>
Enabling <i>any one</i> of the connection testing options (test reserved, test created, or test released) causes the JDBC transaction to get silently rolled back.
<p/>
We're using Sybase Adaptive Server Enterprise/12.5.3/EBF 12868 ESD#4/P/Sun_svr4/OS 5.8/ase1253/1923/32-bit/FBO/Thu Sep 8 14:14:28 2005.
<p/>
Is there a known "Test Table Name" that works?
<p/>
I've tried several different options including:
<ul>
<li>SQL SELECT 1 from sysobjects</li>
<li>SQL SELECT @@version</li>
<li>SQL SELECT count(*) from tablename</li>
<li>SQL SELECT count(*) from db..tablename</li>
<li>SQL SELECT count(*) from db.user.tablename</li>
</ul>
Any help would be greatly appreciated. -
Dear experts,
I'm using CALL METHOD ob_grid1->set_table_for_first_display, during the first run the display is ok.
When I back to screen 0 and enter different values and re-run, the values of internal table has been changed.
But the second run still display the values I have during the first run. What could be the reason for this and how to solve this? Thanks.
IF ob_custom1 IS INITIAL.
CREATE OBJECT ob_custom1
EXPORTING
container_name = 'ALV_CONTAINER'.
ENDIF.
IF ob_split1 IS INITIAL.
CREATE OBJECT ob_split1
EXPORTING
parent = ob_custom1
orientation = cl_gui_easy_splitter_container=>orientation_vertical.
ENDIF.
IF ob_grid1 IS INITIAL.
CREATE OBJECT ob_grid1
EXPORTING
i_parent = ob_split1->top_left_container.
PERFORM build_fieldcatalog.
gs_layout1-info_fname = 'ROWCOLOR'.
gs_layout1-smalltitle = 'X'.
CALL METHOD ob_grid1->set_table_for_first_display
EXPORTING
i_structure_name = 'T_REPORT'
is_layout = gs_layout1
CHANGING
it_outtab = T_REPORT
it_fieldcatalog = alv_fcat_dock1.
ENDIF.
KathHi,
Please add the code after else statement.
IF ob_grid1 IS INITIAL.
CREATE OBJECT ob_grid1
EXPORTING
i_parent = ob_split1->top_left_container.
PERFORM build_fieldcatalog.
gs_layout1-info_fname = 'ROWCOLOR'.
gs_layout1-smalltitle = 'X'.
CALL METHOD ob_grid1->set_table_for_first_display
EXPORTING
i_structure_name = 'T_REPORT'
is_layout = gs_layout1
CHANGING
it_outtab = T_REPORT
it_fieldcatalog = alv_fcat_dock1.
ELSE. " Add
Call method refersh table for display. " Add
ENDIF. -
SOA does not commit to database using type 4 JDBC adapter.
We are using Oracle SOA suite 11.1.1.3 and have successfully configured a type 4 JDBC adapter "ViaServ" to enable polling. These kinds of adapter are configured in the SOA suite as non X Data Source adapters and transaction has been set to "Supports Global" with the Logging Last Resource option.
We also created the connection pool to for this Data sources. The Polling SQL for logical delete (SELECT) is working great and the After read SQL Update is happening successfully. Some how the updates are not being committed to the database. The process is not throwing any exceptions/errors etc.
I shall really appreciate help.
thanksSOLVED:
1.) The JDBC type 4 adapter was installed in the WLS HOME/lib directory and SOA server/modules/ext directory.
2.) Change the setComEnv.sh, modify the WLS_CLASSPATH variable to point to the WLS_HOME/lib/jadbcjarfile.jar
3.) Restart admin servers and managed server. -
IPAM registration using powershell does not commit to DNS
I am working on having IPAM become a valuable tool in the organization I work, and as part of that I am setting up a registration Gateway for Our Developers and their VMs, and the gatway invokes the PowerShell script With the proper command to register in
IPAM including all nescessary dns information. The problem is that the registration Works like a charm, With an exception for DNS registration.
In the GUI you have the option to Select "register automatically in dns", but this option is not documented in the PowerShell command and in in IPAM it just says "not attempted"
My syntax for the powershel registration is like this:
Add-IpamAddress -IpAddress 127.0.0.3 -AssignmentType Static -DeviceName testreg -ForwardLookupZone blastlan.com -ForwardLookupPrimaryServer anakin.blastlan.com
How can i force the registration to the DNS? I have currently solved this using the dns server functions together With the ipam registration, but this seems a but idiotic as I want a single command for this registration, as well as using the IPAM Access
to define what ranges the Gateway should allow the users to register within.Hi Hawkie,
Did the option "register automatically in dns" is the option in the screenshot below:
If so, I haven't found this option in IPAM cmdlets, as a workaround, you can register DNS record for IP address on client as the script below, you can run this script on client and connect remote IPAM server:
<pre class="brush:powershell">##Check the following items: IPAM Server Name, Start and End IP Addresses of IPAM Range,
##Name of network adapter, Subnet Prefix Length, Default Gateway, DNS Server Addresses
##Requires Powershell 4.0 or higher
##Create a Common Information Model connection to IPAM Server
$cim = new-cimsession -ComputerName IPAM
##Find a free IP Address from the IPAM Server. Be sure to use the addresses in your range from the IPAM Server
$FreeIP = Get-IpamRange -StartIPAddress 10.10.50.10 -EndIPAddress 10.10.50.69 -CimSession $cim | Find-IpamFreeAddress | select-object -expandproperty IPAddress
##add the IP Address to the IPAM Server
$servername = hostname
Add-IpamAddress -CimSession $cim -IpAddress $FreeIP -devicename $servername
##Remove the CIM Session (logout)
Remove-CimSession -CimSession $cim
##Get the Network Adapter named "Ethernet"
$adapter = Get-NetAdapter -name Ethernet
##Disable DHCP
$adapter | Set-NetIPinterface -dhcp disabled
##Set New IP AddressString
$adapter | New-NetIPAddress -addressfamily IPv4 -IPAddress $FreeIP -PrefixLength 24 -type Unicast -DefaultGateway 10.10.50.254
##Set DNS Server
set-dnsclientserveraddress -InterfaceAlias ethernet -ServerAddresses 10.10.50.12, 10.10.50.9
##Register DNS
Ipconfig /registerdns
Refer to:
Dynamically Assigned Static IP Addresses…Huh?
If there is anything else regarding this issue, please feel free to post back.
Best Regards,
Anna Wang -
Last cell change does not commit in Matrix
Hello everyone,
I use VB.Net+SAP2004, bound matrix with a UDT, there is a problem when save the data at et_ITEM_PRESSED event, it always can not save the last cell's changed value, just the value before edit. who can help me solve this problem.
Thanks in advance.
LanjunJose,
Thank you very much for your replying,
Actually, I want to show a message if edit value changed when user click "Cancel" buttong, I write data changed check and save code in et_FORM_UNLOAD event, because user can also click close button to close form, seems at this event the change lost, so I need also add code in "Cancel" button click or press event.
Thanks again.
Lanjun -
New view object row does not get committed to DB
Hi guys,
on a taskflow with a new transaction I have a form to enter a new record on an entity-based view object.
Before the page is called I call the CreateInsert Operation to create the new record on that view object.
There are quite a few attributes that have default values which I determine in the ViewRowImpl's create method (using populateAttributeAsChanged to set the values).
Now if none of the inputValues in the form is filled manually and I want to save the data (default values are sufficient to save the record) the taskflow return action commit does not commit the data to the db. As soon as I manually enter one value into any field the same return action commits the record correctly to the db. There is no error message and the new record is visible in the application because it is inserted into the view's iterator...
Is there any way to mark the new row as changed/insert if only the default values are filled? Or am I doing something wrong?
Using JDev 11.1.1.5
AchimAdd the following method in your RowImpl class:
public void setNewRowState(byte b) {
if (b != Row.STATUS_INITIALIZED ||
getNewRowState() != Row.STATUS_NEW) {
super.setNewRowState(b); -
My ipod touch has a permanent image of the end of a USB cable with an arrow pointing to an icon of ITunes. I can't reset using the two button method, and ipod does not appear on itunes when I plug it into the computer - and nothing else happens either. This happened after I agreed to a software update which failed. How can I get it going again?
Try:
- iOS: Not responding or does not turn on
- Also try DFU mode after try recovery mode
How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
- If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
- If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
Apple Retail Store - Genius Bar
Maybe you are looking for
-
Is there any documentation for UCES?
Hi, I'm searching and searching for documentation for the "Utility Customer E-Services"-component, but I cannot find anything on the SDN or Marketplace. Can anybody help me with a link for documentation, so that I can configure and also work with thi
-
Videos on YouTube stop and start
Why do the videos I'm watching on YouTube pause every few seconds?
-
How would i go about adding a border (just a black line) around a JtextArea?
-
while editing via GPMC we are getting below error Encountered an error while parsing" will occur if the .adml files missing in the %windir%\PolicyDefinitions\en-US Mukesh Saini
-
Hi, While doing transports in SAP BI, I am collecting the objects through automatic collection (before and after). But still I am getting errors while importing. Please guide me about the resolution. Thanks, Kishore