2005 Dec 29 9:32 PM
hi friends,
I tried creatig a Dialog program , for entering employee details.
I created my own table zpkemp1, but when i tried activating my program i wasnt able to do soo.
it says : "zpkemp1 must be a flat structure. you canoot use internal tables,strings, reference and structures.
CAn anyone helpo me to proceed with this task.
Thanks&Regards
Rinky123
You must be trying to update the table the wrong way. can you please post the relevant code where you are trying to update the table? Or where the zpkemp1 is being used in the code?
Regards,
Rich Heilman
2005 Dec 29 9:35 PM
2005 Dec 29 9:38 PM
Hi rich,
This is my code.plz chk with it
&----
*& Module pool Z_PK_DIALOG1 *
*& *
&----
*& *
*& *
&----
PROGRAM Z_PK_DIALOG1.
TABLES : ZPKEMP1.
DATA : t1 like zpkemp1-zpkempno.
t2 like zpkemp1-zpkfn.
t3 like zpkemp1-zpkln.
t4 like zpkemp1-zpkdob
t5 like zpkemp1-zpkhd.
DATA : OKCODE LIKE sy-ucomm.
INCLUDE Z_PK_TOP . " global Data
INCLUDE Z_PK_O01 . " PBO-Modules *
INCLUDE Z_PK_I01 . " PAI-Modules *
INCLUDE Z_PK_F01 . " FORM-Routines *
&----
*& Module STATUS_0010 OUTPUT
&----
text
----
module STATUS_0010 output.
SET PF-STATUS 'ZPKMENU'.
SET TITLEBAR '001'.
endmodule. " STATUS_0010 OUTPUT
&----
*& Module USER_COMMAND_0010 INPUT
&----
text
----
module USER_COMMAND_0010 input.
CASE OKCODE.
When 'SAVE'.
zpkemp1-zpkempno = t1.
zpkemp1-zpkfn = t2.
zpkemp1-zpkln = t3.
zpkemp1-zpdob = t4.
zpkemp1-zpkhd= t5.
insert zpkemp1.
when 'BACK'.
set screen 0.
leave screen.
when 'EXIT' or 'CANCEL'
Leave Program.
endcase.
endmodule. " USER_COMMAND_0010 INPUT
2005 Dec 29 9:46 PM
Please try this.
<b>*tables : zpkemp1. " comment this out</b>
data : t1 <b>Type</b> zpkemp1-zpkempno.
t2 <b>Type</b> zpkemp1-zpkfn.
t3 <b>Type</b> zpkemp1-zpkln.
t4 <b>Type</b> zpkemp1-zpkdob
t5 <b>Type</b> zpkemp1-zpkhd.
<b>data: xzpkemp1 type zpkemp1.</b>
data : okcode like sy-ucomm.
include z_pk_top . " global Data
* INCLUDE Z_PK_O01 . " PBO-Modules *
* INCLUDE Z_PK_I01 . " PAI-Modules *
* INCLUDE Z_PK_F01 . " FORM-Routines *
*&---------------------------------------------------------------------*
*& Module STATUS_0010 OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
module status_0010 output.
set pf-status 'ZPKMENU'.
set titlebar '001'.
endmodule. " STATUS_0010 OUTPUT
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0010 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
module user_command_0010 input.
case okcode.
when 'SAVE'.
<b> xzpkemp1-zpkempno = t1.
xzpkemp1-zpkfn = t2.
xzpkemp1-zpkln = t3.
xzpkemp1-zpdob = t4.
xzpkemp1-zpkhd= t5.
insert zpkemp1 from xzpkemp1.</b>
when 'BACK'.
set screen 0.
leave screen.
when 'EXIT' or 'CANCEL'
leave program.
endcase.
endmodule. " USER_COMMAND_0010 INPUT
Regards,
Rich Heilman
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |