Skip to Content
avatar image
Former Member

Smartforms and AT NEW event

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Sep 21, 2010 at 09:53 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 21, 2010 at 09:48 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 21, 2010 at 10:32 AM

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

    Add comment
    10|10000 characters needed characters exceeded