Application Development and Automation 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: 
Read only

build Macro

Former Member
0 Likes
530

Hi,

i can build macro that can do this commend?

IF sy-subrc NE 0.

flag_empty = 'X'.

ENDIF.

Regards

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
505
REPORT  ZMACRO.

data: flag.

DEFINE checksubrc.
  if &1 ne 0.
   &2 = &3.
  endif.

END-OF-DEFINITION.

sy-subrc = 4.

checksubrc sy-subrc flag 'X'.
3 REPLIES 3
Read only

Former Member
Read only

Former Member
0 Likes
506
REPORT  ZMACRO.

data: flag.

DEFINE checksubrc.
  if &1 ne 0.
   &2 = &3.
  endif.

END-OF-DEFINITION.

sy-subrc = 4.

checksubrc sy-subrc flag 'X'.
Read only

Former Member
0 Likes
505

Check this code:

DATA: flag_empty TYPE char1.

  • Macro definition

DEFINE check_error.

if sy-subrc ne 0.

flag_empty = 'X'.

endif.

END-OF-DEFINITION.

*Macro call

check_error.

Regards,

Joy.