2007 May 23 10:45 PM
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
2007 May 23 11:00 PM
try putting that statement into INITIALIZATION or START-OF-SELECTION event and it will not give an error
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
2007 May 23 11:00 PM
try putting that statement into INITIALIZATION or START-OF-SELECTION event and it will not give an error
2007 May 23 11:43 PM
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.
2007 May 24 1:58 AM
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
2007 May 24 7:32 PM
Thanks everyone for solving my problem. I rewarded points to everyone.
Mithun.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |