2006 May 22 3:03 PM
hi all,
i am trying to use a Macro in the standard User exit MV45AFZA,MV45ATZZ.
i am writing following code but it gives the error for the below code.
***INCLUDE MV45ATZZ .
************************************************************************
*
This include is reserved for user modifications *
*
Additional data definitions *
*
The name of additional data definitions should begin with 'ZZ'. *
*
************************************************************************
DATA: ZZFIELD(8) TYPE C.
*{ INSERT WRDK900243 1
Shared forms and data declarations
DEFINE ZZCHKSTATUS.
ADD 1 TO &1.
END-OF-DEFINITION.
DATA NUMBER TYPE I VALUE 1.
ZZCHKSTATUS NUMBER.
INCLUDE zzsdi_mv45atzz.
*} INSERT
Thanks and Regards,
Ram.
Hai Go through the following Document
Macros can only be used in the program the are defined in and only after the definition are expanded at compilation / generation. Subroutines (FORM) can be called from both the program the are defined in and other programs . A MACRO is more or less an abbreviation for some lines of code that are used more than once or twice. A FORM is a local subroutine (which can be called external). A FUNCTION is (more or less) a subroutine that is called external. Since debugging a MACRO is not really possible, prevent the use of them (Ive never used them, but seen them in action). If the subroutine is used only local (called internal) use a FORM. If the subroutine is called external (used by more than one program) use a FUNCTION
Thanks & regards
Sreeni
2006 May 22 3:06 PM
What error are you getting?
Try this way.
DEFINE ZZCHKSTATUS.
ADD 1 TO &1.
END-OF-DEFINITION.
<b>DATA ZZNUMBER TYPE I VALUE 1.</b>
ZZCHKSTATUS ZZNUMBER.
2006 May 22 3:07 PM
Hai Go through the following Document
Macros can only be used in the program the are defined in and only after the definition are expanded at compilation / generation. Subroutines (FORM) can be called from both the program the are defined in and other programs . A MACRO is more or less an abbreviation for some lines of code that are used more than once or twice. A FORM is a local subroutine (which can be called external). A FUNCTION is (more or less) a subroutine that is called external. Since debugging a MACRO is not really possible, prevent the use of them (Ive never used them, but seen them in action). If the subroutine is used only local (called internal) use a FORM. If the subroutine is called external (used by more than one program) use a FUNCTION
Thanks & regards
Sreeni
2006 May 22 3:07 PM
hi
wat problem r u getting
itz working fine.
can u tell us wat exactly is the error u r getting ?
2006 May 22 3:10 PM
HI ALL,
THE PROGRAM IN WHICH I AM WRITING THIS CODE IS IN MV45ATZZ. WHEN I USE THE SAME IN THE ORDINARY REPORT IT IS WORKING FINE.
THANKS AND REGARDS
2006 May 22 3:13 PM
Hi Ram,
under which form you are doing this...
and try to do it save_document_prepare. are you getting any error.
Regards
vijay
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |