cancel
Showing results for 
Search instead for 
Did you mean: 

Help Need on JDBC Sender Adapter

Former Member
0 Kudos

Dear Experts,

           

           I have a JDBC TO IDOC scenario where i have to retrieve data from a sql server based on company code and send it to the

           HR system. My requirement is  on SQL STATEMENT in JDBC Sender channel .

  

        Emp ID              DATE           InOutTime           IN/Out            CompanyCode

           10                   17/13              10:20                   I                        100

            10                   17/13               19:10                 O                       100

          Target Idoc Field

             EmpId             DATE           InOutTime         Time Event Type

  

              10                    17/13             10:20                     P10

              

               10                   17/13              17.10                     P20

       If In/out=I  then It will post P10 and if In/Out=O then P20

   Please give me some input .  how can i achieve this through JDBC select statement or Ir mapping

Regards,

Anirban

Accepted Solutions (1)

Accepted Solutions (1)

iaki_vila
Active Contributor
0 Kudos

Hi Anirban,

First of all in the database table you need a flag column that it lets you to know wich records have been  taken.

You could retrieve the database data without any change, your requeriment could be done in the message mapping with the standard function If.

Regards.

Message was edited by: Iñaki Vila

Answers (2)

Answers (2)

ambrish_mishra
Active Contributor
0 Kudos

Anirban,

You can achieve this transformation in mapping.

Ambrish

Former Member
0 Kudos

Hi Anirban,

You can very well go with mapping solution provided by Inaki Vila its simple or you can use fixvalues function and handle it.

If you want to achieve it through JDBC select statement then

  • Set a flag field in sql server and update it to avoid reprocessing the same records.
  • Select the entries based on company code and In/Out.
  • But in this case you will need to make two interfaces one for In/Out = I and other for In/Out = O.

Regards,

Karthikeyan S