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: 

Leading zeroes validation

former_member672218
Participant
0 Kudos
230

Hello All,

I am working on a BW transformation where we are updating few standard objects through abap routine. The issue is that the standard objects are all ALPHA conversion enabled in BW and incoming values from R/3 are not so i.e few of the custom table fields have the ALPHA conversion set up and few don't. We cannot go and change the tables in R/3 as the business doesn't approve any modifications in R/3 . In BW, the target is a standard info object.

I am aware of calling the ALPA conversion function module but just curious if there is any better way as we are in ABAP 7.4. Is it possible to set up this check in the READ statement something like

Read table gt_val into data(wa_val1) with key to_vchar(rgptp) = cs_package_line-rgptp.

The above statement is just an example. There are too many read statements that I need to validate and it will be a big problem if the leading zeroes cannot be adhered effectively. Can you guys suggest a good and easy solution?

Thanks,

Venkat

2 REPLIES 2

Clemenss
Active Contributor
0 Kudos
160

If the fields contents are always numeric, you can define them TYPE N. All missing leading zeros are supplied automatically when moving char type numer to field.

Regards Clemens

matt
Active Contributor
0 Kudos
160

Maybe I misunderstand what you are trying to do, but why have you not simply set for alpha conversion on the fields tab of the DataSource in BW?