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

Statement not accessible error - Any ideas please.

Former Member
0 Likes
741

Hello all:

We were using macro from TRMAC table in 4.6C version and it used to give a warning but after upgrading to ECC6.0 it is syntax error! Please look at the code below:

************************************************************************

*SELECTION SCREN / PARAMETERS *

************************************************************************

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-s01.

PARAMETERS: p_mode(1) TYPE c DEFAULT 'N' OBLIGATORY,

p_grp LIKE apqi-groupid DEFAULT 'SKF_POST' OBLIGATORY.

SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN SKIP 1.

unix_pc_path text-001 text-002 text-003.

************************************************************************

*Intialization *

************************************************************************

*INITIALIZATION.

************************************************************************

*At selection screen *

************************************************************************

AT SELECTION-SCREEN OUTPUT.

PERFORM format_unixpath(yunixctrl) USING 'YHOME_UX' yhome_ux.

AT SELECTION-SCREEN.

IF ( rdb_pc = 'X' AND yhome_pc IS INITIAL ) OR

( rdb_ux = 'X' AND yname_ux IS INITIAL ).

MESSAGE e000 WITH 'A filename is required'.

ENDIF.

************************************************************************

  • AT USER-COMMAND *

************************************************************************

  • AT USER-COMMAND.

************************************************************************

*Start-of-selection *

************************************************************************

START-OF-SELECTION.

IF NOT rdb_ux IS INITIAL.

unix_getname yhome_ux yname_ux v_file_in.

PERFORM upload_parse_unix_file.

ELSEIF NOT rdb_pc IS INITIAL.

v_file_in = yhome_pc.

PERFORM upload_parse_pc_file.

ENDIF.

PERFORM skf_posting.

************************************************************************

*End-of-selection *

************************************************************************

END-OF-SELECTION.

The program does not like the line "unix_pc_path text-001 text-002 text-003." and gives an error "Statement not accessible". I went through some discussion forums on this here but nothing related to macro. Could anyone please give me an idea how I could resolve this? All the answers will be rewarded.

Thanks.

Mithun

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
693

try putting that statement into INITIALIZATION or START-OF-SELECTION event and it will not give an error

try putting that statement into INITIALIZATION or START-OF-SELECTION event and it will not give an error

4 REPLIES 4
Read only

Former Member
0 Likes
694

try putting that statement into INITIALIZATION or START-OF-SELECTION event and it will not give an error

Read only

Former Member
0 Likes
693

Basically this macro is in a place where it is not accessable in any event. Move it to the appropriate event and the error should go away. Also, I didn't see the MACRO definition here. Please post that too.

Read only

0 Likes
693

You cannot put it in START-OF-SELECTION a you need the unix path in the

AT SELECTION-SCREEN FOR OUTPUT event.. move the statement from the selection-screen block to the INITIALIZATION event.

~Suresh

Read only

Former Member
0 Likes
693

Thanks everyone for solving my problem. I rewarded points to everyone.

Mithun.