2006 Dec 24 9:29 AM
Hallow I have a problem I wont to use a dialog program and I dont now how .(dialogs is new for me) I build a table in se11 yhr_ex_muslh With id number and name of employee I wont to build dialog program that when the user put id number it bring him the name of employee from the table. how can I do that thankes
Hallow I have a problem I wont to use a dialog program and I dont now how .(dialogs is new for me) I build a table in se11 yhr_ex_muslh With id number and name of employee I wont to build dialog program that when the user put id number it bring him the name of employee from the table. how can I do that thankes
2006 Dec 24 11:45 AM
Hi
Create a module poole program by SE80, to create it you need only to calle it with a name beginning with SAPMZ*
Here create a dynpro a design an input/output field for ID using yhr_ex_muslh-id, insert another fields for only output for the name.
In PAI process insert a module where you check if the employee exists and load his name:
PROCESS PAI.
FIELD YHR_EX_MUSIH-ID MODULE CHECK_ID.
MODULE CHECK_ID.
SELECT SINGLE * FROM YHR_EX_MUSIH WHERE ID = YHR_EX_MUSIH-ID.
IF SY-SUBRC <> 0.
MESSAGE E208(00) WITH 'No ID founded'.
ENDIF.
* Here insert the select to load the name
ENDMODULE.Max
2006 Dec 26 4:27 AM
Hi,
Go to SE51 Give your programe name and screen number(Any number).
Go to layout screen there you can find components.
From them select text elements dag and drop on screen.double click on field.
PROCESS PAI.
MODULE CHECK_ID.
SELECT SINGLE * FROM YHR_EX_MUSIH WHERE ID = YHR_EX_MUSIH-ID.
IF SY-SUBRC <> 0.
MESSAGE E208(00) WITH 'No ID founded'.
ENDIF.
Here insert the select to load the name
ENDMODULE.
Note : to valid date your input value while create your text element component get the filed from table directly