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

values not coming in select statement .

Former Member
0 Likes
811

hii frnds

i am not able to get any value in both the variables in my select statement .

after the select statement i have to assign the text to another variable based on what value do i get in my variable through the select statement

TABLES : AUFK.

DATA : T_AUART LIKE AUFK-AUART,

T_TXT LIKE T003P-TXT,

T_AUFNR LIKE CAUFVD-AUFNR,

L_AUFNR LIKE AFIH-AUFNR ,

S_AUFNR LIKE AFIH-AUFNR,

T_DESC(25) type c .

  • t_desc1(25) type c .

READ TABLE in_tab WITH KEY name = 'CAUFVD-AUFNR' .

T_AUFNR = IN_TAB-VALUE.

SELECT SINGLE AUFNR AUART INTO (S_AUFNR,T_AUART) FROM AUFK WHERE

AUFNR = T_AUFNR .

if T_AUART = 'LM01' .

WRITE 'Description of PM ' to T_DESC .

elseIF

T_AUART EQ 'LM02'.

write 'Description of Defect' to T_DESC .

endif.

kindly help .

thanx

rohit

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
665

Hi Rohit

Please take care of the following:

READ TABLE in_tab WITH KEY name = 'CAUFVD-AUFNR' .

---> <b>Check whether the above statement is successful via SY-SUBRC</b>

T_AUFNR = IN_TAB-VALUE.

SELECT SINGLE AUFNR AUART INTO (S_AUFNR,T_AUART) FROM AUFK WHERE

AUFNR = T_AUFNR .

---> <b>Make sure that the value you are passing is having the necessary leading ZEROES. Also check if there is any corresponding entry in table AUFK via SE16 for the value</b>

Kind Regards

Eswar

hii frnds

i am not able to get any value in both the variables in my select statement .

after the select statement i have to assign the text to another variable based on what value do i get in my variable through the select statement

TABLES : AUFK.

DATA : T_AUART LIKE AUFK-AUART,

T_TXT LIKE T003P-TXT,

T_AUFNR LIKE CAUFVD-AUFNR,

L_AUFNR LIKE AFIH-AUFNR ,

S_AUFNR LIKE AFIH-AUFNR,

T_DESC(25) type c .

  • t_desc1(25) type c .

READ TABLE in_tab WITH KEY name = 'CAUFVD-AUFNR' .

T_AUFNR = IN_TAB-VALUE.

SELECT SINGLE AUFNR AUART INTO (S_AUFNR,T_AUART) FROM AUFK WHERE

AUFNR = T_AUFNR .

if T_AUART = 'LM01' .

WRITE 'Description of PM ' to T_DESC .

elseIF

T_AUART EQ 'LM02'.

write 'Description of Defect' to T_DESC .

endif.

kindly help .

thanx

rohit

3 REPLIES 3
Read only

Former Member
0 Likes
666

Hi Rohit

Please take care of the following:

READ TABLE in_tab WITH KEY name = 'CAUFVD-AUFNR' .

---> <b>Check whether the above statement is successful via SY-SUBRC</b>

T_AUFNR = IN_TAB-VALUE.

SELECT SINGLE AUFNR AUART INTO (S_AUFNR,T_AUART) FROM AUFK WHERE

AUFNR = T_AUFNR .

---> <b>Make sure that the value you are passing is having the necessary leading ZEROES. Also check if there is any corresponding entry in table AUFK via SE16 for the value</b>

Kind Regards

Eswar

Read only

0 Likes
665

hii eswar

thanx for ur help i actualy forgot to put that coversion exit . u just reminded me .

thanx a lot .

rohit

Read only

0 Likes
665

Glad could help you Rohit.

Regards

Eswar