2009 May 30 8:25 AM
you can put a condition or the key of a table read
example.
READ TABLE i_bsid ASSIGNING <f_bsid>
WITH KEY kunnr = <f_zppo>-kunrg
belnr = <f_zppo>-belnr
bldat = <f_zppo>-zpda_von.
this instruction with 'OR'
2009 May 30 8:30 AM
No !!! U Cant
instead some thing like this
READ TABLE i_bsid ASSIGNING <f_bsid>
WITH KEY kunnr = <f_zppo>-kunrg.
if sy-subrc ne 0.
READ TABLE i_bsid ASSIGNING <f_bsid>
WITH KEY belnr = <f_zppo>-belnr.
if sy-subrc ne 0.
READ TABLE i_bsid ASSIGNING <f_bsid>
WITH KEY bldat = <f_zppo>-zpda_von.
2009 May 30 8:30 AM
No !!! U Cant
instead some thing like this
READ TABLE i_bsid ASSIGNING <f_bsid>
WITH KEY kunnr = <f_zppo>-kunrg.
if sy-subrc ne 0.
READ TABLE i_bsid ASSIGNING <f_bsid>
WITH KEY belnr = <f_zppo>-belnr.
if sy-subrc ne 0.
READ TABLE i_bsid ASSIGNING <f_bsid>
WITH KEY bldat = <f_zppo>-zpda_von.
2009 May 30 8:33 AM
or use
READ TABLE i_bsid ASSIGNING <f_bsid>
loop at i_zppo assigning <f_zppo>.
loop at i_bsid ASSIGNING <f_bsid>
where kunnr = <f_zppo>-kunrg
or belnr = <f_zppo>-belnr
or bldat = <f_zppo>-zpda_von.
endloop.
endloop.