PO Creation Data Validation

Hello,
Is there a way we could validate the data for PO creation without actually creating the PO. We have data coming in from an external system and we need to validate the PO data and send a confirmation back before we actually post the PO.
Any help will be appreciated.
Thanks,
ALAM.

Hi Alam.
Use the BAPI  =>  BAPI_PO_CREATE1 to create the PO. In this bapi, there is an import parameter called TEST.
With TEST = 'X' , you can simulate the PO creation process. If this is successfull and BAPIRET structure has no errors, it means PO can be successfully create even when TEST = SPACE ...

Similar Messages

  • The timesheet creation failed, because of problems with the project I server or with data validation

    Hi,
    One of my user is facing issue in creating new time sheet,
    "The time sheet creation failed, because of problems with the project server or with data validations".
    This issue is coming to only few members out of 10000 members.
    Note: For the same user, can able to do in other machines. only the problem in his machine. Have ran the office diagnostics, but still the problem persists.
    Is any add-on's/any settings need to update in IE. Could any one please help me on how to fix this issue?
    Many thanks in advance.

    I would check the compatibility settings in IE etc, or try another browser (chrome, safari etc.)
    Ben Howard [MVP] | web |
    blog | book

  • Exit or BAdi for Validating GR posting date Greater than PO creation date.

    Hi all ,
    Is there any Exit or BAdi for restricting users to post GR date greater than PO creation date.
    Regards
    Gibi Philip

    Gibi,
    check this:
    MB_CIN_LMBMBU04                         posting of gr
    Amit.

  • Excise Invoice Cancellation on Date validation only

    Hi Experts,
    i am having critical requirement from Business, which is not available in SAP Standard, So i need help from you guys...
    Excise invoice can be cancelled on the same day of system/posting date. but when the system date and posting dates are not matching it should through error..
    Example  : i created Excise invoice on 17th june,2011 this is posting date of excise invoice, if i try to cancell on 17th june , it should allow.
                        but when i try to cancell the excise invoice on 18th june (system date) , it should not allow to cancell and it say Error !!!
    i heard there will be possible through User Exit  OR Function Module OR Routins ... Please help me
    Thanks and Regards
    Madhu

    Dear Madhusudhanan,
    Following are the list of User Exits available for J1IIN
    J_1I7_USEREXIT_EXCISE_BEF_SAVE User exit after the excise header and details are written and they can changed in J1IS  , J1IIN and Automatic creation of Excise Invoice.
    J_1I7_USEREXIT_EXINV_ADDL_DATA User exit for Excise Invoice Additional Data    in J1IS and J1IG                 
    J_1I7_USEREXIT_J1I5_MATFORM    User exit for J1I5 material form changes                           
    J_1I7_USEREXIT_J1I5_VALIDATE   User exit for subsequent J1I5 data validation                      
    J_1I7_USEREXIT_J1IEX_BEF_SAVE User exit for J1IEX before the data is saved                    
    J_1I7_USEREXIT_J1IEX_CHANGE    User exit for changing data before display             
    J_1I7_USEREXIT_J1IS_BASE_VALUE User exit to Change base value in J1IS                
    I strongly believe that the first exit will serve the purpose.
    Now if you are cancelling it using J1IH, Check the following thread.
    J1IH-User Exit
    Thanks & Regards,
    Hegal K Charles

  • PO creation date and info record validy price relation.

    Dear Gurus,
    While creating a PO, when I change the PO creation date, price in the PO will change according to the validity start date based on the PIR.I believe thats the logic right? I have a scenario, I'm facing a problem that when I change the PO creation date between 2011 and 2012 period,  the price of the PO at times will not change according to the PIR validity start date. Is there any OSS note related to this issue or I'm missing out any logic?
    Validity periods
    Validity on        Validity to         Deletion Flag.   
    04.11.2011       31.12.2011              x
    01.01.2012       31.12.9999

    HI,
    By default, the pricing conditions are dependant on PO document date.
    But there are different options like, whether you want your pricing to be dependant on Delivery date of PO item or current date (sy-datum) or GR date etc.
    This filed is available in 2 places: 1. Vendor master>purchasing data> Pricing Date Control
    2. Info record>Purchasing data> Pr.Date Cat.
    Check in these 2 places and then simulate pricing by changing the corresponding date.

  • How to find Record creation date

    Hi Friends,
    Is there any way to find the actual Record creation date for each record in Database tables?
    Thanks

    Hi.
    I would like to suggest you something.
    In order to get the changed record date entry,
    1. GoTo the table you have created.
    2. GoTo the data element related to that field which you have defined.
    3. In the data element window, GoTo->Further Characteristics (Window) and
    4.Check the CHANGE DOCUMENT Radio button.
    Hence, For every change the date will be fetched.
    But, This is valid for only that TABLE.
    \[removed by moderator\]
    Regards
    Harsh
    Edited by: Jan Stallkamp on Jul 7, 2008 6:03 PM

  • If xmp creation date precedes raw file date Bridge/ACR does not recognize

    I decided to start a new thread with this revelation from a prior discussion, because of its importance.
    I have several iPad apps that apply metadata to raw images captured in the field using the camera connection kit.  These apps have various export mechanisms, with a typical capability to bundle up raw images from the Photos app space with xmp files from the metadata editor app's space, and deliver them via ftp or however.  I have seen failures where the creation date of the image file was made equal to the creation date of the xmp, and subsequent to export Bridge would not recognize the xmp file as valid edits to the raw file, even though they both had the same file name ahead of the extension.  Up to now I never understood the cause of the failure.  Opening the xmp file in a text editor and saving it out with a later creation date "fixed" the problem.
    Adobe either needs to change this behavior (IMO the right solution, forget about checking creation dates) or at least publish the dependency.  I believe there are a lot of programmers out there that had no idea that the creation date could invalidate the coupling between the raw file and the xmp file.
    Richard Southworth

    Ok, made some tests.
    First: there is nothing interesting in /sys/class/drm. Only one file called version... which, as you might guess, contains the version info for DRM.
    Secondly: tested this Phantom Output thing. Used LVDS-1, LVDS-0, LVDS... nothing.
    I even tried to add i915 and intel_agp modules to the initramfs... nothing changed.
    However, I looked a bit more into dmesg and found another interesting thing:
    [ 2.038447] Linux agpgart interface v0.103
    [ 2.041261] input: Video Bus as /devices/LNXSYSTM:00/device:00/PNP0A08:00/LNXVIDEO:01/input/input8
    [ 2.048750] ACPI: AC Adapter [ACAD] (on-line)
    [ 2.060820] agpgart-intel 0000:00:00.0: Intel 945GM Chipset
    [ 2.060849] agpgart-intel 0000:00:00.0: detected gtt size: 0K total, 0K mappable
    [ 2.060858] agpgart-intel 0000:00:00.0: Intel (null) Chipset
    [ 2.060867] agpgart-intel 0000:00:00.0: can't determine aperture size
    [ 2.060933] agpgart-intel 0000:00:00.0: agp_backend_initialize() failed
    [ 2.060942] agpgart-intel: probe of 0000:00:00.0 failed with error -22
    So it seems there is a problem with the AGP module not correctly detecting the card in the first place
    Edit: also tested it with the internal screen connected, still the same problem.
    Last edited by kjans (2014-12-03 21:33:09)

  • Relocating files based on creation date

    Hello,
    I have a folder full of hundreds of Video clips. I am interested in a script that will
    1. look at the files sequentially
    2. For each file read the creation date
    3. If a Folder with that creation date does not exist, create a folder with that creation date (YYYY-MM-DD)
    4. Move the file to the folder with the file's creation date
    I've never used automator. Is this easy to do using that program?
    The reason I want to do this is to avoid having to manually re-organize the videos by date, if I were to import the contents of the existing folder of video clips into iMovie.
    Appreciate any input you can provide.
    Thanks.

    Automator is designed to take small, pre-written routines (actions) and string them together into a workflow. There isn't a default action to do something like this, but the Run AppleScript action can be used. Actually, an AppleScript would probably be the way to go, but I just happened to have an Automator action lying around for some reason.
    Tested workflow:
    1) *Ask for FInder Items* {Type: Folders}
    2) *Get Folder Contents* (be careful with getting subfolders - this action will go into packages)
    3) *Run AppleScript:*
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    font-weight: normal;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px; height: 340px;
    color: #000000;
    background-color: #FFEE80;
    overflow: auto;"
    title="this text can be pasted into an Automator 'Run AppleScript' action">
    on run {input, parameters} -- create folders and move
    make new folders from file creation dates (if needed), then move document files into their respective new folders
    if no container is specified (missing value), the new folder will be created in the containing folder of the item
    if the container is not a valid path (and not missing value), one will be asked for
    input: a list of Finder items (aliases) to move
    output: a list of the Finder items (aliases) moved
    set output to {}
    set SkippedItems to {} -- this will be a list of skipped items (errors)
    set TheContainer to "" -- a Finder path to a destination folder, or missing value for the source folder
    if TheContainer is not missing value then try -- check the destination path
    TheContainer as alias
    on error
    set TheContainer to (choose folder with prompt "Where do you want to move the items?")
    end try
    tell application "Finder" to repeat with AnItem in the input -- step through each item in the input
    if TheContainer is not missing value then -- move to the specified folder
    set {class:TheClass, name:TheName, name extension:TheExtension} to item AnItem
    else -- move to the source folder
    set {class:TheClass, name:TheName, name extension:TheExtension, container:TheContainer} to item AnItem
    end if
    if TheClass is document file then try -- just documents
    set TheDate to text 1 thru 10 of (creation date of AnItem as «class isot» as string) -- YYYY-MM-DD
    try -- check if the target folder exists
    get ("" & TheContainer & TheDate) as alias
    on error -- make a new folder
    make new folder at TheContainer with properties {name:TheDate}
    end try
    -- duplicate AnItem to the result
    move AnItem to the result
    set the end of output to (result as alias) -- the new file alias
    on error -- permissions, etc
    -- set the end of SkippedItems to (AnItem as text) -- the full path
    set the end of SkippedItems to TheName -- just the name
    end try
    end repeat
    ShowSkippedAlert for SkippedItems
    return the output -- pass the result(s) to the next action
    end run
    to ShowSkippedAlert for SkippedItems
    show an alert dialog for any items skipped, with the option to cancel the workflow
    parameters - SkippedItems [list]: the items skipped
    returns nothing
    if SkippedItems is not {} then
    set {AlertText, TheCount} to {"Error with AppleScript action", count SkippedItems}
    if TheCount is greater than 1 then
    set theMessage to (TheCount as text) & space & " items were skipped:"
    else
    set theMessage to "1 " & " item was skipped:"
    end if
    set {TempTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, return}
    set {SkippedItems, AppleScript's text item delimiters} to {SkippedItems as text, TempTID}
    if button returned of (display alert AlertText message (theMessage & return & SkippedItems) ¬
    alternate button "Cancel" default button "OK") is "Cancel" then error number -128
    end if
    return
    end ShowSkippedAlert
    </pre>

  • Incrementing creation date times to preserve sort

    I've got bunches of scanned analog photos. The creation dates were the scan time, not when the photos were taken. And some are out of order.
    I don't remember the exact times and dates, but I do recollect the sequence. And I can use a "user order" within LR.
    But how do I preserve that order in the metadata in the files for use in other applications, etc? I can set a creation date, but it appears to be the same for all. How I could increment the date/time so that I'd end up with the same sequence when sorted by "capture time"?
    Rob

    John, your memory is better than mine. And some of the shots have an obvious sequence, but I don't even know the year (old old photos). Unfortunately with many the service that scanned them also tossed them like salad, and the frames on prints, which sometimes had month/date info, were cut off on the scans.
    So arbitrarily adding dates could result in duplicates, but most importantly it may delude those I distribute the files to into thinking they are somehow valid dates. So I'll stick with the scan date and file renaming. Don't want somebody to see a picture of granny and wonder why she was looking so young when the picture was snapped.
    I've been looking around, thinking there might be a convention for sets of photos and sequences, with perhaps a "x of y" type parameter which would indicate it was part of a set, since photos were commonly taken that way (I have old photos with names like "Roll 1 -3" for example), and since it might be a holdover from then, even when sequential filenames came into use. Even today with camera phones and such I still get lots of filename dups. Or perhaps it was useful when one is shooting sequences or bursts in sports. But I haven't found anything explicit yet. The IPTC extension "object title" might be suitable, since it's used for accession numbers. But not many applications would sort on that.
    And aside from sequence, historical dates can be entered into the IPTC extension "date [object] created." But if the sequence matters, and you only know the year, it's still a problem.
    So overall I think the file renaming is the way to go, with some keywords or descriptors in IPTC to indicate the name of the set. Like filename "1 of 42 Aunt Matilda's wedding."  So even if the photos get moved around, separated, etc the new owner will be able to discern they're part of a set, and with access to metadata get even more info if the filenames somehow got borked.
    Rob

  • Loosing CREATION dates of pictures when EXPORTING

    Hi,
    When exporting pictures into other folders I loose the creation dates of these pictures. For the exported pictures I get the date of exporting instead of the dates when the pictures were taken.
    Drag and drop doesn't help either.
    Is there a way to keep this valid information for the exported pictures?
    Thomas
    Dual 2.7 GHz Power Mac G5   Mac OS X (10.4.8)   1.5 GB DDR SDRAM

    Thomas
    You need to distinguish between the FILE info and the PHOTO info.
    The Finder quite correctly gives the creation date for the file: that file is created when you export the pic.
    The Photo data is preserved in the EXIF information, and although the file is a copy, the correct EXIF data is exported along with the Photo.
    For an example of an EXIF viewer check out EXIFViewer
    Bear in mind, that if you have edited the photo it will reflect the date of editing in the EXIF data. If you want to the actual data you'll need to examine the Original File.
    If you want to edit the Finder info on the File to reflect the EXIF data, there are several apps that will do this, including A Better Finder Attributes X . But there are others.
    Regards
    TD
    MacBook Pro 15 2.16gig / iMac 20" 2.16 C2D   Mac OS X (10.4)   2 gig RAM/ 2 gig RAM

  • Want to get placed images Dimension and Creation Date in Catalog

    Below is the script which is free with CS4. Is there anybody who can modify this script in a way which provide the creation date and dimension of the images in image catalog.
    //ImageCatalog.jsx
    //An InDesign C4 JavaScript
    @@@BUILDINFO@@@ "ImageCatalog.jsx" 2.0.0 5-December-2007
    //Creates an image catalog from the graphic files in a selected folder.
    //Each file can be labeled with the file name, and the labels are placed on
    //a separate layer and formatted using a paragraph style ("label") you can
    //modify to change the appearance of the labels.
    //For more information on InDesign scripting, go to http://www.adobe.com/products/indesign/scripting/index.html
    //Or visit the InDesign Scripting User to User forum at http://www.adobeforums.com .
    //The myExtensions array contains the extensions of the graphic file types you want
    //to include in the catalog. You can remove extensions from or add extensions to this list.
    //myExtensions is a global. Mac OS users should also look at the file types in the myFileFilter function.
    main();
    function main(){
    var myFilteredFiles;
    //Make certain that user interaction (display of dialogs, etc.) is turned on.
    app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
    myExtensions = [".jpg", ".jpeg", ".eps", ".ps", ".pdf", ".tif", ".tiff", ".gif", ".psd", ".ai"]
    //Display the folder browser.
    var myFolder = Folder.selectDialog("Select the folder containing the images", "");
    //Get the path to the folder containing the files you want to place.
    if(myFolder != null){
       if(File.fs == "Macintosh"){
        myFilteredFiles = myMacOSFileFilter(myFolder);
       else{
        myFilteredFiles = myWinOSFileFilter(myFolder);
       if(myFilteredFiles.length != 0){
         myDisplayDialog(myFilteredFiles, myFolder);
         alert("Done!");
    //Windows version of the file filter.
    function myWinOSFileFilter(myFolder){
    var myFiles = new Array;
    var myFilteredFiles = new Array;
    for(myExtensionCounter = 0; myExtensionCounter < myExtensions.length; myExtensionCounter++){
      myExtension = myExtensions[myExtensionCounter];
            myFiles = myFolder.getFiles("*"+ myExtension);
      if(myFiles.length != 0){
       for(var myFileCounter = 0; myFileCounter < myFiles.length; myFileCounter++){
        myFilteredFiles.push(myFiles[myFileCounter]);
    return myFilteredFiles;
    function myMacOSFileFilter(myFolder){
    var myFilteredFiles = myFolder.getFiles(myFileFilter);
    return myFilteredFiles;
    //Mac OS version of file filter
    //Have to provide a separate version because not all Mac OS users use file extensions
    //and/or file extensions are sometimes hidden by the Finder.
    function myFileFilter(myFile){
    var myFileType = myFile.type;
    switch (myFileType){
      case "JPEG":
      case "EPSF":
      case "PICT":
      case "TIFF":
      case "8BPS":
      case "GIFf":
      case "PDF ":
       return true;
       break;
      default:
      for(var myCounter = 0; myCounter<myExtensions.length; myCounter++){
       var myExtension = myExtensions[myCounter]; 
       if(myFile.name.indexOf(myExtension)>-1){
        return true;
        break;  
    return false;
    function myDisplayDialog(myFiles, myFolder){
    var myLabelWidth = 112;
    var myStyleNames = myGetParagraphStyleNames(app);
    var myLayerNames = ["Layer 1", "Labels"];
    var myDialog = app.dialogs.add({name:"Image Catalog"});
    with(myDialog.dialogColumns.add()){
      with(dialogRows.add()){
       staticTexts.add({staticLabel:"Information:"});
      with(borderPanels.add()){
       with(dialogColumns.add()){
        with(dialogRows.add()){
         staticTexts.add({staticLabel:"Source Folder:", minWidth:myLabelWidth});
         staticTexts.add({staticLabel:myFolder.path + "/" + myFolder.name});
        with(dialogRows.add()){
         staticTexts.add({staticLabel:"Number of Images:", minWidth:myLabelWidth});
         staticTexts.add({staticLabel:myFiles.length + ""});
      with(dialogRows.add()){
        staticTexts.add({staticLabel:"Options:"});
      with(borderPanels.add()){
       with(dialogColumns.add()){
        with(dialogRows.add()){
         staticTexts.add({staticLabel:"Number of Rows:", minWidth:myLabelWidth});
         var myNumberOfRowsField = integerEditboxes.add({editValue:3});
        with(dialogRows.add()){
         staticTexts.add({staticLabel:"Number of Columns:", minWidth:myLabelWidth});
         var myNumberOfColumnsField = integerEditboxes.add({editValue:3});
        with(dialogRows.add()){
         staticTexts.add({staticLabel:"Horizontal Offset:", minWidth:myLabelWidth});
         var myHorizontalOffsetField = measurementEditboxes.add({editValue:12, editUnits:MeasurementUnits.points});
        with(dialogRows.add()){
         staticTexts.add({staticLabel:"Vertical Offset:", minWidth:myLabelWidth});
         var myVerticalOffsetField = measurementEditboxes.add({editValue:24, editUnits:MeasurementUnits.points});
        with (dialogRows.add()){
         with(dialogColumns.add()){
          staticTexts.add({staticLabel:"Fitting:", minWidth:myLabelWidth});
         with(dialogColumns.add()){
          var myFitProportionalCheckbox = checkboxControls.add({staticLabel:"Proportional", checkedState:true});
          var myFitCenterContentCheckbox = checkboxControls.add({staticLabel:"Center Content", checkedState:true});
          var myFitFrameToContentCheckbox = checkboxControls.add({staticLabel:"Frame to Content", checkedState:true});
        with(dialogRows.add()){
          var myRemoveEmptyFramesCheckbox = checkboxControls.add({staticLabel:"Remove Empty Frames:", checkedState:true});
      with(dialogRows.add()){
        staticTexts.add({staticLabel:""});
      var myLabelsGroup = enablingGroups.add({staticLabel:"Labels", checkedState:true});
      with (myLabelsGroup){
       with(dialogColumns.add()){
        //Label type
        with(dialogRows.add()){
         with(dialogColumns.add()){
          staticTexts.add({staticLabel:"Label Type:", minWidth:myLabelWidth});
         with(dialogColumns.add()){
          var myLabelTypeDropdown = dropdowns.add({stringList:["File name", "File path", "XMP description", "XMP author"], selectedIndex:0});
        //Text frame height
        with(dialogRows.add()){
         with(dialogColumns.add()){
          staticTexts.add({staticLabel:"Label Height:", minWidth:myLabelWidth});
         with(dialogColumns.add()){
          var myLabelHeightField = measurementEditboxes.add({editValue:24, editUnits:MeasurementUnits.points});
        //Text frame offset
        with(dialogRows.add()){
         with(dialogColumns.add()){
          staticTexts.add({staticLabel:"Label Offset:", minWidth:myLabelWidth});
         with(dialogColumns.add()){
          var myLabelOffsetField = measurementEditboxes.add({editValue:0, editUnits:MeasurementUnits.points});
        //Style to apply
        with(dialogRows.add()){
         with(dialogColumns.add()){
          staticTexts.add({staticLabel:"Label Style:", minWidth:myLabelWidth});
         with(dialogColumns.add()){
          var myLabelStyleDropdown = dropdowns.add({stringList:myStyleNames, selectedIndex:0});
        //Layer
        with(dialogRows.add()){
         with(dialogColumns.add()){
          staticTexts.add({staticLabel:"Layer:", minWidth:myLabelWidth});
         with(dialogColumns.add()){
          var myLayerDropdown = dropdowns.add({stringList:myLayerNames, selectedIndex:0});
            var myResult = myDialog.show();
            if(myResult == true){
       var myNumberOfRows = myNumberOfRowsField.editValue;
       var myNumberOfColumns = myNumberOfColumnsField.editValue;
       var myRemoveEmptyFrames = myRemoveEmptyFramesCheckbox.checkedState;
       var myFitProportional = myFitProportionalCheckbox.checkedState;
       var myFitCenterContent = myFitCenterContentCheckbox.checkedState;
       var myFitFrameToContent = myFitFrameToContentCheckbox.checkedState;
       var myHorizontalOffset = myHorizontalOffsetField.editValue;
       var myVerticalOffset = myVerticalOffsetField.editValue;
       var myMakeLabels = myLabelsGroup.checkedState;
       var myLabelType = myLabelTypeDropdown.selectedIndex;
       var myLabelHeight = myLabelHeightField.editValue;
       var myLabelOffset = myLabelOffsetField.editValue;
       var myLabelStyle = myStyleNames[myLabelStyleDropdown.selectedIndex];
       var myLayerName = myLayerNames[myLayerDropdown.selectedIndex];
       myDialog.destroy();
       myMakeImageCatalog(myFiles, myNumberOfRows, myNumberOfColumns, myRemoveEmptyFrames, myFitProportional, myFitCenterContent, myFitFrameToContent, myHorizontalOffset, myVerticalOffset, myMakeLabels, myLabelType, myLabelHeight, myLabelOffset, myLabelStyle,  myLayerName);
      else{
       myDialog.destroy();
    function myGetParagraphStyleNames(myDocument){
    var myStyleNames = new Array;
    var myAddLabelStyle = true;
    for(var myCounter = 0; myCounter < myDocument.paragraphStyles.length; myCounter++){
      myStyleNames.push(myDocument.paragraphStyles.item(myCounter).name);
      if (myDocument.paragraphStyles.item(myCounter).name == "Labels"){
       myAddLabelStyle = false;
    if(myAddLabelStyle == true){
      myStyleNames.push("Labels");
    return myStyleNames;
    function myMakeImageCatalog(myFiles, myNumberOfRows, myNumberOfColumns, myRemoveEmptyFrames, myFitProportional, myFitCenterContent, myFitFrameToContent, myHorizontalOffset, myVerticalOffset, myMakeLabels, myLabelType, myLabelHeight, myLabelOffset, myLabelStyle,  myLayerName){
    var myPage, myFile, myCounter, myX1, myY1, myX2, myY2, myRectangle, myLabelStyle, myLabelLayer;
    var myParagraphStyle, myError;
    var myFramesPerPage = myNumberOfRows * myNumberOfColumns; 
    var myDocument = app.documents.add();
    myDocument.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.points;
    myDocument.viewPreferences.verticalMeasurementUnits = MeasurementUnits.points;
    var myDocumentPreferences = myDocument.documentPreferences; 
    var myNumberOfFrames = myFiles.length;
    var myNumberOfPages = Math.round(myNumberOfFrames / myFramesPerPage);
    if ((myNumberOfPages * myFramesPerPage) < myNumberOfFrames){ 
      myNumberOfPages++;
    //If myMakeLabels is true, then add the label style and layer if they do not already exist.
    if(myMakeLabels == true){
      try{
       myLabelLayer = myDocument.layers.item(myLayerName);
       //if the layer does not exist, trying to get the layer name will cause an error.
       myLabelLayer.name;
      catch (myError){
       myLabelLayer = myDocument.layers.add({name:myLayerName});
      //If the paragraph style does not exist, create it.
      try{
       myParagraphStyle = myDocument.paragraphStyles.item(myLabelStyle);
       myParagraphStyle.name;
      catch(myError){
       myDocument.paragraphStyles.add({name:myLabelStyle});
    myDocumentPreferences.pagesPerDocument = myNumberOfPages; 
    myDocumentPreferences.facingPages = false; 
    var myPage = myDocument.pages.item(0); 
    var myMarginPreferences = myPage.marginPreferences;
    var myLeftMargin = myMarginPreferences.left; 
    var myTopMargin = myMarginPreferences.top; 
    var myRightMargin = myMarginPreferences.right; 
    var myBottomMargin = myMarginPreferences.bottom; 
    var myLiveWidth = (myDocumentPreferences.pageWidth - (myLeftMargin + myRightMargin)) + myHorizontalOffset
    var myLiveHeight = myDocumentPreferences.pageHeight - (myTopMargin + myBottomMargin)
    var myColumnWidth = myLiveWidth / myNumberOfColumns
    var myFrameWidth = myColumnWidth - myHorizontalOffset
    var myRowHeight = (myLiveHeight / myNumberOfRows)
    var myFrameHeight = myRowHeight - myVerticalOffset
    var myPages = myDocument.pages;
    // Construct the frames in reverse order. Don't laugh--this will 
    // save us time later (when we place the graphics). 
    for (myCounter = myDocument.pages.length-1; myCounter >= 0; myCounter--){ 
      myPage = myPages.item(myCounter);
      for (var myRowCounter = myNumberOfRows; myRowCounter >= 1; myRowCounter--){ 
       myY1 = myTopMargin + (myRowHeight * (myRowCounter-1));
       myY2 = myY1 + myFrameHeight;
       for (var myColumnCounter = myNumberOfColumns; myColumnCounter >= 1; myColumnCounter--){ 
        myX1 = myLeftMargin + (myColumnWidth * (myColumnCounter-1));
        myX2 = myX1 + myFrameWidth;
        myRectangle = myPage.rectangles.add(myDocument.layers.item(-1), undefined, undefined, {geometricBounds:[myY1, myX1, myY2, myX2], strokeWeight:0, strokeColor:myDocument.swatches.item("None")}); 
    // Because we constructed the frames in reverse order, rectangle 1 
    // is the first rectangle on page 1, so we can simply iterate through 
    // the rectangles, placing a file in each one in turn. myFiles = myFolder.Files; 
    for (myCounter = 0; myCounter < myNumberOfFrames; myCounter++){ 
      myFile = myFiles[myCounter]; 
      myRectangle = myDocument.rectangles.item(myCounter);
      myRectangle.place(File(myFile));
      myRectangle.label = myFile.fsName.toString();
      //Apply fitting options as specified.
      if(myFitProportional){
       myRectangle.fit(FitOptions.proportionally);
      if(myFitCenterContent){
       myRectangle.fit(FitOptions.centerContent);
      if(myFitFrameToContent){
       myRectangle.fit(FitOptions.frameToContent);
      //Add the label, if necessary.
      if(myMakeLabels == true){
       myAddLabel(myRectangle, myLabelType, myLabelHeight, myLabelOffset, myLabelStyle, myLayerName);
    if (myRemoveEmptyFrames == 1){ 
      for (var myCounter = myDocument.rectangles.length-1; myCounter >= 0;myCounter--){ 
       if (myDocument.rectangles.item(myCounter).contentType == ContentType.unassigned){
        myDocument.rectangles.item(myCounter).remove();
       else{
        //As soon as you encounter a rectangle with content, exit the loop.
        break;
    //Function that adds the label.
    function myAddLabel(myFrame, myLabelType, myLabelHeight, myLabelOffset, myLabelStyleName, myLayerName){
    var myDocument = app.documents.item(0);
    var myLabel;
    var myLabelStyle = myDocument.paragraphStyles.item(myLabelStyleName);
    var myLabelLayer = myDocument.layers.item(myLayerName);
    var myLink =myFrame.graphics.item(0).itemLink;
    //Label type defines the text that goes in the label.
    switch(myLabelType){
      //File name
      case 0:
       myLabel = myLink.name;
       break;
      //File path
      case 1:
       myLabel = myLink.filePath;
       break;
      //XMP description
      case 2:
       try{
        myLabel = myLink.linkXmp.description;
        if(myLabel.replace(/^\s*$/gi, "")==""){
         throw myError;
       catch(myError){
        myLabel = "No description available.";
       break;
      //XMP author
      case 3:
       try{
        myLabel = myLink.linkXmp.author
        if(myLabel.replace(/^\s*$/gi, "")==""){
         throw myError;
       catch(myError){
        myLabel = "No author available.";
       break;
    var myX1 = myFrame.geometricBounds[1];
    var myY1 = myFrame.geometricBounds[2] + myLabelOffset;
    var myX2 = myFrame.geometricBounds[3];
    var myY2 = myY1 + myLabelHeight;
    var myTextFrame = myFrame.parent.textFrames.add(myLabelLayer, undefined, undefined,{geometricBounds:[myY1, myX1, myY2, myX2], contents:myLabel});
    myTextFrame.textFramePreferences.firstBaselineOffset = FirstBaseline.leadingOffset;
    myTextFrame.parentStory.texts.item(0).appliedParagraphStyle = myLabelStyle;   

    "Scripting Forum Conduct
    While this forum is a great place to get scripting help, it's also very easy to misuse it. Before using this forum, please read this post!"

  • Payment Program Creation Date and User (is this in any table in SAP R/3)?

    Dear Experts!
    The treasury guy asked me whether there would be a way to recover the "Payment Program" Creation Date and Created by (User) from Payment Program Executions (F110 transaction).
    I searched on the REGU* tables and I didn't find out this information.
    Does anybody know whether there is any table where this is recorded?
    NOTE: We cannot use the information from "Proposal Log" because the log is removed from the Productive System and only the last 3 (three) days are remaining.
    Thanks and Kind Regards,
    Daniel Carvalho.

    Hello "The Wirtschaftsmann",
    Thanks for the reply. However, I need the Creation Date and Creation by of the Proposal / Payment Run steps.
    Not sure if this information is available nowadays at SAP. I opened an incident with SAP, let's see what they reply to us.
    Regards,
    Daniel

  • Table for Plant Creation Date

    Hi,
    Can anyone tel me the  table name for Plant Creation date .?
    I searched in SDN but DBLOGTAB in my case has ZERO entries .Is thr any other way ?

    Hello,
    So i hope you get the reason why your are not getting the table changes in DBTABLOG
    You should take help of the basis team for doing this. PLease go through the SAP documentation for details:
    [http://help.sap.com/saphelp_nw04/helpdata/en/7e/c81ec852c511d182c50000e829fbfe/content.htm|http://help.sap.com/saphelp_nw04/helpdata/en/7e/c81ec852c511d182c50000e829fbfe/content.htm]
    [http://help.sap.com/saphelp_nw2004s/helpdata/EN/32/a479f0e083fc4386e66380e932497e/content.htm|http://help.sap.com/saphelp_nw2004s/helpdata/EN/32/a479f0e083fc4386e66380e932497e/content.htm]
    BR,
    Suhas

  • Table for Reservation creation Date

    All SAP Gurus,
    What is the Table for Reservation creation Date?
    Regards,

    Hi Vijay,
    Thanks for reply.
    Tables yiu have recommended do not have the reservation creation or updation date.
    Please correct me if I'm wrong.
    Regards,

  • How can I change the file creation date?

    I recently downloaded more than 1,000 photos from my vacation. I'm preparing to burn DVDs for a friend, and I noticed that when I copy the photos to the desktop, they don't all have the same date. I have read a couple of discussions here about the difference between photo creation date and file creation date, and I understand the difference. But something seems odd to me.
    For purposes of illustration, let's take two photos: "A" was taken with the camera in the landscape position (how one normally holds a point-and-shoot); "B" was taken with the camera held in the portrait position (rotated 90 degrees). The photos were taken on April 24, about three minutes apart, but not imported into iPhoto until May 19.
    In iPhoto, both files show the actual creation date. Yay!
    The problem is with the files after having been copied to the desktop.
    When copied to the desktop, the info panel for photo "A" shows April 24 for both the "created" and "modified" dates. Photo "B," however, shows May 19 for the "created" and "modified" dates.
    Apparently, when the "B-style" photos were imported into iPhoto, the app automatically rotated them so that they are viewed correctly (without having to turn your head sideways). This is a very nice feature, but the result is that the file date changes.
    Is there any way to change this? I want the DVD to show the date the photo was created, not imported to iPhoto. Picky, I know … but I'm like that. 

    Apparently, when the "B-style" photos were imported into iPhoto, the app automatically rotated them so that they are viewed correctly (without having to turn your head sideways). This is a very nice feature, but the result is that the file date changes.
    Correct.  Your camera has an Auto-Rotate feature. However, the camera does not actually rotate any pixels in the file, but instead flags it with an instruction: "Display me this way". This is a tag in the Exif metadata. When you import a file with this tag iPhoto creates a modified version. It does this because most of the apps that integrate with it -  email clients, word processors etc - simply don't understand this Exif tag. So if you used the shot in a word processing doc, uploaded it to many Web site etc, the shot would come out sideways.
    iPhoto has nothing to say about File dates. There are various file utilities that will edit the dates on Files
    http://www.macupdate.com/app/mac/11143/a-better-finder-attributes
    for instance. But there are otheers, search on  MacUpdate
    Regards
    TD

Maybe you are looking for

  • Questions on the Tungsten C

    I am a new owner of Tungsten C.  More of a Gearhead than a Techie.  So far it works great and does all that I want, still learning the nuances of the machine.  Hope this is posted in the right area, but I have a couple if questions. The SD slot does

  • Can't Print After Upgrading to Windows 8.1

    My HP4100 is connected via USB adapter, since printer ports no longer come with computers, and my (older) HP4100 requires one.  (I have a HP700 desktop.) After upgrading, the printer was gone from Printer Setup.  I downloaded the "HP Print and Scan D

  • Unknown error -50 while syncing CONTACTS in Windows Vista 64 Bit & iTunes 9

    My operating environment: Windows Vista Home Premium 64 Bit; iTunes 9.0.2.25. iPod is Classic 80 GB, setup for a hard rive also. Music sync is fine. iPod plays the music tracks fine. Problem: Few days back I tried to sync my "contacts" from my Window

  • Kernel Panics when waking from Sleep

    I'm getting many panics sometimes a couple of times of day with a MBP 2.0Ghz. No funny USB devices plugged in. So there is an extra 1GB ram, but a 5 pass Memtest shows the memory as fine. Hardware Diagnostics shows no problems. Is this a hardware fau

  • How to connect Canvas object by line ?

    I want to make an application which can draw object relationship like UML. for example , after i made the replationship between two object (draw line), when i drag one object , the line will be updated automatically .And when i select the connect lin