Skip to Content

smartform number of pages increases based on internal table values.

Hi,

  In my smartfrom am getting value from driver program..

so in smartform  i want to display the number of line items in single page.

but here it_tab[] = 1 value means displayed in single page ..

but it_tab[] = 2 means for (same material ) also displaying in 2 page ..like wise 3 means 3 page....

I want to display in single page for single material  and single vendor as per selection screen values.

so i created command  as go to new page,...But still not working.

Any one give suggestion????

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Jan 12, 2015 at 02:38 PM

    Hi Anitha,

    Kindly confirm whether condition is created for the command as shown below.

    1. Create a Global variable L_MATNR
    2. During Looping, Read the next row material and and assign to Global variable inside the Loop/Table
    3. Inside command, in condition tab, compare current row(wa_matnr) with next row(l_matnr).

    Regards

    Rajkumar Narasimman


    Add comment
    10|10000 characters needed characters exceeded

  • Jan 13, 2015 at 05:42 AM

    Hi Anitha,

    Sort internal table by matnr.

    Declare a global variables.

    LOOP AT ITAB.

    AT NEW  MATNR.

    CLEAR FLAG.

    ENDAT.

    AT END OF MATNR.

    FLAG = 'X'.

    ENDAT.

    ENDLOOP.

    Pass the flag  variable  to the command.

    Hope it helpful.

    Regards,

    Venkat.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 13, 2015 at 08:13 AM

    Hello Anitha ,

    Another solution of your concern is  follows:

      1) In the  Table inside the main window --> Tab "DATA"--> SORT CRITERIA --> Check the EVENT SORT END checkbox  and put MATNR in filed name (this field should be in you Internal table). Check the below screenshot :

    2 ) Once you will check the Event sort end Checkbox you will get an event inside in your Table, please see the below image ,

    Need to put a Command inside the event and set the NEXT PAGE.

    So what exactly it will do, for each different Material it will print the details in different Page .

    Kindly try this and let me know if you need any more information from my end.

    Thanks

    Romit Raina


    SF1.png (29.0 kB)
    SF2.png (21.4 kB)
    Add comment
    10|10000 characters needed characters exceeded