Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

question on sapscript - window INFO

former_member496861
Participant
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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.

13 REPLIES 13

Former Member
0 Kudos

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.

0 Kudos

Hi Jeyabalasubramanian,

That's what i thought but i am unable to search 'window= Info' in the program. Let me look again.

thanks

joyce

0 Kudos

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.

0 Kudos

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

Former Member
0 Kudos

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.

0 Kudos

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

0 Kudos

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.

0 Kudos

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

0 Kudos

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.

0 Kudos

Hi Wing Yuen,

May i ask how to add my new window 'HdrTitle' to Page Windows ?

thanks

Joyce

0 Kudos

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.

0 Kudos

Hi Wing Yuen,

It works ! Thank you for your help/

I like to thanks to others who have replied. All help appreciated.

Joyce

0 Kudos

Hi

Could you respond to my thread ?

Thanks