cancel
Showing results for 
Search instead for 
Did you mean: 

where to compare Current and previous messages.

Former Member
0 Kudos

i had requirment where i had to insert the text data from FTP to MSSQL Database

(R/3) File -> Xi -> JDBC.

but the condition is -> In case the SQL server is down for any time (1 Jan to 4 Jan), and when SQL Server is UP on 5 jan, All the data in R/3 form 1-4 Jan shall also be udpated on 5th Jan.

Check has to be made by XI whether Current Data DATE is 1 more then previous data DATE.

(i.e on 5 day XI has to check whether 4 Jan Data has passed Xi Sucessfuly or not)

My Views : Alert can be used to identify the days of downtime, and we again put the file from Archives to FTP.

But this process also has to be automated, no manual intervention on taking file from archives

I had to use BPM.?

any Inputs..?

Regards

Ajay Pant

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Ajay,

i hope adapter engine in case of Message Quality EO, guarantees message delivery if the system is up. in that case your previous messages will be delivered once your SQL server comes up.

Regards

Rajeev

Former Member
0 Kudos

Dear chirag and Rajiv thx for reply..

But

message flow is: R3 -> XI -> MSSql Database

Adapters : file JDBC

-> if i maitain a table in XI for message processed

date wise , and use this table to compare for next coming messages, as a check.

but this table will also contain the details of failed messages , failed at JDBC adapter( ex: sql server is down)

as after mapping only JDBC adapter receives the data

I need ->

the table should mantain message details,datwise for Sucessfully inserted data in MSSQL Database.

now where i should i mantain this table...

Regards,

AJAY

Former Member
0 Kudos

HI Ajay,

How u r checking that message is failed one or sucessful one.

Are there any field in incoming message for comparision.

THnx

Chirag

Former Member
0 Kudos

hello,

u can also maintain table in SQL-Server where date and timestamp will be updated from your payload. i hope u r familiar with core java programming. in that case u can have java program to connect to SQL-Server database through JDBC to check the date and timestamp and then compare messages.

when server is up, adapter engine will deliver all the message to SQL-Server and then u can everytime check records with previous date.

Regards

Rajeev

Former Member
0 Kudos

Hi

i need a table which should contain list of messages Sucessfull at target ( JDBC Adapter level) side.

the date of that last sucessfull messsage will be compared

with any new message,

if the diference is 1.(4 jan - 5 jan) the new message should proceed to hit MSSQL server,

if the diference is not 1 (2Jan - 5 Jan) = 3

XI should call an z rfc which will create the file at ,file adapter again , containing data for 3 previous days ( when server was down.

Regards,

AJAY

Former Member
0 Kudos

Hi

but this java program will be scheduled or through Xi we can call it, like in file adapter..( OS command option).

and where the comparison will hapen in SYNC with XI ..

Regards,

Ajay Pant.

Former Member
0 Kudos

HI Ajay,

U can do the comparion on R3 side by witing a Function module and do the comparision.

That function module return the value as true if the difference is 1 u need to do all the comparision at the root node of XI.......If the difference is one then the mapping will execute otherwise it will not.

I was just thinking how u r going to hold the message of date which result is not 1.....

Thnx

Chirag

Former Member
0 Kudos

maintain the date of last processed message in SQL level in a table and do a JDBC look up from XI before processing a message

Former Member
0 Kudos

HI,

In both the cases u require to write a java code in UDF and pass the value to either DB or R3.

Here are few links which will help u..

Lookup - /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer

DB lookup - /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler

SOAP Lookup - /people/bhavesh.kantilal/blog/2006/11/20/webservice-calls-from-a-user-defined-function

http://help.sap.com/saphelp_nw04/helpdata/en/cf/406642ea59c753e10000000a1550b0

Lookup’s in XI made simpler - /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler

How to check JDBC SQL Query Syntax and verify the query results inside a User Defined Function of the Lookup API -

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

/people/prasad.illapani/blog/2006/10/25/how-to-check-jdbc-sql-query-syntax-and-verify-the-query-results-inside-a-user-defined-function-of-the-lookup-api

Lookups - /people/morten.wittrock/blog/2006/03/30/wrapping-your-mapping-lookup-api-code-in-easy-to-use-java-classes

Lookups - /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer

/people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler

http://help.sap.com/saphelp_nw04/helpdata/en/cf/406642ea59c753e10000000a1550b0/content.htm

/people/sap.user72/blog/2005/12/06/optimizing-lookups-in-xi

Lookups with XSLT - https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8e7daa90-0201-0010-9499-cd347ffb...

/people/sravya.talanki2/blog

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/05a3d62e-0a01-0010-14bc-adc8efd4...

Thnx

Chirag

Former Member
0 Kudos

Thanks a lot to all ...

maintaining a table at MSSQL database side and using JDBC look will solve my problem.

-> option of maintaining the table at XI or R/3 ( in abap stack)

is not possible , for messages failed at target JDBC adapter level.

why i am thinkin, because sxmb_moni, wo'nt take care of messages failed at (target side) Adapter Engine after passing Integration server.

Regards,

Ajay Pant

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

U can maintain a table at the R3 end with the information of date.

Now when message comes to XI u pass that value to R3 and compare the value which is maintained in table of R3.

U need to use the lookup for passing the value to R3.

Thnx,

Chirag