cancel
Showing results for 
Search instead for 
Did you mean: 

Leading zeros from Adobe form web service data connection

scott_stefanich
Active Participant
0 Kudos

I created a web service for BAPI_PRODORD_GET_DETAIL and used it as a data connection in an Adobe form. When executing the connection using request parameters of:

Number = [Production Order #]

OrderObjects.Operations = 'X'

no production orders are found.

I debugged and discovered the BAPI only found production orders when the Number importing parameter contained padded leading zeros. After searching the forums, I suspect (1) I have the wrong field type and / or pattern for the production order number input field or (2) SAP Note 1050826 may apply.

Does anyone have suggestions on which field types and patterns to use? I have tried each of Text, Numeric, and Decimal. When using Numeric, I set the data format to Float instead of Integer. I tried data patterns such as: num , the data displays with leading zeros but does not pass to the BAPI with them.

I was also thinking a Formcalc or Javascript may be the solution.

Livecycle version: 8.1.2

Component SAP_APPL: 603 (for SAP note relevancy)

Thank you,

--- Scott

Accepted Solutions (1)

Accepted Solutions (1)

chintan_virani
Active Contributor
0 Kudos

I too second what Robert said as such things should be handled in backend itself.

Answers (3)

Answers (3)

scott_stefanich
Active Participant
0 Kudos

The problem was resolved by the tried & true method of deleting everything and starting over. A simple text field type then passed the string.

Otto and Robert, thank you both very much for your responses. Following your suggestions, I am going to take the route of creating a wrapper BAPI which calls BAPI_PRODORD_GET_DETAIL for input conversion / validation as well as reusability.

Thanks again,

--- Scott

Former Member
0 Kudos

if on ECC 6, you could also enhance your BAPI to call the conversion exit alpha input to always convert your PO to an internal format...

Or write a wrapper BAPI(WS) to convert it then have it call your BAPI_PRODORD_GET_DETAIL

OttoGold
Active Contributor
0 Kudos

Hello,

maybe it would be the fastest approach here to work with the value as a string and check the length of the "string" and if needed add some leading zeros. You may try some validations, so the value entered by the user is denied if not in the respective format.

For a smooth start with scripting start here:

http://www.adobe.com/devnet/livecycle/articles/lc_designer_scripting_basics/lc_designer_scripting_ba...

http://help.adobe.com/en_US/livecycle/es/FormCalc.pdf

Regards, Otto