select stmt not picking values
hi friends,
the below stmt is not picking any values,
here itab has both columns hkont and bukrs,
SELECT saknr bukrs
INTO TABLE I_SKB1
FROM SKB1
FOR ALL ENTRIES IN ITAB
WHERE saknr = ITAB-hkont and bukrs = itab-bukrs.
wheni remove the condition saknr = itab-hkont, ie. only with bukrs, it is working perfectly fine,
where as if i remove bukrs = itab-bukrs and run with condition of saknr = itab-hkont it is not working.
for testing purpose, i had picked up the value 165000 form skb1 and put as
saknr = 165000, then also its not picking up any value,
did any one face this problem before.
thank you.
Tags:
Former Member replied
You have to pad with leading zeroes. You can use CONVERSION_EXIT_ALPHA_INPUT to do this.
Like this:
LOOP AT itab. CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT' EXPORTING input = itab-hkont IMPORTING output = itab-hkont. MODIFY itab. ENDLOOP. SELECT saknr bukrs INTO TABLE i_skb1 FROM skb1 FOR ALL ENTRIES IN itab WHERE saknr = itab-hkont AND bukrs = itab-bukrs.
Rob
Message was edited by:
Rob Burbank