2007 Jun 27 10:59 AM
hi
i want to send mail automatic to user when below condition is satified.
Data: ZUONR1 LIKE BSEG-ZUONR.
data: 2days_out type sy-datum.
2days_out = sy-datum + 2.
data: lv_date type sy-datum.
data: lv_formatdate(10) type c.
data: var1(4) type c,
var2(2) type c,
var3(2) type c.
lv_date = 2days_out.
var1 = lv_date+(4).
var2 = lv_date+4(2).
var3 = lv_date+6(2).
concatenate var3 var2 var1 into lv_formatdate separated by '.'.
<b>select single zuonr from bseg into zuonr1
where bukrs = 'GSEG' and ZUONR = lv_formatdate.</b>
<b>zuonr is not date field its character field .</b>
thanks.
2007 Jun 27 11:03 AM
You do not need to reformat the date, it is already in the correct format. Change you code as follows:
Data: ZUONR1 LIKE BSEG-ZUONR.
data: 2days_out type sy-datum.
2days_out = sy-datum + 2.
data: lv_date type sy-datum.
lv_date = 2days_out.
select single zuonr from bseg into zuonr1
where bukrs = 'GSEG' and ZUONR = lv_date.
You do not need to reformat the date, it is already in the correct format. Change you code as follows:
Data: ZUONR1 LIKE BSEG-ZUONR.
data: 2days_out type sy-datum.
2days_out = sy-datum + 2.
data: lv_date type sy-datum.
lv_date = 2days_out.
select single zuonr from bseg into zuonr1
where bukrs = 'GSEG' and ZUONR = lv_date.
2007 Jun 27 11:03 AM
You do not need to reformat the date, it is already in the correct format. Change you code as follows:
Data: ZUONR1 LIKE BSEG-ZUONR.
data: 2days_out type sy-datum.
2days_out = sy-datum + 2.
data: lv_date type sy-datum.
lv_date = 2days_out.
select single zuonr from bseg into zuonr1
where bukrs = 'GSEG' and ZUONR = lv_date.
2007 Jun 27 11:05 AM
Oops ignore my last message, you are right ZUONR is char not date. Is the select not working or do you require details on how to send an email??
2007 Jun 27 11:11 AM
hi
select not working and also i require details on how to send an email?? .
please help .
thanks.
2007 Jun 27 11:25 AM
hi
i got data in select but now i want how to send mail to perticular user.
thanks.
2007 Jun 27 11:25 AM
Well I don't see any problems with the select statement and it should work so long as you have an entry in BSEG where bukrs = 'GSEG' and zuonr = DD.MM.YYYY
Have you checked an entry exists with the data you see in debug?
What makes you suspect the select is not working?
2007 Jun 27 11:29 AM
You can use methods of the class CLS_BCS to send an external email, see the following examples:
BCS_EXAMPLE_1
BCS_EXAMPLE_2
BCS_EXAMPLE_3
BCS_EXAMPLE_4
BCS_EXAMPLE_5
BCS_EXAMPLE_6
2007 Jun 27 11:45 AM
2007 Jun 27 11:16 AM
hi,
declare var1, var2, var3 as string variables n try
wit regards,
Suresh.A
2007 Jun 27 11:25 AM
Hi,
correct it var1 = lv_date+0(4).
regards,
ruchika
Reward if useful.........
| User | Count |
|---|---|
| 5 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |