"AT END OF" Command in Smartforms

Hi all,
       I'm trying to use Smartforms For Invoice Printing. I created a "Z" Smartform wherein I've to call a new page for a new invoice number. I'm giving the Invoice numbers as I/P in my "Z" report. What should I do regarding this?
Cheers
Ramky.G

Hi Ramakrishna,
<b>1</b>.
Try to loop ur Internal table with invoices and Call ur SMARTFORM for every new invoice .
<b>2</b>.
Define 2 variables
DATA:
num_1 TYPE i,
num_2 TYPE sy-tabix.
DESCRIBE TABLE it_table LINES num_1.
LOOP AT it_table.
num_2 = sy-tabix.
CASE num_2.
WHEN 1.
control_parameters-no_open = ' '.
control_parameters-no_close = 'X'.
WHEN num_1.
control_parameters-no_open = 'X'.
control_parameters-no_close = space.
WHEN OTHERS.
control_parameters-no_open = 'X'.
control_parameters-no_close = 'X'.
ENDCASE.
IF num_1 = 1.
CLEAR: control_parameters.
ENDIF.
Here u call Smartform
CALL FUNCTION fm_name
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
control_parameters = control_parameters
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
output_options = gv_output
user_settings = space
gv_agmt = p_agr
gv_dist = gs_distributors-kunnr
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5
Endloop.
<b>3</b>.
If u do as in 2nd point by defining 2 variables num_1 num_2 and logic for control_parameters between LOOP and ENDLOOP.
U will get all Invoices pages in single output.
I hope that u can understand .
<b>Thanks,
Venakt.O</b>
Thanks,
Venkat.O

Similar Messages

  • AT NWE COMMAND IN SMARTFORMS

    HOW TO GIVE AT NEW COMMAND IN SMARTFORMS.NEED THE REPLY URGENTLY.PLEASE HELP.

    To determine the sorting of your internal table, use the Data tab of the table or loop node. In the Sort Criteria  group box you can enter the fields by which to sort the table.
    The sequence in which you enter the field names into the table control determines the sort sequence. Use the radio buttons to choose whether to sort the field in ascending or in descending order.
    If you want to display data before or after a sort level, mark Event on Sort Begin  and/or Event on Sort End . In the navigation tree, an event node appears for which you can create inferior nodes. In these inferior nodes you specify the data you want to display at this event (for example, subtotals).

  • Firefox is very slow to respond when opening and nearly always stops responding altogether even refusing to react to Task Manager "End Program@ command. The "not responding@ error message also comes up during navigation on line.

    Firefox is very slow to respond when opening and nearly always stops responding altogether, even refusing to react to the Task Manager "End Program" command. The "not responding" error message also comes up during navigation on line. Several attempt have to be made to get on line. A loss of stability seems to be endemic at the moment.

    Try following the instructions here: [[Firefox hangs]]

  • Address Command in smartform

    Hi all,
    i am using address command in smartform .there is a radio button for po box and street ..i have to select both po box and street ..is there any way to get the same.
    also i need to print some hard code text in front of address how can i do it.
    i want output as
    B  Name
    I    Street
    L   po box
    L

    Hello,
    The radio buttons are specified to just give the priority to print; i.e.,  whether to print the street as the priority or the PO as the priority.
    Now you can decide what to print first by selecting the radio button.
    If you are selecting radio button for street then, first Street prints and then the PO, if you are selecting the PO radio button, then PO prints then followed by street.
    Hence no worries, now your second requirement to print the text before the address, just add an text element before the address format.
    PS: please do make a note that you cannot insert your texts in the middle of the address that is being printing by using address tab.

  • What are the commands in smartforms

    hi gurus
    can anyone suggest me
    what are the commands in smartforms
    thank you
    regards
    kals.

    Hi,
    Check the below link for complete information on smartforms
    [SMARTFORMS|http://sapabap.iespana.es/sapabap/manuales/pdf/smart.pdf]
    Regards,
    Chandru

  • Using Address..End Address Command in Script ?

    Using Address........End Address Command in Script , Is it possible to print without Name filed ? I have tried but w/o name field it is not printing   ..
    I liket to print like this
    Address paragraph Z3
    Street ...........................
    PoBox.........................
    City........................
    End Address
    can any1 suggest me?

    Hi,
    If you want to print country specific then use
    /:           ADDRESS PARAGRAPH AS
    /:             ADDRESSNUMBER &EKKO-ADRNR(K)&
    /:             FROMCOUNTRY &T001-LAND1&
    /:           ENDADDRESS
    Reward if useful.
    Regards,
    Nageswar

  • Smartforms : How to include Printer commands in smartforms

    I want to include printer command <esc>&l1T at the end of the smartform so that the printer can staple the form after printing.
    Can any one please let me know how to include this in smart form ..?
    Is there any way ..?

    You should use the following way:
    - Copy the device type into the Customer name space.
    - Go via transaction SPAD - Device types into the device type and
    here to tab strip 'Print controls'. Here add a print control
    with the following contents: \e&l1T
    (without flag 'Hexadecimal'; the \e is the escape character)
    - Now go to your Smartform and add a command node (right-click
    on the tree, Create - Flow logic - Command) and enter the print
    control name into the field 'Include Printer Control'.
    This adds the print control at this point. You only have to
    select the right position of the command node in the tree
    (and therefore the point of time, when the sequence shall be sent).
    - If you want to check the print data, which the SAP sends to the
    printer (and therefore whether the escape sequence was included
    correctly), you can use note 5799, method 2.

  • Regarding event & command in smartforms

    i have an assignment like this,i need to develop an smartforms in which
    employees details will come page wise means for first employee the details will come
    in the first page for second employee the details will come in the second page
    like this i need the outptut ,here i need to use templates plz let me know how will
    i proceed in smartforms as well as in the driver programs....
    if possible plz send ur codes as i m new to smartforms.
    FOR THIS i already post the maater and got this answer,
    write the driver program in se38 ......with taking an internal table with the details of all
    employees for your selection.......
    in the driver program itself call ssf_function_module ........and pass the internl atable to
    this FM .......sort the table by employee number
    now create a smartform ......with one page...desgin the page as per your requirement.....
    in the mail window create a loop (assgin the tAable ....to it which has been passed from driver program....)
    inside the loop create at new (down you will see ) and put the employee number field.....
    next inside the loop create a command ...and put a new page(call) ...
    new page will trigger automatically for each employeee.
    and i did as per the answer but i m not getting here in my smartforms i m using
    table under this i have sorted pernr in the data tab and under this event i m
    putting command in this command i m using go to new page,as per this scenario
    i m getting my output but one blank page is also coming in the output ,
    how to remove this page plz help me i also tried in the condition not on first page but it is not coming.
    plz help me

    Hi,
    Uncheck the goto new page command and put the condition pernr not equal to prevevious pernr in the conditions tab of the new command.
    This can be done as follows.
    with in loop and endloop at the end of the loop create text node(cretae a var called W_prev_pernr and then w_prev_pernr = itab-pernr.) which stores the current pernr.at in the conditions tab of the new command(Create>Flow Logic>Command) put the condition like : pernr NE w_prev_pernr.
    Hope this helps you.
    Regards,
    Rama.P.

  • Command in Smartform not working

    Hi all,
    I need to print totals in every page, for that how to know the end of the page.
    i tried to print only 15 rows in page and set a flag, if flag = X then im printing total in footer.
    But in some instances, the page has more than 15 rows then after 15th row the total is printing then the
    remaining records are printing. Now i called the Command with flag = X and in goto new page i gave second page.
    But the flag has set to X, total is also printing but the command is not trigerring.
    after 15th record the total is getting displayed and remaining item are printing.
    anybody has a clue on this why the command is not trigerring?
    pls suggest.
    Regards,
    Priya

    Declare your total line in Footer of table. There you will have the option to display it at end of table or end of each page.
    No need to calculate 15 lines or so.
    Just keep calculating the total in a variable and display it in footer.
    Double click on Footer node of table and you will see the optin to display it 'At page break' or 'End of table'
    Revert if in any doubt.
    Edited by: Ankesh Saharan on Dec 24, 2008 2:19 PM

  • BOX Command in Smartforms

    Guyz,
    My situation is i have main window which is having 2 columns ...
    1st - invoice line item text
    2nd - invoice line item value
    requriement is i'll have to print a vertical line after the 1st column (inv line itemtext) which should draw through out the main window.
    Firstly - I tried with BOX Command (BOX XPOS 3.00 CM WIDTH 5.00 CM FRAME 10 TW) inside the MAIN Widnow and inside a text element which is not working to my surprise.  MAIN WINDOW  height = 11,80 cm width = 18,16 cm ...SO I'M SURE ABOVE BOX COMMAND SHOULD FIT INTO THIS WINDOW DIMENSIONS but nothing is being printed ?
    Secondly -- As i'm using internal table for priting whole MAIN Window i tried using patterns (framed pattern having one line after first column)... initial look at this pattern made me happier but to my disappointment it didn't work i.e., though it's pritning vertical line it's not printing through out the main window. Say if we have just one row to print vertical line just spans the first row but I WANT VERTICAL LINE TO BE PRINTED THROUGH OUT THE MAIN WINDOW.
    Any suggestions pls ?
    Thanks in advance
    SK

    Sreedhar,
    In SMART Forms you cannot have a line / box unless there is a element.
    What you can do is CREATE a TEMPLATE object and select the pattern. But with template and TABLE inside that formatting of the data will be difficult.
    This link might be useful for you.
    http://www.sapgenie.com/abap/smartforms.htm
    http://www.sap-img.com/smartforms/sap-smart-forms.htm
    http://help.sap.com/saphelp_46c/helpdata/en/a5/de6838abce021ae10000009b38f842/frameset.htm
    See the demo programs and smartforms SF_EXAMPLE_*
    Regards,
    Ravi
    Note : PLease mark the helpful answers

  • Dynamic New-Page Command in Smartform

    Dear Experts,
    I have a particular requirement of triggering New-Page after the end of Main window for displaying Terms & Conditions on the last page.
    For this purpose I have designed 3 pages :
    PAGE1 - Contains Main window, few Secondary windows and some Graphic windows.
                   (In PAGE1 -> General Attributes -> Next Page = PAGE2)
    PAGE2 - Is in continuation with PAGE1 except a few changes w.r.t. some Secondary windows.
                   (In PAGE2 -> General Attributes -> Next Page = PAGE2)
    PAGE3 - Contains a new Main window for displaying Terms & Conditions, few Secondary windows and
                   some Graphic windows.
                   (In PAGE3 -> General Attributes -> Next Page = PAGE3)
    After the end of Main window in PAGE1 or PAGE2 depending on the amount of data, I have used a Command logic for triggering New-Page (PAGE3). But it always triggers PAGE2 as new page and not PAGE3.

    Thanks Muthukumar.
    But in case if I set a next page of page 3 to the second page, then if my Page2 contains data spreading over more than one pages, it will display Page2 once and immediately display Page3 as next page.
    I will explain my requirement once again:
    1. If my PO details fits on Page1 itself than my next page should be Page3(Terms & Condition page).
    2. If my PO details is of more than one page, for that I have designed Page1 as first page and Page2
        for remaining pages. Once the PO details is over the next page should be Page3.

  • New Page COmmand in Smartforms

    Hi,
    My requirement is as follows,
    Whenever the item number changes it has to generate a new page with the header
    Whenever an item overflows it should come in a new page without the header details.
    So for this I have two pages in my smartform.
    Page1 - Header with item details
    Page2 - Only item details without the header
    I have given Page1's next page as Page2. And I have given a command whenever the item no changes it should go to Page1.
    But whats happening now is whenever a new page is generated only Page 2 is coming and not the Page 1.
    Any ideas??

    Hi ,
    u want like this right ...
    assume  that  table  data
    item                            item desc                              qty
    10                              10item descripotion                 23
                                        for material      
    20                               20item descripotion                 33
                                         for material      
    O/P Like  This u want
    *page1
    item                                    item desc                            qty
    10                                       10item descripotion            23
    page2  (dont want  want headers only remainning data of the line item)
                                              for material      
    For this simply u can put your header  in the main area of the table  (leave header as blank)
    Let me know if any concerns........
    Regards,
    Lokesh.

  • Remap Home / PgUP / PgDwn / End Key Commands?

    Hey I'm having a problem with Dreamweaver CS3. I am using a
    MacBook running OSX 10.5.3, and in order to use Home, End, Page Up
    and Page Down in Dreamweaver, I have to hit a combination of Fn,
    Cmd and one of the Arrow keys, each corresponding to one of the
    commands above.
    The problem is, I have Fn mapped to use Expose / Spaces, and
    its really important to how I manage my windows and applications.
    In other applications, I don't have to use this tricky sticky 3-key
    combo to go to the top or bottom of my long CSS document or HTML
    page. As of right now, I have to scroll all the way back to the top
    or bottom. I know, oh, poor me! But hey, it is becoming a colossal
    time waster as the docs I'm building get longer and longer.
    Is there anyway I can remap this function in Dreamweaver,
    instead of in OSX which would compromise my highly ingrained and
    functioning workflow? I have looked throughout the Keyboard
    Shortcuts and Preferences menus and haven't had any luck so far. Do
    any of you Dreamweaver Geniuses out there have a cure for this?
    Many thanks in advance.
    nugx

    Try diagnosing using this help link.
    http://library.gnome.org/users/user-gui … rd-layouts
    GL!

  • Command in smartform

    hi..
    i have given a explicit page break in smart form by using command-->goto new page,but its not triggering.in the conditions tab i have given sfsy-page>=4.
    My sf has 3 pages first,next and new, but the data in the main window flows for abt 12 pages.In the main window footer i am giving the command .can anyone let me know why it is not triggering.

    Hi
    u have given cndtion for the command node i.e. sfsy-page >=4 it is fine..
    u r telling that this created in main window footer.. as per my knowledge the main window doesn't contains any parts just it is a window. i dont wht do u mean here.
    the command node will be triggered only if it is in main window.
    and u r telling u have 3 pages.. so u have to give another condtion i.e. "only on Page" PAGE1 or PAGE2 or PAGE3.. otherwise it will be executed in all the pages(i am reffrering page number1.2.3.4 etc iam reffereing page type PAGE1 PAGE2 PAGE3)..
    make sure u have created the commang in MAin window

  • REQUIRE One spool request for n copies in one print command in smartform

    Hii Friends,
              I created a smartform..I require 5 copies of that form..There is a text which needs to be changed in evry copies...eg Original in first copy
                            Duplicate in second copy
                            Triplicate in third copy....n so on
    So i used a loop n i am calling smartform 5 times....The problem is i need one spool request to be created..
    Note: By default sometimes it create one spool request and sometimes 3 spool request...
    Pls share your inputs ............
    Thanks,
    Regards,
    Sujit.

    hi,
    this is more complicated see below description from help
    regards,darek
    Printing Several Forms in One Print Request
    Use
    You want to bundle several forms into one print job.
    Print Request vs. Spool Request
    SAP Smart Forms allows you to bundle several forms to form one output unit. This output unit is called a print request. A print request is different from a spool request:
    Whether a new spool job is created in the spool depends on the settings in the spool dialog.
    Whether a new print request starts depends on the standard parameters of the generated function module you set in SAP Smart Forms. For each print request, the spool dialog is called only once. If you suppress the dialog, you can pass parameters for spool processing only at the beginning of the print request.
    This means that a print request gathers several forms before submitting them to spool processing. Thus they cannot be spread over several spool requests. Vice versa however, you can include several print requests into one spool request.
    Procedure
    Use function module SSF_FUNCTION_MODULE_NAME to retrieve the name of the function module generated from the Smart Form (see also: Integrating the Smart Form Into the Application).
    Call the Smart Form for the first time and set the NO_CLOSE parameter of the control structure. This prevents the print request from being closed after accepting the output of the Smart Form and allows you to include all other form output into this print request as well. Leave the NO_OPEN parameter empty.
    Instead of calling the Smart Form for the first time you can also call function module SSF_OPEN .
    If you want to start a new spool request for the print request, set the TDNEWID field of the Output Options in this first call.
    For all other form output of the application program that you want to include into the print request, use a loop to set both the NO_OPEN field and the NO_CLOSE field of the control structure.
    To close the print request, in the call of the last Smart Form set the NO_OPEN parameter and unmark the NO_CLOSE parameter.
    Instead of calling the Smart Form for the last time, you can also call function module SSF_CLOSE .
    Result
    The forms you called in the steps described above are included into one print request. If in the first step you started a new spool request, you can now view its status in the spool request overview (transaction SP01 ).

Maybe you are looking for

  • Will Reinstalling Mountain Lion Erase My data ?

    Please Help, I am haivng issues with FACETIME and MESSAGES, both are not letting me log in. I have tried several accounts but no luck. I tried Keychain Unknown Certificate deletion as well, still no luck. I still cannot log in to both. Now i believe

  • Time lag

    something terrible is the i OS 7, all interface such as big time lag and it is on iPad with retina!! It's really sad that Apple started to do such mistakes- iMessage is individually part, there is no iMassage on iOS 7 it's simply to say))) we have a

  • Where are my missing songs

    My iTunes library no longer has many of the songs that were once there. This is not my imagination. For example, I have ten versions of "Stardust" in my iPod, which were of, course, downloaded from my iTunes library. However, I now only have two vers

  • Credit Control Issue

    Hello All, I want to know the importance of following field in OVA8 (Maintenance of Automatic Credit Control) 1) Checks in Financial Accounting/ old A/R summary      Payer     Permitted Days  --               Permitted Hours --- I want to give some g

  • All updates for Acrobat 8 Pro

    Where can I find all the updates/patches for Acrobat 8 Pro.  I did find up to 8.1.1 and tried to install 8.1.2, but it will not recognize my current version of Acrobat.  So I am thinking there must be another update between those two.  The check for