2007 Jan 24 10:30 AM
selection screen parameters r plant : P_WERKS(VBAP-WERKS),sales doc : S_VBELN(VBAP-VBELN) & sales doc item : S_POSNR(VBAP-POSNR).
PARAMETER: p_werks like vbap-werks.
select-options : s_vbeln for vbap-vbeln,
s_posnr for vbap-posnr.
rite now im using d query :
select VBELV LFIMG from LIPS into table ITAB where VBELV in S_VBELN and POSNV in S_POSNR.
now this query is not workin if we give multiple choices in d input.
2007 Jan 24 10:39 AM
PARAMETER: p_werks like vbap-werks.
select-options : s_vbeln for vbap-vbeln,
s_posnr for vbap-posnr.
select VBELV LFIMG
from LIPS
into table ITAB
where VBELN in S_VBELN
and POSNR in S_POSNR.U have to check with the key fiels, VBELN and POSNR.
Now it will work.
Reward poinst if this helps.
selection screen parameters r plant : P_WERKS(VBAP-WERKS),sales doc : S_VBELN(VBAP-VBELN) & sales doc item : S_POSNR(VBAP-POSNR).
PARAMETER: p_werks like vbap-werks.
select-options : s_vbeln for vbap-vbeln,
s_posnr for vbap-posnr.
rite now im using d query :
select VBELV LFIMG from LIPS into table ITAB where VBELV in S_VBELN and POSNV in S_POSNR.
now this query is not workin if we give multiple choices in d input.
2007 Jan 24 10:35 AM
Hi ,
Could you please check whether there is data in the table for the set of inputs you give.
Regards
Arun
2007 Jan 24 10:37 AM
yes... data is present..
now wat modifications i should make in dat query...
2007 Jan 24 10:39 AM
well if data is present, your statement HAS to work.
Only problem you may run into now is that your internal table is of y wrong type.
maybe just decalre it like following:
data itab type lips.
2007 Jan 24 10:40 AM
2007 Jan 24 10:41 AM
OMG, YEAH the one who can read is in clear advantage.
listen to the LADIES, they really know the answers 😛
2007 Jan 24 10:42 AM
2007 Jan 24 10:44 AM
Hi
Just as I said in my previuos answer try this:
DATA: BEGIN OF ITAB OCCURS 0,
VBELV LIKE LIPS-VBELV,
POSNV LIKE LIPS-POSNV,
LFIMG LIKE LIPS-POSNV,
END OF ITAB.
select VBELV POSNV LFIMG from LIPS into table ITAB where VBELV in S_VBELN and POSNV in S_POSNR.
U make sure to have all keys fields in ITAB to miss any records, it should be better your table was like this:
DATA: BEGIN OF ITAB OCCURS 0,
VBELN LIKE LIPS-VBELN
POSNR LIKE LIPS-POSNR,
VBELV LIKE LIPS-VBELV,
POSNV LIKE LIPS-POSNV,
LFIMG LIKE LIPS-POSNV,
END OF ITAB.
select VBELN POSNR VBELV LFIMG from LIPS into table ITAB where VBELV in S_VBELN and POSNV in S_POSNR.
Now it should work
Max
2007 Jan 24 10:59 AM
then i am not sure why this is not working for you , because i tried it on my server and it worked fine. the only thing i can say , please again carefully check the whether you have values in your table LIPS for the field <b>VBELV</b>.
Regards
Arun
2007 Jan 29 9:39 AM
hi.........
if it is workin on ur server then could you pls mail d whole pgm u've written to test this query ?
my email id is [email protected].....
2007 Jan 24 10:36 AM
Hi
It can depend on how you've defined ITAB, you should insert POSNV field too: INTO TABLE option loads only one record if there are hits with the same key, so you can risk to load one records for every sales order (VBELV) with several items.
select VBELV POSNV LFIMG from LIPS into table ITAB where VBELV in S_VBELN and POSNV in S_POSNR.
Max
2007 Jan 24 10:37 AM
Hi,
Your Internal table should have the same field names, if the Itab is not contain the same field names, then use
select VBELV LFIMG from LIPS into corresponding fields of table ITAB where VBELV in S_VBELN and POSNV in S_POSNR.
Regards
Sudheer
2007 Jan 24 10:40 AM
DATA : BEGIN OF ITAB OCCURS 0,
VBELV LIKE LIPS-VBELV,
LFIMG LIKE LIPS-LFIMG,
END OF ITAB.
i've used the above declaration....
2007 Jan 24 10:39 AM
PARAMETER: p_werks like vbap-werks.
select-options : s_vbeln for vbap-vbeln,
s_posnr for vbap-posnr.
select VBELV LFIMG
from LIPS
into table ITAB
where VBELN in S_VBELN
and POSNR in S_POSNR.U have to check with the key fiels, VBELN and POSNR.
Now it will work.
Reward poinst if this helps.
2007 Jan 24 10:42 AM
<b>VBAK-VBELN /VBAP -VBELN = LIPS-VGBEL .</b>
VBELN IN LIPS -> DELIVERY
VBELN IN VBAP/VBAK IS SALES DOCUMENT NUMBER
Get the flow of the tables first and then build the query .
vbak-vbeln = vbap-vbeln. } sales
sales->delivery
vbap-vbeln = lips-vgbel.
vbap-ponsr = lips-vgpos.
regards,
vijay
2007 Jan 24 10:56 AM
select VBELV LFIMG from LIPS into table ITAB where VBELV in S_VBELN and POSNV in S_POSNR.
This query will not work . The reason is u are comparing VBELV & S_VBELN . Thats not the right field to comnpare as both are diff fields.
vbelv - Originating document
vbeln- Delivery
In LIPS table these fields will have different values.
reward points if found useful.
regards,
barath.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |