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

Simple Select Help

Former Member
0 Likes
502

I have the below code and it's not pulling the chart of accounts.  What could I be doing wrong? It looks fine to me...

PARAMETERS: d_cc TYPE bukrs OBLIGATORY.

DATA: wa TYPE t001.

SELECT ktopl FROM t001 INTO wa WHERE bukrs EQ d_cc.

      IF wa-ktopl IS NOT INITIAL.

           WRITE: 'Company Code ', d_cc, ' uses Chart of Accounts ', wa-ktopl.

      ELSE. WRITE: 'Company Code ', d_cc, ' has not been assigned a Chart of Accounts.'.

ENDIF.

ENDSELECT.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
465

Hello,

Change your select query as below.

SELECT ktopl FROM t001 INTO wa-KTOPL WHERE bukrs EQ d_cc.


Regards,

Sameer

2 REPLIES 2
Read only

Former Member
0 Likes
466

Hello,

Change your select query as below.

SELECT ktopl FROM t001 INTO wa-KTOPL WHERE bukrs EQ d_cc.


Regards,

Sameer

Read only

0 Likes
465

Thank you! Duh!