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

report

Former Member
0 Likes
597

Hi friends.

This is code used to display comp name.

DATA : v_butxt LIKE t001-butxt.

SELECT SINGLE butxt FROM t001 INTO v_butxt WHERE bukrs EQ '1000'.

fheader-typ = 'H'.

fheader-info = v_butxt.

APPEND fheader.

CLEAR fheader.

But now requirment is diplay company name for different comp code or display name as per comp code entered

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
577

HI,

DATA : v_butxt LIKE t001-butxt.

parameters: p_Bukrs like bkpf-bukrs.

SELECT SINGLE butxt FROM t001 INTO v_butxt WHERE bukrs EQ p_bukrs.

write:/ v_butxt.

Regards,

S.Kendi.

5 REPLIES 5
Read only

Former Member
0 Likes
577

declare a variable BUKRS and get the entered company code into BUKRS and pass that into ur select query like

data: bukrs like t001-bukrs.

bukrs = 'UR Com Code'.

SELECT SINGLE butxt FROM t001 INTO v_butxt WHERE bukrs EQ BUKRS.

Regards

Sugumar G

Edited by: Sugumar Ganesan on Mar 27, 2008 7:01 AM

Read only

0 Likes
577

thanks

Read only

Former Member
0 Likes
578

HI,

DATA : v_butxt LIKE t001-butxt.

parameters: p_Bukrs like bkpf-bukrs.

SELECT SINGLE butxt FROM t001 INTO v_butxt WHERE bukrs EQ p_bukrs.

write:/ v_butxt.

Regards,

S.Kendi.

Read only

Former Member
0 Likes
577

query is answered

Read only

Former Member
0 Likes
577

Hai

if u enter a company code as parameter in selection screen

parameter p_bukrs type bukrs.

data: w_butxt type butxt.

u need to write

SELECT SINGLE butxt FROM t001 INTO w_butxt WHERE bukrs EQ p_bukrs.

and write:/ w_butxt.

if u use select-options

select-options: s_bukrs like mara-bukrs.

u need to write

SELECT butxt FROM t001 INTO table it_butxt WHERE bukrs in s_bukrs.

u need to get all the company code text into a table and display them by looping the internal table it_butxt.

pls reward if helpful

raam