How to print Sequential  Numbers like purchase order?

I ma new to mac and Numbers 09 and have a quick question. How do I print sequential numbers? I have my own MS Excel purchase order number with macro and I want to use Iwork Numbers to print the numbers. For example, Purchase Order: 70085-1 is in my form. When I ask to print 20 copies, it will print 70085-1, 70085-1, 70085-3, etc.
Thanks in advance

Here is a modified version of my original script which was posted in :
http://discussions.apple.com/thread.jspa?messageID=12679002
This time, with a single run, we may define the number of consecutive invoices to create.
--[SCRIPT openAndNameInvoiceWithAnumber]
Enregistrer le script en tant que Script : openAndNameInvoiceWithAnumber.scpt
déplacer le fichier créé dans le dossier
<VolumeDeDémarrage>:Utilisateurs:<votreCompte>:Bibliothèque:Scripts:Applications:Pages:
Il vous faudra peut-être créer le dossier Pages et peut-être même le dossier Applications.
aller au menu Scripts , choisir Pages puis choisir openAndNameInvoiceWithAnumber
crée un nouveau document à partir du modèle personnel prédéfini
et renomme le document avec un nouveau numéro.
Il insère également le numéro de facture au début du document.
--=====
L'aide du Finder explique:
L'Utilitaire AppleScript permet d'activer le Menu des scripts :
Ouvrez l'Utilitaire AppleScript situé dans le dossier Applications/AppleScript.
Cochez la case "Afficher le menu des scripts dans la barre de menus".
+++++++
Save the script as Script, Application or Application Bundle: openAndNameInvoiceWithAnumber.xxx
Move the newly created file into the folder:
<startup Volume>:Users:<yourAccount>:Library:Scripts:Applications:Pages:
Maybe you would have to create the folder Pages and even the folder Applications by yourself.
go to the Scripts Menu, choose Pages, then choose openAndNameInvoiceWithAnumber
will create a new document from the defined user template
and name it with a new number.
It also insert the invoice number at the very beginning of the document.
--=====
The Finder's Help explains:
To make the Script menu appear:
Open the AppleScript utility located in Applications/AppleScript.
Select the "Show Script Menu in menu bar" checkbox.
--=====
Yvan KOENIG (Vallauris, FRANCE)
2010/11/30
2010/12/20 edited to apply if the template is a flatfile one.
2011/01/11 added ability to build several invoices in a single call
property theApp : "Pages"
property theExt : ""
property myTemplate : "ma_facture.template" (*
Adapter à vos besoins
Put your preferred template name *)
property fichierNum : "le_numéro.txt" (*
Adapter à vos gouts
Put your preferred text file name *)
--=====
on run
if theApp is "Pages" then
set theExt to "pages"
else
if my parleAnglais() then
error "The application “" & theApp & "” is not supported !"
else
error "L’application « " & theApp & " » n’est pas gérée"
end if
end if
if my parleAnglais() then
set nombredefactures to my askAnumber("Enter the number of consecutive invoices needed", 1, "i")
else
set nombredefactures to my askAnumber("Saisir le nombre de factures consécutives demandé", 1, "i")
end if
repeat nombredefactures times
my buildaninvoice()
end repeat
end run
--=====
on buildaninvoice()
set {p2myTemplate, numero} to my prepare()
set numero to text -5 thru -1 of ("0000" & numero) (* pour numéro de 5 chiffres *)
set UNTITLED_loc to my getLocalizedFrameWorksName(theApp, "Untitled")
tell application "Pages"
activate
try
close document UNTITLED_loc
end try
end tell -- to Pages
tell application "Pages"
activate
open p2myTemplate
set theDoc to numero & "." & theExt
set name of document 1 to theDoc
tell document 1
tell body text
if my parleAnglais() then
set paragraph 1 to "invoice #" & numero & return & paragraph 1
else
set paragraph 1 to "facture n°" & numero & return & paragraph 1
end if
end tell
end tell
end tell
end buildaninvoice
--=====
on getLocalizedFrameWorksName(theApp, x)
local p2bndl
set p2bndl to (path to application support as text) & "iWork '09:Frameworks:SFApplication.framework:Versions:A:Resources:"
set x_loc to my getLocalizedName(theApp, x, p2bndl)
return x_loc
end getLocalizedFrameWorksName
--=====
on getLocalizedFunctionName(theApp, x)
local p2bndl
set p2bndl to (path to application support as text) & "iWork '09:Frameworks:SFTabular.framework:Versions:A:Resources:"
set x_loc to my getLocalizedName(theApp, x, p2bndl)
return x_loc
end getLocalizedFunctionName
--=====
on getLocalizedName(aa, tt, ff)
tell application aa to return localized string tt from table "Localizable" in bundle file ff
end getLocalizedName
--=====
on prepare()
local d1, d2, p2d, containerOfTemplates, pathToTheTemplate, p2n, nn
tell application theApp
set d1 to localized string "Templates" (* nom local du dossier "Modèles" *)
set d2 to localized string "My Templates" (* nom local du dossier "Mes Modèles" *)
end tell -- theApp
set p2d to (path to application support from user domain) as Unicode text
set containerOfTemplates to p2d & "iWork:" & theApp & ":" & d1 & ":" & d2 & ":"
set pathToTheTemplate to containerOfTemplates & myTemplate & ":"
try
set pathToTheTemplate to pathToTheTemplate as alias
on error
if my parleAnglais() then
error "The template “" & pathToTheTemplate & "” is unavailable! Please make sure the template file “" & myTemplate & "” is installed in Numbers “Templates:My Templates” folder, then rerun this script."
else
error "Le modèle « " & pathToTheTemplate & " » est introuvable! Veuillez installer le fichier modèle « " & myTemplate & " » dans le dossier « Modèles:Mes modèles » de Numbers avant de relancer ce script."
end if
end try
tell application "System Events"
if class of disk item (pathToTheTemplate as text) is file then
(* flat file *)
set p2n to containerOfTemplates & fichierNum
if not (exists file p2n) then
make new file at end of folder containerOfTemplates with properties {name:fichierNum}
write "100" to file p2n (* mettez le numéro de départ de votre choix *)
end if -- not…
else
(* package *)
set p2n to "" & pathToTheTemplate & fichierNum
if not (exists file p2n) then
make new file at end of pathToTheTemplate with properties {name:fichierNum}
write "100" to file p2n (* mettez le numéro de départ de votre choix *)
end if -- not…
end if
end tell -- System Events
set nn to read file p2n
set nn to ((nn as integer) + 1) as text
write nn to file p2n starting at 1
return {pathToTheTemplate, nn}
end prepare
--=====
on parleAnglais()
local z
try
tell application theApp to set z to localized string "Cancel"
on error
set z to "Cancel"
end try
return (z is not "Annuler")
end parleAnglais
--=====
Asks for an entry and checks that it is an floating number
set myInteger to my askAnumber(Prompt, DefaultValue, "i")
set myFloating to my askAnumber(Prompt, DefaultValue, "f")
on askAnumber(lPrompt, lDefault, IorF)
local lPrompt, lDefault, n
tell application (path to frontmost application as string)
if IorF is in {"F", "f"} then
set n to text returned of (display dialog lPrompt & " (" & (1.2 as text) & ")" default answer lDefault as text)
try
set n to n as number (* try to convert the value as an number *)
return n
on error
if my parleAnglais() then
display alert "The value needs to be a floating number." & return & "Please try again."
else
display alert "La valeur saisie doit être un nombre décimal." & return & "Veuillez recommencer."
end if
end try
else
set n to text returned of (display dialog lPrompt default answer lDefault as text)
try
set n to n as integer (* try to convert the value as an integer *)
return n
on error
if my parleAnglais() then
display alert "The value needs to be an integer." & return & "Please try again."
else
display alert "La valeur saisie doit être un nombre entier." & return & "Veuillez recommencer."
end if
end try -- 1st attempt
end if -- IorF…
end tell -- application
Here if the first entry was not of the wanted class
second attempt *)
tell application (path to frontmost application as string)
if IorF is in {"F", "f"} then
set n to text returned of (display dialog lPrompt & " (" & (1.2 as text) & ")" default answer lDefault as text)
try
set n to n as number (* try to convert the value as an number *)
return n
on error
end try
else
set n to text returned of (display dialog lPrompt default answer lDefault as text)
try
set n to n as integer (* try to convert the value as an integer *)
return n
on error
end try -- 1st attempt
end if -- IorF…
end tell -- application
if my parleAnglais() then
error "The value you entered was not numerical !" & return & "Goodbye !"
else
error "La valeur saisie n’est pas numérique !" & return & "Au revoir !"
end if
end askAnumber
--=====
--[/SCRIPT]
Yvan KOENIG (VALLAURIS, France) mardi 11 janvier 2011 09:30:37

Similar Messages

  • How to print the modified old Purchase Order

    Dear Friends,
    What is the process of printing the modified old Purchase Order.
              With Regards,
                Siva kumar

    Dear,
    Please check the link with screenshots.
    http://www.finance.utoronto.ca/fast/qrg/purch/po/print.htm
    Regards,
    Syed Hussain.

  • How to print Excise values in Purchase Order Smartform

    Hi, Experts,
    I am developing the Purchase Order Smartform as per the my client requirment. For this i took the copy of standard Smartform for PO. The name of the standard smartform is 'YBIN_MMPO'. My requirment is to print all the excise values {BED,CESS,ECESS and VAT/CST} of every item. How to get these conditions to print in PO. I serched the table KONV, but the conditions which are under the taxes button are not stored in this table.
    For this I found one FM "CALCULATE_TAX_FROM_AMOUNT'. This is also not helpful if client goes to manual excise to create PO.
    Is there any other table to get these conditions? or is there any function modules to get these conditions?
    Please give me the solution.
    Thanks & regards,
    Jagadeesh.

    Hi,
    I used this piece of code to get the excise values in PO.
    SELECT SINGLE * FROM EKPO INTO
                    W_EKPO
             WHERE EBELN EQ IS_EKKO-EBELN AND
                   EBELP EQ <FS>-EBELP.
    CALL FUNCTION 'J_1I4_COPY_PO_DATA'
        EXPORTING
          Y_EKPO        = W_EKPO
        EXCCOM        =
    CALL FUNCTION 'CALCULATE_TAX_FROM_NET_AMOUNT'
    EXPORTING
    i_bukrs                 =  <FS>-BUKRS
    i_mwskz                 =  <FS>-MWSKZ
      I_TXJCD                 =
    i_waers                 = IS_EKKO-WAERS
    i_wrbtr                 =  <FS>-NETWR
      I_ZBD1P                 = 0
      I_PRSDT                 =
      I_PROTOKOLL             =
      I_TAXPS                 =
      I_ACCNT_EXT             =
    IMPORTING
      E_FWNAV                 =
      E_FWNVV                 =
      E_FWSTE                 =
      E_FWAST                 =
    tables
    t_mwdat                 = ITAB_TAXDATA
    EXCEPTIONS
       BUKRS_NOT_FOUND         = 1
       COUNTRY_NOT_FOUND       = 2
       MWSKZ_NOT_DEFINED       = 3
       MWSKZ_NOT_VALID         = 4
       KTOSL_NOT_FOUND         = 5
       KALSM_NOT_FOUND         = 6
       PARAMETER_ERROR         = 7
       KNUMH_NOT_FOUND         = 8
       KSCHL_NOT_FOUND         = 9
       UNKNOWN_ERROR           = 10
       ACCOUNT_NOT_FOUND       = 11
       TXJCD_NOT_VALID         = 12
       OTHERS                  = 13
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDIF.
    regards,
    Jagadeesh T.

  • How to print page numbers like 'Page 2 of 10' on an ALV report

    Hi,
    I've seen a few threads regarding this, but haven't seen any code that actually works. 
    What I'd like to do is print page x of y (i.e. Page 2 of 10) on an ALV report once the report is printed.
    Is this actually possible?  If so, what are the steps and coding required? 
    I greatly appreciate your help experts!
    Mark

    Hi Mark,
    I think there is no better way than calculate it before doing the output. If you do not have extra-new-page, the total number of pages may be calculated as the number of lines displayed divided by lines on one page - this will depend on the lines used for top-of-page and end-of-page. Also filters and subtotals could not be used.
    An other approach could be to read the current page number in end-of-list event and then scan the whole list using READ LIST and MODIFY LIST in each page top accordingly.
    Because it is decades ago I printed a list last time I will never have the chance to try.
    Regards,
    Clemens

  • How can we print the Stock Transfer Purchase Order

    Hi,
    How can we print the Stock Transfer Purchase Order??
    Because from Transaction ME9L & ME9F, we can print simple PO's like NB, MPR etc..but Stock Transfer PO could not print.
    Plz guide, from where we can do it...

    Messages for PO are set in MN04. For details on how to follow this link:
    Re: Problem with PO output determination MN04
    Once the record is set here you will see the records in ME23n under messages button in header.
    Edited by: Afshad Irani on Apr 30, 2010 10:09 AM

  • How to check/update an open purchase order ?

    Dear Experts,
    Is there any Transaction to check the open purchase order?
    Since our company has recently started working with SAP, my supervisor asked me to make a full report of it.
    Thus, I would kindly like to ask
                                                       how we can check the open purchase order?
                                                       how to check/see purcahse orders that are not shipped yet?
                                                       how to see purchase orders that are currently overdue?
    I will really appreciate if you can give me a detail overview of an purchase order(even more than the questions mentioned above).
    Thankyou in advance.
    Wishes,
    Jeevan

    Hi Jeevan,
    Check ME2L or ME2N with Scope of list as BEST or ALV and Selection paramters - WE101 or WE103
    Thanks & Regards,
    Ramagiri

  • How to creat deadlock for the purchase order in SAP Workflow

    How to creat deadlock for the purchase order in SAP Workflow

    Hi Ben,
    Are you using FM "CONVERT_DATE_TO_EXTERNAL" before passing delivery date?  If not, use FM like this, before passing the date to BAPI_PO_CREATE1 and it might work
      DATA: vf_doc_date(10),
                 internal_date TYPE d.
         vf_doc_date = sy-datum.              "Document date.
         internal_date = vf_doc_date.
      CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL'
        EXPORTING
          date_internal            = internal_date
        IMPORTING
          date_external            = vf_doc_date
        EXCEPTIONS
          date_internal_is_invalid = 1
          OTHERS                   = 2.
    Regards,
    Vivek

  • How can i see the Asset purchase order & GR after settlement

    Hello Gurus,
    Would you please tell me how can i check the Asset Purchase order, which is settled (WBS Element)? How can i see the GR document for the specific asset? & if i treat as a expeneses toward the project where i get the GR/ PO in asset explorer?
    Warm Regards,
    Dhananjay Rahane.

    Dear,
    Dhanajay.
    Purchase order related to asset you can see in Asset Master itself. Go to AS03 - Environment  ( Menu bar ) - Click on Purchase Order. Here you will have all the relevant PO's relating to asset.
    GR you can see in PO at a Purchase Order history. The data relating to asset you can  see in left hand side navigation in AW01N Asset Explorer. Like as Vendor, PO's, etc.
    WBS in PO you can see in Account Assignment Tab if your PO is created with N. ( Network PO ). WBS linked to Network you can see in CJ20N ( Project Builder ). 
    WBS Actual values can see in report CJI3 Actual Cost & Revenues.
    I hope this helps you to solve your issue. If you have any doubts feel free to share.
    Regards,
    Pankaj A Bhalerao.

  • 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.

  • How to see the list of purchase order

    hi,
    Please kindly guide me how to see the list of purchase order released and unreleased both.
    Regards,
    Sanchita

    Hi
    Check it out in Tcode ME2N
    Menu bar - Edit -Dynamic selections - Purchasing document header - Release status.
    Check it out.
    Thanks
    Raman

  • How to reopen a particular closed purchase order

    Hi all,
    In our company when AP_MATCHING is run, we got some matching exceptions. one of them is RULE_S210, which states that invalid POs. So we went to those POs, and found that the PO Status is Completed. I guess they were closed. so i am thinking by making those purchase orders' status to Dispatched will not give any matching exceptions.
    But i am not sure how to reopen a close purchase order.
    Can any one please tell me how to re-open a particular purchase order that is closed.
    I have gone to Purchasing -> Purchase Orders -> Reconcile POs -> Reopen POs.
    But according to my research in peoplebooks, that Reopen POs will just reverse the last run of PO_RECON(the process, which is used to close the purchase orders) of the PO process. I dont think it will not Re-open a particular PO. There are no parameters in the run control page fo reopen a PO.
    Please help me. It's a production issue.
    Thank you,
    Bye.

    What I heard it it it is an issue with FS 8.8.
    They fixed it in 9.0 so that you can re-open any purchase order.

  • How to disable hold button in purchase order creation.

    hi
    how to disable hold button in purchase order creation.

    Select single * from VBAK where clause
    ---It fetches single record from the database, based on the condition you specified in the where clause.
    Where as select * from VBAK up to 1 row
    ---Fetches first record if the condition specified in the where clause is satisfied, otherwise it doesn't fetch any record

  • How to do form personalization on purchase order cancell functionality

    Hi,
    how to make form personalization on purchase order form so that user should not cancell the PO.
    Please suggest.
    Thanks

    This is already available in the additional line information..though..
    If you still want that at line level to be displayed..maybe you need to customize the form...not sure how u can handle that logic
    Mahendra

  • How to extract TEXT for archived Purchase Orders ?

    Hi Friends,
    Can any one tell me how to extract TEXT for archived Purchase Orders ?
    I have used READ_TEXT but that is not fetching texts for archived PO's. Whenever I am trying to fetch data from STXH against archived PO, no value is coming and resulting SY_SUBRC <> 0.
    Any demo code will be highly appreciated.
    Thanks in advance..
    Sivaji

    Hi,
    You can see that table STXH is linked to archiving object MM_EKKO (you can see it in tcode DB15).
    My suggest is that you must get the data. See the demo object BC_SBOOK in tcode AOBJ. You can see the report to reload data. The object is get the data in an internal table. So for report SBOOKR you can see this function module:
    *   get data records from the data container
    *   SBOOK
        CALL FUNCTION 'ARCHIVE_GET_TABLE'
          EXPORTING
            archive_handle        = lv_handle
            record_structure      = 'SBOOK'
            all_records_of_object = 'X'
          TABLES
            table                 = lt_sbook_tmp
          EXCEPTIONS
            end_of_object         = 0.         "not entries of this type
    *   check lt_sbook_tmp entries against selections. Delete not
    *   requested entries
        LOOP AT lt_sbook_tmp ASSIGNING <ls_sbook>
                             WHERE carrid IN s_carrid
                               AND connid IN s_connid
                               AND fldate IN s_fldate.
          APPEND <ls_sbook> TO lt_sbook.
        ENDLOOP.
        REFRESH lt_sbook_tmp.
    The idea is that you get the same data that you handle in READ_TEXT (because you don't have the data in database) and recovery the text.
    I hope this helps you
    REgards
    Eduardo

  • How to find import and local  purchase order for report

    Dear Friends,
                  Please help me in coding this report, =below is the functional requirement.
    1. To find the list of Import or Local Purchase Orders(purchase orders to be procured from another country).
    2.Once the import purchase order is selected .The report sould display the PO number ,Currency , Value , po Date , Planned recipt date ,
    BUy from vendor , ship from vendor , Origin Country, Destination country, and Status of the PO.
    I am clear about the PO number Currency ,value and po date but could not get how do i fetch the details like:--Planned recipt date ,
    BUy from vendor , ship from vendor , Origin Country, Destination country, and Status .
    Your help is greatly appreciated.

    Hi,
    Buy from vendor is the real vendor who is supplying the items while Ship from vendor is the vendor who just arrange for the transport. This should be maintained in the pruchase order, just consult with your MM consultant to get where they are storing those details
    Regards
    Karthik D

Maybe you are looking for

  • RFC connection error in recording eCATT from Solman

    Hello, I am trying to record eCATT from Solution Manager into our DEV box. I have set-up the RFC connection and tested them. When trying to recording I got the following message: "RFC error ThControl: illegal sap_dext call !!!/ connection" Any sugges

  • Significance of Long and short text Objects

    Hi all, I want to know the difference between Long and short texts and scenarios in which long texts are better to use than short texts.

  • Oracle 8i - force connection with protocol encrytpion

    Hi, I would like all client connections via JDBC to my oracle database to use protocol encrytion this way a hacker can not see the data thru a sniffer. Is it possible ? and how? Thousand thanks -Dan

  • Error administrating ohs1 in EM Fusion Middleaware Control

    Using WebLogic Server Version: 10.3.5.0 with Enterprise Manager 11g Fusion MIddleware Control 11.1.1.5.0 on Oracle Linux 5.8 64-bit. I have three OHS instances in the cluster and for jut one of them (ohs1 on the admin server) I cannot do any type of

  • Integrating new system into CPH (Central Performance History)

    Hi, I have configured (CPH( in Solution Manager 7 EHP1, during the configuration I have assigned 2 systems into (CPH) 1. Solution Manager system itself 2. R/3 system in both systems CCMS configuration is done when displaying report in (RZ23N) I see o