cancel
Showing results for 
Search instead for 
Did you mean: 

Data not getting Inserted and/or Deleted in DB. No error in channel.

Former Member
0 Kudos

Hi,

I am using the below structure for both 'Insert' and 'Delete' operation.

<?xml version="1.0" encoding="UTF-8"?>

<ns0:InsertDeleteTable xmlns:ns0="abc:xyz">

<StatementName1>

<TableName Action="INSERT">

<Table>TableName</Table>

<access>

<ID></ID>

<DATE hasQuot="No"></DATE>

<FLAG></FLAG>

</access>

</TableName>

</StatementName1>

<StatementName2>

<Name Action="SQL_DML">

<access>delete statement</access>

</Name>

</StatementName2>

</ns0:InsertDeleteTable>

There's no error in the receiver channel, but the data is not getting and/or deleted fro the table. When I excluded the 'delete' structure, insert was happening properly. I would like to know if it's not possible to do both operations simultaneously from a single mapping.

Thanks,

Vishal

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi vishal,

Are u using any placeholders in your Delete querry or u r using constants. Generate your strucuture base on the following link

http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/frameset.htm

also change the maximum occurency in your channel to 2 or more.

Regards,

Rahul

former_member200962
Active Contributor
0 Kudos
<Name Action="SQL_DML">

Are you doing any complex validations for the delete action.....i hope you are writing the DELETE query properly in your access tags.....if it is a simple delete action from some columns of the DB table then you can try using the action as DELETE.

Regards,

Abhishek.

Former Member
0 Kudos

When I give action as DELETE, it throws structure 'StatementName2', key element 'access' contains no values error in CC since 'access' contains no elements.

Edited by: Vishal.P.Kulkarni on Sep 24, 2009 10:44 AM

former_member200962
Active Contributor
0 Kudos

You are getting the error because the structure of the DT is not maintaned properly for the DELETE statement you need to have key tags enclosing the column names on which you want to perform the DELETE action.

If not mainatined properly then you are bound to get the error....even help mentions this behavior specifically:

http://help.sap.com/saphelp_nw70/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm

From the above link:
If there is no <key> element, or if there is a <key> element but it is empty, then no condition is specified and the entire table is to be 
deleted. This may not be permitted by the configuration of the JDBC adapter for security reasons and will therefore result in an 
error during message processing and an appropriate error message.

Regards,

Abhishek.

Former Member
0 Kudos

Yes.. Basically I've to delete records from the table which are 3 months older. Is there any way to subtract 90 days from sysdate if I use 'key' element. When I had used only 'access' I was able to write the query.

There's a column 'DATE' in the table which holds the date when the record was inserted. If it is 3 months older, it needs to be deleted.

Edited by: Vishal.P.Kulkarni on Sep 24, 2009 12:07 PM

former_member187339
Active Contributor
0 Kudos

Hi Vishal,

Set Maximum concurrency to more than 1

http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/content.htm

As per help.sap.com

+Processing Tab Page

Maximum Concurrency

Enter the number of messages to be processed in parallel by the receiver channel. For example, if you enter the value 2, then two messages are processed in parallel. Default value is 1 and this means only one message can be processed at a time by the receiver channel.\+

Regards

Suraj

Former Member
0 Kudos

The status in receiver commn channel is just 'Message processing started' and not 'Message processing completed successfully'.