Skip to Content
author's profile photo Former Member
Former Member

SMARTFORMS

HI FOLKS,

I printing the statements using ABAP print program, and my objective is to print for a range of customers (which I input in the selection-options and give the range)

I have read these customer numbers into an ITAB and looping the data I am declaring the function module within the loop.

But, the entire data is printing in one statement which should not be the case, for each customer it should print different statements i.e for each customer it should print unique and not update the same statement.

How can i facilitate this ?

Thanks

vinu

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Aug 29, 2005 at 06:37 PM

    You are saying that it is putting all of the statements into one spool?

    Regards,

    Rich Heilman

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      Instead of selecting the data in program and calling the fm for each loop, call the smartforms just once and put all the select statements and other stuff in the smart forms in node PROGRAM LINES.

      Then you loop thru this internal table in node LOOP and print the data for each table entry in the internal table.

      Hope this helps you. Let me know if you need in detail.

      Thanks

      Vamsi

  • Posted on Aug 29, 2005 at 07:08 PM

    Hi Santhosh,

    You need to have explicit page break whenever you find a new customer. Hope you are using the TABLE node for displaying the line items. But explicit page break (using COMMAND node) is not possible inside the TABLE node. The solution is using LOOP node. I think you are using an internal table for TABLE node. Copy the values in another internal table and take only unique customer number (use SORT and DELETE ADJUCENT DUPLICATES). Use this internal table in the LOOP node. The TABLE node will be inside the LOOP node.

    So the LOOP node will loop through the unique customer number internal table and the TABLE node will loop through the items for the selected customer.

    Hope this will help you. If you want to have different page numbers for each customer please go through this blog.

    /people/vinod.chandran/blog/2005/08/23/using-final-window-in-smartforms

    Another solution is to control this in the print program.

    Instead of command node for page break you have to call the smartform for each customer passing the items for the selected customer. You need the unique internal table in the program.

    Hope this will help you.

    Thanks

    Vinod

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 29, 2005 at 07:25 PM

    Hi,

    As said in earlier mail. This can be handled in Print Program. Print program will extract data in Internal Table Sorted on Customer. Within loop set Print parameters & Call Function module. After call to Function module Set Parameter New Spool Id = 'X'.

    But it has a smaller problem. You have to give 'Wait' for some seconds before starting new customer. This way it will generate seperate spools for seperate customers.

    Mahindra

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.