‎2010 May 07 3:58 AM
Hi all,
I have a sapscript form with window 'INFO, ADDRESS , MAIN and PAGE'.
In Call Function 'Write-form' for MAIN, you use:
Call Fx Write-Form
Export
Element = 'Item_line1'
WIndow = 'MAIN'.
However for window INFO of type CONST, it contains header 'contact person' and 'phone number' and its values.
The question is: How do i find the Call Function 'Write-FORM' that reference this window INFO in the program ? The window INFO don't have an element like MAIN window. I am looking at purchase order with custom form from MEDFRUCK. IN the call function, one cannot use element as there is no element to reference in WIndow INFO.
Pls forward any suggestions you have.
thanks
Joyce
Edited by: Joyce Chan on May 7, 2010 5:09 AM
‎2010 May 07 4:29 PM
Is your WINDOW "INFO" assigned to your PAGE "FIRST"? Does it show up in your PAGE WINDOWS view? If it does it should print along with your other defined windows.
‎2010 May 07 5:24 AM
Hi Joyce,
We can call the window INFO by using the below code in the program.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
window = 'INFO'
EXCEPTIONS
window = 1.
Regards,
Jeyabalasubramanian J.
‎2010 May 07 12:47 PM
Hi Jeyabalasubramanian,
That's what i thought but i am unable to search 'window= Info' in the program. Let me look again.
thanks
joyce
‎2010 May 07 1:04 PM
Hi Joyce,
window MAIN must be explicitly called using function module WRITE_FORM in the program in order to display in the ouput.
All the other window need not be called in the program using function module WRITE_FORM.
Even if it is not called in the program it will display all the window in the output other than MAIN window in the output.
Regards,
Jeyabalasubramanian J.
‎2010 May 07 4:27 PM
Hi Jeyabalasubramanian,
Since MAIN must be explicitly called, then for Window INFO, i assume the following can be used without any parameters ?
Call function 'write-form'
thanks
Joyce
‎2010 May 07 4:29 PM
Is your WINDOW "INFO" assigned to your PAGE "FIRST"? Does it show up in your PAGE WINDOWS view? If it does it should print along with your other defined windows.
‎2010 May 07 4:38 PM
Hi Wing Yuen,
Yes. The window 'INFO' is assigned to PAGE 'FIRST" only. When i go to PAGE WINDOW for FIRST page, it shows me two windows - MAIN and INFO.
Does this mean that the driver program will not have a call function 'WRITE-FORM' for this INFO window ?
This INFO does print out on my form. I asked because i cannot find the WRITE-FORM for the INFO window.
Thanks
Joyce
‎2010 May 07 4:50 PM
We use the standard print program SAPFM06P with a custom SAPscript. I checked SAPFM06P and I did not find any CALL FUNCTION 'WRITE_FORM' in it. Not sure why? Could be they are hidden behind function modules.
Not sure if that's helpful, but it's the same in my system.
‎2010 May 07 4:57 PM
HI Wing Yuen,
Thanks for looking up in your system. I am going to add another box like window INFO which will be in first page.
I thought with the new box that i am going to create, i need to put the statement 'CAll Function Write-Form' in the program.
Do you think i still need the statement ? I guess I will find out soon.
thanks
Joyce
‎2010 May 07 5:17 PM
It should appear without any CALL FUNCTION 'WRITE_FORM'. I've created many WINDOWS (added to PAGE WINDOWS) in SAPscript without having any CALL FUNCTION. Mostly to hold static text and company logos.
‎2010 May 07 7:00 PM
Hi Wing Yuen,
May i ask how to add my new window 'HdrTitle' to Page Windows ?
thanks
Joyce
‎2010 May 07 9:24 PM
Go to your PAGE WINDOW view, then on your Edit menu > Create Element a popup window will show up. Scroll to your WINDOW and choose it (double-click). You'll then be prompted to enter the window attributes/margins.
‎2010 May 10 4:11 AM
Hi Wing Yuen,
It works ! Thank you for your help/
I like to thanks to others who have replied. All help appreciated.
Joyce
‎2010 Jun 24 4:20 AM