Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

how to print only one line item details in one page smartform

former_member565026
Participant
0 Kudos

Hi ,

i want to print item details in invoice verification smart form,

only one item details for one page, second item details has to print

in second page.ho w to achieve this functionality.

item 1 :   item matnr qty    value total   -----> first page

item 2 : item matnr qty    value total   -----> second page

 

                                                

      


Thanks

sree

11 REPLIES 11

0 Kudos

you can try this.

Loop at itab into wa_tab. " here your internal table contains item details

call smartfrom with item 1 details in wa_tab.

Endloop.

Likewise, for each item call smartform from your driver program.

nabheetscn
Active Contributor
0 Kudos

In the Main window under table. After every line is printed. do a right click add command new-page

Nabheet

0 Kudos

Hello Srini,

Create Template in Main Window.

And keep template inside loop.

Regards,

Kalpesh

rosenberg_eitan
Active Contributor
0 Kudos

Hi,

Have a look at program SF_EXAMPLE_03

Regards.

Former Member
0 Kudos

Hi Srinivas,

                Hope this helps.

  1. Determine the total number of entries in the internal table using,

                             DESCRIBE TABLE ITAB LINES num_entries

  2.   Keep a counter after printing each line item

  3.   Check IF counter = num_entries

                         stop printing.

                 ELSE trigger new page

       do all these in conditions part of table.

Cheers,

Santhosh Yadav

0 Kudos

hi santhosh,

i want to print 2 item datils in second page , 3 item 3 page like that

0 Kudos

Hi Srinivas

We have SFSY-FORMPAGES where it holds the page number. Inside loop you create a count of what is numbe of item being printed. Lets say 1 its equal to formpage so trigger new-page and clear GV_COUNT.  Next time count will be set to 1 then 2 in second line which is equal to cuurrent page yes clear variable and trigger new page

Nabheet

0 Kudos

Hi Srinivas,

                 If thats the case use system variable SFSY-PAGES which gives the current page number so write,

1)  Inside loop increase COUNT by 1.

         In conditions part check IF SFSY-PAGES = COUNT

                                                    trigger new page

                                                    clear COUNT

                                             ELSE

                                                   continue printing. 

                                             ENDIF.

Happy Coding,

Santhosh Yadav

Former Member
0 Kudos

HI Srinivas,

Please refere the code attached in world document.

Regards

Sudheer

Former Member
0 Kudos

Hi Srinivas,

Check below link..

Page breaks in Smart Forms with Condition - ABAP Development - SCN Wiki

Thanks and Regards,

Rajkumar.

Former Member
0 Kudos

Hi ,

First you need find total no.of records in your internal table then do the following,

if u want to print only one lineitem for each page ,just do the following ,

create a mainwindow and under that create a table and in that create a command line(conditions tab give GT 1) general attributes select goto new page option .

hope this will help you,

Regards,

Thiru.