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: 

date and time not update in table

Former Member
0 Kudos

Hi All!

In an userexit i am writing the code as below :

likp-zzdnstatdate = sy-datum.

likp-zzdnstattime = sy-uzeit.

I am assigning the date and time to likp for a particular document.But the fields are not getting updated they are shomwing the old values.Interestingly in debugging mode i could see the change.Since I can't use commit in user exit how to solve this..

Please advise

Regards

Praneeth

6 REPLIES 6

Former Member
0 Kudos

hi,

is there any other structure

for likp.

like v_likp in the user exit.

if yes then u have reassign value from likp to v_likp.

before comming out of user exit.

that is

v_likp-zzdnstatdate = likp-zzdnstatdate.

v_likp-zzdnstattime = likp-zzdnstattime.

0 Kudos

HI Manoj!

I assigned to a structure but it still not getting updated..Please advise

Regards

Praneeth

Former Member
0 Kudos

Hi Praneeth,

Just try doing this.

Pass ur date and time to an internal table and from internal table try to update it to ur table.

Eg:

DATA: BEGIN OF itab OCCURS 0.

INCLUDE STRUCTURE likp.

DATA: END OF itab.

itab-erdat = sy-datum.

itab-erzet = sy-uzeit.

APPEND itab.

INSERT likp FROM TABLE itab.

Hope this should work, it worked for me when i tried updating a z-table.

Regards,

S.Gomathy Krithiga.

0 Kudos

Hi

I am getting a dump at line

INSERT likp FROM TABLE itab.

Regards

Praneeth

0 Kudos

Praneeth,

Try this.

Try to update the table.

Update likp set: erdat = sy-datum

erzet = sy-uzeit

where vbeln = <the document number which u want to update>.

Hoep this should work.

0 Kudos

Boss ,

u are in User Exit. U cannt use Commands like APPEND .

regards

Prabhu