Arabic SubTotals in Adobe Form Page.

Hi Everyone,
I have a requirement of printing Subtotals of a table in Arabic as well as English on the same page for all pages in the form.
FYI i have made a function module to convert english digits into arabic, which i use in my code to convert english amounts to arabic amounts.
Like -
CALL FUNCTION 'ZJP_M_ARABIC_NUMERALS'
EXPORTING ENGLISH = V_AMOUNT
IMPORTING ARABIC = V_AMOUNT_AR.
This gives me the arabic amount.
Now i am printing english subtotals using the javascript code :
var fields = xfa.layout.pageContent(xfa.layout.page(this)-1, "field", 0);
var total = 0;
for (var i=0; i <= fields.length-1; i++) {
if (fields.item(i).name == "AMOUNT") {
total = total + fields.item(i).rawValue;
this.rawValue = total;
Through this code i am able to get the english subtotal in my offline adobe form.
My PROBLEM is - how do i use this english subtotal generated via javascript to convert it into arabic subtotal (using the FM)
for each page.
Any help is highly appreciated..!!
Thanks,
Piyush.

Hi Piyush,
Check this below link set locales for a field using java script this might help if you are looking for @ scripting
/people/raghavendra.prabhu/blog/2010/12/17/currencynumber-formatting-in-hcm-forms
I have 2 approaches (hopefully both of them will work).
1)  Have a hidden field with arabic locale, in your loop keep adding values to this field.
2) have the required field on the form set the locale to arabic, just assign the english value to this field. (if both english and arabic totals are from same records and same values mathematically then only the presentation locale is different but the value sud be the same right).
If I am wrong understanding your requirement, please explain what is the difference ...?
Cheers,
Sai

Similar Messages

  • Arabic font in Adobe forms

    Hi experts,
               I am working on displaying Arabic text in Adobe forms using Include Text.I am getting the arabic text displayed in the output from right to left(RTL) in LP01 output deive type.But the arabic text is not right aligned in the output.In smartform the same include text is coming absoulutely fine with properly right aligned in the output.But in smartform we use ZARSWIN device type for printing the arabic text.So my question  is do we need to use special device type for priting arabic text in  adobe forms.Please let me know why i am not getting the right aligned output in adobe forms for Arabic include text.
    Thanks,
    Vignesh

    Hi,
    Please check the following links,
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/d4fe7fca-0b01-0010-569a-9a9c1ddf4132
    https://www.sdn.sap.com/irj/sdn/docs?rid=/webcontent/uuid/7c3bc67e-0c01-0010-dbb3-908315896909 [original link is broken] [original link is broken]
    https://www.sdn.sap.com/irj/sdn/docs?rid=/webcontent/uuid/7c3bc67e-0c01-0010-dbb3-908315896909 [original link is broken] [original link is broken]
    /people/vani.krishnamoorthy/blog/2006/05/17/fillable-adobe-forms-using-abap

  • Adobe Forms - Page Count

    Hi All,
    I am facing a problem with one issue in Adobe Forms.
    We need to have two sets of data in the same spool. Like one set of data on one body page and other set of data on other body page. So, if there are total 5 pages of 2 sets, they should print like 1of3, 2of3, 3of3 and 1of2, 2of2.
    Please Help !
    Thanks in Advance.
    Sahitya

    Hello Sahitya,
    If you know in advance two sets of data can be identified then you can trigger smartform twice for each data set and have added spool. In this case you need not to do any change in ur form design.
    Pls ref below link for further details of spool addition-
    http://help.sap.com/saphelp_nw70/helpdata/EN/e3/31f03bb8e8ed0ce10000000a11402f/content.htm
    Regards,
    Nishikant.

  • Adobe Forms - Page Break via a Conditional Break

    Having read through the forum I am getting the impression that Page Breaks is a bit of a problem.
    I can enforce a page break between datasets by setting "After:" to "Goto Next Page", on the Object->Pagination tab, however this results in a blank page at the end of the entire output which is just the Master Page with all the static elements.
    The 'Conditional Breaks' sounds like the logical point to force a page break based on a combination of inequality or if a particular data element equals a known value.
    However, I don't seem to be able to get the 'Conditional Break' to work.
    So, the question I would like to ask, is how can you tell if the conditional break logic is correct and whether or not it is running? For example on an ABAP system is it possible to run it and debug it?
    My attempts at getting the break to open a pop up or write to disk via JavaScript fails, which is leading me to think they  are being ignored by the Adobe Form at both the server and client level.
    Is it possible that I have missed another setting somewhere else in the Adobe form configuration?

    Hello Jason!
    You are right that conditions (and all scripting) are bit tricky in this solution. Still they work.
    Debugging of AIF at ABAP side is not possible due to the architecture of the solution - from the ABAP POV it is just a web-service call and receiving result (PDF) back. You can't stop it on midpoint or intercept it somehow.
    At the same time there are other ways to check it.
    First, you can enable trace and saving additional info in SFP transaction under Utilities -> Settings.
    Details see [here|http://help.sap.com/saphelp_nw70/helpdata/EN/f7/a04aee0cb94978a011401311efe603/frameset.htm]
    And the nice way to check if your condition block is taken into the account is simple check like 1 = 2.
    If this works and you receive page break than all you need is find errors in your condition syntax, otherwise the problem is somewhere else.
    Regards,
    Petr Perstnev

  • Subtotals in adobe forms

    Hi,
       Sorry for this question.Although this has been asked a lot of times,i am getting problems.
    I want to print the subtotal for each page in adobe forms.I am getting the total at end of last page.
    This is the code given in sdn and saptechnical.
    var fields = xfa.layout.pageContent(xfa.layout.page(this)-1, "field", 0);
    var total = 0;
    for (var i=0; i <= fields.length-1; i++)
    if (fields.item(i).name == "PRICE")
    total = total + fields.item(i).rawValue;
    this.rawValue = total;
    But it is not working for me.
    Some have also asked to code in the program,but I have no idea about it.
    Pls help.
    Thanks and regards,
    Raka.

    Hi Raka,
    Add a footer row for your table.
    From the object palette -> Pagination, check property 'Include footer row in subsequent pages'.
    Add total field in the required cell.
    Hide unwanted cells in the footer row.
    In the calculate event of the total field use the following script in formCalc
    sum(Table1.Row1[*].amount[*])
    Hope this will help.
    Regards,
    Sanoosh

  • Adobe form page per work table record

    I have read detail records into a table and I want one page per record in that table.  Other tables are to be subset of that record but all data to be written on each page relates to one record in the table.  How do I set the hierarchy so each record in the top table makes a new page.
    Easy to do in Smartforms but I want to use SFP as it is much more detailed when designing form.
    I have laid out the Master Page and I want each record to fit into Content area.
    Also the Master Page was uploaded directly from pdf created from users desgn in EXCEL which worked nicely.
    Do any of the example (FP_TEST*) Adobe forms work easily as an example?

    Solution:  Define subform for the page.
    subform tab > Content: flowed, Direction: Top to Bottom
    Pagination    > Place; In Content Area If Dataset must be Paginated Overflow: Go To Content Area Overflow Leader *1st sub-subform
    Binding        > Default Binding (the table with [*])
                             check Repeat Subform for each Data Item
                             check Min Count 1
    This made each record in table a new page.  In my case I was writing a cycle count record (LINV) with additional statistical and historical data.

  • ADOBE form - page reset for the second SO

    Hi all,
    Iam working on sales order form ( ADOBE Form). Nneed to display SO header and item details.But it is not for a single SO and it is for multiple SOs.First i need to display one sales order and its items after completing the all items of the first SO , the second SO details should come in the next page. This is fine, i have done this, but for the second SO the page numbers should start from 1. That means the page no has to be reset for each SO change.Suppose assume that, if the first SO is taking 2 pages for  printing item details and second SO is taking 3 pages for printing item details then the page nos should follows the below sequence:
    First SO :  1 of 2
                    2 of 2
    second SO : 1 of 3
                        2 of 3
                        3 of 3.
    but it is printing as 1 of 5, 2 of 5 ..... like this. Because we are using the system field for this.Can we reset the page numbers according to the condition?
    Regards ,
    Vineel.

    Hi,
    One addition to the previous answer. You need to set the Output device in the program itself and the nodialog field of the outputparams should be set to 'X'. For example you can go through the below code.
    DATA:
      w_formname TYPE fpname,
      w_function TYPE funcname.
    DATA : docparams TYPE sfpdocparams.
    DATA : formoutput TYPE fpformoutput.
    DATA : outputparams TYPE sfpoutputparams.
    DATA:
          BEGIN OF fs_orders,
            vbeln TYPE vbak-vbeln,
          END OF fs_orders,
          t_orders LIKE STANDARD TABLE OF fs_orders.
    SELECT vbeln
      FROM vbak
      INTO TABLE t_orders
        UP TO 5 ROWS.
    CHECK sy-subrc EQ 0.
    w_formname = 'YH297_FORM_SALESORDER'.
    CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
      EXPORTING
        i_name                     = w_formname
      IMPORTING
        e_funcname                 = w_function
      E_INTERFACE_TYPE           =
    outputparams-dest = 'PDF1'.
    outputparams-nodialog = 'X'.
    LOOP AT t_orders INTO fs_orders.
      CALL FUNCTION 'FP_JOB_OPEN'
        CHANGING
          ie_outputparams = outputparams
        EXCEPTIONS
          cancel          = 1
          usage_error     = 2
          system_error    = 3
          internal_error  = 4
          OTHERS          = 5.
      IF sy-subrc NE 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      CALL FUNCTION w_function
        EXPORTING
        /1bcdwb/docparams        =
          document                 = fs_orders-vbeln
      IMPORTING
        /1BCDWB/FORMOUTPUT       =
        EXCEPTIONS
          usage_error              = 1
          system_error             = 2
          internal_error           = 3
      IF sy-subrc NE 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      CALL FUNCTION 'FP_JOB_CLOSE'
    IMPORTING
       e_result       =
        EXCEPTIONS
          usage_error    = 1
          system_error   = 2
          internal_error = 3
          OTHERS         = 4.
      IF sy-subrc NE 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDLOOP.
    Regards,
    Ram

  • Print Adobe form pages on different printers based on the condition

    Hi All,
    I am new in Adobe forms. We have requirement to print first 5 line items in adobe form (which are printing on first page) on one printer and remaining pages on another printer.
    What solution I was thinking was, in print program call the adobe form twice with flag as a importing parameter. For the first call the flag value will be set and for second run a blank value will be passed in flag.
    If flag is set then call make the first page "visible" and if flag is cleared then "hide" the first page and make the remaining pages "visible".
    But as its an item data which is designed on "Design" view I am not able to write a script to hide the page. Any suggestion you can give to resolve this issue.
    Thanks,
    Mihika.

    If it is OK to have the default printer defined/maintained in the user master (like tcode Su01 or System > User profile > Own data, Then the standard logic may suit your needs. I think you will need to undo some config for the whs. Te standard logic works as detailed below. the system needs to get to #4 below, then the SAP userid printer will be selected.
    the system proceeds with automatic printer determination as described below Config Tcode is OMLV.
    1) First the system checks whether a printer is set in the configuration "Printer-Movement". If so, the printer determination is complete at  this point.                                                         
    2) If not, the system uses the parameter "PriSrcTyp" defined in the configuration "Printer-Movement" to decide how it will proceed.  If the parameter is set here, the system checks if a printer is defined in the setting "Printer Picking Area" and then proposes this printer.                                                            
    3) If the system finds no printer, it searches in the setting "Printer - Storage Type" and uses this, if a printer is set.                   
    4) If the system cannot find a printer using the methods described above it selects the printer defined in the user master of the user currently logged on.                                                
    5) If no printer is defined here, the system automatically proposes LP01
    This writes the data to the spool file.

  • ADOBE form page hiding using formcal scripting

    Hi Experts,
    I am new to ADOBE form and currently working on invoice print output. (NOT an Interactive adobe form)
    My requirement is
    i wanted to print one main page and 5 different annexures(anexures are having different layouts so is in diff forms and contained in diff pages)
    Deppending on 'Oreder reason' (made as global variable) , i need to select appropriate annexure and print
    main page and any one of the annexure.
    so i should hide all other annexure, to achive this i used formcalc scripting.
    i tried hiding annexure 2 by following code,
    data.Annexure2::ready:form - (FormCalc, client)
    if ( data.G_F_ORDER_REASON.rawValue == "ANX" )
    then $.presence = "hidden"
    endif
    i have passed value 'ANX' to this , i could see the value of order reason printed on page Annexure2 but it is not executing (getting in to if condition) condition and not hiding the page ...
    Experts please help me...
    this way i have to hide 4 other annexures...please help me or give me some other option to achive this.
    thanks and regards
    varun
    Edited by: skyblue on Aug 6, 2011 3:30 PM
    Moderator message: please do not cross-post.
    Edited by: Thomas Zloch on Aug 8, 2011 11:29 AM

    Hi Experts,
    I am new to ADOBE form and currently working on invoice print output. (NOT an Interactive adobe form)
    My requirement is
    i wanted to print one main page and 5 different annexures(anexures are having different layouts so is in diff forms and contained in diff pages)
    Deppending on 'Oreder reason' (made as global variable) , i need to select appropriate annexure and print
    main page and any one of the annexure.
    so i should hide all other annexure, to achive this i used formcalc scripting.
    i tried hiding annexure 2 by following code,
    data.Annexure2::ready:form - (FormCalc, client)
    if ( data.G_F_ORDER_REASON.rawValue == "ANX" )
    then $.presence = "hidden"
    endif
    i have passed value 'ANX' to this , i could see the value of order reason printed on page Annexure2 but it is not executing (getting in to if condition) condition and not hiding the page ...
    Experts please help me...
    this way i have to hide 4 other annexures...please help me or give me some other option to achive this.
    thanks and regards
    varun
    Edited by: skyblue on Aug 6, 2011 3:30 PM
    Moderator message: please do not cross-post.
    Edited by: Thomas Zloch on Aug 8, 2011 11:29 AM

  • Adobe Forms page break inside a table

    Hi,
    I have a 50 columns table and I need to print the first 25 columns on a page and the next 25 columns on the following page. Beside this if the number of lines in the table is big enough to flow on a new page I would like to print them like that:
    First n lines (where n is the maximum  of lines that can enter in one page)
    Page 1
    Coumn1 ........ Column25
    Page 2
    Column26..... Column50
    Next n lines
    Page 3
    Coumn1 ........ Column25
    Page 4
    Column26..... Column50
    and so on, until the lines in the table are all printed.
    Thank you very much!

    Hello Ana,
    You can only add a maximum of 20 columns and 50 rows in a single page, the solution would be to conditionally divide the main table as 20xN, 20xN, and 10xN. And regarding the flow on a new page:
    1. If you use the subform for line items, then make the subform type 'Flowed'.
    2. If you use only table in body page then check for Allow page-breaks within content.
    Regards,
    Manish

  • Current page printing problem - while repeating pages : Adobe forms

    Hi Experts,
    I have a problem in printing current page number of an adobe form.
    My requirement is that , my form got 2 pages. On first page i am not printing page numbers and excluded from numbering.
    Numbering starts from second page. The second page needs to be repeated twice.
    In this case my page printing should look like :
    First page - no page number
    second page - 1 of 1
    Third page - 1of 1 (as it is a copy)
    IF second page extends to multiple pages (eg.. 2)
    First page - No Page no
    First instance of second page - 1of 2 , 2 of 2
    Second instance of second page - 1 of 2 , 2 of 2 . Presently it is printing like : 3 of 2 , 4 of 2. I need to initialize current page count. I could able to set the total page count 2 via variable from print program. But while printing the second instance, I am not able to initialize the current page count.
    I have seen the following thread which exactly talks about my problem but with out any solution.
    Re: Adobe Forms - Page Count
    Can any one help me in this regard.
    Thank You,
    Regards,
    Naresh.

    Hi,
    I am not sure how your page design looks like.
    Assumption:
    During runtime, ONLY 1 page for Page1, multiple pages for Page2 and Page3, same number of pages for Page2 and Page3.
    This is what i did:-
    I have 3 pages:
    Page1: With NO page number: ONLY 1 page
    Page2: With page number: Multiple page
    Drag the "Insert -> Custom -> Page n of m"
    - TextField: "CurrentPage",
    -- replace the original script: "this.rawValue = xfa.layout.page(this)" with "this.rawValue = xfa.layout.page(this) - 1"
    - TextField: "PageCount",
    -- replace the original script: "this.rawValue = xfa.layout.pageCount()" with "this.rawValue = ( xfa.layout.pageCount() - 1 ) / 2"
    Page3: With page number: Multiple page
    Drag the "Insert -> Custom -> Page n of m"
    - TextField: "CurrentPage",
    -- replace the original script: "this.rawValue = xfa.layout.page(this)" with "this.rawValue = xfa.layout.page(this) - 1 - ( xfa.layout.pageCount() - 1 ) / 2"
    - TextField: "PageCount",
    -- replace the original script: "this.rawValue = xfa.layout.pageCount()" with "this.rawValue = ( xfa.layout.pageCount() - 1 ) / 2"
    Good luck.

  • How to change the page break in adobe forms

    Does anyone know how to change the page break on an adobe form?  I'm hoping it will be the same way you change the page view in excel.
    Can anyone help?
    Thank you in advance,
    Priscilla

    HI
          YOU CAN USE THE FOLLOWING SYSTEM FIELDS OF SMARTFORMS FOR THE MENTIONED PURPOSE
    <b>&SFSY-PAGE& </b>
         Inserts the number of the current print page into the text. You determine the  format of the page number (for example, Arabic, numeric) in the page node. 
    <b>&SFSY-FORMPAGES&</b> 
         Displays the total number of pages for the currently processed form. This  allows you to include texts such as'Page x of y' into your output
    <b>&SFSY-JOBPAGES& </b>
         Contains the total page number of all forms in the currently processed print  request.
    REGARDS
    ANOOP

  • How to print page numbers in adobe form

    Hi,
    Can anybody tell me how to print page numbers in adobe form.
    Thanks in advance
    Chaitanya

    Hi,
    Yes the field page n of m is used normally for printing page numbers. But it won't display the current page of total pages by itself. You have to set the run time property to n (current page ) and m (Total number of pages). Carefully select the # (current page ) and ## (Total number of pages). Hope this works for you.
    My requirement is to have the user control on current page. For Example:
    Example for a Invoice with 5 PO items (stands on 2 pages) :
    1st  page is the letter : no page number
    2nd page is the 1st page of the 1st copy of the invoice : we should read u201C1 / 2u201D
    3rd page is the 2nd page of the 1st copy of the invoice : we should read u201C2 / 2u201D
    4th page is the 1st page of the 2nd copy of the invoice : we should read u201C1 / 2u201D
    5th page is the 2nd page of the 2nd copy of the invoice : we should read u201C2 / 2u201D
    Presently i cam getting the current page number for page 4th as 3 / 2 and for 5th page 4 / 2. I could able to control the total number of pages from print program. But when i am printing the second copy (4th and 5th pages), I couldn't able to control the current page number. I need to initialize the Current page count (4th page ) as 1.
    I have used the follwing java scripting:
    this.rawValue = wv_pages - xfa.layout.page(this)
    where wv_pages is total no of pages calculated from print program.
    Please help me in this regard with some formcal or java scripting conditions.
    Thank You,
    Regards,
    Naresh.

  • Header and Footer in not displaying correctly on each page in Adobe Forms

    Hi experts,
       I need your little help on Adobe Form.  I have develop a customer account statement and facing problem.
         In header and footer part I have to display customer address. It is ok if data is of one page. But when data is overflowing, customer address is showing only at first page in header, and not displaying address neither in header nor in footer(footer section will print on last page, it may be either first page or third page ) on other pages. (Address is table type data )
           Header and footer Section address has been designed on Master Page.
    Please help me to resolve these two problems as soon as possible.
    Regards
    Piyush

    I found this post which I hope helps:
    This can be done by bit of tweaking using JavaScript. 
    Actually the problem was, the header was printing continuously in subsequent pages and once the header data was over the rest of the pages contained blank header. But we need have to print same header for each group of items till that group of items finish in the specific page. And for new group of items different header will be filled and so on.
    So to overcome this issue, create the item table in such a way that the header data is also included in the item table for each group of items. In the layout, select your header field and the event READY LAYOUT and write the below JavaScript code. This event is called for each page for that header field, so you can directly map the item table value and put it in your header field.
    // Get the current page
    var currpage = xfa.layout.page(this);
    // variable to store number of fields in that page.
    var fields = 0;      
    // Get the number of fields
            fields = xfa.layout.pageContent(currpage-1, "field", 0);
    // Loop on each field on the page
            for ( i=0; i<= fields.length-1; i++ )
    // Check if the field is in the item table column (it will be actually header data column in your item table)
                if ( fields.item(i).name == "TL" ) 
    // Fetch that value and store in your header field.
                           this.rawValue = fields.item(i).rawValue;

  • Adobe form output not getting displayed for the whole length of the page

    Hi All,
    I have developed an adobe form using webdynpro application. While testing, the output(pdf) does not occupy the entire page/screen from end-user side. But when I test the same from my side, the output appears fine . Could anyone suggest me on this?
    Regards,
    Allwin.

    Did you check the resolution at end user side? Is it different from your resolution?
    To overcome this check what is the height and width you have specified for InteractiveFormUI element in your Web Dynpro application. Have you specified in pixels like 300px? You need to enter it as 100% for both.
    Chintan

Maybe you are looking for

  • TS1389 I have one song in my library that will not play because it says it is not authorized to play on my computer.  I have already authorized the computer and I'm at a loss on what to do?

    Why won't iTunes play one song in my library after I have already authorized my new computer to play all music?  I keep getting the same message about authorizing the song over and over.  What can I do to fix this?

  • FCP won't play mixed resolution timeline

    Trying to play a ProRes 422 sequence with mixed resolutions (AIC, HDV, ProRes) and keep getting the Dropped Frames warning. I have closed all other sequences, turned off "unlimited RT", gotten down to two audio tracks. I am on Dynamic Video Quality a

  • Mountain Lion, Perian and Quicktime 7.6.6 - no audio

    I used to play and burn .AVI files with Quicktime, Mac OSX Lion and Perian.  But with Mountain Lion, its all broken now ! I have installed Quicktime Player 7.6.6 (in the Utilties folder) and Perian - and I can now get video with an .AVI file, but no

  • Information broadcasting basics

    Hi, I searched for Information Broadcasting in the forums.. they are talking about more about the issues. I am new to Broadcasting. Can you please provide me any good basic documents for my study Thanks in advance

  • Oracle 扩展优化的问题

    oracle data cartridge提供了extensible optimizer interface,通过这些接口可以自定义函数的代价值或定义对象成员函数的代价值,当两个代价不同的函数出现在where条件中时,oracle 优先执行代价小的函数.但是当一个对象含有一个嵌套表属性时,上面的那种规则就失效了,where条件中函数的执行顺序和它们的出现顺序是相同的,即:不是优先执行函数代价小的函数.这是什么原因呢? 数据库版本为oracle 10g <code> create or repla