06-26-2005 3:47 PM
HI All,
I am trying to write a code for the following scenario:
I have to Create three texts(I will be doing it in So10) and this standard text got few program symbols that will take values from my program.This three Texts will be called in my program based on some coniditions and than using smartforms or normal function module i have to send a email(web mail id).
The problem that i have presently is that the program symbols are not taking the required values from my program and the mails send are giving a pending message.
All the required scot transaction settings have been done and the mails are working fine when i do it from inbox.
Please let me know if any one of u have any solution for this scenario.
Thanks and Regards
Satish.
06-27-2005 4:10 AM
Hi Satish,
You should read the text using function module READ_TEXT and then replace the variables with its value within your program itself.
In SapScript/samrtform you may not have to do this as Include statement will take care of it but if you are doing this in a normal report program then you need to code everything to handle it.
Further, for your mail program, you should try Trace facility ( Xn SCOT - Trace On) and then check the trace to see the log.
Also remeber that sender must have a valid email id.
cheers,
Ram
06-27-2005 6:58 AM
Hi Ram,
Thanks for your reply.
Please let me know this
How to replace the program symbols with in my program.
Do I have to decalare anything before that.
Thanks and Regards
Satish
06-27-2005 2:34 PM
Use FM READ_TEXT to get the text in an itab.
Then say &var1& is the variable there in the text maintained using SO10.
And lv_var1 is the variable which containes its value in program.
Then :
LOOP AT ITAB.
REPLACE &var1& with lv_var1 into ITAB. "Check F1 REPLACE
MODIFY ITAB.
ENDLOOP.
Now you can pass this ITAB to the mail function module.
Cheers,
Ram