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

or in brackets

Former Member
0 Kudos
197

HI all,

i want to ask if one of the field is initial do the below codeing,

how can i do so in abap without ask after every field if it initial ?

if ( <lf_de>-date_ft OR <lf_de>-num_ft OR <lf_de>-langu OR <lf_de>-tzone ) IS INITIAL.

do the follwing.

what is the short way to write it?

Best Regards

Nina

Edited by: Nina C on Jul 1, 2009 4:15 PM

1 ACCEPTED SOLUTION
Read only

matt
Active Contributor
0 Kudos
165

It's either

IF a = b OR a = c OR a = d.

or

CASE a.
  WHEN b OR c Or D.

Important tip: Read the ABAP help on the statements in question. They'll tell you if there is a short form, without you needed to ask. And that's got to be quicker, yes?

matt

5 REPLIES 5
Read only

babu_kilari4
Active Contributor
0 Kudos
165

Hello Nina,

ABAP syntax is of that way. Without checking individual fields by an OR condition you can achieve this. There will not be any difference in the processing speed I guess.

Thanks,

Babu Kilari

Read only

matt
Active Contributor
0 Kudos
166

It's either

IF a = b OR a = c OR a = d.

or

CASE a.
  WHEN b OR c Or D.

Important tip: Read the ABAP help on the statements in question. They'll tell you if there is a short form, without you needed to ask. And that's got to be quicker, yes?

matt

Read only

Former Member
0 Kudos
165

HI Matt,

Thanks ,

i read the sap help but i don't find how i can write this in better way.

IF <lf_de>-date_foat IS INITIAL OR <lf_de>-n_fort IS INITIAL

OR <lf_de>-lagu IS INITIAL OR <lf_de>-tne IS INITIAL."

maybe u have an idea?

Br

Nina

Read only

Former Member
0 Kudos
165

Matt replied in his thread:

Important tip: Read the ABAP help on the statements in question.

They'll tell you if there is a short form, without you

needed to ask. And that's got to be quicker, yes?

and then you replied

i read the sap help but i don't find how i can write this in better way.

You should have your answer from Matt's response and your findings.

Read only

matt
Active Contributor
0 Kudos
165

I'll spell it out.

There isn't a better way. That's why you couldn't find it.

matt