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

Problem with select Statement.

Former Member
0 Likes
993

Moved to more appropriate forum

I have return select statement in implemented BADI , Select statement perfectly works in

Development Client but in production same Select statement returning Sy-subrc = 4.

I have checked value in table, values are available.

Please help me what could be possible cause

DATA: l_lifnr TYPE bseg-lifnr.

DATA: im_bukrs TYPE bukrs.

DATA: im_gjahr TYPE gjahr.

DATA: i_lfc3 TYPE TABLE OF lfc3.

BREAK-POINT.

SELECT * FROM lfc3 INTO TABLE i_lfc3

WHERE lifnr = l_lifnr

AND bukrs = im_bukrs

AND gjahr = im_gjahr.

BREAK-POINT.

Edited by: Matt on Mar 23, 2009 1:58 PM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
784

Hi,

use the Conversion routnie CONVERSION_EXIT_ALPHA_INPUT for the l_lifnr. In Some case the becaues of leading zeros the select can fail.

You need to pass the values in same format as exists in the database table.

4 REPLIES 4
Read only

Former Member
0 Likes
785

Hi,

use the Conversion routnie CONVERSION_EXIT_ALPHA_INPUT for the l_lifnr. In Some case the becaues of leading zeros the select can fail.

You need to pass the values in same format as exists in the database table.

Read only

Former Member
0 Likes
784

Hi,

You have specified some conditions in select query.

It may be the case that there are no such data available pertaining to that condition in production client but are available in development.

regards,

Sunny

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
784

Hello,

Use CONVERSION_EXIT_ALPHA_INPUT with l_lifnr for this purpose.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        INPUT  = L_LIFNR
      IMPORTING
        OUTPUT = L_LIFNR.

BR,

Suhas

Read only

Former Member
0 Likes
784

Thanks,

The Problem is solved with 'CONVERSION_EXIT_ALPHA_INPUT'.

Select Statement is working in development and not in production because of the Vendor Number range in both the system is different.