Application Development 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: 

Uploading ztables

Former Member
0 Kudos

hello friends,

i have one simple requirment even i am strugling in this. when the user enters some data in selection screen fields, i need to move that data to respective fields of tables(Z tables).

With Regards

MurugeshRajeev

7 REPLIES 7

prasanth_kasturi
Active Contributor
0 Kudos

Hi,

when you have values in the selection screen fields

the values are stored in the corresponding variables.

So in start-of-selection you can use INSERT or MODIFY statemnt to update the respective database tables.

Make sure that you are inserting the tables with the primary key, otherwise they will not get updated correctly

hey U duplicated the thread with the same question is there anything U wanted more

regards

prasanth

Former Member
0 Kudos

Hi,

use select-option for getting values.

then in side the program write following coding under start of selection:

if u want to add new entry :

insert dbtable set fild1 = value1 .

if table contains value already and u want to modify the particular field of that entry.

use

update dbtable set field3= val1 field4 = val2 where field1 = sel1 and field 2 = sel2.

thanks and regards,

kani.

Former Member
0 Kudos

you want to move the data entered by the user to respective fields.

then use 'INSERT TABLE NAME' this statement will store all the fields.

if user want to change the existing data then use

'MODIFY TABLE NAME ' .

0 Kudos

Precautions to be taken while updating the tables:

1. U have to consider all the primary key fields. Then only u can update the table entries if already existing.

2. If u want to insert new records into the table then use the 'MODIFY' . With this query u can create new entry if does not exist ,if it is already exist with the key fields which modifies the record.

Now u have to pass ur selection screen values into some variables and do the update if already record existing (Consider all key fields in UPDATE statement otherwise it will not consder)

If u are using update statement should be like this....

select * from mara.............. where matnr = s_matnr.

in this table there is only one key field. Here * is mandatory.

I hope this is helpfull for u.

setty

Former Member
0 Kudos

hi,

If you have your selection screen fields as a internal table fields then you can use 'Move-corresponding' comand in PAI.

MOVE-CORRESPONDING ITAB TO ZMYTABLE.

MODIFY ZMYTABLE.

If you have independent fields in selection screen then you can use 'Insert' statement in PAI.

shadow
Participant
0 Kudos

Hi,

use insert/ modify stmts to update the respective d-base table

and using move-corresponding <i-table name> to ztable......

Regards

Shaik.

Former Member
0 Kudos

i found answer myself for that requirment