Application Development 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: 

Declaration

Former Member
0 Kudos

I want to declare a field as blank how to do?

1 ACCEPTED SOLUTION

former_member195383
Active Contributor
0 Kudos

declare the field and then clear it...

data: wf_char type c.

clear wf_char.

reward points if useful....

11 REPLIES 11

former_member195383
Active Contributor
0 Kudos

declare the field and then clear it...

data: wf_char type c.

clear wf_char.

reward points if useful....

0 Kudos

I have to put it in the if codn.In that i have to check 2 codn like if var1 as blank or var2 = var3.In this situation how to do?

0 Kudos

U can write condition like

if var1 is initial or var2 eq var3.

...

endif.

Reward points if useful,

Regards,

Janani

0 Kudos

IF VAR1 = SPACE 
 OR VAR2 = VAR3.

You can write your own logic


ENDIF.

Former Member
0 Kudos

HI,

Don't assign any value(initiate), then it will be INITIAL.

GauthamV
Active Contributor
0 Kudos

hi,

ex:

itab-matnr = ' '.

if u want it blank under some condition do like this.

if itab-matnr = '1000234568'.

itab-matnr = ' '.

modify itab.

endif.

reward points if hlpful.

Former Member
0 Kudos

data: v_char type c.

move space to v_char.

former_member598013
Active Contributor
0 Kudos

Hi Hema,

Here is the logic.


 Data: var type c value space.

&*********************Reward Point if helpful********************&

Former Member
0 Kudos

Hi,

If you need to declare the field as blank we can write,

parameters: p_matnr type mara-matnr default ' '.

or In initialization event of report ,

Initialization.

p_matnr = ' '.

if you need to put in condition :

if p_matnr is initial.

.....

endif.

Hope this helps you.

plz reward if useful.

thanks,

dhanashri.

Former Member
0 Kudos

Hi,

take a look at [Predefined ABAP Types|http://help.sap.com/saphelp_nw70/helpdata/EN/fc/eb2fd9358411d1829f0000e829fbfe/frameset.htm]. Here you can see the initial values.

Regards Rudi

Former Member
0 Kudos

Hi

if u define any variable.it is intially blank only until you pass some value into it.

you execute this code.you will get idea.

data:name type c.

write:/ name.