2009 Jul 01 3:02 PM
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
2009 Jul 01 3:18 PM
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
2009 Jul 01 3:16 PM
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
2009 Jul 01 3:18 PM
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
2009 Jul 01 9:03 PM
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
2009 Jul 01 10:14 PM
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.
2009 Jul 01 10:18 PM
I'll spell it out.
There isn't a better way. That's why you couldn't find it.
matt