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: 

Manipulating fields in a view

Former Member
0 Kudos

I have a table with a date and a time and I really need that data in a datetimestamp format. I'm trying to avoid creating a custom table and a custom program to get this information that already exists in this table.

If I put the data in a view, is there any way to perform calculations on the fields and show that as another field in the view?

I've got a view partially set up, but I just don't see a way to manipulate the fields to that degree?

Or any other way to do this without creating a custom table with the right field type and a program that converts the data from one to the other?

Thanks for any help.

1 ACCEPTED SOLUTION

former_member194669
Active Contributor
0 Kudos

May be try with creating table maintenance generator for the table and use EVENTS to write your code to manipluate the data and display in differnet column.

aRs

Message was edited by:

10 REPLIES 10

former_member194669
Active Contributor
0 Kudos

May be try with creating table maintenance generator for the table and use EVENTS to write your code to manipluate the data and display in differnet column.

aRs

Message was edited by:

0 Kudos

How would I add the extra field to the view to hold the data? Is there a way to put a field in a view that doesn't come from a table?

0 Kudos

Hi,

It is not possible to include an extra field to the view that is not a part of any table.

Hope this helps.

Please reward if useful.

Thanks,

Srinivasa

0 Kudos

How then can I implement the previous suggestion without adding a new field to the view?

0 Kudos

Hi,

You can use edit mask statement to display the date and time which ever format you like.

Example:

Data time type t value '154633'.

write (8) time using edit mask '_:_:_'.

Output will be 14:46:33

Hope this helps.

Please reward if useful.

Thanks,

Srinivasa

Message was edited by:

Srinivasa Bhanuprasad Moningi

0 Kudos

Within the view?

Let me restate my question, because I think we're all confused.

I am looking at the table PEVSH.

I need to use a few fields from this table, including the date and time, but I need that together in a timestamp format, not in two seperate date and time fields.

Is there a way to create a view of PEVSH that displays those two fields together into a timestamp field?

I'm not seeing how I can use a maintenace generator to do that if I don't have the field. The same with the edit mask, there's no field to put the edit mask on.

If I can't do it in a view, is there a way, if I create a custom table, to have lines inserted into it everytime PEVSH is updated?

I'm happy to award points for helpful answers, but please consider my total problem when answering. Thanks.

0 Kudos

Hi,

I am not sure of what time stamp format you are looking for.

But for example, the below lines can be used in a sample program.

data time type t value '154633'.

write (8) time using edit mask '__:__:__'.

write sy-datum.

The output will be:

15:46:33 08/01/2007

So, depending on this you can change to the format you want.

Hope this helps.

Please reward if useful.

Thanks,

Srinivasa

0 Kudos

But I'm not trying to write the data out, I'm trying to store it in a table or view where it can be accessed by a BW extractor.

So I don't think using an edit mask is at all helpful?

0 Kudos

Hi,

I think you have to create a custom table.

Else it is not possible.

Thanks,

Srinivasa

0 Kudos

Yes I'm back to thinking that as well, thanks for everyone who tried to help.