Skip to Content

How to determine when to add leading zeros to values in bapi calls

Hi,

I call a couple of BAPIs from .net. In some places I need to add leading zeros to values in order to get the correct results. For example I must add leading zeros to material numbers in BAPI_GET_LIST's MATERIAL_RANGE (LOW and HIGH values).

When looking at the bapi definition is there a way to determine when I have to add leading zeros and when I don't have to add leading zeros? So far I hardcoded the padding with leading zeros, but I would rather determine that programatically.

Thanks

Sascha

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Nov 07, 2019 at 09:21 PM

    Hello,

    Looking to the BAPI is a little bit difficult to confirm this. Usually the domain used in data type of the field's structure is the same of the standard table. If it was the case, you can check if some specific field use a "Conversion Exit" in domain... A conversion exit determines if you have to deal with leading zeros.

    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.