‎2007 May 09 11:17 AM
Suppose i have created one structure and that structure having the field of bkpf and bseg table. Now in my report i want to create work area for bkpf. And in next step I want to transfer the value of bseg into itab. And at last want to compare the wa_belnr with itab_belnr.
How I will do that. What would be the syntaxt for that.
‎2007 May 09 11:19 AM
Hi
Work area(V_WA) will store only one value at any point of time.
Yes you can use to store first BKPF-BELNR value
and after that you can use for BSEG-BELNR value
and you can compare this V_WA with ITAB-BELNR field also.
like
loop at itab.
if itab-belnr = v_wa.
....<do something>...
endloop.
Reward points if useful
Regards
Anji
‎2007 May 09 11:19 AM
Hi
Work area(V_WA) will store only one value at any point of time.
Yes you can use to store first BKPF-BELNR value
and after that you can use for BSEG-BELNR value
and you can compare this V_WA with ITAB-BELNR field also.
like
loop at itab.
if itab-belnr = v_wa.
....<do something>...
endloop.
Reward points if useful
Regards
Anji
‎2007 May 09 11:20 AM
DATA : wa_bkpf TYPE structure name
this will create ur work area
now after creating ths use ur internal table to compare the data
loop at itab.
read the other with key fields
regards
Navjot
Message was edited by:
navjot sharma
‎2007 May 09 11:20 AM
hi abhay,
select * from bkpf into wa_bkpf where condition. [here u can only last record available when u dont use a internal table to store the records that came from select st and wa_bkpf should have same structure of bkpf]
select * from bseg into itab where condition.
l
oop at itab where belnr = wa-bkpf-belnr [itab is a internal table with header line]
loop at itab into wa_itab where wa_itab-belnr = wa-bkpf-belnr [if itab is with out a header line u should create a work area of type bseg having required fileds and validate]
if helpful reward some points.
with regards,
suresh babu aluri.
‎2007 May 09 11:23 AM
Hi,
step1- first declare the structure.
DATA : begin of t_struct,
-
end of t_struct.
step2- now declare the internal table .
DATA : itab type standard table of t_struct with header line.
step 3- now declare the work area.
DATA : wa type t_struct.
now append wa to itab.
*****do rewards if usefull
vijay
‎2007 May 09 11:29 AM
Hi,
* u want to create wa
data: wa_bkpf type bkpf.
*fetch data into itab from bseg
select <fld_list> from bseg into table itab....
* comapare itab and wa!!!!!!!
loop at itab where belnr = wa_bkpf-belnr.
"Process ur data here....
endloop.Hope this will help u.
Jogdand M B