‎2006 Feb 27 9:29 AM
Hi All!
Can anybody provide me the sample module pool program.I am having an input field which i have to validate and a push button after that to execute.Please provide me the logic in the PAI and PBO and also what to give as parameters in the fetch code of a button.
regards
pavan
‎2006 Feb 27 9:43 AM
Hi Kumar,
this is a sample code with five push buttons one of which is a cancel button and i/o field..
DATA: OK_CODE LIKE SY-UCOMM,
SAVE_OK LIKE OK_CODE,
OUTPUT(8) TYPE C.
CALL SCREEN 100.
<b>MODULE USER_COMMAND_0100 INPUT.</b>
SAVE_OK = OK_CODE.
CLEAR OK_CODE.
CASE SAVE_OK.
WHEN 'BUTTON_EXIT'.
LEAVE PROGRAM.
WHEN 'BUTTON_1'.
OUTPUT = 'Button 1'(001).
WHEN 'BUTTON_2'.
OUTPUT = 'Button 2'(002).
WHEN 'BUTTON_3'.
OUTPUT = 'Button 3'(003).
WHEN 'BUTTON_4'.
OUTPUT = 'Button 4'(004).
WHEN OTHERS.
OUTPUT = SAVE_OK.
ENDCASE.
ENDMODULE.in this..The screen flow logic is as follows...
PROCESS BEFORE OUTPUT.
MODULE INIT_SCREEN_0100.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0100...When the user chooses a pushbutton, the PAI event is triggered...
The function code
of the pushbutton is assigned to the screen field OK_CODE, which is then passed
onto the ABAP field with the same name...
The module USER_COMMAND_0100 is
then processed....
a text symbol is assigned to the OUTPUT field
according to the button that the user chose. This is displayed in the output field on
the screen. If the user chooses Cancel, the program ends.
..
‎2006 Feb 27 9:36 AM
Hi,
for module programs there are so many examples in the ABAPDOCU it self.
did you check those ..<b>demo_dynpro_push_button</b>
Regards
vijay
‎2006 Feb 27 9:36 AM
There are some demo programs in ABAPDOCU tcode.
Go through the same...
‎2006 Feb 27 9:38 AM
Hi,
check this example <b>demo_dynpro_value_select</b>
this one will validate the input, and push button also there..
regards
vijay
‎2006 Feb 27 9:38 AM
Hi kumar pavan
Check out this link
http://sap.mis.cmich.edu/sap-abap/abap09/index.htm
Regards
Deepak
reward points if helpful.
‎2006 Feb 27 9:43 AM
Hi Kumar,
this is a sample code with five push buttons one of which is a cancel button and i/o field..
DATA: OK_CODE LIKE SY-UCOMM,
SAVE_OK LIKE OK_CODE,
OUTPUT(8) TYPE C.
CALL SCREEN 100.
<b>MODULE USER_COMMAND_0100 INPUT.</b>
SAVE_OK = OK_CODE.
CLEAR OK_CODE.
CASE SAVE_OK.
WHEN 'BUTTON_EXIT'.
LEAVE PROGRAM.
WHEN 'BUTTON_1'.
OUTPUT = 'Button 1'(001).
WHEN 'BUTTON_2'.
OUTPUT = 'Button 2'(002).
WHEN 'BUTTON_3'.
OUTPUT = 'Button 3'(003).
WHEN 'BUTTON_4'.
OUTPUT = 'Button 4'(004).
WHEN OTHERS.
OUTPUT = SAVE_OK.
ENDCASE.
ENDMODULE.in this..The screen flow logic is as follows...
PROCESS BEFORE OUTPUT.
MODULE INIT_SCREEN_0100.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0100...When the user chooses a pushbutton, the PAI event is triggered...
The function code
of the pushbutton is assigned to the screen field OK_CODE, which is then passed
onto the ABAP field with the same name...
The module USER_COMMAND_0100 is
then processed....
a text symbol is assigned to the OUTPUT field
according to the button that the user chose. This is displayed in the output field on
the screen. If the user chooses Cancel, the program ends.
..
‎2006 Feb 27 9:54 AM
Hello Kumar,
in PROCESS AFTER INPUT.u need to write logic for validation..
FIELD f1 module valide_f1.
Module valide_f1.
checking logic for F1.
message exxx(xx).
endmodule.
for push button..
u need to check ok code.
CASE OK-CODE.
WHEN 'XXXX'.<-- this code is allocated to the button.
endcase.