Application Development 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: 

rate display the last value among the 4 values.........?

former_member185158
Participant
0 Kudos

i have to show rate in a column in smartforom table........rate contain 4 value but in froms it shows last value and display 4 times  .......

here is my code

    select single

       knumv  from vbrk into  wa_vbrk

       where vbeln = wa_vbrp-vbeln.

      select  kposn kawrt from konv into corresponding fields of table it_konv

        where knumv = wa_vbrk-knumv and kschl = 'ZRRP'.

  LOOP AT IT_konv INTO WA_konv

RATE = WA_konv-KAWRT .

ENDLOOP.

finaly i display rate in text &text& but it shows 10 four times.


7 REPLIES 7

Former Member
0 Kudos

Hi,

You are not comparing with item. You have to compare the item KONV-KPOSN = VBRP-POSNR.

Get the rate with item level and diplay it in smart form.

You are missing this logic.

Thanks,

Kiran

0 Kudos

hi kiran ,

i add kposn = wa_vbrp-posnr

select single

       knumv  from vbrk into  wa_vbrk

       where vbeln = wa_vbrp-vbeln.

      select  kposn kawrt from konv into corresponding fields of table it_konv

        where knumv = wa_vbrk-knumv and kposn = wa_vbrp-posnr and kschl = 'ZRRP'.

  LOOP AT IT_konv INTO WA_konv

RATE = WA_konv-KAWRT .

ENDLOOP.

but now it shows first value among the 4 values............

0 Kudos

Hi,

Are you writing this logic in the smart form or in the print program.

If it is in the smart form -> are you looping the main window with this

Loop at it_vbrp into wa_vbrp.

Endloop.

Please clarify where exactly you are writing the logic

LOOP AT IT_konv INTO WA_konv

Read table it_konv int

RATE = WA_konv-KAWRT .

ENDLOOP.

0 Kudos

yes i m using this logic in smartforms and adding loop in main window

0 Kudos

hii kiran,

thanks ...problem solv with ur help

0 Kudos

Main window!

Loop at It_Vbrp into Wa_vbrp.   " Main window

* I guess below code is in program lines of the variable


select single

       knumv  from vbrk into  wa_vbrk

       where vbeln = wa_vbrp-vbeln.

* You will get the Rate at item level of the condition record

select  single kposn kawrt from konv into corresponding fields of table wa_konv

        where knumv = wa_vbrk-knumv and

                    kposn = wa_vbrp-posnr

                     and kschl = 'ZRRP'.

RATE = WA_konv-KAWRT .

*pass the &rate& as a variable.

endloop.

Thanks,

Kiran

0 Kudos

Nice, Please close the thread as answered! 

Thanks,

Kiran.