we have a table called t077k where we store the account group, I need to put a logic if the account grou ois ZTEMP then the address for the vendor in that particular group should come from table BSEC, for that I have written the following code. can you please tell me if tht's right or if I m missing something
read table t077k.
if t077k-ktokk eq 'ZTEMP'.
select single stras into addr1 from bsec
where adrnr eq lfa1-adrnr.
if sy-subrc eq 0 and not addr1 is initial.
move 'ADDRESS1' to out_par-name.
move addr1 to out_par-value.
modify out_par index 1.