Dynamic table height for Printed PO Report

I have created a RTF template for Printed Purchase Order report using Microsoft Word. The template has Header and Line information. I have two questions.
1) Lines are printed in Table format. I also print header level notes in Line Section.
If the header notes are blank, I want the line information (line #, Item Number, Description, quantity etc) to be moved to line1. How do I acheive this?
I want to dynamically adjust the Table height based on the information printing in the line section. The table has two rows. One for Header notes and one for Line information.
2) Header notes field is placed in Description column of Line Table (MS word). Currently Header notes are printing within the Description column as wrapped text. I want to print Header notes in one line. How do I expand this field to print in one line?
Thanks,

Hi,
Even I faced the same problem, however I have found a workaround to come out of this problem.
My PO design template has 16 lines, I am counting the number of lines with data and subtracting the same from 16 and inserting that many empty rows to increase the table height.
I am pasting the code so that it will be useful for others.
Paste this code before LINES_ROW for-each loop. This will give the number of lines present.
<xsl:variable name="_XDOFOTOTAL" select="count(.//LINES_ROW)"/>
Paste this code at the end of the for-each loop.
<!-- 16 is the maximum number of rows which fits in my page.-->
<xsl:variable name="_cnt" select="16-$_XDOFOTOTAL"/>
<xsl:call-template name="countdown">
<xsl:with-param name="countdown" select="16-$_XDOFOTOTAL"/>
</xsl:call-template>
This function you can put it at the end.
<xsl:template name="countdown">
<!-- Instead of for loop. -->
<xsl:param name="countdown"/>
     <xsl:if test="$countdown">
          <fo:table-row keep-together="always">
          <fo:table-cell/>
          <fo:table-cell>
          <fo:block height="13.2pt"/>
          </fo:table-cell>
          <fo:table-cell>
          <fo:block height="13.2pt"/>
          </fo:table-cell>
          <fo:table-cell xdofo:use-attribute-sets="c_33 c_35">
          <fo:block height="13.2pt"/>
          </fo:table-cell>
          <fo:table-cell xdofo:use-attribute-sets="c_33 c_35">
          <fo:block height="13.2pt"/>
          </fo:table-cell>
          <fo:table-cell>
          <fo:block height="13.2pt"/>
          </fo:table-cell>
          <fo:table-cell>
          <fo:block height="13.2pt"/>
          </fo:table-cell>
          <fo:table-cell>
          <fo:block height="13.2pt"/>
          </fo:table-cell>
          <fo:table-cell/>
          </fo:table-row>
          <!-- Call the template again -->
          <!-- The below code is like x=x-1 -->
          <xsl:call-template name="countdown">
               <xsl:with-param name="countdown" select="$countdown - 1"/>
          </xsl:call-template>
     </xsl:if>
</xsl:template>
If some one is having a better solution, please share.
Regards,
SURESH KUMAR M R

Similar Messages

  • Dynamically set template for Print Quote report

    We need to customize "Print Quote" in Quoting
    As part of this we will be having 2 custom templates (will be related to data definition "Quote Printing", ASOPRT).
    These two templates have to be defaulted based on the quote status - one for status "Approved", and the other template for other non "Approved" statuses.
    How can this be achieved dynamically? (OAF CO customization / personilization)
    There doesn't seem to be any setup for assigning different templates based on status.
    Profile option "ASO: Default Layout Template" can be utilized to change the default template, but we need this template to be defaulted dynamically based on the Quote status.
    Thanks,
    Sumanth
    Edited by: user1131947 on Oct 25, 2011 3:51 AM

    If you want to create a custom report using concurrent program then refer:
    http://apps2fusion.com/apps/apps/63-xml-publisher-concurrent-program-xmlp
    If you want to create a custom report using OAF page then refer:
    http://apps2fusion.com/at/51-ps/260-integrating-xml-publisher-and-oa-framework
    -Anand

  • Urgent please help: what is the table name for cash management reports?

    I am wondering what the table name for cash management reports is. I am trying to figure out then if I have any missing.
    Please help.

    I checked MSEG table. But, I didn't find any field for date.
    Can you tell me field name.
    Regards
    Siva

  • Use dot matrix printers for printing text reports in Reports 10g

    In Forms 6i, customers had the option to use dot matrix printers for printing text reports.
    I believe, from 9i onwards, text based reports aren’t supported and instead HTML/PDF,DOC,RTF reports are supported which are not text based and use modern day printers.
    Is it still possible to use text printers ??
    Regards,
    Noman

    hi
    check out the following link.
    Re: Is printing to generic text printer and hand-coding the report possible?
    http://download.oracle.com/docs/html/B10314_01/pbr_uxprt.htm#1005700
    sarah

  • What r all the tables  used for the following report

    hai
    what r all the tables  used for the following report
    report:
    <b>
    •     Report that displays all the late shipments in a particular period of time</b>
    send important fields for this tables also
    thanks in advance.

    Hi,
       Imp table are vttk,vttp,vtts.
    Regards
    Amole

  • Fixed Table Height for PO Report

    Hi,
    We have a problem in adjusting the height of the table for Purchase order Report.We are displaying lines and shipment information in the table.
    But the shipments data is varying for each line due to which the table height is also varying on each page.
    We tried fixing this by counting lines but this didn't help.
    Cant we fix the table height so that it runs throughout the page irrespective of the number of lines it contains and gets attached to the footer information at the Bottom of the page.
    Urgent help required.
    Thanks in advance.

    My suggestion would be to figure out the maximum number of lines the layout can handle and fix that number. Then modify the program that generates the XML output to create that many lines i.e. if the max number is 50 and your PO contains 2 lines, create 48 additional dummy blank lines so that the layout is always satisfied. For overflows, i.e PO contains 52 lines, make sure the program handles it.
    Just my suggestion. I've used it for AP checks, where the layout is stub over check and it works great.

  • Dynamic Table Width for XML Renderer

    Hi Guys,
    I'm looking for a way to get a XML documents with a dynamic table width.
    Using a dynamic result table doesn't work.
    The test program looks like this.
    REPORT  xml_test.
    TYPE-POOLS: ixml.
    DATA: go_ixml TYPE REF TO if_ixml.
    go_ixml = cl_ixml=>create( ).
    DATA:  go_xml_document TYPE REF TO if_ixml_document.
    go_xml_document = go_ixml->create_document( ).
    DATA: go_xml_root_elm TYPE REF TO if_ixml_element.
    go_xml_root_elm  = go_xml_document->create_simple_element(
               name = 'flights'
             parent = go_xml_document
             value  = 'Texas Flight' ).
    DATA: go_xml_main_elm TYPE REF TO if_ixml_element.
    go_xml_main_elm  = go_xml_document->create_simple_element(
                  name = 'airline'
                parent = go_xml_root_elm  ).
    DATA: lv_rc TYPE i.
    lv_rc = go_xml_main_elm->set_attribute( name = 'code' value = 'LH401' ).
    DATA: go_xml_streamfactory TYPE REF TO if_ixml_stream_factory.
    go_xml_streamfactory = go_ixml->create_stream_factory( ).
    * Static Creation of X tab ---------------------------------------------
    DATA: BEGIN OF gs_xml_line,
             data(255) TYPE x,
           END OF gs_xml_line.
    DATA:  gt_xml_table       LIKE TABLE OF gs_xml_line,
           gv_xml_size        TYPE i,
           go_ostream         TYPE REF TO if_ixml_ostream.
    * END Static Creation of X tab ------------------------------------------
    * Dynamic Creation of X tab ---------------------------------------------
    FIELD-SYMBOLS: <lf_x_tab>  TYPE STANDARD TABLE,
                   <lf_x_stru> TYPE ANY.
    DATA: lt_fldcat TYPE lvc_t_fcat.
    DATA: lr_tab TYPE REF TO data,
          lr_stru  TYPE REF TO data,
          ls_fldcat TYPE lvc_s_fcat,
          lv_dyn_width TYPE i.
    lv_dyn_width = 255.
    * Append Dynamic Field.
    CLEAR ls_fldcat.
    ls_fldcat-fieldname = 'DATA' .
    ls_fldcat-datatype  = 'X'.
    ls_fldcat-inttype   = 'X'.
    ls_fldcat-intlen    = lv_dyn_width.
    APPEND ls_fldcat TO lt_fldcat .
    * Create dynamic internal table and assign to FS
    CALL METHOD cl_alv_table_create=>create_dynamic_table
      EXPORTING
        it_fieldcatalog = lt_fldcat
      IMPORTING
        ep_table        = lr_tab.
    ASSIGN lr_tab->* TO <lf_x_tab>.
    * Create dynamic work area and assign to FS
    CREATE DATA lr_stru LIKE LINE OF <lf_x_tab>.
    ASSIGN lr_stru->* TO <lf_x_stru>.
    CHECK sy-subrc  = 0.
    * END Dynamic Creation of X tab ------------------------------------------
    * Static Table works
    go_ostream = go_xml_streamfactory->create_ostream_itable( table = gt_xml_table ).
    * Dynamic Table doesn't work
    go_ostream = go_xml_streamfactory->create_ostream_itable( table = <lf_x_tab> ).
    * Show result
    DATA: go_renderer        TYPE REF TO if_ixml_renderer.
    go_renderer = go_ixml->create_renderer( ostream  = go_ostream
                                            document = go_xml_document ).
    lv_rc = go_renderer->render( ).
    gv_xml_size = go_ostream->get_num_written_raw( ).
    DATA: lv_str  TYPE string,
          lv_xstr TYPE xstring.
    LOOP AT gt_xml_table INTO gs_xml_line.
      lv_xstr = gs_xml_line-data.
      CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'
        EXPORTING
    *                          FROM_CODEPAGE       = '8500'
          in_xstring          = lv_xstr
    *                          OUT_LEN             =
       IMPORTING
         out_string          = lv_str.
      WRITE: / lv_str.
    ENDLOOP.
    If the static table is used, the program gets a result, but it doesn't work with the dynamic table.
    * Static Table works
    go_ostream = go_xml_streamfactory->create_ostream_itable( table = gt_xml_table ).
    * Dynamic Table doesn't work
    go_ostream = go_xml_streamfactory->create_ostream_itable( table = <lf_x_tab> ).
    Any Ideas?
    Thanks in advance
    Dominik

    I've never used dynamically changing popup items variable before, and I'm not sure it will work(?)
    But, if it's displaying a long string, it does not sound like 'items' is being assigned a proper table yet.
    I don't know what you mean by a  "chunk" of values. I assume you mean table.
    In any case, if SYPNEventResults[1].title is a string, then SYPNEventResults[1].value can be any legal lua type.
    Likewise for SYPNEventResults[2], SYPNEventResults[3], ...
    If you can index/display the title with this syntax, e.g. LrDialogs.message( SYPNEventResults[1].title ), then the popup should be initialized thusly:
    viewFactory:popup_menu {
           items = SYPNEventResults,
           value = LrView.bind('eventname2'),
           width_in_chars = 40,
    if a function is returning multiple values, then to get it into a table "array", do this:
    local tableArray = { myTableArrayFunc( myTableArrayParameters ) }
    Does this help?
    Rob

  • Dynamic table field for filtering a selection criteria

    Hi Friends
    I am using a table a981 and fetching data in internal table but the table has a fieil Country whose technical name is ALAND in dev and LAND1 in production.Now i cannot use LAND1 as it wont let me to activate the report and if i use ALAND i cannot move the request to production as it fails. So how can i achive dynamic table field in the select query based on server.My query is-
        select kschl
               wkreg
               matnr
               knumh
       from a981 into corresponding fields of table it_a981
       for all entries in it_marc where matnr = it_marc-matnr
                                    and kschl in ('MWST','ZSER')
                                    and aland = 'IN'
                                    and datab le sy-datum
                                    and datbi ge sy-datum.
    I need to make aland dynamic.Pls suggest

    Hi,
    this forum is for the BusinessObjects Integration Kit for SAP but I don't see how you entry is related to it.
    Ingo

  • Dynamic row heights for NSTableView

    Hi everyone,
    I just began writing OSX apps not too long ago. I'm having trouble with dynamically setting my row heights for an NSTableView. I've seen a really old solution where the subclass the view but I also found a solution posted by Corbin on Stack Overflow. However, I don't quite understand and am hoping someone has sample code?
    For my usecase, I have a list of text of varying lengths and are displayed in a multi-line text field. The rows for the table cut off the text and so I'm trying to resize them to fit the text. When I check on the setRowSizeStyle to custom - it defaults to 71 and is fixed at 71. I hope someone can help me out. I think the solution posted by Corbin should solve my problem but I have no idea how to implement it.
    Thanks

    Etresoft, the function that you gave me for some reason constantly calculates the height as 39. Minus the fudge factor of 25 means I'm constantly getting 14 for my height for all rows and some of the text is cut off. I think it might be because I'm passing in the wrong size into my NSTextContainer.
    Here's my code right now:
    - (CGFloat)tableView:(NSTableView *)tableView heightOfRow:(NSInteger)row
        Message *message = [thread objectAtIndex:row];
        NSTableColumn *tableColoumn = [conversationView
                                       tableColumnWithIdentifier:@"tableColumn"];
        if (tableColoumn)
            NSCell *dataCell = [tableColoumn dataCell];
            [dataCell setWraps:YES];
            [dataCell setStringValue:message.message];
            CGFloat height = [self calculateIdealHeightForSize:[dataCell cellSize] content:message.message];
            NSLog(@"Message: %@ Height: %f", message.message, height);
            return height;
        NSLog(@"No size found. Returning default size for 100.");
        return 100;
    - (CGFloat) calculateIdealHeightForSize: (NSSize) size content: (NSString *) content
        NSTextStorage * storage =
        [[NSTextStorage alloc] initWithAttributedString:[[NSAttributedString alloc] initWithString: content ]];
        NSTextContainer * container =
        [[NSTextContainer alloc] initWithContainerSize: size];
        NSLayoutManager * manager = [[NSLayoutManager alloc] init];
        [manager addTextContainer: container];
        [storage addLayoutManager: manager];
        [manager glyphRangeForTextContainer: container];
        NSRect idealRect = [manager usedRectForTextContainer: container];
        // Include a fudge factor.
        return idealRect.size.height + 25;

  • Tables name for Customer Payment Report

    hiiiiiiiiii
    can anyone tell us the tables name for the report customer payment receive..?
    Thanks & Regards
    Rekha sharma

    Hi Rekha
    when you pass following entry
    Bank dr  
    to Customer
    All header data like co code currecy ref , period etc goes to BKPF,
    line item - Bank Dr ( its a GL  entry ) goes to BSIS
    line item- Customer Cr ( its a AR entry ) goes to BSID or BSAD depends it is cleared or still open
    Also both the line items goes to BSEG
    Hope this helps.
    Regds
    Rajiv

  • BUTTON FOR PRINT A REPORT

    Hi Guys!!
    Hey, I need to print "directly" in the local printer or in the default windows printer, a report without download it to excell or PFD. Is there a way or a scrip to create a button to do this on the Web Application Designer?
    Thanx and Regards!
    Luis.

    Hi Guys!!!
    Thanx for your replies, both answers are very usefull, but i still have some issues applying your solutions, first, the pice of javascript that Arun shows it's very usefull and it works in an excellent way, but, is there another pice of JavaScript  that i can use to print without the header line and the footprint and also in an horizontal way?, this is because some reports are to wide to print it as the default print option. i search on several pages, blogs and forums but i cant find something that can correctly apply on this.
    And about the button with the command "[LAUNCH_BROADCASTER]". that Pradnya shows, i made the button and insert this command, but when i hit the button instead of  the Bex Broadcaster wizard, it shows me an "Internet Explorer cannot display the webpage" window. my reports are published in the BI Portal, not via Bex Broadcaster, is it could be the problem?,  do i have to make a setting or how can i solve this issue?
    Again Thanx a lot for your replies and best regards.
    Luis

  • How to change the table's for an existing report

    Hello,
    How can I change the table names for reports created with a different table name? for e.g If I created a report which included a table called "2009_10_example", How can I change that table to a different table "2010_10_example1".
    I am using Crystal reports 2008, and the reports were created using Report Creating Wizard.
    Thanks,
    Abhishek

    In the Database Menu, there is an option Set Datasource Location.  This allows you to pick a table from the current tables used, and select a table to replace it with.  Press the Update button, and Crystal will swap one for the other.  If the field names and data types are all the same, it will automatically change all references throughout the report to the new table's fields.
    May I suggest that your tables are set up improperly if you have to change report code to run it for different months?  The data should all be in one table with dates, and parameters to select the date range to report on.  (That was said in the spirit of helping...)
    HTH,
    Carl

  • Dynamic Select Query including Dynamic Tables with For all Entries

    Hello everyone,
    I need to create a select query which involves using of Dynamic Tables.
    Suppose I have a dynamic table <d1> which consist of let say 10 records.
    Now i need to make a select query putting data into another dynamic table <d2>
    CONCATENATE keyfield '=' '<d1>' INTO g_condition SEPARATED BY space.
    CONCATENATE g_condition '-' keyfield INTO g_condition.
    SELECT * FROM (wa_all_tables-name) INTO CORRESPONDING FIELDS OF TABLE <d1>
            FOR ALL ENTRIES IN <d1>
    WHERE (g_condition).
    But it is giving dump.
    Please help me on this....

    Short text
        A condition specified at runtime has an unexpected format.
    What happened?
        Error in the ABAP Application Program
        The current ABAP program "ZNG_CUSTOMWRITE" had to be terminated because it has
        come across a statement that unfortunately cannot be executed.
    Error analysis
        An exception occurred that is explained in detail below.
        The exception, which is assigned to class 'CX_SY_DYNAMIC_OSQL_SEMANTICS', was
         not caught in
        procedure "WRITE_ARCHIVE_PROD" "(FORM)", nor was it propagated by a RAISING
         clause.
        Since the caller of the procedure could not have anticipated that the
        exception would occur, the current program is terminated.
        The reason for the exception is:
        The current ABAP program has tried to execute an Open SQL statement
        which contains a WHERE, ON or HAVING condition with a dynamic part.
        The part of the WHERE, ON or HAVING condition specified at runtime in
        a field or an internal table, contains the invalid value "ZCOURIER-ZCOURIERID".
    CONCATENATE keyfield '=' g_header INTO g_condition SEPARATED BY space.
    CONCATENATE g_condition '-' keyfield INTO g_condition.
    SELECT * FROM (wa_all_tables-name) INTO CORRESPONDING FIELDS OF TABLE <dyn_table1>
    FOR ALL ENTRIES IN <dyn_table>
      WHERE (g_condition).

  • Table name for balance sheet report

    Hi,
    which table  name used to get the Trail balance and Blance Sheet reports or .
    Regards,
    balu.k

    Hi
    have you tryed to use the standard reports in SAP.  because its very big thing when you try to develop the Z report for trail balances report.
    try to us the standard one like F.01
    If realy want to develop the report then us the reference program using standard transaction code. F.01.
    Hope this will help you.
    Regards
    Ram

  • Dynamic table generation for Employee Schedule Project

    Hi,
    I am new to Jave programming and attempting to teach myself Java using the Sun tutorials & these forums. As a first step of learning, I want to do a Automated Employee Schedule Project in Java. (JSP)
    There are two main parts of the project. The first part will be a table with the employees listed down the left, the days of the week across the top, and with each cell being that employee's shift for the day. There are four different types of shift in a day ( M- Morning, R- Regular, A- Afternoon and N- Night).
    The second part will allows the user to enter in a new employee or display/edit an existing employee's information, including a list of scheduling constraints, like can?t work in Morning shift / Night shift. Apart from that number of employee in a shift may vary based on situation.
    Could you please help me to understand the flow for creating this Automated Employee Schedule project?
    Thanks in advance.
    Amitava

    I need the logic as to how to generate the shift plan. Could you tell me how to get about creating this dynamic table and any idea what i should take as baseline? I was thinking to read the employees from the database and take them as input for the first column. and the number of days as the column list. Can you tell me if this is the correct approach?

Maybe you are looking for