Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

macro

Former Member
0 Kudos

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.

5 REPLIES 5

former_member181962
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

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 (I’ve 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

Former Member
0 Kudos

hi

wat problem r u getting

itz working fine.

can u tell us wat exactly is the error u r getting ?

0 Kudos

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

former_member188685
Active Contributor
0 Kudos

Hi Ram,

under which form you are doing this...

and try to do it save_document_prepare. are you getting any error.

Regards

vijay