on 05-02-2008 4:59 AM
Hi all,
I have one small problem.In my company there is PO form.At the end of the PO,I have to attach my code.I am getting one small problem,which I and my freinds are unable to resolve it for the past 3 days.I commented my entire code and checked with the below example.Even though I am getting the same wrong data.So,problem is not with my code.
At the end of the PO below is the code.I have one global variable 'X' declared in top include.
****End of existing PO code*********
****Begin of my code*******
X = '1'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'POSPEC'
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.
X = '2'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'POSPEC'
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.
POPEC is text element in main window.It creates a new page POSPEC
/E POSPEC
NEW-PAGE POSPEC
I have one variable window,which has the variable 'W'.Now I have to get 2 new pages(POSPEC) with W as '1' on the begining page and W as '2' on second page.But unfortunately I am getting W as '2' on the two pages.Remember W is on the variable window of the page 'POSPEC'.
Can anyone help me in this regard.It is very very urgent.I have been struggling for the past 3 days.
Thanks,
Balaji
Hi Krishna,
In Sapscripts, the variable window gets called only once at close_form and what ever the value is there at that time in your variable it will be displayed. That is why in your case you are getting only '2'.
If you want to use more than once then you should use MAIN window for that pupose.
Regards,
Anil
Pls award if helpful..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Anil,
Could you please let me know other alternate solution other than Main Window.My problem is I have to remove main window and create another window,which is bigger than main window.This we need because our Bitmap images will be too bigger.So I created new page with new variable window.Main window is part of PO .I modified both Print program and PO form to include my Modifications immediate after PO starting with new page.
So I can't create a new page with Main window.Since parameters for Main window are fixed.
Please let me know if you have any questions.
Thanks,
Balaji
User | Count |
---|---|
81 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.