cancel
Showing results for 
Search instead for 
Did you mean: 

looping in smart forms

Former Member
0 Kudos

HI EXperts,

I have a problem in Samrt forms. Can anyone tell me what's the answer of that

loop at lt_price1 to ls_price1 """"Table that contains material no... like 8646,8647,8648,8646,8646

loop at lt_price1 to ls_price2 """loop that counts how many same no. of material in lt_price1 ITAB.

loop at ltscale to ls_scale """it;s for scaling (Quantity) of material.

endloop.

endloop.

>>>>>>>>>>>>>>> What can i do that ITAB won't able to read same material row again in lt_price1. can i write a program line that's deletes same no. of material thats in ITAB lt_price1.

I did all the looping in smart forms but can't to solve my problem.

Thanks and Regards,

Shakun.

Accepted Solutions (0)

Answers (3)

Answers (3)

nabheetscn
Active Contributor
0 Kudos

Hi,

I would go with follwoing approach.

Sort lt_price1 by matnr

loop at lt_price1

at end matnr--you will get count

and another loop at end of for material qty lt_price3.

endloop

endat

endloop

Hope it help you

Nabheet

Former Member
0 Kudos

You're description is a bit tricky so i might not have understand it well.

Given your code (and since you forgot an endloop i just added it:

loop at lt_price1 to ls_price1 """"Table that contains material no... like 8646,8647,8648,8646,8646
   loop at lt_price1 to ls_price2 """loop that counts how many same no. of material in lt_price1 ITAB.
      loop at _lt_scale to ls_scale """it;s for scaling (Quantity) of material.
     endloop.
   endloop

* Try this and hope for the best... :)
  delete lt_price1 where matnr eq ls_price1-matnr.
  continue.

endloop.

edit.

But to be honest.. i would do it another way: i would simply make sure that i don;t need to manipulate any data (like deletiong entries from itab) within the smartforms. Instead i would prepare all data in the print program and pass it to the smartform.

Edited by: Maen Anachronos on Nov 23, 2010 7:26 PM

Former Member
0 Kudos

Hi

Can you explain your issue again? I can't understand what you need to do

Max