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: 

Fiori: Missing leading zeros for VBELN

Former Member
0 Kudos

Hi guys,

I have a small fiori app with VBAK/VBAP relationship.

The problem is, that VBELN in the master view is cutted and the leading zeros are missing. So instead of VBELN '0060000017' it is only '60000017' shown. So when I click on this VBELN an oData service get called in order to read the corresponding VBAP data. But in this service I get the VBELN '60000017' and so I get no data back and sy-subrc = 4.

So how can I fix this problem?

Regards,
Basti

9 REPLIES 9

ipravir
Active Contributor
0 Kudos

Hi,

You can call conversion_routine function module in Gateway side to make the VBELN no. correct.

FM Name: CONVERSION_EXIT_ALPHA_INPUT

Call this function module, before reading the information from Header Table.

Regards,

Praveer.

Former Member
0 Kudos

Ok nice, that's working so I can run the select and get my data back now.

But what can I do, if I want to see the leading zeros in my fiori app?

0 Kudos

FM  CONVERSION_EXIT_ALPHA_OUTPUT for getting leading zero or unpack in abap

0 Kudos

Hi,

You can use below FM .That is useful for your scenario.

FM => CONVERSION_EXIT_ALPHA_INPUT.

Thanks,

Karthikeyan R.

ipravir
Active Contributor
0 Kudos

Hi,

I am not sure, if you take a string type of variable in UI5 to display VBELN information, then i think you will able to see leading zeros there.

Regards,

Praveer.

Former Member
0 Kudos

It's a Edm.String, so I would expect that the string is exactly the same like in abap without any cutting of leading zeros.

ipravir
Active Contributor
0 Kudos

Could you check, when you are mapping the data in UI5. what exactly value is passing.

Is leading zeros are there or not, you can debug you application in browser to check the data flow.

Former Member
0 Kudos

Hello Bastian,

Yes, you are correct. What is the format you can see in the gateway client? Are there leading zeros?

If yes, your app converts your numbers. So you could implement a formatter.js in your Fiori app which adds leading zeros.

If no, you have to add them in your ABAP service implementation.

Regards,

Dominik

Former Member
0 Kudos

With a breakpoint in the oData service I get the VBELN with leading zeros in the et_entitiyset. But when I see the data in firebug in the network view there are no more leading zeros. So I think the app is the problem and I will try to implement here a conversion rule.

Thank you very much guys!

Regards,

Basti