Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

work area

Former Member
0 Likes
613

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
589

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

5 REPLIES 5
Read only

Former Member
0 Likes
590

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

Read only

Former Member
0 Likes
589

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

Read only

Former Member
0 Likes
589

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.

Read only

Former Member
0 Likes
589

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

Read only

Former Member
0 Likes
589

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