cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with CLOSE_FORM

Former Member
0 Kudos

Hi,

I would really appreciate if somebody can help me in fixing this issue.

We have custom program for sending statements to customer via fax.

Process is:

We open a sapscript form using FM OPEN_FORM, write data in all the windows and then close the form using FM CLOSE_FORM.

While closing the form, we get spool ID from structure ITCPP.

Then we use FM RSPO_RETURN_SPOOLJOB to get data from spool to internal table. And finally use FM SO_NEW_DOCUMENT_ATT_SEND_API1 to send out e-mail.

While sending the e-mail, standard program checks if cover page needs to be printed?

If yes, it use OPEN_FORM, WRITE_LINES_TO_FORM and then CLOSE_FORM.

Here comes the problem when it close the form. While doing that it sets 1 variable date_mask = MMMM, DD, YY.

Because of this, when our custom statement program opens the new form for next customer, it writes the date in format October 07,2010 instead of 10/07/2010.

I tried using SET COUNTRY before opening the form, passed country value in variable itcpo-tdteleland while opening form.

But nothing helped..

Could anyone please let me know why variable date_mask is getting set to MMMM, DD, YY and how can i reset it before open up another form?

Thanks

Puneet

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

in the form which prints your cover page you could reset it to your date mask right at the end making use of statement SET DATE MASK.

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks you all for replying. The issue has been resolved.

FYI, issue was with standard SAP form OFFICE-TELEFAX where SET DATE MASK MMMM DD, YY is used in FOOTER window.

This form was opened up to print the cover page.

So i used SET DATE MASK in my sapscript form and it worked.

kesavadas_thekkillath
Active Contributor
0 Kudos

I dont think the date mask will be set default by the close form. May be they have written it some where in the print program or driver program.

Former Member
0 Kudos

Thanks for your reply Keshav.

But this is happening during CLOSE_FORM only. May be based on data which it is trying to send out!!! Not sure though!

It calls FM CONTROL_TEXTSYMBOL and in this FM, it sets the value of date_mask.

But is there any way i can reset the value of this date_mask?

Former Member
0 Kudos

Hi,

Please check your Script , the coding might be written there.

write this statement :

SET DATE MASK = 'MMDDYYYY'

Regards,

Srini.