07-20-2009 10:47 PM
I have a select statement it is not working properly
SORT i_bom_temp BY idnrk.
DELETE ADJACENT DUPLICATES FROM i_bom_temp COMPARING idnrk.
SELECT bdart matnr werks bdmng INTO TABLE i_resb
FROM resb
FOR ALL ENTRIES IN i_bom_temp
WHERE
matnr = 'RSG67FG'.
matnr = i_bom_temp-idnrk.
RESB has 24 table entries for the material. The SELECT statement featched me 2 entries. If i hard code the material it gives me all 24 entries in the material
Very weired.
Any suggestions.
Thanks,
AP
07-20-2009 11:15 PM
One thing I noticed is that it is giving only uniques combination in output.
Thanks
AP
07-20-2009 11:15 PM
u need to do type casting of material..means data element for two material fields seems to be different..
use FM CONVERSION_EXIT_ALPHA_INPUT to convert into teaget data type of material then do the select statement..
cheers
07-20-2009 11:18 PM
Once I had the same problem ..
what is internal table type for matnr?
regards
07-20-2009 11:29 PM
If I do in loop than working fine. Doing select for each material. Very weired. PLEASE GIVE SUGGESTIONS.
LOOP AT i_bom_temp INTO k_bom_2.
SELECT bdart matnr werks bdmng INTO TABLE i_resb
FROM resb
FOR ALL ENTRIES IN i_bom_temp_2
WHERE
bdart IN r_bdart AND
matnr = '55-24612-3'.
matnr = k_bom_2-idnrk.
ENDLOOP.
07-20-2009 11:35 PM
>
> SORT i_bom_temp BY idnrk.
> DELETE ADJACENT DUPLICATES FROM i_bom_temp COMPARING idnrk.
> If not i_bom_temp[] is initial. "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> SELECT bdart matnr werks bdmng INTO TABLE i_resb
> FROM resb
> FOR ALL ENTRIES IN i_bom_temp
> WHERE
> * matnr = 'RSG67FG'.
> matnr = i_bom_temp-idnrk.
> endif.
or try to use before coming into the select..CONVERSION_EXIT_MATN1_RANGE_I
07-20-2009 11:41 PM
Joy-
The first one did not work.
Whst will the FM CONVERSION_EXIT_MATN1_RANGE_I
do???
Thanks,
AP
07-20-2009 11:59 PM
It will convert the value into Matnr format.. say 1234 would be converted to Char18 of Matnr
07-21-2009 12:01 AM
Soved the issue on own. Thanks a lot for all your suggestions and help.
Put all the materials in RANGE and then used RANGE in SELECT statement instead of FOR ALL ENTRIES.
Thanks,
AP
07-21-2009 12:02 AM
hmm Using range tables would be a pit on performance... so make sure its not performance critical Object.
07-21-2009 3:51 AM
Hi,
Have you selected all the primary keys of 'RESB' table, if not put all the key fields in your select statement, else you will
get wrong result.
When ever using for all entries, do select all primary keys.
Tks,
Krishna..