Skip to Content
author's profile photo Former Member
Former Member

Declaration

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

8 Answers

  • Best Answer
    Posted on Jun 19, 2008 at 09:16 AM

    declare the field and then clear it...

    data: wf_char type c.

    clear wf_char.

    reward points if useful....

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 19, 2008 at 09:17 AM

    HI,

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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 19, 2008 at 09:17 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 19, 2008 at 09:17 AM

    data: v_char type c.

    move space to v_char.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 19, 2008 at 09:19 AM

    Hi Hema,

    Here is the logic.

     Data: var type c value space.
    
    

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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 19, 2008 at 09:21 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 19, 2008 at 09:22 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 19, 2008 at 09:25 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.