‎2005 Jan 15 10:07 AM
hai
I cannot write "Form" module in INCLUDE program and access inside the Module program.why
could you pls help.
PROGRAM ZMW00M0010.
INCLUDE ZMW0010010.
inside include prg i wrote small FORM ..ENDFORM and
tried to call from Main Module pool program ZMW00M0010.
Chandra kumar
‎2005 Jan 15 4:06 PM
Chandra, it's important that inside your main program you call your include.
for example:
PROGRAM ZMYPROGRAM.
INCLUDE ZMW0010010.
now, you must call your rutine that's inside your include,
PERFORM MY_RUTINE.
The my_rutine it's inside the include with a
form my_rutine.
endform.
‎2005 Jan 15 10:00 PM
Could you post additional details for us to look at?
What kind of error did you get?
Has everything been activated?
If you move the FORM to the main program can you call it?
‎2005 Jan 16 3:49 AM
HAI
PROGRAM ZMW00M0010. * Main module program type M
INCLUDE ZMW0010010. * data declaration type I
*INCLUDE ZMW0010020. * PBO module program type I
INCLUDE ZMW0010040. * Subrouting program type I
In ZMW0010010, data declaration.
DATA: FIELDS_LINE TYPE SVAL,
FIELDS_ITAB LIKE TABLE OF FIELDS_LINE.
In ZMW0010040,Inside Subrouting program i wrote
FORM TP_GETDATE.
FIELDS_LINE-TABNAME = 'ZMW0001'.
FIELDS_LINE-FIELDNAME = 'IMPORTDAY'.
FIELDS_LINE-VALUE = SY-DATUM.
* FIELDS_LINE-FIELD_ATTR =
FIELDS_LINE-FIELD_OBL = 'X'.
* FIELDS_LINE-COMP_CODE =
FIELDS_LINE-FIELDTEXT = '移送反映日'.
* FIELDS_LINE-COMP_TAB =
* FIELDS_LINE-COMP_FIELD =
* FIELDS_LINE-NOVALUEHLP =
APPEND FIELDS_LINE TO FIELDS_ITAB.
CALL FUNCTION 'POPUP_GET_VALUES'
EXPORTING
* NO_VALUE_CHECK = ' '
POPUP_TITLE = 'testpopup'
* START_COLUMN = '5'
* START_ROW = '5'
* IMPORTING
* RETURNCODE =
TABLES
FIELDS = FIELDS_ITAB
EXCEPTIONS
ERROR_IN_FIELDS = 1
* OTHERS = 2
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM.
In Main PROGRAM ZMW00M0010,
PROGRAM ZMW00M0010. * Main module program type M
INCLUDE ZMW0010010. * data declaration type I
INCLUDE ZMW0010040. * Subrouting program type I
Inside user command
MODULE MAINUSER_COMMAND_0100 INPUT.
SAVE_OK = OK_CODE.
CLEAR OK_CODE.
CASE SAVE_OK.
WHEN 'BACK'. "前画面
SET SCREEN 0.
WHEN 'CANCEL'. "中止
LEAVE PROGRAM.
WHEN 'EXIT'. "終了
LEAVE PROGRAM.
ENDCASE.
CASE SY-UCOMM.
WHEN 'FU01'.
PERFORM TP_GETDATE.
CALL SCREEN '200'.
ENDMODULE.
I tried compiling individual programs it gives below error
"STATEMENT is INACCESSIBLE"
Could you pls tell why this error occurs.
Chandra kumar
‎2005 Jan 16 4:12 PM
You need an ENDCASE statement:
CASE SY-UCOMM.
WHEN 'FU01'.
PERFORM TP_GETDATE.
CALL SCREEN '200'.
<=== need ENDCASE here
ENDMODULE.
Try adding that and let us know what happens.
Message was edited by: Charles Folwell
You will also need to define OK_CODE and SAVE_OK.