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

Problem with Select Statement & Date

Former Member
0 Likes
617

Dear Friends,

I developed a ztable with some table including two date fileds of type char10.

i am uploading one file with some data including these dates.

after that i have to calulate values for other fields before inserting the data.

when i am using select statement by passing these values it is not picking values(even though it has for those selection).

i tried to chage the zdates type to datum.

in this case it is ignoring the last two characters while taking.

file format - 01.02.2012

data type in table - zchar10

can anyone help me please.

Moderator message: no duplicates please, basic problem, continue below:

https://forums.sdn.sap.com/thread.jspa?threadID=2145218&tstart=0

Edited by: Thomas Zloch on Feb 24, 2012

2 REPLIES 2
Read only

Harsh_Bansal
Contributor
0 Likes
520

Hi,

What is the type of fields you are passing in select statement for selection??

are they also of same type zchar10??

Go in debugging and check in what format the values are coming in fields you are passing to select statement.

If it is not same as you have stored in ztable..then before select statement..convert them into ztable format. (xx.yy.zzzz etc)

If still issue persists, then paste your code for reference.

Regards,

Harsh Bansal

Read only

former_member194797
Active Contributor
0 Likes
520

Hi,

Use 2 different fields for the date in zchar10 format and in datum (dats) format; then convert your date from one format to the other using CONVERT_DATE_TO_INTERNAL FM.