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

how can i hide zeros in select-options?

I wanna hide zeros in select-options values.
eg.
select-options value is 00000338
but i wanna display it without zeros.

Users enter just 338 but i will use it with zeros in my query. How can i do it?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Jan 11, 2014 at 01:32 PM

    Hi

    If you area declaring using proper type it will automatically add zero's in backend. I just created select option for MARA-MATNR on screen you see 123 but in debugging it will add leading zero's because of its domain conversion exits. Please use correct field and table reference

    Nabheet

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Nabheet Madan

      I solved problem.

      bpid and pernr datas are same but length is diffirent. I just change it. every pernr is 8 character but bpid's length is 12 character i changed it on below code.

      data : lv_pernr like pa0001-pernr.

      LOOP AT s_bpid.

      lv_pernr = s_bpid-low.

      s_bpid-low = lv_pernr.

      modify s_bpid index sy-tabix transporting low.

      ENDLOOP.

      Thanks nabheet madan.

  • author's profile photo Former Member
    Former Member
    Posted on Jan 11, 2014 at 02:46 PM

    Hi Kaya,

    Currently I am not infront of SAP system but please check if BPID domain have conversion routine it will take leading zero , no need to do any code for that.

    Cheers,

    Prakash

    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.