cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Z TABLE IS NOT GETTING UPDATED

Former Member
0 Likes
1,301

Hi All,

I have excel sheet of 5 records I got those records into internal table it_data_z

now I have 5 records in my internal table .

I am trying to upload 5 records from internal table ' it_data_z ' into z table ' zer_a3s_upload ' using

MODIFY zer_a3s_upload FROM TABLE it_data_z.

but when I am checking in debugging mode only last record is getting updated

I also tried for INSERT zer_a3s_upload FROM TABLE it_data_z.

Can anyone have on this .

thanks & regards,

Jyoshna.

Accepted Solutions (0)

Answers (3)

Answers (3)

venkateswaran_k
Active Contributor
0 Likes

Dear Jyoshna,

Having only one primary key as MANDT - will always going to be one record only. Because it stores the Client id only.

Adding bukrs also - unless you have multiple company codes.

Please add Line numbers like POSNR - which will be like sequence number of your line items.. adn keep that as additional key to MANDT

Only then it will work

Please update

Former Member
0 Likes

Hi All,

I have only taken mandt as a primary key and there are no primary keys in my table . because i am uploading excel sheet data into Z table .

my Ztable has 9 fields and i am taking It_data_z type standard table of my z table only .

okay i will take BUKRS as a primary key and check.

Thnaks to both for your replies .

venkateswaran_k
Active Contributor
0 Likes

Dear Jyoshna

The Statement

MODIFY zer_a3s_upload FROM TABLE it_data_z.

will work as insert as well as update.

If primary key value is new, it will insert else it will update

When you say it is updating the last record only means, The internal table is not having the full key - may be all 5 records belongs to same primary key - so it may be that 1st record is inserted and remaining 4 records are updated on it

So please recheck your Primary keys.