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

regarding PBO and PAI

HEY

I am handling many dynpro screens, so to make the code easier

I created two include programs "PBOPGM" for storing PBOcodes

and "PAIPGM" for storing all PAI code.

Also I created one "M"(module pool) TYPE program as main program

and included both INCLUDE programs.

Now i wrote module status_100 output code at "PBOPGM"

and tried to compile, it gives error "invalid command access". why.

could you pls tell how to do this. Am i doing wrong.?

Chandra kumar.

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 16, 2005 at 03:39 AM

    HAI

    when i compile below individual programs i get "STATEMENT is in accessible"!

    i want to display ALV grid using below code encapsulation

    PROGRAM ZMW00M0010. * Main module program

    INCLUDE ZMW0010010. * data declaration

    INCLUDE ZMW0010020. * PBO module program

    ZMW0010010 is include program type I for data declaration.

    DATA: FIELDCATALOG TYPE LVC_T_FCAT,

    FIELDCATALOG_TMP TYPE LVC_T_FCAT,

    FIELDCATALOG_LINE TYPE LINE OF LVC_T_FCAT.

    DATA: G_CONTAINER TYPE SCRFNAME VALUE 'GRIDLIST_STATUS',

    GRID_REPORT TYPE REF TO CL_GUI_ALV_GRID,

    G_CUSTOM_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER.

    I tried to compile this gets error "STATEMENT is inaccessible"

    ZMW00M0010 is Main program type M for coding.

    CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'

    EXPORTING

    I_STRUCTURE_NAME = 'ZMW0001'

    CHANGING

    CT_FIELDCAT = FIELDCATALOG_TMP

    EXCEPTIONS

    INCONSISTENT_INTERFACE = 1

    PROGRAM_ERROR = 2

    OTHERS = 3.

    IF SY-SUBRC <> 0.

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

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

    ENDIF.

    LOOP AT FIELDCATALOG_TMP INTO FIELDCATALOG_LINE.

    CASE FIELDCATALOG_LINE-FIELDNAME.

    WHEN 'TRKORRNUM'.

    FIELDCATALOG_LINE-COL_POS = '2'.

    FIELDCATALOG_LINE-KEY = SPACE.

    FIELDCATALOG_LINE-EMPHASIZE = SPACE.

    FIELDCATALOG_LINE-REPTEXT = '&#31227;&#36865;&#20381;&#38972;&#30058;&#21495;'.

    WHEN 'CLIENT'.

    FIELDCATALOG_LINE-COL_POS = '3'.

    FIELDCATALOG_LINE-KEY = SPACE.

    FIELDCATALOG_LINE-EMPHASIZE = SPACE.

    FIELDCATALOG_LINE-REPTEXT = '&#12463;&#12521;&#12452;&#12450;&#12531;&#12488;'.

    WHEN 'IMPORTDAY'.

    FIELDCATALOG_LINE-COL_POS = '4'.

    FIELDCATALOG_LINE-KEY = SPACE.

    FIELDCATALOG_LINE-EMPHASIZE = SPACE.

    FIELDCATALOG_LINE-REPTEXT = '&#31227;&#36865;&#21453;&#26144;&#26085;'.

    WHEN 'CONVERTFILENAME'.

    FIELDCATALOG_LINE-COL_POS = '5'.

    FIELDCATALOG_LINE-KEY = SPACE.

    FIELDCATALOG_LINE-EMPHASIZE = SPACE.

    FIELDCATALOG_LINE-REPTEXT = '&#20013;&#38291;&#12501;&#12449;&#12452;&#12523;&#21517;'.

    FIELDCATALOG_LINE-NO_OUT = 'X'.

    WHEN 'TRANSNO'.

    FIELDCATALOG_LINE-COL_POS = '1'.

    FIELDCATALOG_LINE-REPTEXT = '&#31227;&#36865;&#31649;&#29702;No'.

    WHEN 'EXETIMING'.

    FIELDCATALOG_LINE-REPTEXT = '&#23455;&#26045;&#12479;&#12452;&#12511;&#12531;&#12464;'.

    FIELDCATALOG_LINE-COLDDICTXT = 'R'.

    WHEN 'PRETRKORRNUM'.

    FIELDCATALOG_LINE-REPTEXT = '&#20808;&#34892;&#31227;&#36865;&#20381;&#38972;&#30058;&#21495;'.

    WHEN 'IMPRETURNCODE'.

    FIELDCATALOG_LINE-REPTEXT = '&#12522;&#12479;&#12540;&#12531;&#12467;&#12540;&#12489;'.

    FIELDCATALOG_LINE-COLDDICTXT = 'R'.

    WHEN 'STATUS'.

    FIELDCATALOG_LINE-REPTEXT = '&#12473;&#12486;&#12540;&#12479;&#12473;'.

    WHEN 'HOLD'.

    FIELDCATALOG_LINE-REPTEXT = '&#20445;&#30041;'.

    FIELDCATALOG_LINE-COLDDICTXT = 'R'.

    FIELDCATALOG_LINE-NO_OUT = 'X'.

    WHEN 'MEMO'.

    FIELDCATALOG_LINE-REPTEXT = '&#20869;&#23481;&#35500;&#26126;'.

    WHEN 'JOBNAME'.

    FIELDCATALOG_LINE-NO_OUT = 'X'.

    WHEN 'JOBCOUNT'.

    FIELDCATALOG_LINE-NO_OUT = 'X'.

    WHEN 'UDATE'.

    FIELDCATALOG_LINE-REPTEXT = '&#26368;&#32066;&#22793;&#26356;&#26085;&#20184;'.

    WHEN 'UTIME'.

    FIELDCATALOG_LINE-REPTEXT = '&#26368;&#32066;&#22793;&#26356;&#26178;&#21051;'.

    WHEN OTHERS.

    ENDCASE.

    INSERT FIELDCATALOG_LINE INTO TABLE FIELDCATALOG.

    ENDLOOP.

    Call screen 200.

    here i call screen 200, so inside PBO i renamed

    STATUS_200 Output as REPORTSTATUS and includein in

    PBO include program as below.

    In PBO include program ZMW0010020. below code is writen.

    MODULE REPORTSTATUS_PBO200 OUTPUT.

    IF G_CUSTOM_CONTAINER IS INITIAL.

    CREATE OBJECT G_CUSTOM_CONTAINER

    EXPORTING CONTAINER_NAME = G_CONTAINER.

    CREATE OBJECT GRID_REPORT

    EXPORTING I_PARENT = G_CUSTOM_CONTAINER.

    SELECT * FROM ZMW0001 INTO TABLE SDYN_ITAB.

    CALL METHOD GRID_REPORT->SET_TABLE_FOR_FIRST_DISPLAY

    CHANGING IT_FIELDCATALOG = FIELDCATALOG

    IT_OUTTAB = SDYN_ITAB.

    ENDIF.

    ENDMODULE. " REPORTSTATUS_PBO200 OUTPUT

    this also i cant compile give same above error.

    Could you please help how to structure this alv grid to display in above

    coding.

    i am sorry,invisible above coding are japanese codes.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Since your program is type M, you cannot have any code that is not inside of a processing block. In your case the line:

      ZMW00M0010 is Main program type M for coding.

      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'

      EXPORTING

      shows the executable statement CALL FUNCTION that is NOT in a processing block like MODULE, FORM, etc.

      Usually, you would do things like generate a field catalog in a PBO module.

  • author's profile photo Former Member
    Former Member
    Posted on Jan 15, 2005 at 04:21 PM

    Hi Chandra, try to rename your status_100 to MODULE STATUS.

    I suggest you do this in order to test it:

    - If you're using table control, don't do the Loop inside the PBOPGM, put it in the PBO.

    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.