Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to get tSAPCommit working after a tSAPBapi update call properly?

Dear friends of Talend!

We want to use tSAPCommit to commit SAP updates done by a tSAPBapi. The BAPI called is BAPI_BAPI_MOSRVAPS_SAVEMULTI3 updating production orders. tSAPBapi is preceded by a tSAPConnect. Apart from tSAPCommit the job is working, incl. tSAPBapi.

Unfortunately tSAPCommit does not execute but produces the following error:

0683p000009M7y5.jpg

 

Question #1: How to use tSAPCommit properly?

I'd love to connect it to a tSAPBapi "job ok" trigger, tSAPBapi does not offer such a trigger. Thus I connected it to "sub job ok" of the subjob containing tSAPBapi.

Is this the correct way to do it, respectively what is the correct way to use that component?

Question #2: Any further ideas, how to get tSAPCommit working?

We are using Talend 6.4.1

Many thanks in advance for any hint!

Markus

Labels (2)
7 Replies
Anonymous
Not applicable
Author

Hi Markus,

 

Can you please check if the records are already committed in SAP? 

If it has implicit commit, the explicit commit may faild

 

Cheers!

Gatha

Anonymous
Not applicable
Author

Dear Gatha,

not sure how to check it. Maybe the broader context of the problem: Our job

1. Updates orders with tSAPBapi BAPI_MOSRVAPS_SAVEMULTI3 

2. Reads order data required to update activities using tSAPBapi  BAPI_MOSRVAPS_GETLIST2

3. Updates activities of orders with tSAPBapi BAPI_MOSRVAPS_CHANGEACTMULTI

The issue is that (3) update of activities fails randomly, i.e. updates are not done for some individual activities without error message.

We found that (3) however worked even in those failure cases, when we did another tSAPConnect before (3).
Before we accept that as solution to our problem, we however want to understand it.

We reasoned that the second tSAPConnect may have led to a clearer commit to the order update and thus eliminated the random problems

Following the best practice in SAP Abap to do an explicit commit after every write as well, we wanted to do the same in our Talend job as well.

Finally also tSAPConnect documentation says that it is typically used in combination with tSAPCommit.

This is why we added a tSAPCommit after (1) which led to the Java error shown in my original post.

To come back to your question, the question is when there is a commit done in SAP, when the Talend job uses tSAPCommit and a update BAPI afterwards?

I also do not think that somewhat already committed transaction in SAP leads (or should lead) to a run time Java error.
Btw. if there is another reasonable explanation why update (3) seems to work with a second preceeding tSAPConnect, it is welcome too!

Anonymous
Not applicable
Author

Hi Markus,

 

     Could you please share the job screen shot to understand the flow? Please also include component screen shots of problematic components.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved

Anonymous
Not applicable
Author

Sorry for my delayed reply, Indian holidays have been blocking me a little bit 😉
Find screen shots of the the job incl. some comments on the purpose of the sub jobs and the issues described above in the file attached.

I am looking forward to your thoughts - many thanks in advance!


SAPCommit Issue.pdf
Anonymous
Not applicable
Author

Hi Markus,

 

    I could see that you are doing both OnSubJob Ok and On component Ok in various parts of the jobs. To make sure that the job flow is following the desired way in your case, could you please use On SubJob Ok between your subjobs including the commit part. I believe the next stage of the jobs (in page 3 of the doc) can be started after the SAP commit. If its workign fine with a second connection, it means the subjob control transfer is not happening in the right way.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved

Anonymous
Not applicable
Author

Dear Nikhil,

many thanks for your response! 

We prepared a simplified job, consisting of only one sub job that updates SAP with a BAPI call that should be committed subsequently.

There is not further "on component" or "on subjob" trigger used other than triggering tSAPCommit

Sorry to say that both option that we checked do not work.

Option #1: tSAPCommit triggered by "sub job ok": - plus the error generated:

0683p000009M7wr.jpg

 

Option #2: tSAPCommit triggered by "component ok": - plus the error generated:

 

0683p000009M8Ap.jpg

 

The first question is, how to tie tSAPCommit into the job the right way. Maybe there are other triggers to be used or tSAPCommit should be rather tied into the data flow. Unfortunately to our understanding the tSAPBapi component itself does not offer a trigger or another output, where tSAPCommit may be linked to.

The second certainly, how to make it work in general

Markus

Anonymous
Not applicable
Author

@MarkusL 

 

Unfortunately I do not have a SAP environment handy to test the details myself.

 

Lets contact @xdshi to get a clue.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved