Skip to Content
0
Former Member
Apr 10, 2009 at 06:22 AM

how to compare in the loop

216 Views

hi gurus....

than for all ur suggestions and help for solving out....

i found out that it was in my read stmt i have made the mistake and i have made it to work....

now i have another problem where previously i compared vbeln = wa_vbeln in the loop condition and got the result too

vbeln = wa_vbeln i have data like in vbeln = wa_bkpf-vbeln

123 90000046

123 90000046

123 90000046

123 90000046

123 90000047

2132 90000047

1234 90000047

1234 90000047

2132 90000048

1234 90000048

1233 90000048

123 90000048

123 90000049

SDD 90000049

SDD 90000049

SDD 90000049

SDD 90000050

SDD 90000050

SDD 90000050

MAIL 90000050

MAIL 90000050

SDD 90000051

only in vbeln = wa_bkpf-vbeln has the output but i want to take this too vbeln = wa_vbeln i have data like and show in the alv thou it doesnt match with the reference

i want to take both the vbeln inside my loop and watever matches should get proceed and

that which dont match should show in my alv without and get atleast appended .....

can you plzzzzzz help??/

Loop at it_vbrp into wa_vbrp where vbeln = wa_vbeln AND vbeln = wa_bkpf-vbeln.

read table it_vbrk into wa_vbrk with key vbeln = wa_vbrp-vbeln.

If sy-subrc = 0.

wa_final-knumv = wa_vbrk-knumv.

Endif.

wa_final-arktx = wa_vbrp-arktx.

wa_Final-fkimg = wa_vbrp-fkimg.

move wa_final-arktx to wa_final-a.

move wa_final-fkimg to wa_final-b.

wa_final-mcod3 = wa_kna1-MCOD3.

wa_final-belnr = wa_pos-belnr.

wa_final-dmbtr = wa_pos-dmshb.

.......................................