cancel
Showing results for 
Search instead for 
Did you mean: 

File to IDoc updating status in DB Table

former_member644654
Participant
0 Kudos

Hi All,

I'm doing a scenario which is File to IDoc. In this scenario we are supposed to check the file for an interface sequence no., as this interface runs every 2 hours. I've implemented a shell script in the sender communication channel so that when the file is placed the script gets executed and checks for the sequence no. If the sequence no. is validated correctly we store the sequence no. with the file name in the database. If the validation fails for the sequence no. PI processing stops and sends a mail to the source.

Now the challenge in this scenario is that we have 1 more field in the database table which is "Status" which is set to "N" by default when the file processing starts in PI and after the PI processing is successfully executed the field "Status" should be updated to "Y".

I'm unable to get a solution for the same. Kindly guide me how to get a solution for this.

Regards,

Sreedhar, Av

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member644654
Participant
0 Kudos

Hi Baskar,

In my scenario I'm not sure how to use a UDF as I'm not having a Source and Target field to which I can map my UDF. As the Data Type which is mapped to is just the Detail records. Even though I add the Trailer part in the structure, I don't have a Target field.

Kindly let me know what else should I be doing?

baskar_gopalakrishnan2
Active Contributor
0 Kudos

>Now the challenge in this scenario is that we have 1 more field in the database table which is "Status" which is set to "N" by default when the file processing starts in PI and after the PI processing is successfully executed the field "Status" should be updated to "Y". I'm unable to get a solution for the same. Kindly guide me how to get a solution for this.

In your scenario file to idoc, after file is picked up and processed do the jdbc update using UDF in mapping.  Since this is going to be a single field update you can write UDF and update this in the mapping. This is one  approach which does not need any configurations and just write the code and update the status. 

You can refer this thread and Bhavesh replies.

http://scn.sap.com/thread/412661

Another approach is using multimapping without BPM. Create another inbound interface for jdbc and reference in the target side of operation mapping in ESR. Use Enhanced interface determination approach.

Refer this link for creating enhanced interface determination.

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/90dcc6f4-0829-2d10-b0b2-c892473f1...

Hope that helps