Application Development and Automation 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: 
Read only

Removing Padding Zeros from RFC input

Former Member
0 Likes
669

Hi,

I have written one RFC which accepts PERNR as input and gives some records in a output table.

My query is

SELECT pernr vorna from pa0002 into CORRESPONDING FIELDS OF TABLE Z_PD_TABLE WHERE pernr Like 'InputValue'

When i enter 12, input value automatically becomes '00000012'. i want such values which contains 12 in it.

Any help??

-


Prashant

4 REPLIES 4
Read only

Former Member
0 Likes
563

PERNR is a numc 8 field that's why u r getting 00000012 after entering 12.

Use input field as type c field.

Regards,

Joy.

Read only

Former Member
0 Likes
563

Hi,

Other use this abap command before query


SHIFT <InputValue> LEFT DELETING LEADING '0'.

SELECT pernr vorna from pa0002 into CORRESPONDING FIELDS OF TABLE Z_PD_TABLE WHERE pernr Like 'InputValue'

OR



CONVERSION_EXIT_ALPHA_OUTPUT Conversion exit ALPHA, internal->external

call function 'CONVERSION_EXIT_ALPHA_OUTPUT'
  exporting
    input  = <InputValue>
  importing
    output = <InputValue>.

Hope it will helps

Read only

Former Member
0 Likes
563

Thanks for the help

Read only

Former Member
0 Likes
563

HI ,

USE THIS FM: 'CONVERSION_EXIT_ALPHA_INPUT'

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = wa_crrb_audit-cust_acct_id

IMPORTING

output = wa_crrb_audit-cust_acct_id.

IT WILL DEFINATELY HELP YOU

regards

Rahul Sharma