Skip to Content
avatar image
Former Member

Problem with counters of sapscript

hii frnds

i need to print some data in the last page of my script . the data should be only in the main window . the problem is in main window we cant use counters of script like nextpage , page , formpages cauze these r not gvng true values .this gives true values in variable window . so can any body suggest how to do it . are there any other counters which gives last page no of the script inside the main window .

thanking you

rohit gupta

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Mar 14, 2007 at 08:28 PM

    Hi,

    can you try the below one.

    In the main window are you print any internal table values or any variable value which prints in the last page also you will now that it is a last page. meaning for example if you are printing the internal table then get the no of records (10) in the internal table definetly the last record will be printed in the last page so take such conditions and keep on the below one

    if lv_lines ne 10.

    &SAPSCRIPT-COUNTER_1(+)&.

    else.

    page1 = &SAPSCRIPT-COUNTER_1(+)&.

    endif.

    if page1 is not initial.

    write your logic.

    endif.

    Br,

    Laxmi.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      hii lasmi

      thankx a lot for your answer i had to modify ur logic but its realy working

      thankx

      rohit