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

Table has data but not selecting in program

Former Member
0 Likes
535

Hi,

I have a problem with below piece of code.

I have data in the table VBAP and on debugging i could see value for ITAB_CATSDB-PERNR, but still the select is not fetching any rows.

===========================================================

SELECT SINGLE * FROM VBAP WHERE MATNR EQ ITAB_CATSDB-PERNR.

IF VBAP-ARKTX NE ''.

ITAB_CATSDBTEMP-ARKTX = VBAP-ARKTX.

ENDIF.

===========================================================

regards

Balaji

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
513

may be it is due to leading zero problem

try like this

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

INPUT = ITAB_CATSDB-PERNR

IMPORTING

OUTPUT = ITAB_CATSDB-PERNR

.

SELECT SINGLE * FROM VBAP WHERE MATNR EQ ITAB_CATSDB-PERNR.

IF VBAP-ARKTX NE ''.

ITAB_CATSDBTEMP-ARKTX = VBAP-ARKTX.

ENDIF.

it may work.

regards

shiba dutta

3 REPLIES 3
Read only

Former Member
0 Likes
513

Hi Balaji,

Into Is Missing.

SELECT SINGLE * FROM VBAP <b>into table "your internal table "</b> WHERE MATNR EQ ITAB_CATSDB-PERNR.

Thanks,

Reward If Helpful.

Read only

Former Member
0 Likes
514

may be it is due to leading zero problem

try like this

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

INPUT = ITAB_CATSDB-PERNR

IMPORTING

OUTPUT = ITAB_CATSDB-PERNR

.

SELECT SINGLE * FROM VBAP WHERE MATNR EQ ITAB_CATSDB-PERNR.

IF VBAP-ARKTX NE ''.

ITAB_CATSDBTEMP-ARKTX = VBAP-ARKTX.

ENDIF.

it may work.

regards

shiba dutta

Read only

Former Member
0 Likes
513

Hi,

You need to use 'CONVERSION_EXIT_ALPHA_INPUT' functionmodule to conver the field to internal format then only write the Select statment

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

INPUT = ITAB_CATSDB-PERNR

IMPORTING

OUTPUT = ITAB_CATSDB-PERNR

  • Here write your select then it wil fetch the records

Regards

Sudheer