‎2007 Oct 12 10:24 AM
Hi All,
I want to select buzei, zuonr,sgtxt,meins from bseg ,temp (a temporary variable of type p deciamls 2), tmp (another temporary variable) and dmbtr from HBSEG (a structure of type bseg) . under the cond
koart ne 's' or
xauto ne 'x' or
buzid ne 't'.
I have to write this select query usinf a WORKAREA . After this select query i give WRITE_FORM as i call there vairables in script.Its very urgent.
thanks much
‎2007 Oct 12 10:28 AM
‎2007 Oct 12 10:31 AM
Hi can you try like this,
select a~buzei
a~ zuonr
a~sgtxt
a~meins
b~dmbtr
from bseg as a
inner join hbseg as b
into table itab
where koart ne 's' or
xauto ne 'x' or
buzid ne 't'.
you have to take the other two temporrary variable separately
and
loop at itab.
use the fm write_form.
endloop.
regards,
Venkatesh
‎2007 Oct 12 10:44 AM
Hi,
select values into internal table say itab.
loop at itab.
call write_form ( place header line of itabwithin & symbol in script --- &itab-value&)
endloop.
‎2007 Oct 12 10:52 AM
Hi,
You can use inner join. Consider this simple example.
data : a type zvijirank occurs 10 with header line,
b type zvijirank1 occurs 10 with header line.
data : name like zvijirank-name,
total like zvijirank1-total,
reg_no like zvijirank.
* regno type i.
data : begin of wa,
name type zvijirank-name,
total type zvijirank1-total,
branch type zvijirank1-branch,
reg_no type zvijirank-reg_no,
* FNAME TYPE ZVIJIRANK2-F_NAME,
* MNAME TYPE ZVIJIRANK2-M_NAME,
* CITY TYPE ZVIJIRANK2-CITY,
* TEL_NO TYPE ZVIJIRANK2-TEL_NO,
end of wa.
data : it like standard table of wa with header line,
it1 like standard table of wa with header line.
call selection-screen 9010.
select a~name b~total b~branch a~reg_no into table it from zvijirank as a inner join zvijirank1 as b on a~reg_no = b~reg_no .
loop at it.
if it-reg_no eq regno.
write : 'NAME :', it-name,
'REG_NO :', it-reg_no,
'TOTAL :', it-total.
ENDIF.
endloop.Thanks,
Reward If Helpful.
‎2007 Oct 12 10:53 AM