2008 Mar 28 10:21 AM
Hi All,
I have designed z table with following fields.
1) CONSULTANT
2) MODULE_NAME
3) CR_DATE
4) ISSUE
5) RPT_NAME
6) TCODE
7) REQ_NO
😎 DEV_STA
9) QA_STA
10) PRD_STA.
the ztable contains no primaty key as we are storing the duplicates values
I have created One screen with all above fields using module pooled programming. One Input screen is designed containing all above fields. after that when i click on SAVE Button all above fields are getting inserted into ztable. But when i again fill the data the second record is not getting inserted into ztable.
I have written the following code for this :
wa_issue-CONSULTANT = ZISSUE-CONSULTANT.
wa_issue-MODULE_NAME = ZISSUE-MODULE_NAME.
wa_issue-CR_DATE = ZISSUE-CR_DATE.
wa_issue-ISSUE = ZISSUE-ISSUE.
wa_issue-RPT_NAME = ZISSUE-RPT_NAME.
wa_issue-TCODE = ZISSUE-TCODe.
wa_issue-REQ_NO = ZISSUE-REQ_NO.
wa_issue-DEV_STA = ZISSUE-DEV_STA.
wa_issue-QA_STA = ZISSUE-QA_STA.
wa_issue-PRD_STA = ZISSUE-PRD_STA.
insert into zissue values wa_issue .
commit work.
Hi All,
I have designed z table with following fields.
1) CONSULTANT
2) MODULE_NAME
3) CR_DATE
4) ISSUE
5) RPT_NAME
6) TCODE
7) REQ_NO
😎 DEV_STA
9) QA_STA
10) PRD_STA.
the ztable contains no primaty key as we are storing the duplicates values
I have created One screen with all above fields using module pooled programming. One Input screen is designed containing all above fields. after that when i click on SAVE Button all above fields are getting inserted into ztable. But when i again fill the data the second record is not getting inserted into ztable.
I have written the following code for this :
wa_issue-CONSULTANT = ZISSUE-CONSULTANT.
wa_issue-MODULE_NAME = ZISSUE-MODULE_NAME.
wa_issue-CR_DATE = ZISSUE-CR_DATE.
wa_issue-ISSUE = ZISSUE-ISSUE.
wa_issue-RPT_NAME = ZISSUE-RPT_NAME.
wa_issue-TCODE = ZISSUE-TCODe.
wa_issue-REQ_NO = ZISSUE-REQ_NO.
wa_issue-DEV_STA = ZISSUE-DEV_STA.
wa_issue-QA_STA = ZISSUE-QA_STA.
wa_issue-PRD_STA = ZISSUE-PRD_STA.
insert into zissue values wa_issue .
commit work.
2008 Mar 28 10:30 AM
2008 Mar 28 10:43 AM
Also use ENQUEUE_E_TABLEE and DEQUEUE_E_TABLEE for the same also.While inserting also insert with the mandt field.
2008 Mar 28 10:34 AM
Hi,
Try using this.
MODIFY zissue FROM wa_issue.
Also check whether the mandt field is present in the table as primary key.
Regards.
Abhisek
2008 Mar 28 10:35 AM
Hi,
hcheck the key fields in the table
Regards,
V.Balaji
Reward if Usefull...
2008 Mar 28 10:38 AM
HI,
We should have one primery key in our table than only we can give more than one value.
U want give a itam value means u can use Cardinality.
Regards,
Kendi.
Edited by: Kendi on Mar 28, 2008 11:39 AM
2008 Mar 28 10:42 AM
Hi Ulhas
At the end of assigning all parrameters to work area
include the statement
CLEAR ZISSUE.
This will clear the data in the screen fields.
Regards
lakshman
2008 Mar 28 10:43 AM
Hi,
Any table should have atleast one primary key. But in your scenario You cant until you have a primary key. So just have a primary key with your table. Then only your requirement will meet.
Regards,
Sanki.
2008 Mar 28 10:45 AM
Hi,
Try <Insert> along with <accept duplicate values> syntax
It ll work
Regards,
Dilip
2008 Mar 28 1:25 PM
You must have a primary key. As far as I know this is mandatory and is always unique. So you need to change your table definition. You could generate a number for this key or use a conbination of the fields if possible. To verify this check the sy-subrc status after you attempt the second insert
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |