Skip to Content
author's profile photo Former Member
Former Member

error the statement is not accessible

Hallow I do a simple program and I have a error that I don’t now what to do with that. This is my program.

&----


*& Report YHR_T

*&

&----


*&

*&

&----


REPORT YHR_T.

INCLUDE YHR_T_data.

INCLUDE YHR_T_sel.

INCLUDE YHR_T_read.

This is sel

&----


*& Include YHR_T_SEL

&----


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

SELECT-OPTIONS so_date FOR sy-datum OBLIGATORY.

SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-t01.

SELECT-OPTIONS y_ergnit FOR hrp1000-objid NO INTERVALS.

SELECTION-SCREEN END OF BLOCK b2.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR y_ergnit-low.

*======================================================

REFRESH: y_ergnit.

CLEAR: y_ergnit.

PERFORM get_objid USING 'O'

CHANGING y_ergnit-low.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR y_ergnit-high.

*======================================================

REFRESH: y_ergnit.

CLEAR: y_ergnit.

PERFORM get_objid USING 'O'

CHANGING y_ergnit-high.

----


***INCLUDE YHR_OREGH_UNIT_GET_OBJIDF01 .

----


&----


*& Form get_objid

&----


  • text

----


  • -->P_0026 text

  • <--P_SO_ORGEH_LOW text

----


FORM get_objid

USING p_otype

CHANGING p_c_course.

*p_so_orgeh_low

CALL FUNCTION 'RH_OBJID_REQUEST'

EXPORTING

plvar = '01'

otype = p_otype

seark = '*'

seark_begda = so_date-low

seark_endda = so_date-high

set_mode = 'X'

  • DYNPRO_REPID = ' '

  • DYNPRO_DYNNR = ' '

  • DYNPRO_PLVARFIELD = ' '

  • DYNPRO_OTYPEFIELD = ' '

  • DYNPRO_SEARKFIELD = ' '

  • CALLBACK_PROG = ' '

  • CALLBACK_FORM = ' '

  • RESTRICT_FB = ' '

  • RESTRICT_DATA = ' '

  • WITHOUT_RSIGN =

  • WITHOUT_RELAT =

  • WITHOUT_SCLAS =

  • ORGBEG = SY-DATUM

  • ORGEND = SY-DATUM

  • WIN_TITLE =

  • APP_DATA =

IMPORTING

sel_plvar = wa_plvar

sel_otype = wa_otype

sel_object = wa_objid

TABLES

  • OTYPE_TABLE =

  • CONDITION =

  • BASE_OBJECTS =

  • MARKED_OBJECTS =

sel_objects = itab_object

  • SEL_HROBJECT_TAB =

  • SEL_HRSOBID_TAB =

EXCEPTIONS

cancelled = 1

wrong_condition = 2

nothing_found = 3

internal_error = 4

illegal_mode = 5

OTHERS = 6

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

IF wa_otype = 'O '.

REFRESH: y_ergnit.

CLEAR: y_ergnit.

LOOP AT itab_object.

CLEAR y_ergnit.

y_ergnit-low = itab_object-objid.

y_ergnit-option = 'EQ'.

y_ergnit-sign = 'I'.

APPEND y_ergnit.

ENDLOOP.

CLEAR: itab_object.

REFRESH: itab_object.

ENDIF.

p_c_course = wa_objid-objid.

ENDFORM.

This is read.

&----


*& Include YHR_T_READ

&----


<b>here the problem</b><b>when i do check it come here i delete clear and refresh and it still the same err</b>or

CLEAR stru_tab.

REFRESH stru_tab.

SELECT objid

FROM hrp1000

INTO TABLE org_tab

WHERE objid = y_ergnit

AND otype = 'O'

AND plvar = '01'.

LOOP AT org_tab INTO wa_org_tab-objid.

CALL FUNCTION 'RHPH_STRUCTURE_READ'

EXPORTING

plvar = '01'

otype = 'O'

objid = y_ergnit

wegid = 'ORGEH'

begda = sy-datum

endda = sy-datum

  • PUP_INFO = 'X'

  • WITH_STEXT = 'X'

  • TDEPTH = 0

TABLES

stru_tab = stru_tab

  • EXCEPTIONS

  • CATALOGUE_PROBLEM = 1

  • ROOT_NOT_FOUND = 2

  • WEGID_NOT_FOUND = 3

  • OTHERS = 4

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDLOOP.

<b>

The error problem is in yhr_t_read that "statement is not accessible what can I do with this problem thankes for your time</b>

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 07, 2007 at 05:32 PM

    Hi,

    Move the following code (marked in bold) above the subroutine (Form get_objid)...Means the code you have given is after a ENDFORM..That is why it says..the statement maynot be accessible..

    <b>CLEAR stru_tab.

    REFRESH stru_tab.

    SELECT objid

    FROM hrp1000

    INTO TABLE org_tab

    WHERE objid = y_ergnit

    AND otype = 'O'

    AND plvar = '01'.

    LOOP AT org_tab INTO wa_org_tab-objid.

    CALL FUNCTION 'RHPH_STRUCTURE_READ'

    EXPORTING

    plvar = '01'

    otype = 'O'

    objid = y_ergnit

    wegid = 'ORGEH'

    begda = sy-datum

    endda = sy-datum

    • PUP_INFO = 'X'

    • WITH_STEXT = 'X'

    • TDEPTH = 0

    TABLES

    stru_tab = stru_tab

    • EXCEPTIONS

    • CATALOGUE_PROBLEM = 1

    • ROOT_NOT_FOUND = 2

    • WEGID_NOT_FOUND = 3

    • OTHERS = 4

    .

    IF sy-subrc <> 0.

    • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    ENDLOOP.</b>

    ----


    ***INCLUDE YHR_OREGH_UNIT_GET_OBJIDF01 .

    ----


    &----


    *& Form get_objid

    &----


    • text

    ----


    • -->P_0026 text

    • <--P_SO_ORGEH_LOW text

    ----


    FORM get_objid

    USING p_otype

    CHANGING p_c_course.

    *p_so_orgeh_low

    CALL FUNCTION 'RH_OBJID_REQUEST'

    EXPORTING

    plvar = '01'

    otype = p_otype

    seark = '*'

    seark_begda = so_date-low

    seark_endda = so_date-high

    set_mode = 'X'

    • DYNPRO_REPID = ' '

    • DYNPRO_DYNNR = ' '

    • DYNPRO_PLVARFIELD = ' '

    • DYNPRO_OTYPEFIELD = ' '

    • DYNPRO_SEARKFIELD = ' '

    • CALLBACK_PROG = ' '

    • CALLBACK_FORM = ' '

    • RESTRICT_FB = ' '

    • RESTRICT_DATA = ' '

    • WITHOUT_RSIGN =

    • WITHOUT_RELAT =

    • WITHOUT_SCLAS =

    • ORGBEG = SY-DATUM

    • ORGEND = SY-DATUM

    • WIN_TITLE =

    • APP_DATA =

    IMPORTING

    sel_plvar = wa_plvar

    sel_otype = wa_otype

    sel_object = wa_objid

    TABLES

    • OTYPE_TABLE =

    • CONDITION =

    • BASE_OBJECTS =

    • MARKED_OBJECTS =

    sel_objects = itab_object

    • SEL_HROBJECT_TAB =

    • SEL_HRSOBID_TAB =

    EXCEPTIONS

    cancelled = 1

    wrong_condition = 2

    nothing_found = 3

    internal_error = 4

    illegal_mode = 5

    OTHERS = 6

    .

    IF sy-subrc <> 0.

    • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    IF wa_otype = 'O '.

    REFRESH: y_ergnit.

    CLEAR: y_ergnit.

    LOOP AT itab_object.

    CLEAR y_ergnit.

    y_ergnit-low = itab_object-objid.

    y_ergnit-option = 'EQ'.

    y_ergnit-sign = 'I'.

    APPEND y_ergnit.

    ENDLOOP.

    CLEAR: itab_object.

    REFRESH: itab_object.

    ENDIF.

    p_c_course = wa_objid-objid.

    ENDFORM.

    Thanks,

    Naren

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 15, 2007 at 10:40 AM

    Dear Antonio,

    I am receiving the same error message for the includes in the function group.

    Could you please tell me that have you encountered with the same lind of error and what could be the reason for it?

    Thanks and Regards.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.