cancel
Showing results for 
Search instead for 
Did you mean: 

Table name in Receiver JDBC Adapter

Former Member
0 Kudos

Hi All,

I am using receiver JDBC adapter.

But table name consist of " like BPC."#II" .

After mapping table name becomes BPC."#II" .

I am getting error while pulling data from DB.

Is the table name creating a problem.

Please remedy of this if you have come across such scenario.

Regards

Piyush

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Piyush,

All that i could get from the SAP Help regarding JDBC Adapters are these links where i never found anything much regarding the table name.anyways just go through these links and see if you find anything useful.

http://help.sap.com/bp_bpmv130/Documentation/Planning/XIUnicodeGuide030411.pdf

<a href="http://help.sap.com/saphelp_nw04/helpdata/en/b0/676b3c255b1475e10000000a114084/content.htm">Configuring the Receiver JDBC Adapter</a>

<a href="http://help.sap.com/saphelp_nw04/helpdata/en/cf/406642ea59c753e10000000a1550b0/content.htm">Mapping Lookups</a>

<a href="http://help.sap.com/saphelp_nw04/helpdata/en/22/b4d13b633f7748b4d34f3191529946/content.htm">JDBC Adapter</a>

<a href="http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/content.htm">Configuring the Receiver JDBC Adapter - part 2</a>

This is all i got from the help files, anyways you can also go through those links and see if you find anything else useful.

- Escape Symbol for Apostrophe

The apostrophe character (‘) is a reserved character in SQL syntax and is therefore replaced by an escape character if it occurs within value strings. This replacement character can be database-specific. Typical replacement characters are \’ or ’’(default value). If a character occurs that is invalid for the database being used, the adapter triggers an error message (an SQL exception) concerning the SQL syntax that is generated by the database.

- Column Name Delimiter

Depending on the database being used, column names can be enclosed by a special delimiter character, for example, if the names can contain special characters (such as ”). This character can be specified at this point. The default setting is no delimiter character. If a character occurs that i

Also check if there are notes in the service market place related to the same.

Regards,

abhy

Message was edited by: Abhy Thomas

Answers (1)

Answers (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Piyush,

What is the staus of your JDBC adapter in the RWB? Normally, the error shown in your JDBC adapter can help trace the error out.

Regards,

Bhavesh

Former Member
0 Kudos

Hi Bhavesh

JDBC adapter status is green.

Regards

Piyush

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Piyish,

Your post tells that you are getting an erro, Can you elaborate more on the error information. Is this error een in SXMB_MONI??

Regards,

Bhavesh

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Piyush,

Can you give us the exact table name that you are trying to insert / update data using JDBC adapter.

If your table name contains an apostrophe(') symbol, then you will have to use a delimite as this is a reserved character in SQL syntax and should therefore replaced by an escape character if it occurs within the table value .

Regards,

Bhavesh

Former Member
0 Kudos

Hi Bhavesh,

In sxmb_moni, i am getting the desired table name.

I have worked with sender JDBC and i am getting the data.

but in case of receiver JDBC, i am getting this error,

<SAP:AdditionalText>com.sap.aii.af.ra.ms.api.DeliveryException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'BPC."#II"' (structure 'Statement'): java.sql.SQLException: FATAL ERROR document format: structure 'Statement', key element 'key' contains no values</SAP:AdditionalText>

And after adding key value, i am not able to see message for the same scenario in sxmb_moni

If do you have any idea that why i am not able to see message for the same.

Regards

Piyush

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Piyush,

Are you trying an Insertion into the database or an INSERT_UPDATE??

if you are doing only an insertion, then the KEY value is not needed at all and if you are doing an INSERT_UPDATE, the key values are used to specify if the value mentioned in the key exists, then Update, else Insert.

Just go through the Document Format on SAP Help for receiver JDBC adapter and make sure it is correct.

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

Regards,

Bhavesh

Former Member
0 Kudos

Hi Bhavesh,

I am doing select. And as par syntax given in format, i have specified my XML but it is showing error previosly and now it doesnot show even error also

Regards

Piyush

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Piyush,

the SELECT statement can be used in your Receiver JDBC adapter only to send a response back Sunchronously.

Can you please explain your scenario. If you are doing a SELECT statement in your Receiver JDBC adapter, it is bound to return some values right, and these values can be used only if the adapter is a synchronous adapter.

Regards,

Bhavesh

Former Member
0 Kudos

Hi Bhavesh,

Yes you are right i am executing synchronous scenario.

It is HTTP to JDBC.

From http it will specify the field and i have to return the field value.

Regards

Piyush

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Piyush,

<i>//And after adding key value, i am not able to see message for the same scenario in sxmb_moni</i>

Your JDBC adapter for select, <b>you have to give the KEY value</b> and it will specify the condition on which your rows have to be selected.

Regards,

Bhavesh

former_member187339
Active Contributor
0 Kudos

Hi,

Is your table name => 'BPC.#II'

<StatementName4>

<<i>dbTableName</i> action=”SELECT”>

<table><b>realDbTableName</b></table>

<access>

<col1/>

<col2/>

<col3/>

</access>

<key1>

<col2>val2old</col2>

<col4>val4</col4>

</key1>

<key2>

<col2>val2old2</col2>

</key2>

</dbTableName>

</StatementName4>

If your table contains special symbols then create a dummy field in the Data type ( eg <i>dbTableName</i>) and give the value as the table name (eg <b>realDbTableName</b>) in between the <table> tags.

Can you mention the name of your table?

Regards

Suraj

Former Member
0 Kudos

Hi Bhavesh and Suraj,

Table name is <u>BPC."#II"</u>.

The issue is resolved.

Key field is manadatory field in statement.

I want to select records unconditionally but it seems i have to fetch the records conditionally.

Do you have any idea about unconditional fetch

Regards

Piyush

bhavesh_kantilal
Active Contributor
0 Kudos

Hi piyush,

Unfortunately , this is not possible. The SAP help clearly states,

<i><b>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 selected. 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.</b></i>

One way would be to speicfy the value of KEY such that all rows satisfy that condition and are selected.

You can manipulate the value in KEY statement such that all rows are selected as the condition specified isatisfies all rows.

For instance if your Key Field contains numbers , your condition for key can be Greater than 0. For String , it can be LIKE *, etc.

Just go through the operators under the Document Format of JDBC adapter at SAP help and manipulate your selection criteria on the basis of your table.

Regards,

Bhavesh

Regards,

Bhavesh