11-30-2007 7:55 AM
Both programs can use to call screens (created in screen painter).
What are the differences between them?
11-30-2007 10:07 AM
Executable programs are Report programs which are driven by Events.
Module pool programs are driven by transaction code
11-30-2007 9:05 AM
module pule programe is need the ztransaction name(se93), we can also execute MP s with out using se93 with call sceen<screen no)ok
starting of the code just put call screen <screen no>, then u can directly execute prog..
ok
ravinder
11-30-2007 9:14 AM
Can you give an example on this statement?
<i>starting of the code just put call screen ><screen no>, then u can directly execute prog..
ok</i>
Thanks.
11-30-2007 10:07 AM
Executable programs are Report programs which are driven by Events.
Module pool programs are driven by transaction code
11-30-2007 11:49 AM
hi,
like this...
u can call screen from normal report
TYPES: BEGIN OF values,
matnr TYPE marc-matnr,
werks TYPE marc-werks,
END OF values.
DATA: matnr(18) TYPE c,
werks(4) TYPE c.
DATA: progname TYPE sy-repid,
dynnum TYPE sy-dynnr,
dynpro_values TYPE TABLE OF dynpread,
field_value LIKE LINE OF dynpro_values,
values_tab TYPE TABLE OF values.
DATA : len TYPE i,
no TYPE i,
mat_t(18) TYPE c,
mat(18) TYPE c.
<b>CALL SCREEN 100.</b>
&----
*& Module init OUTPUT
&----
text
----
MODULE init OUTPUT.
progname = sy-repid.
dynnum = sy-dynnr.
CLEAR: field_value, dynpro_values.
field_value-fieldname = 'MATNR'.
APPEND field_value TO dynpro_values.
ENDMODULE. " init OUTPUT
&----
*& Module cancel INPUT
&----
text
----
MODULE cancel INPUT.
LEAVE PROGRAM.
ENDMODULE. " cancel INPUT
----
MODULE value_material INPUT
----
*
----
MODULE value_material INPUT.
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
tabname = 'MARC'
fieldname = 'MATNR'
dynpprog = progname
dynpnr = dynnum
dynprofield = 'MATNR'.
ENDMODULE. "value_material INPUT
----
MODULE value_plant INPUT
----
*
----
MODULE value_plant INPUT.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = progname
dynumb = dynnum
translate_to_upper = 'X'
TABLES
dynpfields = dynpro_values.
READ TABLE dynpro_values INDEX 1 INTO field_value.
len = STRLEN( field_value-fieldvalue ).
IF len < 18.
CLEAR : no,mat_t,mat.
no = 18 - len.
DO no TIMES.
CONCATENATE '0' mat_t INTO mat_t.
ENDDO.
CONCATENATE mat_t field_value-fieldvalue INTO mat.
ENDIF.
SELECT matnr werks
FROM marc
INTO CORRESPONDING FIELDS OF TABLE values_tab
WHERE matnr = mat.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'WERKS'
dynpprog = progname
dynpnr = dynnum
dynprofield = 'WERKS'
value_org = 'S'
TABLES
value_tab = values_tab.
ENDMODULE. "value_plant INPUT
12-04-2007 8:51 AM
<i>The major difference between the program flow of an executable program and a dialog program is that in a dialog program, you can program screens to appear in any sequence you want.
In executable programs, the screen sequence is controlled by events, which occur in a fixed order.
In a dialog program, the programmer is free to program any sequence of screens, and the user can affect the program flow by his or her actions.
However, it is still possible to call a freely-defined screen sequence within an executable program and thus to branch into a form of dialog program.</i>
-
with reference to SAP Library -
12-04-2007 8:54 AM
With reference to SAP Library - Running ABAP Programs for further details.