‎2006 Apr 24 2:52 PM
when running the program in background it gives short dump at a remote function call(CALL FUNCTION 'RFC_MAIL'
DESTINATION 'CC_MAIL'
EXPORTING
USER = E_MAIL_USERS-UNAME
TABLES
MAIL = MAIL_TAB .)
It was logged under the name "RFC_EXTERNAL_ABORT"
on the called page.
what happended : ("mail terminated with exit code 256 (Command not found ?)."
The current ABAP/4 program had to be terminated because
of the above FM statements could not be executed.
This is probably due to an error in the ABAP/4 program.
The error occurred in an RFC call to another system.
The target system has also written a short dump.
where is the change required ? and what is the exact problem..?
thanx in advance.
Regards
Ashok
‎2006 Apr 24 3:30 PM
Hey,
You can avoid the short dump by adding this bit to your code.
EXCEPTIONS
communication_failure = 1 MESSAGE msg_text
system_failure = 2 MESSAGE msg_text
OTHERS = 3.
Evaluate the contents of the variable MSG_TEXT. Hope this helps troubleshoot your problem.
Kiran
‎2006 Apr 24 2:54 PM
‎2006 Apr 24 2:57 PM
Hi,
Probably there are two reasons for this :
1) A logical system is not defined - which must not be the scene in your case.
2) The volume of data that is being processed through the RFC is huge, this would in turn result into time_out scenario and give a dump as well.
Regards,
Tanveer.
Please mark helpful answers.
‎2006 Apr 24 3:00 PM
<b>here is the form which contains the RFC.</b>
TABLES : BSEG.
DATA: BEGIN OF E_MAIL_USERS OCCURS 1 ,
UNAME(50) ,
END OF E_MAIL_USERS.
DATA: V_WRBTRC(17) TYPE C,
V_WRBTR LIKE REGUP-WRBTR.
DATA: BEGIN OF MAIL_TAB OCCURS 1 ,
TEXT(80) ,
END OF MAIL_TAB.
Get the email address
SELECT SINGLE * FROM LFA1
WHERE LIFNR = REGUP-LIFNR.
IF SY-SUBRC EQ 0.
CHECK LFA1-KTOKK = '005'. "To Check for Employees
MOVE LFA1-NAME4 TO E_MAIL_USERS-UNAME.
APPEND E_MAIL_USERS.
ELSE.
EXIT.
ENDIF.
CLEAR V_WRBTR.
SELECT * FROM REGUP
WHERE LAUFD = REGUP-LAUFD
AND LAUFI = REGUP-LAUFI
AND XVORL = SPACE
AND LIFNR = REGUP-LIFNR.
SELECT SINGLE * FROM BSEG
WHERE BUKRS = REGUP-BUKRS
AND BELNR = REGUP-BELNR
AND GJAHR = REGUP-GJAHR
AND BUZEI = REGUP-BUZEI.
SELECT * FROM BSEG
WHERE BUKRS = REGUP-ZBUKR
AND BELNR = REGUP-VBLNR
AND GJAHR = REGUP-GJAHR
AND LIFNR = REGUP-LIFNR.
check bseg-shkzg eq 'H'. " JR (Don't reject debits)
IF BSEG-SHKZG EQ 'S'. " (Record is a debit)
BSEG-WRBTR = -1 * BSEG-WRBTR. " (Reduce amount of payment
" in notification header
" by debit amount)
ENDIF. " JR (end)
V_WRBTR = V_WRBTR + BSEG-WRBTR.
ENDSELECT.
ENDSELECT.
WRITE '$' TO V_WRBTRC(1).
WRITE V_WRBTR TO V_WRBTRC+1(16).
CONDENSE V_WRBTRC NO-GAPS.
MOVE 'Subject: Account Credit - ' TO MAIL_TAB-TEXT.
WRITE REGUP-LAUFD TO MAIL_TAB-TEXT+29(8) MM/DD/YY.
INSERT MAIL_TAB INDEX 1.
SELECT SINGLE * FROM LFA1
WHERE LIFNR = REGUP-LIFNR.
WRITE ' ' TO MAIL_TAB-TEXT.
APPEND MAIL_TAB.
WRITE 'From : HAL Finance Department' TO MAIL_TAB-TEXT. "GM 3/5/99
APPEND MAIL_TAB.
WRITE 'Date :' TO MAIL_TAB-TEXT.
WRITE SY-DATUM TO MAIL_TAB-TEXT+8(8) MM/DD/YY.
WRITE SY-UZEIT TO MAIL_TAB-TEXT+18(8).
APPEND MAIL_TAB.
WRITE TEXT-LIN TO MAIL_TAB-TEXT.
APPEND MAIL_TAB.
WRITE 'Employee :' TO MAIL_TAB-TEXT.
WRITE LFA1-NAME1 TO MAIL_TAB-TEXT+20(30).
APPEND MAIL_TAB.
WRITE 'Date of Credit :' TO MAIL_TAB-TEXT.
WRITE REGUP-LAUFD TO MAIL_TAB-TEXT+20(8) MM/DD/YY.
APPEND MAIL_TAB.
WRITE 'Amount :' TO MAIL_TAB-TEXT.
WRITE V_WRBTRC TO MAIL_TAB-TEXT+20(17).
APPEND MAIL_TAB.
WRITE TEXT-LIN TO MAIL_TAB-TEXT.
APPEND MAIL_TAB.
WRITE 'Inv Number' TO MAIL_TAB-TEXT.
WRITE 'Inv Date ' TO MAIL_TAB-TEXT+15(10).
WRITE 'Description' TO MAIL_TAB-TEXT+30(30).
WRITE 'Inv Amt' TO MAIL_TAB-TEXT+73(7).
APPEND MAIL_TAB.
WRITE TEXT-LIN TO MAIL_TAB-TEXT.
APPEND MAIL_TAB.
To get all the invoices for the employee get from BSEG
SELECT * FROM REGUP
WHERE LAUFD = REGUP-LAUFD
AND LAUFI = REGUP-LAUFI
AND XVORL = SPACE
AND LIFNR = REGUP-LIFNR.
SELECT SINGLE * FROM BSEG
WHERE BUKRS = REGUP-BUKRS
AND BELNR = REGUP-BELNR
AND GJAHR = REGUP-GJAHR
AND BUZEI = REGUP-BUZEI.
check bseg-shkzg = 'H'. " JR (Don't reject debits)
Get the Description text for CC Mail
SELECT SINGLE * FROM BKPF
WHERE BUKRS = REGUP-ZBUKR
AND BELNR = REGUP-BELNR
AND GJAHR = REGUP-GJAHR.
WRITE BSEG-BELNR TO MAIL_TAB-TEXT.
WRITE REGUP-BLDAT TO MAIL_TAB-TEXT+15(8) MM/DD/YY.
WRITE BKPF-BKTXT TO MAIL_TAB-TEXT+30(25).
WRITE '$' TO V_WRBTRC(1).
WRITE BSEG-WRBTR TO V_WRBTRC+1(16).
CONDENSE V_WRBTRC NO-GAPS.
WRITE V_WRBTRC TO MAIL_TAB-TEXT+62(17) RIGHT-JUSTIFIED.
IF BSEG-SHKZG EQ 'S'. " JR (Record is a debit)
MOVE '-' TO MAIL_TAB-TEXT+79(1). " (Insert minus sign)
ELSE. " (Record is a credit)
CLEAR MAIL_TAB-TEXT+79(1). " (No minus sign)
ENDIF. " JR (End)
APPEND MAIL_TAB.
ENDSELECT.
WRITE TEXT-LIN TO MAIL_TAB-TEXT.
APPEND MAIL_TAB.
CONCATENATE '* Please Note the availability of funds may vary due t'
'o the capabilities' INTO MAIL_TAB-TEXT.
APPEND MAIL_TAB.
CONCATENATE ' of your financial institution. Should you not receive c'
'redit for these' INTO MAIL_TAB-TEXT.
APPEND MAIL_TAB.
CONCATENATE ' funds, please notify your Accounts Payable Manager as s'
'oon as possible.' INTO MAIL_TAB-TEXT.
APPEND MAIL_TAB.
CALL FUNCTION 'RFC_MAIL'
DESTINATION 'CC_MAIL'
EXPORTING
USER = E_MAIL_USERS-UNAME
TABLES
MAIL = MAIL_TAB .
‎2006 Apr 24 3:05 PM
Hi,
The reason for dump would probably be large volume of data you are passing. If so once you pass the data - break it into small chunks in internal table on the other end(in your RFC) then apply the required processing on the data, this would not let the time-out condition occur.
-Regards
Murtaza Kapadia
Please Mark the helpful answers.
‎2006 Apr 24 3:07 PM
Ashok,
Has this worked in the past in background? Or is this the first time that you are trying it?
Does it work in foreground processing?
And definitely not "timeout" related.
‎2006 Apr 24 3:12 PM
no it worked properly in the Back ground earlier.
still i didnt get what is problem and where is the change required?
‎2006 Apr 24 3:30 PM
Hey,
You can avoid the short dump by adding this bit to your code.
EXCEPTIONS
communication_failure = 1 MESSAGE msg_text
system_failure = 2 MESSAGE msg_text
OTHERS = 3.
Evaluate the contents of the variable MSG_TEXT. Hope this helps troubleshoot your problem.
Kiran
‎2009 Jan 14 6:42 AM
Hi Ashok,
Please let me know if you have found the resolution to this issue. We are facing the similar issue.
Thanks and Regards
Nitin.