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

Issue while fetching data from custom table....

Former Member
0 Likes
1,211

Hello All,

I have a field in custom table called BELNR with data elemnt type BELNR_D (character 10). Now on selection of a custom report , I have this field as parameter.

Foe example, one of records have data "444005" in BELNR in custom table. But if I put "444005" for BELNR on selection screen, nothing is retrieved from table but if I put 444005*, then only record 444005 is retrieved.

I am not sure why this happening.

Any help..

Regards,

Jainam..

Edited by: Jainam Shah on Jun 9, 2009 10:01 PM

Edited by: Jainam Shah on Jun 9, 2009 10:01 PM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
911

Run the value through FM CONVERSION_EXIT_ALPHA_INPUT before doing the SELECT. This will append the leading zeroes.

Rob

5 REPLIES 5
Read only

Former Member
0 Likes
912

Run the value through FM CONVERSION_EXIT_ALPHA_INPUT before doing the SELECT. This will append the leading zeroes.

Rob

Read only

former_member194669
Active Contributor
0 Likes
911

BELNR_D have the domain BELNR that contains a conversion exit. so before fetching the data (ie making the select on your parameter) you need to use fm CONVERSION_EXIT_ALPHA_INPUT convert and then use this value in the select

Read only

Former Member
0 Likes
911

Hi Jainam,


PARAMETERS : p_belnr type ztable_belnr.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
  EXPORTING
    INPUT         = p_belnr "12345
 IMPORTING
   OUTPUT        =  p_belnr."000012345

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
  EXPORTING
    INPUT         = p_belnr "000012345
 IMPORTING
   OUTPUT        =  p_belnr."12345

Now write the select statement Accordingly..

Read only

0 Likes
911

Hi,

The domain has a conversion exit attached to it. Therefore, before using it you have to use the FM 'CONVERSION_EXIT_ALPHA_INPUT'. This will resolve your problem.

Read only

Former Member
0 Likes
911

Hi Jainam,

I thought in a diffrent manner.

CONVERSION_EXIT_ALPHA_INPUT and CONVERSION_EXIT_ALPHA_OUTPUT are good as they are mentioned in domain of belnr.

con't we write like this.

PARAMETERS : p_belnr type belnr_d default '123'.

pack p_belnr to p_belnr.

condense p_belnr.

write:/ p_belnr.

Please let me know if I am wrong.

Regards,

Kumar Bandanadham.