cancel
Showing results for 
Search instead for 
Did you mean: 

File-XI-JDBC Scenario

Former Member
0 Kudos

Dear All,

I am working on File-XI-JDBC scenario. I am able to update the SQL database with the file.

My SQL database is having following columns:

MATNR MATXT DATUM

Now, I want is that even if the MATNR is already existing in the database then again that entry should not be inserted into the database with the different date although the same MATNR exists in the flat file.

Please guide me on how this can be done.

Warm Regards,

N.Jain

Accepted Solutions (0)

Answers (5)

Answers (5)

nikhil_bose
Active Contributor
0 Kudos

that should be taken care in the database side itself.

1) you can make MATNR be a part of primary key

or

2) you can go for stored procedures to check its existing or not

or

3) you can create a triger before insert

thanks

nikhil

Former Member
0 Kudos

1) you can make MATNR as primary/unique key

2) write before insert trigger and do necessary for calling procedure or write code in itself

then also if you can not tell me I can give you exact steps for what to do.

you can not call procedure directly in XI

Thanks

Former Member
0 Kudos

Hi,

solution is very simple, in SQL database make MATNR as primary key (only MATNR).

After that databse will not allow you to insert this field in database.

Regards,

Gourav

---

reward points if it helps you

Former Member
0 Kudos

Dear All,

I have got one stored procedure writtern in the SQL database which will check if the MATNR already exists in the database or not, if MATNR does not exists in the database then it will write a new row.

Bit I am not able to call tht procedure in XI.

Can anybody please explain me on how we have to call that procedure in XI and use it.

Warm Regards,

N.Jain

Former Member
0 Kudos

HI,

Check out the weblog and help for writing stored procedure:

/people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures

/people/sriram.vasudevan3/blog/2005/02/14/calling-stored-procs-in-maxdb-using-sap-xi

http://www.ics.com/support/docs/dx/1.5/tut6.html

http://java.sun.com/docs/books/tutorial/jdbc/basics/sql.html

http://www.sqlteam.com/article/stored-procedures-an-overview

Thnx

Chirag

Former Member
0 Kudos

Hi,

This will be taken care by JDBC database. Since MATNR will be a key field in the database so it will not be affected by anyway.

Regards,

Sarvesh