on 09-08-2009 10:27 AM
Hi All,
i am new to SAP SCRIPT , can any one guide us how to Create a footer in the Delivery note sap script.
I need to put some message if the stock of the material is "0"(zero).
can anyone tell me the process to do this.
Thanks
-
Channappa Sajjanar
Hi,
U create a window in script (Footer), and in the Driver program call this window at last..
eg:
create a window in script and call it at the end in the layout..
/E FOOTER
P1 'Write Required text what u want to display;.
now in print program, after printing all the line items in ur internal table call the FM write_form to print the footer...
LOOP AT itab.
call function 'WRITE_FORM'
exporting
window = 'MAIN'
exceptions
others = 1.
endloop.
now call, FM write_form to print the footer
IF stock EQ 0.
call function 'WRITE_FORM'
exporting
window = 'FOOTER'
element = 'FOOTER'
exceptions
others = 1.
endif.
Hope it helps!!
Rgds,
Pavan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
First place Windows on page like this :
Main Window
Footer
Then go to Print program :
CALL FUNCTION 'OPEN_FORM'
EXPORTING
FORM = 'ZTEST'.
CALL FUNCTION 'START_FORM'
EXPORTING
FORM = 'ZTEST'
STARTPAGE = 'FIRST'.
LOOP AT IT.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'HEADER'
WINDOW = 'MAIN'.
ENDLOOP .
CALL FUNCTION 'WRITE_FORM'
EXPORTING
WINDOW = 'FOOTER'.
CALL FUNCTION 'END_FORM'.
CALL FUNCTION 'CLOSE_FORM'.
I am not sure ..try like this.......
Hi,
be sure your footer window iis declared on every page in the sapscript.
In the print program: determine you variable which you use to print (or not print) the footer before printing the main window.
explanation: if you first print the main window and then determine that variable your are already on the last page. And the foorter will only be printed there.
Gr., Frank
Hi Frank,
thanks a lot for your reply, your explanation solved my issue, actually i putted the FOOTER window after the mail window which result's every time printing at last page.
below is the steps i have done .
1:Defined a CONST window names 'Footer". and added this window in both pages 1st and 2nd at the bottom.
2:In the window defied a text element "foot_mesg' and below it hard coded the text which i need to note.
3:in the print program i checked stock for 0(zero) stock .if the stock is zero then mark a variable = 'X'.
4:before printing the fotter window check Variable = 'X' if yes then print the footer window other wise not.
*let me know is this solution is correct or not .
Regards
-
channappa Sajjanar
Hi,
Create a window at the required position in Bottom part of page.
Put a condition like :
/: If &Stock_of_mat& EQ '0'.
p1 Place the text here
/: Endif.
Edited by: MR Venkat on Sep 8, 2009 11:45 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.