on 2009 Jun 22 8:16 AM
Hello Friends,
I got a requirement where I need to send an email to the concerned department with Last Day in Office and Last Pay Date.
During the termination of employee table PA0041 will be filled with dates(dat01-12) and
date types(dar01-12).
I am fetching data from table pa0041 based on the personal number but i am getting 00/00/0000 value in the email even though there is value in the table. I am getting values from other tables and displayed properly in the content of email except from this table.
CALL FUNCTION 'HR_READ_INFOTYPE'
EXPORTING
PERNR = OBJECT-KEY-NUMBER
INFTY = '0041'
IMPORTING
SUBRC = SUBRC
TABLES
INFTY_TAB = P0041
EXCEPTIONS
INFTY_NOT_FOUND = 1
OTHERS = 2 .
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
SORT P0041 DESCENDING BY BEGDA.
READ TABLE P0041 INDEX 1.
DO 12 TIMES VARYING DATAR_TAB FROM P0041-DAR01 NEXT P0041-DAR02
VARYING DATE_TAB FROM P0041-DAT01 NEXT P0041-DAT02.
IF DATAR_TAB = 'U7'.
V_ENDDA = DATE_TAB.
EXIT.
ELSEIF DATE_TAB IS INITIAL.
EXIT.
ENDIF.
ENDDO.
How do i get the value during termination. the object is bus1065.
Thanks & Regards,
Nagaraj
Request clarification before answering.
So what is the Problem. Is the Code not working or email is providing default value. Please check the binding from Wflow to send mail Task.
Thanks
Arghadip
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Trigger the event of that BOR COMPANYLEFT by using the FM SAP_WAPI_CREATE_EVENT*
1. Here 2 cases are possible one is if you trigger from PA30 Txn
2. Delete emtry directly from the table.
2.
When ever a entry is deleted from the table the a message will displayed saying that the employee deleted so what i personally feel is try to trigger the workflow which you have designed to send the mail, when ever this message is triggerd by using the t-code SWUY
1.
Find a enhancement spot and trigger the event SAP_WAPI_CREATE_EVENT aspecify the start event in the workflow, so when evenr the employee is deleted then this event is triggered and then the workflow will be triggered
Hi Pavan,
For me event is triggering and also email generated. In the email body i have field called Termination Date which will be filled from table PA0041-dat01 to dat12 based on the datetype dar01 to dar12.
Now the problem is while testing via SWO1 IT IS WORKING FINE also value will be fetched from pa0041 but during tcode it will be 00/00/0000.
Thanks,
Nagaraj
| User | Count |
|---|---|
| 14 | |
| 8 | |
| 6 | |
| 6 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.