cancel
Showing results for 
Search instead for 
Did you mean: 

Smartforms and AT NEW event

Former Member
0 Kudos

Is it possible to use the AT NEW event within the logic of a Smartform? If yes how? I have an old report program which utilises the AT NEW event to organize how data is printed on the screen and I want to achieve the same effect using Smarforms. The following code is from the afforementioned program.


LOOP AT it_vbrp
  AT NEW ishbegdt.
    WRITE : "print something out.
  ENDAT.
      AT NEW ishtagr2.
        WRITE : "print something else.
      ENDAT.
ENDLOOP

Thanks in advance!

Edited by: rabbitisle on Sep 21, 2010 11:41 AM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You could do it by using the sort radio button available in the TABLE node in the smartform..

Go thru the below link, which wud give step by step process of doing it.

http://wiki.sdn.sap.com/wiki/display/ABAP/SUBTOTALINSAP+SMARTFORMS

Cheers,

Varna

Edited by: Varna17 on Sep 21, 2010 11:54 AM

Former Member
0 Kudos

Thanks Varna17! That was it. I never thought that this option was related to the AT NEW event...

Former Member
0 Kudos

You are most welcome!!!!

Happy posting!!

Cheers,

Varna

Answers (2)

Answers (2)

Former Member
0 Kudos

The approach suggested by Varna17 is ideal for your requirement. Go ahead with that.

Former Member
0 Kudos

Hi,

Try using the below in the smart form to acheive "At NEW command"

Table -> create (right click) -> flow logic -> command lines

Hope this may be helpful.

Regards,

Sharin Varghese