‎2007 Jul 25 6:52 AM
HI GURU'S,
I'M NEW TO SCREEN PROGRAMMING.
I DEVELOPED ONE SCREEN AND ONE ZTABLE WHERE I PUT EMPNO, EMPNAME, DESIGNATION.
BUT IN MY MODULE POOL ,I VREATED PROGRAM LIKE THIS
TABLES : ZEMP.
DATA : BEGIN OF ITAB OCCURS 0,
EMPNO LIKE ZEMP-EMPNO,
EMPNAME LIKE ZEMP-EMPNAME,
DESIGNATION LIKE ZEMP-DESIGNATION,
END OF ITAB.
&----
*& Module USER_COMMAND_0100 INPUT
&----
text
----
MODULE USER_COMMAND_0100 INPUT.
CASE SY-UCOMM.
WHEN 'DISP'.
SELECT EMPNO EMPNAME DESIGNATION FROM ZEMP INTO TABLE ITAB WHERE EMPNO =
ITAB-EMPNO.
APPEND ITAB.
WHEN 'INSE'.
INSERT ZEMP.
IF SY-SUBRC = 0.
MESSAGE E000(0) WITH 'RECORD NOT INSERTED'.
ENDIF.
WHEN 'UPDA'.
UPDATE ZEMP.
WHEN 'DELE'.
DELETE ZEMP.
WHEN 'EXIT'.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
I'M NOT GETTING ,WHAT I WANT FROM THIS.
SUJJEST ME HOW CAN I SOLVE THIS.
THANKS IN ADVANCE.
‎2007 Jul 25 6:58 AM
Hi
In PAI you are fetching data into ITAB.
In PBO you have to display the data from program to Screen.
and use the INSERT,MODIFY(for Update), delte of table from the data from ITAB .
See the demo programs and do it as per them
Check the below link:
http://wiki.ittoolbox.com/index.php/FAQ:What_is_module_pool_program_in_abap%3F
http://help.sap.com/saphelp_46c/helpdata/en/35/26b1aaafab52b9e10000009b38f974/content.htm
http://sap.mis.cmich.edu/sap-abap/abap09/sld011.htm
http://sap.mis.cmich.edu/sap-abap/abap09/index.htm
http://www.geocities.com/ZSAPcHAT
http://www.allsaplinks.com/files/using_table_in_screen.pdf
http://help.sap.com/saphelp_webas630/helpdata/en/9f/db9cdc35c111d1829f0000e829fbfe/content.htm
http://www.sapdevelopment.co.uk/dialog/dialoghome.htm
http://help.sap.com/saphelp_46c/helpdata/en/08/bef2dadb5311d1ad10080009b0fb56/content.htm
http://www.sapgenie.com/links/abap.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c9/5472fc787f11d194c90000e8353423/frameset.htm
You can also check the transaction ABAPDOCU which gives you lot of sample programs.
Also you can see the below examples...
Go to se38 and give demodynpro and press F4.
YOu will get a list of demo module pool programs.
One more T-Code is <b>ABAPDOCU</b>.
YOu can find more examples there.
See the prgrams:
<b>DEMO_DYNPRO_TABLE_CONTROL_1</b> Table Control with LOOP Statement
DEMO_DYNPRO_TABLE_CONTROL_2 Table Control with LOOP AT ITAB
http://www.geocities.com/ZSAPcHAT
http://www.allsaplinks.com/files/using_table_in_screen.pdf
<b>Reward points for useful Answers</b>
Regards
Anji
‎2007 Jul 25 6:58 AM
Hi
In PAI you are fetching data into ITAB.
In PBO you have to display the data from program to Screen.
and use the INSERT,MODIFY(for Update), delte of table from the data from ITAB .
See the demo programs and do it as per them
Check the below link:
http://wiki.ittoolbox.com/index.php/FAQ:What_is_module_pool_program_in_abap%3F
http://help.sap.com/saphelp_46c/helpdata/en/35/26b1aaafab52b9e10000009b38f974/content.htm
http://sap.mis.cmich.edu/sap-abap/abap09/sld011.htm
http://sap.mis.cmich.edu/sap-abap/abap09/index.htm
http://www.geocities.com/ZSAPcHAT
http://www.allsaplinks.com/files/using_table_in_screen.pdf
http://help.sap.com/saphelp_webas630/helpdata/en/9f/db9cdc35c111d1829f0000e829fbfe/content.htm
http://www.sapdevelopment.co.uk/dialog/dialoghome.htm
http://help.sap.com/saphelp_46c/helpdata/en/08/bef2dadb5311d1ad10080009b0fb56/content.htm
http://www.sapgenie.com/links/abap.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c9/5472fc787f11d194c90000e8353423/frameset.htm
You can also check the transaction ABAPDOCU which gives you lot of sample programs.
Also you can see the below examples...
Go to se38 and give demodynpro and press F4.
YOu will get a list of demo module pool programs.
One more T-Code is <b>ABAPDOCU</b>.
YOu can find more examples there.
See the prgrams:
<b>DEMO_DYNPRO_TABLE_CONTROL_1</b> Table Control with LOOP Statement
DEMO_DYNPRO_TABLE_CONTROL_2 Table Control with LOOP AT ITAB
http://www.geocities.com/ZSAPcHAT
http://www.allsaplinks.com/files/using_table_in_screen.pdf
<b>Reward points for useful Answers</b>
Regards
Anji
‎2007 Jul 25 7:00 AM
MODULE USER_COMMAND_0100 INPUT.
CASE OK_CODE. <b>"CASE SY-UCOMM. note : define OK_code for your screen</b>
WHEN 'DISP'.
<b>*SELECT EMPNO EMPNAME DESIGNATION FROM ZEMP INTO TABLE ITAB *WHERE EMPNO = ITAB-EMPNO.</b>
<b>SELECT EMPNO EMPNAME DESIGNATION FROM ZEMP INTO CORRESPONDING FIELDS OF TABLE itab WHERE EMPNO = ITAB-EMPNO.</b>
<b>*APPEND ITAB.</b>
<b>LOOP AT ITAB.
***Display your fields.
ENDLOOP.</b>
<b>IF itab IS INITIAL.</b><b>
**IF SY-SUBRC = 0.</b>
MESSAGE E000(0) WITH 'No data avaialble'.
ENDIF.
Do it in this way, it will help you to solve your problem.
Regards,
Sairam