2007 Feb 13 2:52 PM
Hello NG,
I've got a SAPSCRIPT-Form with 4 pages.
Page FIRST with follow page AGB, page AGB with follow page NEXT,
page NEXT with follow page NEXT and page AGB2 with no follow page.
The page AGB2 is called by command NEW-PAGE in a element at the main window at page FIRST, as we don't want to print a clear sheet, when we use the normal follow page logic and the new-page command if the is only one formpage to print ( the pages AGB and AGB2 don't have a main-window).
This logic is correct if we have to print a PO for foreign customer.
But for interior customer we need the following logic:
FIRST->NEXT->NEXT->...->NEXT
Thanks for help.
Best Regards Stefan
2007 Feb 13 3:18 PM
Hi,
The AGB2 page is calling externally from the Program, so that will be in the CONTROL_FORM function module, so here you need to write the simple if condition .
If Customer = interior customer.
Call the CONTROL_FROM Fucntion moduel and call the NEW page.
ENDIF
Hi,
The AGB2 page is calling externally from the Program, so that will be in the CONTROL_FORM function module, so here you need to write the simple if condition .
If Customer = interior customer.
Call the CONTROL_FROM Fucntion moduel and call the NEW page.
ENDIF
2007 Feb 13 3:13 PM
Hi!
For the interior customer the normal program flow is correct. You only have to implement the coding for foreign customer.
In your ABAP you have to identify the foreign customer with a variable like gv_foreign_customer TYPE c.
Your ABAP will seems like this:
LOOP AT itab...
...
IF gv_foreign_customer = 'X'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'NEW_PAGE_AGB2'.
ENDIF.
...
ENDLOOP.
And the SAPScript in MAIN window:
/E NEW_PAGE_AGB2
/: NEW-PAGE AGB2
Regards
Tamá
2007 Feb 13 3:16 PM
try to use
START_FORM
CLOSE_FORM
for handling this scenario.
regards,
vijay
2007 Feb 13 3:18 PM
Hi,
The AGB2 page is calling externally from the Program, so that will be in the CONTROL_FORM function module, so here you need to write the simple if condition .
If Customer = interior customer.
Call the CONTROL_FROM Fucntion moduel and call the NEW page.
ENDIF
2007 Feb 13 6:20 PM
Hi,
I try to explain the problem more.
I use a modified 'SAPLMEDRUCK' for printing the form, a modified 'MEDRUCK'.
I just need the point where the is the change from page FIRST to the follow page, so I can differ between foreign and interior customer by the field 'LFA1-LAND1' the logic therefore I have.
The best point in my opinion is the end of the first page, but at the end of the main window of page first there is automatically the change the next page with a main window.
If there were a special event I could catch, it would help me to solve the problem.
Thx Stefan
2007 Mar 05 2:04 PM
I just solved the problem with changing the complete logic.
Page First -> Next -> ... -> Next -> if foreign customer page AGB .
Thanks for all your Help and suggestions.
Best Regards Stefan
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |