Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Inserting Multiple Records in Transparent Table

Former Member
0 Likes
947

Hi Friends,

I am New to ABAP and Previously i was in Web Dynpro Java....

I am doing an scenario Travel Request.

The Problem i am facing i this scenario is inserting the data in the table. I have to maintain a custom table in which Travel request No (Primary Key), Employee No (Primary Key) and Transport Details.....etc.are maitained...

Employee Number -


Travel Request No--Place From-Place To

70043 -


817--


Chicago--


Miami

70043 -


817--


Miami--


Chicago

I have to maintain table like this

Whenever i inseted the data into the Tranparent Table its showing dump and sy-subrc count is 4

Plz provide suggestion to achieve this........Thanks in Advance

Regards

Chandran S

3 REPLIES 3
Read only

former_member195698
Active Contributor
0 Likes
719

Hi,

Your primary key is Travel request No, Employee No

So combination of these two should be unique.

You are trying to insert two Entries in the table with the same primary key, which is causing issues.

Read only

Former Member
0 Likes
719

In ur case u r trying to enter duplicate values that's why u r getting error.

In ur custom table, Employee Number and Travel Request No are 2 primary keys. That means for each record content of these fields should be unique but in ur case they are same. If u really need to maintain data in this way then u have to make another field as key field so that it can uniquely identify a record.

Employee Number Travel Request No Place From Place To

70043 817 Chicago Miami

70043 817 Miami Chicago

Regards,

Joy.

Read only

0 Likes
719

u have duplicate entries in ur primary key.