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: 

SO_OBJECT_SEND function does not work without an explicit COMMIT WORK

Former Member
0 Kudos

Hi,

We have used this Function module (SO_OBJECT_SEND) inside a custom BAdI Implementation , which sends e-mails when some of the fields inside an infotype are modified using transaction PA30 (HR-Maintain master data).

After the system was upgraded to BASIS version 7.0 , as per SAP note 489286 ,the calling program of the send interface must execute an explicit COMMIT WORK.But inside an update , COMMIT WORK should not be executed.

So we did not execute explicit COMMIT WORK inside BAdI.

But after this upgrade, the emails are not sent out of R/3 , and the status message 672 (Still no entry in queue) is displayed on the program 'Administration of External Send Processes' - Transaction SOST.

Can anyone suggest a solution , if you have used this Function module (SO_OBJECT_SEND) inside a BAdI during update?

Thanks,

Kiran

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Kiran,

Welcome to SDN.

Yes you need to use COMMIT WORK and there is no alternative to it.

What you can do is you may look for any other BAdi which is called once the PA30 has recorded all the changes for the fields you required.

But I don't think this option is much feasible.

So you may require to use the COMMIT WORK.

Regards,

Atish

14 REPLIES 14

Former Member
0 Kudos

Hi Kiran,

Welcome to SDN.

Yes you need to use COMMIT WORK and there is no alternative to it.

What you can do is you may look for any other BAdi which is called once the PA30 has recorded all the changes for the fields you required.

But I don't think this option is much feasible.

So you may require to use the COMMIT WORK.

Regards,

Atish

former_member181962
Active Contributor
0 Kudos

Hi Kiran,

YOu can probabbly try this.

Crreate a custom Function Module.

Call your SO_OBJECT_SEND and commit work in that Custom FM.

Call that Custom FM in Update task in the badi.

Regards,

Ravi

Former Member
0 Kudos

Hi ,

Use this Function module to email the document ---

CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'

EXPORTING

document_type = 'RAW'

document_data = x_doc_chng

  • commit_work = 'X'

TABLES

contents_txt = t_email

object_header = int_objhead

packing_list = int_objpack

contents_bin = ttxt

receivers = lt_receiver

EXCEPTIONS

too_many_receivers = 1

document_not_sent = 2

operation_no_authorization = 4

OTHERS = 99.

I too had experienced this issue , so i had to comment the commit_work paramter .

This function module internally calls the same Function module that u are using now. I think it will be better if u use this...U can see ur mails in SOST also and no explicit commit work will be needed

Former Member
0 Kudos

Hi all,

Thanks for all your replies..

We have tried using the FM SO_OBJECT_SEND inside custom FM with commit work and then calling it inside the BAdi. This gives an error when called through RFC from a Web server , with message "Invalid COMMIT WORK in a COMMIT WORK or ROLLBACK WORK".

Using the FM suggested by Soumyadeep also did not help. I mean the e-mails showed up with status message 672 (Still no entry in queue)

Thanks,

Kiran

0 Kudos

Has somebody found any solution to this problem? me too facing the same problem!!

Former Member
0 Kudos

Hi Kiran,

I am also facing similar problem. In BADI i am calling on FM in update task and in it i call SO_NEW_DOCUMENT_ATT_SEND_API1

It has one parameter commit work which i passed as 'X'

(with commit work mail is not send)

Received dump while executing for as external commit is not allowed in update task.

Please let me kow what solution u applied.

Rgds,

Ganesh

Former Member
0 Kudos

Explicit commit work does not work in update task and mostly this is seen and faced in transactions like PA30 PA40 etc... our developer faced it and nothing worked..

we searched on net and found following utility program it is not free but it puts back all SO-672 '"still no entry in queue" messages back in queue and from there our standard process sends them as normal...program can be scheduled in backgroud or can be used as SUBMIT REPORT syntax in update task.. we have scheduled it every half an hour...

Link: http://www.mysaphelp.com/book/index.php?page=shop.product_details&flypage=flypage-ask.tpl&product_id...

this is working for us...see if it works for u or not...

Kindly reward points if useful...

Former Member
0 Kudos

Try to use

CALL FUNCTION func IN BACKGROUND UNIT AS SEPARATE UNIT .

It works for me.

0 Kudos

Hi Khai Huynh ,

I tried your solution

CALL FUNCTION func IN BACKGROUND UNIT AS SEPARATE UNIT . but its not working.

Send me the code for the same.

Then i tried solution available on link below which was mentioned by

michell ongota .It worked for me.

http://www.mysaphelp.com/book/index.php?page=shop.product_details&flypage=flypage-ask.tpl&product_id...

Thanks & Regards,

Birju

0 Kudos

I had the same problem.

The best way for me was to create a new Z FM (create an update FM, look in the property tab). Then, in this new FM, simply call SO_OBJECT_SEND with all the parameters you need.

Then in your BADi, call this new FM (adding 'IN UPDATE TASK') instead of calling SO_OBJECT_SEND.

0 Kudos

Hi,

We are facing the same issue. Can anyone please post the complete message in the link http://www.mysaphelp.com/book/index.php?page=shop.product_details&flypage=flypage-ask.tpl&product_id... ? This link is currently not working.

Thanks,

Aditya.

0 Kudos

Hi Kiran,

create one remote enable function module, write your required logic in this remote enableD function module.

Now call this function module in Badi as below,

eg. suppose Remote enable function module created is 'ztest'.

then,

In BadI write logic,

CALL FUNCTION 'ZTEST' SEPARATE TASK 'T'

EXPORTING ......

IMPORTING.......

also inside this function module

call function 'SO_OBJECT_SEND' separate task 'T'

exporting....

importing....

committwork.

after doing this what will happen is your mail logic will be in saperate session, so your current program will pass the data and execution of this RFC and Program having BADI, will be in two saperate sessions, so although you are using committ work standred program will not get affected.

This will improve performance too...:)

Please Give points if it is going to help you.

0 Kudos

Hi Kiran,

create one remote enable function module, write your required logic in this remote enableD function module.

Now call this function module in Badi as below,

eg. suppose Remote enable function module created is 'ztest'.

then,

In BadI write logic,

CALL FUNCTION 'ZTEST' SEPARATE TASK 'T'

EXPORTING ......

IMPORTING.......

also inside this function module

call function 'SO_OBJECT_SEND' separate task 'T'

exporting....

importing....

committwork.

after doing this what will happen is your mail logic will be in saperate session, so your current program will pass the data and execution of this RFC and Program having BADI, will be in two saperate sessions, so although you are using committ work standred program will not get affected.

This will improve performance too...:)

Please Give points if it is going to help you.

brueggel
Explorer
0 Kudos

Hi Kiran

Im Using for PA30 user-exit ZXPADU02 with CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1' DESTINATION 'NONE'

Regards

leo