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

INITIAL

Former Member
0 Likes
2,408

IF NOT A IS INITIAL

WHAT DOES THIS STATEMENT MEAN?

12 REPLIES 12
Read only

Former Member
0 Likes
1,734

Hi,

it checks whether internal table is empty or not.

IF NOT A IS INITIAL MEANS

IF A IS NOT EMPTY

Regards

Read only

Former Member
0 Likes
1,734

Hi,

it depends upon the type of variable A.

if a is of type char it will check for if A NE ' '.

otherwise it will check for if a NE 0.

rgds,

bharat.

Read only

Former Member
0 Likes
1,734

Hi

It means that A is having some value means it is not blank.

Its having some value.

Reward if help.

Read only

Former Member
0 Likes
1,734

This will check whether the Variable A has other than initial vaule.

If A is charcter variable then the default value is Space. So the statement willl check whether A is ´having other than space.

Cheers,

Vasanth

Read only

Former Member
0 Likes
1,734

Hi,

If NOT A is initial.

And the Statement

If A is not initial.

mean the same thing.

Its just a check to see whether the field A has some value or not.

Incase A is an internal table it should by typed as A[].

Rewards if helpful.

Regards.

Read only

Former Member
0 Likes
1,734

Hi,

It checks the whether A is filled up with the values or not.

Thanks,

Sriram Ponna.

Read only

Former Member
0 Likes
1,734

hi check this,and compare these two .....

tables:mara.

data: begin of it_mara occurs 0,

matnr like mara-matnr,

meins like mara-meins,

mtart like mara-mtart,

pstat like mara-pstat,

end of it_mara.

select-options:s_matnr for mara-matnr.

select matnr

meins

mtart

pstat

from mara

into table it_mara

where matnr in s_matnr.

if not it_mara[] is initial.

loop at it_mara.

write:/ it_mara-matnr,

it_mara-meins,

it_mara-mtart,

it_mara-pstat.

endloop.

endif.

uline.

skip 2.

if not it_mara is initial.

loop at it_mara.

write:/ it_mara-matnr,

it_mara-meins,

it_mara-mtart,

it_mara-pstat.

endloop.

endif.

reward points if useful,

venkat.

Read only

Former Member
0 Likes
1,734

Hai jamnun ,

If Not Itab is Initial .

this means It Will Check Whether The Table Is Initial Are Not.

Nothing but It Check For Initial value.

Regards.

Eshwar.

Read only

Former Member
0 Likes
1,734

IF NOT A IS INITIAL

and

IF A IS NOT INITIAL

means the same.

Some difference is there in performance.

It checks if A = 0 (initial) in case of numeric or it checks if A = ' ' (blankspace) if it is character.

This is very similar to

if A <> B

or

if !(A = B)

both are same.

Consider B = 0 for numeric comparison.

Hope it aws hrlpful.

Regards,

saipriya

Read only

Former Member
0 Likes
1,734

Hi

IF A HAD SOME VALUES THEN IT WILL ALLOW IN TO THAT CONDITION OTHER WISE IT WILL WON'T ALLOW THAT TO ENTER INTO THAT CONDITION

IF A IS INITIAL THAT MEANS ITS HAVING NOTHING (EMPTY)

THEN IT WON'T ALLOW IT INTO GOTO THE CONDITION IT WILL SKIP THAT if BLOCK

Read only

sreelatha_gullapalli
Active Participant
0 Likes
1,734

hi

IF A NOT INITIAL means A already contains some values itis not at the initial stage.

Regards,

Sreelatha Gullapalli

Read only

Former Member
0 Likes
1,734

If not a is initial means-

IF 'a' has a value.

reward points if useful