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

table entries update through tcode me21n

Former Member
0 Likes
607

Hi ,i want to update the database table ekpo through the screen fields execution.

please help me with the code lines.

thanks

3 REPLIES 3
Read only

Sm1tje
Active Contributor
0 Likes
548

Your title:

table entries update through tcode me21n

.

So what do you need CODE LINES for? The tables involved will be updated by the SYSTEM itself after entering the data in transaction ME21N. And that's all there is.

Or should the requirement something completely different?

Read only

Former Member
0 Likes
548

Hi if u enter values in tcode me21n for new entry or me22n for change entry

then system will folat the data automatically and it goes to the

corresponding table.

wht is ur requtrement.

Read only

Former Member
0 Likes
548

i am doing like this for updating the entries through tcode me21n.

IN PBO;

data: v_date type ekpo-zzpldte,

v_code type ekpo-zzreason.

if sy-tcode = 'ME21N'

or sy-tcode = 'ME21'.

loop at screen.

if screen-name = 'EKPO-ZZREASON'

or screen-name = 'EKPO-ZZPLDTE'.

screen-input = '0'.

modify screen.

endif.

endloop.

endif.

IN PAI:

types:ekpo.

data:it_ekpo like standard table of ekpo with header line,

wa_ekpo like ekpo.

select * from ekpo

into corresponding fields of table it_ekpo.

loop at it_ekpo into wa_ekpo.

wa_ekpo-zzpldte = v_date.

wa_ekpo-zzreason = v_code.

modify ekpo from wa_ekpo.

endloop.

i dont know whther i am doing it correctly,

will this will give me the database updates.

please note v_date and v_code is my feilds on th screen for the user entry.

please suggest.

thanks.