REPORT YDEMO_HELLOWORLD . *----------------------------------------------------------------------* TABLES: VBAP. PARAMETERS: FORM LIKE RSSCF-TDFORM DEFAULT 'YDEMO_HELLOWORLD'. *ARAMETERS: form LIKE rsscf-tdform DEFAULT 'YDEMO_TALLY'. START-OF-SELECTION. ************************************************************************ * Open the SapScript Form with the "form" * ************************************************************************ CALL FUNCTION 'OPEN_FORM' EXPORTING * APPLICATION = 'TX' " this is SapScript Appl * DEVICE = 'PRINTER' " allow output to printer * DIALOG = 'X' " printer dialog requested FORM = FORM " name of form (SE71) * LANGUAGE = SY-LANGU * OPTIONS = ' ' EXCEPTIONS CANCELED = 1 DEVICE = 2 FORM = 3 OPTIONS = 4 UNCLOSED = 5 MAIL_OPTIONS = 6 OTHERS = 7. ************************************************************************ * Execute the element "HELLO" in window MAIN * - Nothing happens if /E HELLO is not declared in MAIN ************************************************************************ CALL FUNCTION 'WRITE_FORM' EXPORTING ELEMENT = 'HELLO' "execute element /E HELLO * FUNCTION = 'SET' TYPE = 'BODY' "normal output * WINDOW = 'MAIN' "to window MAIN * IMPORTING * PENDING_LINES = EXCEPTIONS ELEMENT = 1 FUNCTION = 2 TYPE = 3 UNOPENED = 4 UNSTARTED = 5 WINDOW = 6 BAD_PAGEFORMAT_FOR_PRINT = 7 OTHERS = 8. ************************************************************************ * Close the current SapScript Form ************************************************************************ CALL FUNCTION 'CLOSE_FORM' EXCEPTIONS UNOPENED = 1 BAD_PAGEFORMAT_FOR_PRINT = 2 OTHERS = 3.