on 10-28-2009 11:33 AM
Hi gurus,
i've developed a script form whereas the value can not be transported from ABAP program into script form. only the system envoirment variables can be displayed in the FORM.
any ideas? thanks
hi
in the program did u modify the OutTAB corresponding to its index and check out how many paramters (using and changing)
u have written in the Script based on that pass them.
Example
READ TABLE out_tab INDEX 5.
out_tab-value = l_word-word.
CLEAR l_word-word.
MODIFY out_tab INDEX 5.
surya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
all the variables are defined in the TOP include of the module pool entrance program, so i think they should be global.
btw, i am not aware of the OUT_TAB you mentioned.
on the other hand, in the form script, i found the format &I_MSEG-ERFMG(C)& is used. what does '(c)' mean here? anybody knows?
here is my printing program:
the varable A whose value is 4 can not be printed out in the form preview. on the other hand, if i use the same form in the report in stead of output type ME, the value 4 CAN BE displayed.
PROGRAM sapmztest.
DATA: A VALUE '4'.
&----
*& Form ENTRY
&----
text
----
-->ENT_RETCO text
-->ENT_SCREEN text
----
FORM entry USING ent_retco ent_screen.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
APPLICATION = 'TX'
ARCHIVE_INDEX =
ARCHIVE_PARAMS =
DEVICE = 'PRINTER'
DIALOG = 'X'
FORM = 'ZCNMMF017_GR_1'
LANGUAGE = SY-LANGU
OPTIONS =
MAIL_SENDER =
MAIL_RECIPIENT =
MAIL_APPL_OBJECT =
RAW_DATA_INTERFACE = '*'
SPONUMIV =
IMPORTING
LANGUAGE =
NEW_ARCHIVE_PARAMS =
RESULT =
EXCEPTIONS
CANCELED = 1
DEVICE = 2
FORM = 3
OPTIONS = 4
UNCLOSED = 5
MAIL_OPTIONS = 6
ARCHIVE_ERROR = 7
INVALID_FAX_NUMBER = 8
MORE_PARAMS_NEEDED_IN_BATCH = 9
SPOOL_ERROR = 10
CODEPAGE = 11
OTHERS = 12
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'START_FORM'
EXPORTING
ARCHIVE_INDEX =
FORM = 'ZCNMMF017_GR_1'
LANGUAGE = ' '
STARTPAGE = 'FIRST'
PROGRAM = ' '
MAIL_APPL_OBJECT =
IMPORTING
LANGUAGE =
EXCEPTIONS
FORM = 1
FORMAT = 2
UNENDED = 3
UNOPENED = 4
UNUSED = 5
SPOOL_ERROR = 6
CODEPAGE = 7
OTHERS = 8
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'DATA'
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'MAIN'
IMPORTING
PENDING_LINES =
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
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'END_FORM'
IMPORTING
RESULT =
EXCEPTIONS
UNOPENED = 1
BAD_PAGEFORMAT_FOR_PRINT = 2
SPOOL_ERROR = 3
CODEPAGE = 4
OTHERS = 5
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
RESULT =
RDI_RESULT =
TABLES
OTFDATA =
EXCEPTIONS
UNOPENED = 1
BAD_PAGEFORMAT_FOR_PRINT = 2
SEND_ERROR = 3
SPOOL_ERROR = 4
CODEPAGE = 5
OTHERS = 6
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. "ENTRY
Edited by: Stephen Xue on Oct 29, 2009 11:52 AM
You'd better look at a demo program which works well (RSTXEXP2 which uses sapscript form S_CA930_DEMO_3), and compare with your program to see why yours doesn't work.
About (C), see [sap library - sapscript - formatting options|http://help.sap.com/saphelp_nw2004s/helpdata/en/d1/803411454211d189710000e8322d00/frameset.htm]
Hi,
The data declarations shud not be in subroutines.
Ensure that they are globally available in the program.
Then u can make use of them in the script
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
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.