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

IF condition help

Former Member
0 Likes
756

how to specify Date condition for parameters

If condition for not to exceed system date limit ,

points awarded if useful

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
738

hi,

let us consider you are using mara table.there u have erdat as date parameter.

table : mara.

data : begin of itab_mara,

matnr like mara-matnr,

erdat like mara-erdat,

end of itab_mara.

if itab_mara-erdat GT sy-datum.

write : 'date :' erdat.

endif.

reward with points if helpful.

Message was edited by:

Vinutha YV

6 REPLIES 6
Read only

Former Member
0 Likes
738

Hello,

U can do like this.

IF LV_DATUM GT Sy-DATUM.
Do what u want..
ENDIF.

REgards,

Vasanth

Read only

Former Member
0 Likes
738

how to specify date in If condition

if i give like 10.3.1983 then the 3.1983 comes to new line and gives error 3 is unknown

Read only

Former Member
0 Likes
739

hi,

let us consider you are using mara table.there u have erdat as date parameter.

table : mara.

data : begin of itab_mara,

matnr like mara-matnr,

erdat like mara-erdat,

end of itab_mara.

if itab_mara-erdat GT sy-datum.

write : 'date :' erdat.

endif.

reward with points if helpful.

Message was edited by:

Vinutha YV

Read only

former_member196299
Active Contributor
0 Likes
738

Hi Jagrut,

you can solve it in this way ,

data: l_date like sy-datum .

if l_date GT sy-datum .

your code ...

endif.

Read only

Former Member
0 Likes
738

guys i need to restrict them by adding days if it reaches the last year in calender, so guide me

Read only

Former Member
0 Likes
738

parameters date type dats.

at selection-screen.

if date eq sy-datum.

message 'hai good morning' type 'I'.

endif.