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

Loop at XVBAP not working

Former Member
0 Likes
1,706

Hi,

We have real strange problem with the loop at XVBAP .

here is the code.

loop at xvbap into ls_xvbap where updkz ne 'D' and and ( kwmeng eq 0 or zmeng eq 0 ).

endloop.

The above loop works perfectly well but it does not fill the work area ls_xvbap.

This is real starange situation.. ls_xvbap is same as xvbap.

let me know if there is some reason for this.. i can change the code to get this work.. but i am curious to know what could be the reason.

how ever the record is copied to the xvbap header line.. but technically when you say into ls-xvbap y is the record not getting copied into this work area..

Thanks

Mahesh

12 REPLIES 12
Read only

Former Member
0 Likes
1,425

Hi

loop at xvbap into ls_xvbap where updkz ne 'D'.

if kwmeng eq 0 or

zmeng eq 0 .

continue.

endif.

endloop.

try this if it works.

Regards,

Venkat

Read only

0 Likes
1,425

My friend , i know it will work if i change the code.

But i dont want to..

even i have tried with

loop at xvbap into ls_xvbap where updkz ne 'D'.

This also dont work.. here the problem is the record is not getting copied into ls_xvbap. there is no problem with the logic.

we have upgraded to ECC 6.0 and nothing is working in this when i loop at xvbap into some work area...

Thanks

mahesh

Read only

0 Likes
1,425

Can you provide data declaration you have used for these variables..?

It looks like you are using it in some user exit.

G@urav.

Read only

0 Likes
1,425

Yes i am using it in MV45AFZZ user exit.

This is the type

data : ls_xvbap like xvbap.

I have also tried..

data : ls_xvbap type VBAPVB.(VBAPVB is the type that xvbap is declared from).

Thanks

Mahesh

Read only

0 Likes
1,425

Dont know whethet the below code will help u..

I checked this program in my Dev Server too and then I see this code over there.. this works but they have not looped it over into another work area..

LOOP AT xkomv WHERE kposn = xvbap-posnr AND
                            ( kschl(3) = 'ZPB' OR kschl = 'ZP%+' ) AND
                            kinak = space.

Read only

0 Likes
1,425

I see this problem only with this user exit.. i have tried writing a program and its working fine..

into workarea does not work at all in this user exit..

Read only

0 Likes
1,425

Yes..

There seems to be a problem in MV45AZZ.

same thing is working in other programs.

I tried

data : begin of itab occurs 125.

include structure mara.

data : end of itab.

data wa like itab.

select * up to 20 rows from mara into table itab .

loop at itab into wa where mtart ne 'FERT' .

write wa-matnr.

endloop.

and it works.

G@urav.

Read only

0 Likes
1,425

Yes. it works for me too..

That is what i want to understand.. what chould be the probelm with MV45AFZZ.

Read only

0 Likes
1,425

maybe this?


data : ls_xvbap like line of xvbap.

Read only

0 Likes
1,425

I don't have that user-exit in my system

Is xvbap declared in the tables section?

Have you tried to loop with the header line if that's the case?

Read only

0 Likes
1,425

I have tried all this code..

loop at xvbap into ls_vbap..

endlooop.

This statment works all other also works xvbap has a header line that is getting filled.. but its not fillings ls_vbap this is my concern...

Read only

Former Member
0 Likes
1,425

Did not get any answer.. But for sure there sould be something thing in this.. and may be particular to this user exit