Regarding item header printing in the  script

HI,
  i am working on Goods issue script. In my script there 2 pages. For printing the header for items i have taken a new window from the second page onwards.The item header is printing in all the pages from the second pages onwards. But if there is no item data in the lsat page then also its printing the header. How to supress the header if there is no data.
kishore

Hi!
This can be solved in your printer program.
LOOP AT gt_main INTO wa_main.
  CALL FUNCTION 'WRITE_FORM'
    EXPORTING
      window = 'MAIN'
      element = 'ITEM_HEADER'
      type = 'TOP'   "print the header of the items here
  CALL FUNCTION 'WRITE_FORM'
    EXPORTING
      window = 'MAIN'
      element = 'ITEM_DATA'
      type = 'BODY'   "print the item data
ENDLOOP.
Regards
Tamá

Similar Messages

  • Print results the script in landscape mode

    Hi folks,
    how I can
    in powershell print off the results ofthe following code in landscape mode:
    $result | Where {!$_.Values} | Foreach {Start-Process -FilePath "s:\INVOICES\0070\$($_.Invoices).pdf" –Verb Print}

    Hi Nesher,
    good luck with that. Assuming you are using Adobe Reader, this may be of interest to you:
    Adobe Acrobat SDK
    Apparently, this works with the reader too, though it says Acrobat. If that doesn't fit your need ... well, good luck?
    Cheers,
    Fred
    Ps.: This link was brought to you by google inc., savior of all those in search of anything ;)
    There's no place like 127.0.0.1

  • Pick ticket header prints the wrong information on 2nd page of order

    Hello,
    Whenever we have an order that has more than one page of items, it prints all the wrong order header information on the pick ticket.
    We are on SAP 9.0 Business one PL08hf  SS2008.
    Thanks,
    Nick

    Gordon,
    I finally have the screen and the report but I am having a hard time trying to paste the images to this site. Can I send them to your email address?
    thanks,
    Nick

  • HT1923 ITunes new release does not print a playlist to my printer correctly.  It will print the header, but all the songs are printed on top of each other.  I didn't have this problem until I downloaded new version of ITunes.  Does anyone else have this p

    ITunes New Release - Printing a playlist to my printer the header prints, but the song list all print in the same place.  I am able to print from any other source.  Does anyone else have this problem?  Not sure if I should completely uninstall my ITunes and reload from scratch.  Sure would appreciate any help you could provide as I really need to get some playlists printed now.  Thanks - Scott

    There is another discussion of this problem under "can't print cd jewel case inserts"--about 20 people on that page have the same problem.--I have a "band-aid" fix for anyone is in a hurry.  When you go to print, choose the option "large playlist" (I think it is the last option).  You can then print at least the songs that are on the playlist.  Then, you can print a mosaic copy to get the album art work.  Then you get out the scotch tape & tape them together!  This is UNACCEPTABLE but it will do in a pinch. Someone on the other page suggests we all write in "itunes" feedback & complain.

  • Windows 7 and a deskjet 1050A. When printing email only the header appears on the paper.

    Got a new HP1050A prints ok except when printing an email only the header prints not the message.Help!
    It's the same from two different email addresses.

    If you're using Windows 7 Ultimate (I think) and your processor supports virtualization, you could try installing XP Mode. Some older apps that were wonky in Win7 are usually much happier in XP Mode.
    If you're not operating as per above, have you turned off UAC and set Indy to run in Compatibility mode?
    Lastly, I'm suggesting these as possible bits of duct-tape to try, not as reliable fixes. Bob is right. If you're not willing to upgrade InDesign, think hard about downgrading your OS.

  • How to move the script from one env to another

    Hi
    I have a database where i have two schemas.
    1)Owner and 2) User . User schema contains all synonyms for the objects present in Owner schema and the application will connect to user schema only.
    Now i have 2 script files 1) create tables in the owner + giving grant access for user 2 ) create synonyms for objects in the owner
    I have to move the code from Dev environment to QA . For QA i dont have privileges hence have to give the script file to DBA to run it
    My DBA says....give the scripts through clearcase. only 2 script files should be there and environment information should not be hardcoded. i.e
    for statements in the script file like : grant access for <table_name> to USERSCHEMANAME and create synonym <table_name_alisa> for OWNERschemaNAME.table_name
    how do i give the scripts to my DBA with out hardcodiing.    How do you have this code movement in your project ?
    Should i use any placeholder for OWNERNAME ( environment spefcific informationn) and should ask them to replace it by the corresponding env name while executing
    What should i do?
    Hope i am clear please let me know if iam not clear
    regards
    raj

    how do i give the scripts to my DBA with out hardcodiing. How do you have this code movement in your project ?
    Should i use any placeholder for OWNERNAME ( environment spefcific informationn) and should ask them to replace it by the> corresponding env name while executing
    Use a variable for schema names or create public synonyms.
    And document how the DBA should implement your changes.
    Your DBA should have his own "su'ish"/ "@ conn.sql'-ish" scripts for that.
    Passwords can be reset runtime temporarily, and set back after the implementation completed successfully.

  • Tax values get refershed to 0 in item & header condition.

    Hi All,
    The routines have been developed for the tax values in the PO. The values are getting stored in the KONV-KWERT fields.
    But if i go in change mode of that PO No. in ME22N the tax values get refreshed to 0 in item & header conditions. & the same can be seen in the display mode.
    What can be the error?
    Pls suggest the solution for the same.

    Have you maintained the tax code in FTXP?
    Also check the states you maintained in your pricing procedure using M/08 T.code.
    Regds,
    Anil

  • Regarding the Cheque printing in SAP Script. Issue with Layout Change.

    I have to modify the layout of a predeveloped script.
    The issue with the existing one is that, the Labels (on the window, that is printed) and the data (corresponding to it) are not on the same line.
    To be more clear, I have like this on the cheque,
    Payee : _______________________
    Amount : ____________________
    The Data corresponding to the Pay & Amount is not in the respective line (as I shown above).
    How can I get that both on the same line.?
    Shall I need to modify the layout or what else to do ?
    Pls. guide me.
    Your guidance is appreciable.
    Edited by: ravikanth seal on Mar 9, 2011 5:09 AM
    Edited by: ravikanth seal on Mar 9, 2011 5:10 AM

    Hi niraj gadre ..
    Ur idea may not workout fir me.
    My idea is :
    Can I use any formating options in the corresponding window's text elements..
    Pressing F9 on the windiw (in the Windows list) displays the Text Elements (Goto Edit-> Text Elemets on the Window chosen) in the Windows list.
    Here can we do any formating options, so as to change the layout alignment of window's Text Elements ??
    Guide me please.
    Your guidance is Appreciable
    Thanks.
    Edited by: ravikanth seal on Mar 9, 2011 7:55 AM

  • How to print in the last page of the script..?

    Hi,
    I am working on a script. I have a header window and one main window. In the main window, I am printing the line items of the Invoice. Once the line items finish, I have to print the sub totals there. and also to print the company agreement details(around 10 lines of text) in the last page of the script.
    So, <b>how to print the agreement details in the last page of the script..?</b>
    Can anyone provide me a sample code to find the last page of the Script layout..?
    And regarding writing the agreement details, is it better to hard code the text or use the standard texts..? which one is better..?
    Regards,
    Paddu.

    HI,
      Just create a Standard text, if you are going to use this standard text in other layouts also... and use it otherwise you can hard code it as this its of only 10 lines.
    declare one more element in the  main window itselft and call it atlast it would print in the last page..
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    ELEMENT = 'FOOTER'<b><- This element should contain the agreement details</b>
    FUNCTION = 'SET'
    TYPE = 'BODY'
    WINDOW = 'MAIN'
    EXCEPTIONS
    ELEMENT = 1.
    Thanks
    Mahesh

  • How to remove item header on the last page

    Hi,
    We have an adobe form where, on the last page a BIG footer gets displayed.
    Now if the number of line items are not enough, they wont go till the last page, but the last would still be printed with no line items, just to accomodate the huge footer that we want to be displayed only on the last page.
    Now in doing this, we want that if there are no line items on the last page, the item header should not be displayed. We are not sure how do we do this.
    The same is accomplished in SAP Script, and there they are using WRITE_FORM with type DELETE. So anything that prints after that even on a new page, the item header wont get printed.
    Please suggest how do we do this in Adobe Forms.
    Thanks,
    Tirth

    Hi Mate,
    there is a contradiction then.
    in table header rows definition, we specify show header in subsequent pages, then the header appears only if there are items displayed on that page. in your case the table header shouldn't be displayed then please check why its comming out there...?
    well in any case if you want the script it would be like below on layout ready event of the header row.
    // run the below script in last page
    if(xfa.layout.page(this) == xfa.layout.pageCount()){
    var pageSFList = xfa.layout.pageContent(xfa.layout.page(this) - 1, "subform", false);
    var pageTotal = 0;
    // for each subform named <Item>, which is the data row of the table
    for (var i = 0; i < pageSFList.length; i++)
         var sf = pageSFList.item(i);
            if(sf.name == "headerrow"){ // if header row is found then chec is data row is visible and set its presence accordingly
               if(sf.parent.item.presence == "hidden"){
                   sf.presence = "hidden";
         if (sf.name == "Item") // if data row itself is found set its presence accordingly
           sf.parent.headerrow.presence = "visible";
    you might need to tweak the code according to your element names.
    hope this helps,
    Cheers,
    Sai

  • How to print the script in condensed mode

    Hi to all,
    Pls help me.
    How to print the script in condensed mode and particular window only print in the condensed mode.

    Hi,
    Hi
    It will remove the blank spaces in front of the variable
    and if you use the extension NO-GAPS
    It will remove all the blank spaces in the variable field.
    DATA: ws_val1 type char12.
    ws_val1 = ' 100 123'.
    Condense ws_val1.
    Write / ws_val1.
    Condense ws_val1 no-gaps.
    write / ws_val1.
    It will give output as
    100 123
    100123
    The CONDENSE statement deletes redundant spaces from a string:
    CONDENSE c NO-GAPS.
    This statement removes any leading blanks in the field c and replaces other sequences of blanks by exactly one blank. The result is a left-justified sequence of words, each separated by one blank. If the addition NO-GAPS is specified, all blanks are removed.
    Please check this link for sample code.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb33e6358411d1829f0000e829fbfe/content.htm
    Regards,
    Raj.

  • How to print header lines at the top of every page with Alv list display?

    Dear all,
    I need a requirement with printing issue. A program list should be printed with the function reuse_alv_list_display.
    The list has several pages and then can be printed but the header lines appear only first page when they printed. The other pages don't have header lines, they continue with the next record of the list remaining from previous page. I use the alv parameters as below:
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program       = l_repid
          i_callback_pf_status_set = 'ALV_PF_STATUS'
          is_layout                = ls_layo
          it_fieldcat              = lt_fcat
          i_default                = 'X'
          i_save                   = 'A'
          is_variant               = ls_variant
          it_events                = lt_events
        TABLES
          t_outtab                 = lt_data
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
    and lt_events as below:
      ls_event-name = 'END_OF_LIST'.
      ls_event-form = 'ALV_END_OF_LIST'.
      APPEND ls_event TO lt_events.
      ls_event-name = 'END_OF_PAGE'.
      ls_event-form = 'ALV_END_OF_PAGE'.
      APPEND ls_event TO lt_events.
      ls_event-name = 'TOP_OF_LIST'.
      ls_event-form = 'ALV_TOP_OF_LIST'.
      APPEND ls_event TO lt_events.
      ls_event-name = 'TOP_OF_PAGE'.
      ls_event-form = 'ALV_TOP_OF_PAGE'.
      APPEND ls_event TO lt_events.
    So, how can I print header lines for every page?
    Best Regards,

    Hello Saba,
    Your point might be very close to solution.
    Because in the selection screen of the program there are two radio buttons, one of them visits 'REUSE_ALV_COMMENTARY_WRITE' function and the other doesn't. The one which visits has a problem with header liens in every page when printing. But I couldn't find out the solution yet.
    reuse_alv_list_display uses 4 event and of course I call subroutine. There are end_of_list, end_of_page, top_of_list and top_of_page. I use in the subroutine for top_of_page:
      CALL FUNCTION 'LVC_TRANSFER_TO_SLIS'
        EXPORTING
          it_fieldcat_lvc         = gt_fcat
        IMPORTING
          et_fieldcat_alv         = lt_fcat
        EXCEPTIONS
          it_data_missing         = 1
          it_fieldcat_lvc_missing = 2
          OTHERS                  = 3.
      CALL FUNCTION 'REUSE_ALV_LIST_WIDTH_GET'
        EXPORTING
          it_fieldcat = lt_fcat
        IMPORTING
          e_width     = l_width.
    WRITE l_reptx TO l_reptx CENTERED.
      NEW-LINE.
      WRITE: AT (l_width) l_reptx CENTERED.
      SUBTRACT 10 FROM l_width.
      WRITE: AT l_width sy-pagno RIGHT-JUSTIFIED.
        CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
          EXPORTING
            it_list_commentary       = lt_header
      I_LOGO                   =
      I_END_OF_LIST_GRID       =
    Do you have other suggestions ?

  • HOW TO PRINT THE SCRIPT DIRECTLY

    hi ,
    i want to print the script directly by skiping the prini preview screen can any one help me..
    regards,
    siva

    Hi Siva,
    In the function module "<b>OPEN_FORM</b>" pass "<b>SPACE</b>" to the parameter <b>DIALOG</b>.
    This would allow you to SKIP the print preview screen.
    <b>Reward points for helpful answers.</b>
    Best Regards,
    Ram.

  • How to print the script  before realasing?

    how to print the script  before realasing?

    Do you want to see the output of your SAPscript??and print it?? before you release.
    Then goto NACE tcode and configure your script.
    Example :
    Goto Transaction NACE --> Select Application V1(Sales) --> Click on Output Types --> Select the output type as BA00 (as generally BA00 is the output type associated with Sales Order ) --> Double click on the Processing Routines folder on the left and it will display the Form name and the corresponding driver programs name.
    Goto tcode VA03, and display the output from menu and do your printing.
    Close the thread once your question is answered.
    Regards,
    SaiRam

  • If I put an item in clippings that I reduced from a larger article, how do I print just the clippings excerpt?

    If I put an item in clippings that I reduced from a larger article, how do I print just the seperate clippings excerpt?

    Hi Mark,
    I think one thing you may missing is an understanding of the purpose and operation of the mail merge process.
    Mail merge is used to 'personalize' a preset document using information from the records of a database. Any content that will vary from copy to copy of the document must be imported from the database. Every item that is specific to the copy being sent to a specific individual must be included in the row of the table containing the record for that individual.
    For invoices, unless you are sending an invoice for the same item(s) at the same price(s), you'll need to either include the items and prices in the database and merge them into the invoices, or use the merge document to create a document containing an empty invoice for each customer, containing only the customer identification information, and the company information (taken from the card marked "My Card" or "Me"), then fill in each invoice manually.
    The Pages '09 template named "Invoice" might word with the second approach, depending what type of document the merge to file option produces. If it's a Pages document, the table, containing the invoice data, will likely be useable; if it's a pdf document, the table may be editable (or not), but will lose its ability to calculate the tax amounts and totals.
    To produce an individual invoice from this template:
    Open the template.
    Drag the recipient's card from Contacts/Address Book and drop it on one of the fields in the first block of address text.
    Enter the project information in the second block of text.
    Check the Company block in the left margin for correctness.
    Enter the Invoice items and quantities in the table.
    Print (or Print to PDF) the document and mail it.
    Regards,
    Barry

Maybe you are looking for