on 09-21-2010 8:45 PM
Please let me know if I can reference "open_form" and "write_form" function modules from subroutine. I have following code in the sapscript form.
/: perform hdr_text in the program zhdr_pgm
in the zhdr_pgm, I am calling the open_form and write_form to reference new text element that I created in the form.
zhdr_pgm.
form hdr_text.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
form = 'ZPO_FORM'
EXCEPTIONS
canceled = 01
device = 02
OTHERS = 03.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'TERMS'
function = 'SET'
type = 'BODY'
window = 'MAIN'
EXCEPTIONS
element = 1
function = 2
type = 3
unopened = 4
unstarted = 5
window = 6
bad_pageformat_for_print = 7
spool_error = 8
codepage = 9
OTHERS = 10.
CLEAR sy-subrc.
Hi,
i have this same scenario. and in the thread was the answer "possible" or not "possible"?
to explain further here is my requirement
scenario:
dunning letter.
requriement:
when dunning rejected payment, we want to output all invoices related to it.
problem:
in f150 (dunning print program)
fetches all items for dunning
for each line item it calls the form to print each line (window main, text element 531)
now, for DD (rejected payments) from the script we can call a function pool to get all the invoices. but, how do we print these actually? can we from this function call write_form so that we can loop through each invoice items and print it?
Regards,
R
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Instead of using the OPEN_FORM use the START_FORM & END_FORM function modules. Why because it is not possible to use OPEN_FORM FM again with out the CLOSE_FORM.
Regards,
Jagadeesh T
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
what is your exact requirement?
what do you mean by "to reference new text element that I created in the form"??
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well, since you already have a form open (your SAPScript form), I don't think trying to call OPEN_FORM again is going to work.
Rob
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I dont really see a benefit with this solution, just problems.
Would you mind to tell us what brings you to the diea? what is your exact requirement, maybe we can propose something else which will fulfill your task as well.
E.G. like rob already proposed, building a text saving it useing SAVE_TEXT and inculding it.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.