2007 Jan 02 10:57 AM
Hi freinds,
i am joining lfa1 and lfb1 tables, and want to get an output out of tese 2 tables.
i declared lifnr as select-options.
i want to display all the vendors details that are entered by the user at runtime in the selection-screen and print all the vendors details present in that range in the output.
But, when i try it, i am not able to get the vendor details in the given range.i am getting the general list, like as it is present in the database table.
can you suggest me the process to capture the vendors list in the given range.
2007 Jan 02 11:04 AM
<b>If Data is not there in the Table Then How SAP will show more than that ? If u think u may have more data , then check ur Join conditions itself.</b>
<b>But, when i try it, i am not able to get the vendor details in the given range.i am getting the general list, like as it is present in the database table.</b>
2007 Jan 02 11:04 AM
<b>If Data is not there in the Table Then How SAP will show more than that ? If u think u may have more data , then check ur Join conditions itself.</b>
<b>But, when i try it, i am not able to get the vendor details in the given range.i am getting the general list, like as it is present in the database table.</b>
2007 Jan 02 11:14 AM
Hi prabhu,
i took 3 fields from lfa1 and 2 fields from lfb1 tables. The join condition is correct. I am getting the values for fields from both lfa1 and lfb1 in the report output.
The output is same even if i enter values in selection-screen or not.
how to write code to capture the values entered in the selection screen and display the result in the report output.l
2007 Jan 02 11:17 AM
check ur select query . u might have used inner join to fetch the data.
Like this.
select * into corresponding fields of table IT from lfa1 inner join lfb1 on lfa1lifr = lfb1lifnr where lifnr in <select-option field name>.
check whether u have specified the select-option field name correctly in where condition.
2007 Jan 02 11:38 AM
Hi,
my select query is:
SELECT lfa1lifnr lfa1name1 lfa1adrnr lfa1telf1 lfa1~telfx
lfb1bukrs lfb1zterm
INTO TABLE itab
FROM lfa1 INNER JOIN lfb1 ON lfa1lifnr EQ lfb1lifnr
WHERE lifnr IN vend.
But when i execute this , the error says that "COLUMN NAME LIFNR HAS TWO MEANINGS".
I think my select query right?? It hapend previously too.i did not change anything now.
2007 Jan 02 11:44 AM
Hi,
Try this:
In Where clause :WHERE lfa1lifnr IN vend (or lfb1ifnr ).
As lifnr is present in both the tables so u have tos pecify as which DB table LIFNR should be used.
Hope this helps.
2007 Jan 02 11:48 AM
HI Raghu,
Change your <b>where condition with LFA1~LIFNR</b>
SELECT lfa1~lifnr lfa1~name1 lfa1~adrnr lfa1~telf1 lfa1~telfx
lfb1~bukrs lfb1~zterm
INTO TABLE itab
FROM lfa1 INNER JOIN lfb1 ON lfa1~lifnr EQ lfb1~lifnr
WHERE lfa1~lifnr IN vend.
Regards,
Raghav
2007 Jan 02 11:51 AM
Check this.......
SELECT lfa1lifnr lfa1name1 lfa1adrnr lfa1telf1 lfa1~telfx
lfb1bukrs lfb1zterm
INTO TABLE itab
FROM lfa1 INNER JOIN lfb1 ON lfa1lifnr EQ lfb1lifnr
WHERE <b>lfa1~lifnr</b> IN vend.
2007 Jan 02 11:56 AM
Hi friends,
thanx for helping me out. The problem is solved.i actually forgot the syntax of the select query when we use select-options. I got the output now after your help.
Thank you ALL.
2007 Jan 10 12:05 PM
u are having a wrong join statement for suere please check wheter the where condition is correct or not and if you are using left inner join then teere must be no dta in the other table hence its selection all,
please reward point if of any use to you