I am facing serious problem with SO_NEW_DOCUMENT_ATT_SEND_API1 FM.
Actually we are using this FM to trigger email to Vendors when PO change or release. So using one of the user exits(YFM06PE02) we written code to trigger simple email with PO data. I filled required data and passed to FM. When I run Transaction in Debug mode its sending email success fully.
When I run with out debug ppoing its throwing STACK_NO_ROLL_MEMORY error and screwing the system.
Actually I used this FM many times but never face the problem.
Could you plz any one help me on this.
Here is some of the code
DATA: EMAIL_SEND TYPE STANDARD TABLE OF SOMLRECI1 WITH HEADER LINE.
DATA: OBJCONT TYPE STANDARD TABLE OF SOLISTI1 WITH HEADER LINE.
DATA: EMAIL_DATA TYPE SODOCCHGI1.
Send the document
CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
DOCUMENT_TYPE = 'RAW'
DOCUMENT_DATA = EMAIL_DATA
PUT_IN_OUTBOX = 'X'
OBJECT_CONTENT = OBJCONT
RECEIVERS = EMAIL_SEND
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
OPERATION_NO_AUTHORIZATION = 4
OTHERS = 99.