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.