cancel
Showing results for 
Search instead for 
Did you mean: 

Sending a email with the form attached but no submit Button

Madhu2004
Active Contributor
0 Kudos

Hi experts,

I have designed a form in ABAP using the t-code SFP. i Have a button "accept", in the form.

Now i am calling this form from an executable program and send it to mail with the form attached.

I am successfully receiving the mail with the form attach.

Now my requirement is when i open the attached form and click on ACCEPT button, again a mial shud be triggered with the same form attached but no ACCEPT button shud appear on the form.

I am able to trigger the mail on click of the ACCEPT button and mail is also sent withj the form attached , but the ACCEPT button still exists.

I have written the following code on click of the button.

this.presence = "invisible";

event.target.submitForm();

Please some expert help me in solving this problem as soon as possible.

Thanks and Regards,

Madhu

Accepted Solutions (1)

Accepted Solutions (1)

i042339
Product and Topic Expert
Product and Topic Expert
0 Kudos

I understood your problem completely.

I think you are doing everything correct.

The reason why it is not working is because after the mail is sent the form is getting initialised again. hence the Accept button is appearing again.

My suggestion.. create one hidden field - submit flag - and set the value to Y or N.

One form initialise check the flag and hide the button again.

This will solve your problem.

Please reward point if you got the answer.

Cheers

Satya

Madhu2004
Active Contributor
0 Kudos

Shal i trigger the form to ur mail id once

Madhu2004
Active Contributor
0 Kudos

but the code i have written to add the to=ime stamp is getting added.

before clicking the accept button, the time stamp for the fiels accepted on is initial, but after i click accept button, in the result form which is being mailed time stamp is added but the accept button still apears.

if i define a flag, where shud i bind it to the button.

Thanks and regards,

Madhu

i042339
Product and Topic Expert
Product and Topic Expert
0 Kudos

Did you get my point hwta i have mentioned? The steps which I have suggested will solve your problem.

Please add one dummy attribute (One Char length) to the Form interface.

In the form add one hidden field - SubmitFlag and bind this to the dummy attribute of the interface. Before submit set this flag to Y.

On form Load check if Submit Flag is Y or not. if it is then hide the button agin.

This will work fine for you.

If after implementing this it will not work, send it to my Id p_satya123@yahoo.com.

But first i will suggest to try yourself.

Cheers

Satya

i042339
Product and Topic Expert
Product and Topic Expert
0 Kudos

One more simple solution .. as you have already the timestamp field

Go to Accept button Initialize event, you can check if the timestamp is initial or not

If the timestamp is not initial you can hide the accept button.

this.presence = "invisible";

Madhu2004
Active Contributor
0 Kudos

Thanks a lot satya it solved my problem.

Answers (0)