2015 Jul 01 12:20 PM
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
2015 Jul 01 12:32 PM
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.
2015 Jul 01 12:41 PM
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?
2015 Jul 01 12:46 PM
FM CONVERSION_EXIT_ALPHA_OUTPUT for getting leading zero or unpack in abap
2015 Jul 01 12:49 PM
Hi,
You can use below FM .That is useful for your scenario.
FM => CONVERSION_EXIT_ALPHA_INPUT.
Thanks,
Karthikeyan R.
2015 Jul 01 1:08 PM
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.
2015 Jul 01 1:16 PM
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.
2015 Jul 01 1:27 PM
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.
2015 Jul 01 1:28 PM
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
2015 Jul 01 1:39 PM
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