Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

COMMIT_IN_POSTING

Former Member
0 Kudos

Hi experts

I have a problem with an output type of the sales orders, results that after creating a SAP sales order I need to create the same sales order in an informix system, so I'm connecting with DBCO to the informix database and executing some stores procedures with EXEC SQL. sentence, I have this instructions in the output type, then after executing each store procedure I'm executing and ENDEXEC and a COMMIT WORK, because If I don't use the COMMIT WORK from SAP the records I'm inserting in informix database are not inserted in Informix DATABASE, the program of the output type works fine when I run it separately, but when is executed after the VA01 or VA02, the system give me a dump with next error :

The question is , do I have another way to send the commit to the Informix database from SAP??.

Thanks

Regards

Soraya

*******************************************************

Errores tiempo ejec. COMMIT_IN_POSTING

ocurrido el 02.04.2009 a 15:31:26

Invalid COMMIT WORK in an update function module.

Calling a COMMIT WORK in an update process is not allowed

because the function modules triggered in a Logical Unit

of Work cannot then be processed correctly.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Do not try COMMIT WORK

    • Commit the changes on connection

 
    EXEC SQL.
      COMMIT
    ENDEXEC.

Thanks

Naresh

3 REPLIES 3

Former Member
0 Kudos

Do not try COMMIT WORK

    • Commit the changes on connection

 
    EXEC SQL.
      COMMIT
    ENDEXEC.

Thanks

Naresh

0 Kudos

Thanks a lot. It works.

Regards

Soraya

0 Kudos

Yes will work But seems to me a major breach to the 'In Update Task' concept. This native SQL Commit will be executed regardless the Transactional state of the process.

I would like to find a way to detect at Run-Time whether my process (method) is running in that state or not.

So if anybody has a tip for that I'd be very grateful

Dirk

PS: Think I received a better answer in  http://scn.sap.com/message/16428484#16428484