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: 

how to get all pending email in tcode:sost?

0 Kudos
378

I want to get all pending email in SOST, and then filter unnecessary mail. because I use function moudle 'SO_NEW_DOCUMENT_SEND_API1' to send emails, but the program will send all pending emails in SOST. how to solve the issue?

4 REPLIES 4

Former Member
0 Kudos
145

hi

Seems there are not function moudle to get all email, maybe you can ST05 to trace which dbtables be used in SOST.

There is a sql statement by other guys.

select a.snddat, a.msgv4, c.objdes, c.ownnam, b.rectel, f.name_last, f.name_first

from sapr3.usr21 e, sapr3.adrp f, sapr3.soos b join sapr3.soes a

      on b.rectp = a.rectp

      and b.recyr = a.recyr

      and b.recno = a.recno

join sapr3.sood c

      on b.objtp = c.objtp

      and b.objyr = c.objyr

      and b.objno = c.objno

join sapr3.sost d

      on b.rectp = d.rectp

      and b.recyr = d.recyr

      and b.recno = d.recno

where a.msgty='E'

      and a.sndart = 'FAX'

      and d.counter = ( select max( counter ) from sapr3.sost

                where rectp = b.rectp

                and recyr = b.recyr

                and recno = b.recno )

      and a.snddat >= '$date1'

      and a.snddat <= '$date2'

      and c.ownnam=e.bname

      and e.persnumber=f.persnumber

order by a.snddat

regards,

Archer

0 Kudos
145

The issue has been solved, thank you for your help.

0 Kudos
145

How do you solve this issue? Please share with us, thanks,

0 Kudos
145

No solution, we don't get all pending emails.

I just add wrong code to send emails immediately