cancel
Showing results for 
Search instead for 
Did you mean: 

Adobe Form Leading Zero problem

Former Member

Hi expert,

I am working on adobe form. In the field of customer number i want excat number not with zero. but in pdf output it is displaying zero. like '0000117719' but i want 117719.

Pl help

Accepted Solutions (1)

Accepted Solutions (1)

david_liu1
Advisor
Advisor
0 Kudos

Hello,

Please try to recreate the generated function module with

the help of program: FP_GENERATE_FUNCTION_MODULE as per SAP note:

1076159 and see if it helps.

Regards,

David

Former Member
0 Kudos

Dear David Thanks

Answers (2)

Answers (2)

andrs_sarcevic
Contributor

Set the field to Numeric or Decimal and use the appropiate display pattern in in the adobe form.

Regards,

Andres.

JerryWang
Advisor
Advisor
0 Kudos

Hello friend,

you can use the following FormCalc in the field:

var x=$.rawValue;

$.rawValue = replace($.rawValue,"0"," ");

$.rawValue = ltrim($.rawValue);

$.rawValue = right(x,len($.rawValue));

Best Regards,

Jerry

dstjacques
Participant
0 Kudos

Jerry's proposition has one problem. It removes all "0" from the entire value.

So, 00001033 become 133

With the following, we are removing only the "0" from the beginning of the string.

while ( substr( $.rawValue, 1, 1 ) == "0" ) do

$.rawValue = substr( $.rawValue, 2, 1000 )

endwhile