How do I handle Style Groups in InDesign Scripting?

Hi,
I am relatively new to InDesign scripting.
I'm trying to map Paragraph Styles to CSS, and it seemed to be working fine, till I came across Style Groups -
Styles belonging to a group are identified as - Root Style Group name : Child style group name : ...... : Style name
Because of this paragraph style  <Style name> was not mapping to the TOC style <Root Style Group name : Child style group name : ...... : Style name> and my TOC styles were not correctly mapping.
I wrote a fix for this in my app, by fetching parent groups and appending to a string - which i check in the TOC style entries.
Before calling this a FIX, I need to confirm if there are any more hierarchies/represnetations that could be used to represent a Paragraph Style as a TOC style? I don't want to see that a week later I discover something like <Style : Nested paragraph style> as a TOC style and then I'd have to fix my fix!
Thanks.

Hi,
If YourPara is a paragraph style in myDoc and defined inside group of styles named myStGroup
you can refer to it using:
myDoc.paragraphStyleGroups.item("myStGroup").paragraphStyles.item("YourPara");
Jarek

Similar Messages

  • How to delte empty Style Group from paragraph style palette

    Hi Guys,
    I want to delete my empty paragraphStyleGroups folder that are Style Group 1and Style Group 3 (see pic) from my palette.
    I need a js code for this task.
    I have created script but it deletes all the Style group from my panel.
    Here is the script:
    myDoc=app.activeDocument;
    myStyleGroup=myDoc.paragraphStyleGroups;
    for(p=0;p<myStyleGroup.length;p++)
    myStyleGroup[p].remove();
    Please suggest!
    Chang

    You are awesome man.
    It is working as I need. Thanks again Kasyan.
    Regards,
    Chang

  • [JS InDesign CS3] Style groups, begone! (or: How do I take paragraph and character styles out of style groups?)

    Sorry for this question (and my terrible English, by the way), I'm a javascript noob and I know when I've reached my limits.
    Well, I'm trying to take a set of paragraph and character styles out of the style groups they are placed in, in hundreds of InDesign documents (that cannot be treated as a book). As far as I've tried (thanks to the invaluable help of previous posts in this forum) I've been able to move a style into a group and change it's position inside the group, inside the root level or even between groups. But it doesn't matter how I try, I don't know which move reference should I try in case I want to take every style out of their style group and place them after their original group folder, at the [Root] style level .
    I have tried:
    var doc=app.activeDocument;
    var pGroups=doc.paragraphStyleGroups;
    for (i=pGroups.length-1; i>=0; i--){
         var pStylesInGroup=pGroups[i].paragraphStyles;
         for (j=pStylesInGroup.length-1; j>=0; j--){
    // Here I am, trying to move a style outside the folder that contains it, and failing miserably.
              pStylesInGroup[j].move (LocationOptions.after, pGroups[i]);
    It didn't work, the script sent an invalid parameter value in the reference field, so I cant use the group folder itself as reference.
    Tried other (obviously wrong) solutions, like use the first available style as reference. Therefore, my second script was
    var doc=app.activeDocument;
    var pStyles=doc.allParagraphStyles;
    var pGroups=doc.paragraphStyleGroups;
    for (i=pGroups.length-1; i>=0; i--){
         var pStylesInGroup=pGroups[i].paragraphStyles;
         for (j=pStylesInGroup.length-1; j>=0; j--){
    // Now I try placing the styles after the [Basic Paragraph], that is, the second paragraph style in the document style list
              pStylesInGroup[j].move (LocationOptions.after, pStyles[1]);
    It didn't work either, another invalid parameter in the reference field. Similar results with my other attempts (I even tried "[Root]" as literal with similar luck).
    So, my question is: Which command (or script, in case my whole approach is utterly wrong) should I use to achieve my goal?
    Thanks in advance to whoever decides to spend more than a minute thinking about my humble worries, and my apologies for shamelessly ripping some of your lines of code for my purposes.

    Okay, tried a few things and got really weird results!
    1. You can move a style around inside its group.
    2. You can move a style out of a group "to" another, but it will appear 'inside' that style. I got my test style as a sub-item of [Basic Paragraph], using index #1. With index #0 ([No Paragraph Style]) InDesign crashed.
    3. You can duplicate the style, but then you get a copy in the same group. Still no luck.
    4. Finally! What is the parent of a paragraph style?
    Document | Application | ParagraphStyleGroup
    "Application" is easy -- that's when you make a style global. So what's the difference between 'Document' and 'paragraphStyleGroup'? Simple -- well, when you finally get it...
    pStylesInGroup[j].move (LocationOptions.AT_END, doc);
    moves the style out of the group and to the end of the list in the document. I don't think it's possible to move it directly to a specific position into the main style list -- you first have to move it out of a group, then move it around in its own list.
    Fortunately, it returns its new position as a ParagraphStyle again, so if needed, you can use
    newStyle = pStylesInGroup[j].move (LocationOptions.AT_END, doc);
    newStyle.move (LocationOptions.AFTER, pStyles[1]);
    -- I didn't really try that out, but it should work.

  • How to handle Multile Table Group in InDesign

    my XML file having multiple table group tables content but InDesign not supporting while importing xml files?.. could please help and suggest any buddy how to handle multiple table group in InDesign.... because i received many jobs xml workflow with multiple table group.

    its urgent

  • How to PRINT a CD booklet in Indesign CS 5?

    I think it's alittle funny that our professor at my 4yr college is teaching us how to make a CD booklet in Indesign using Masterpages and yet he doesn't know how to print it out.
    Well I'm having trouble printing mine out. I'm making a CD booklet for a singer I like and put lyrics/backgrounds on each document.
    But, since there is two columns on one page, i made the same background stretched across, so that each page/document had a theme. My teacher said this had something to do with pagination and he didn't know how to print it out.
    this is how the pages are setup in indesign masterpages:
    1 (this is the cover)
    2-3
    4-5
    6-7
    8-9
    10-11
    12-13
    14-15
    16-17
    18 (this is the back cover)
    So whenever i print them out the pictures are not matching up right, to where if i folded each page, each page is not matching the theme.
    So here are some screenshots, I'm turning this in next week, and would really appreciate help on the printing parts!! Also, when they print out they are printing upside down i dont know how to fix this.
    and this was taken with my phone, see the images dont match up right, and also want them to be not backwards on the back. I am printing these double sided pages!
    please help thank you as this is also a learning process fot me!

    There's a problem, I think, with Petteri's solution, and that's that he's got all the extra pages to the right of the spine.  When you do island spreads you have to be sure that you have some sort of symmetry so the pages will back up properly, whether in this case you have all the spreads with two pages on either side of the spine, or if you alternate sides with the ones and threes.
    But I can see now why your instructor said he didn't know how you would print this. you want 4 pages together (or two double-width pages, which would be another way to set it up). That combined width is bigger than any sheet of paper that is likely to run in your printers without tiling and pasting the pages together at some point. It would be no problem on a press, but you aren't going to run one booklet on a press. If your printers can handle 13 x 19 sheets you might be able to find a printer willing to cut you some from a lerger sheet, or you might be able to find a ream someplace, but it will be expensive and you might not get the stock you want, and even on that size sheet I'm afraid you'd have clipping on the outer left and right ends where you run into the non-printing area on the edge of the sheet. The other option would be to run on a wide-format inkjet plotter.
    Ask your professor if you can print this at reduced size as a proof of concept and you may be able to output on equipment that is available to you at school.
    But that brings us back to the problem of page count. Your example has 12 panels, not 18. If you want to have a 4-panel spread like this, you need to be working in multiples of 8 panels for your design -- 4 panels on each side of the sheet. You can leave some blank if you want to, but you need to conscioulsly put those blanks where you want them.

  • How do you handle multiple at the same address?

    My wife just got an iMac. She is using the Birthday feature in Address Book and iCal to track our friends and family birthdays and anniversaries.
    Question:
    How do you track it when multiple people are at the same address? For instance, our friends are a family of four, but they all live at the same address. Do you need to make a separate Address Book card for each of them, even the 1 year old baby? Or can you track multiple people in a single card with custom fields?
    If you do need to make multiple cards, then how do you handle mailing lists? For instance, if I make separate cards for all four of them, how do I make sure I only send on Christmas card when I use my Mac to print labels?
    Thanks for any advice.

    This is really an issue that you're going to have to resolve yourself since Apple's address book isn't really built with this in mind - darn it. For me there are three scenarios. First, a singleton. No problem. Second a family for which all members share the same information - acquantences to whom I don't send birthday greetings. These get one card and I'll put in both (or all) their names in the first name field (as in Bob and Jean). If there are children, in the last name field I'll add 'and Ken' or 'and the kids'. Third, a family for which some fields are different - perhaps cell phone number, birthday, etc.
    For mailing purposes, I create a holiday group and put the people I'll be sending cards to into the group.

  • How best to handle multiple web sites using iWeb 08

    I currently am using iWeb08. I am maintaining two websites; The church site resides on a Rogers server. I use Transmit as a FTP loader. The other site is an engineering society's website that is posted on Apple's server. I have an ME account just for the latter group. iWebsites is used to alternate between the two sites. The church group has a .ca web address.
    Is it worth upgrading to iWeb 09? How does iWeb09 handle 2 websites? I wish I could publish both to the Mac account but have not figured out how. I must retain the rogers account for viewing the church site
    Has anyone deleted iWebsites from OX10.5.6? How was it done? I know that backups are mandatory before attempting these changes.
    Thanks,
    Bill

    In its current form, iWeb '09 doesn't handle publishing well at all!
    I keep all my sites on separate domain files, each in their own folder. Any site is launched in iWeb by double clicking the domain file. I start each new site from a new, blank domain file.
    I keep all my website folders in a folder in a second dock so that I can launch any site with two mouse clicks - faster than you can launch iWebsites!
    You can publish as many sites as you want to one MobileMe account but you can only have domain name forwarded as Cname. Any more have to use masking with all its inherent problems.
    I would be more inclined to dump MobileMe and publish both sites to a decent hosting company.
    The new iWeb '09 FTP works for some. I have tested it with my server - Host Excellence - which doesn't force you to upload to a Public_html folder and this goes as planned.
    Having said that, I still publish to a local folder as I optimize and upload my files using Web Site Maestro. Once you have published your site for the first time, this application will then use its Smart Handling feature to process the changed files only.
    Unless all your viewers use Macs you have to optimize to get your pages to download in that browser that all the Fred Flintstones of the world use.

  • How do I handle large resultsets in CRXI without a performance issue?

    Hello -
    Problem Definition
    I have a performance problem displaying large/huge resultset of data on a crystal report.  The report takes about 4 minutes or more depending on the resultset size.
    How do you handle large resultsets in Crystal Reports without a performance issue?
    Environment
    Crystal Reports XI
    Apache WebSvr 2.X, Jboss 4.2.3, Struts
    Java Reporting Component (JRC),Crystal Report Viewer (CRV)
    Firefox
    DETAILS
    I use the CRXI thick client to build my report (.rpt) and then use it in my webapplication (webapp) under Jboss.
    User specifies the filter criteria to generate a report (date range etc) and submits the request to the webapp.  Webapp  queries the database, gets a "resultset".
    I initialize the JRC and CRV according to all the specifications and finally call the "processHttpRequest" method of Crystal Report Viewer to display the report on browser.
    So.....
    - Request received to generate a report with a filter criteria
    - Query DB to get resultset
    - Initialize JRC and CRV
    - finally display the report by calling
        reportViewer.processHttpRequest(request, response, request.getSession().getServletContext(), null);
    The performance problem is within the last step.  I put logs everywhere and noticed that database query doesnt take too long to return resultset.  Everything processes pretty quickly till I call the processHttpRequest of CRV.  This method just hangs for a long time before displaying the report on browser.
    CRV runs pretty fast when the resultset is smaller, but for large resultset it takes a long long time.
    I do have subreports and use Crystal report formulas on the reports.  Some of them are used for grouping also.  But I dont think Subreports is the real culprit here.  Because I have some other reports that dont have any subreports, and they too get really slow displaying large resultsets.
    Solutions?
    So obviously I need a good solution to this generic problem of "How do you handle large resultsets in Crystal Reports?"
    I have thought of some half baked ideas.
    A) Use external pagination and fetch data only for the current page being displayed.  But for this, CRXI must allow me to create my own buttons (previous, next, last), so I can control the click event and fetch data accordingly.  I tried capturing events by registering event handler "addToolbarCommandEventListener" of CRV.  But my listener gets invoked "after" processHttpRequest method completes, which doesnt help.
    Some how I need to be able to control the UI by adding my own previous page, next page, last page buttons and controlling it's click events. 
    B) Automagically have CRXI use a javascript functionality, to allow browser side page navigation.  So maybe the first time it'll take 5 mins to display the report, but once it's displayed, user can go to any page without sending the request back to server.
    C) Try using Crystal Reports 2008.  I'm open to using this version, but I couldnt figureout if it has any features that can help me do external pagination or anything that can handle large resultsets.
    D) Will using the Crystal Reports Servers like cache server/application server etc help in any way?  I read a little on the Crystal Page Viewer, Interactive Viewer, Part Viewer etc....but I'm not sure if any of these things are going to solve the issue.
    I'd appreciate it if someone can point me in the right direction.

    Essentialy the answer is use smaller resultsets or pull from the database directly instead of using resultsets.

  • Labor for purchase - How do we handle that?

    Hi Forum,
    When an item is Labor or Travel, it is available only for sales? How do you handle a Contract Wage that you buy for 75 dollars an hour but sell it for 150 dollars an hour?
    Yes we can make the above item a non-inventory regular item (that is not a labor item). Is that right?
    When do we use Labor Item as given in SAP B1 then? When actually selling services such as Professional services?
    Thanks.

    I just read the help over again : it is fairly clear -
    To define an item as non-inventory, deselect the Inventory Item checkbox. Items such as services, electricity or labor costs are typical non-inventory items. The additional costs resulting from such non-inventory items are included in the production order. Non-inventory items must use the standard evaluation method and have an expense account (unless it is an item group).
    When you define an item as non-inventory, on the Item Master Data: Inventory Data Tab, you can define the valuation method as standard, and set an item cost for that item. Then, when you base the gross profit on the item cost, the base prices for non-inventory items are included in the calculation of gross profit.
    You can change an inventory item to non-inventory, or the opposite, provided that:
    No transactions have been posted for the item
    There are no documents for the item, that is, sales quotation, sales order, purchase order, A/R or A/P down payment request, or draft
    Item Type Select one of the following:
    Items u2013 to define as an SAP Business One item.
    Labor u2013 to use in the Service module to calculate the amount of time spent completing a task.
    Travel u2013 to use in the Service module to calculate the amount of time the technician spends traveling.
    Service type item on the fly is only for onte time occurance. So not suitable for recurring purchasing.
    Service u2013 to create a purchasing document for a service, such as a one-time consultation, that has not been defined as an Item in SAP Business One.

  • How to unlink text to link in indesign cs6

    dear all
    any one tell me how to unlink text to link in indesign cs6...
    regards
    simbu_devan

    Willi Adelberger wrote:
    You need to set up 1 paragraph style for each level.
    In each paragraph style got to the section "Bullets & Numbering"
    Set to numbering, set each paragraph style to the corresponding level. For each level add in the numbering field the placeholder for the same level, in the second and third level set the placeholder and the dot before the actual level for the first and the second level (this only for the third level of course).
    It is also a goot idea to create and select a list which can be done in the same dialog. It would work without a list but it is better to use a list to not get numbering problems with ohter numbered lists in the document.
    Search Google for terms like "multi-level automatic numbering in indesign" without quotes.
    HTH
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices    

  • How can we handle multiple applications in session method

    how can we handle multiple applications in .. session method.
    can any body reply me.
    thanks

    Hari,
    hi Check out this sample code to use session method
    REPORT  ztest_report
    NO STANDARD PAGE HEADING
                            LINE-SIZE 255
                            MESSAGE-ID ZRASH.
                    Internal Table Declarations                          *
    *--Internal Table for Data Uploading.
    DATA : BEGIN OF IT_FFCUST OCCURS 0,
             KUNNR(10),
             BUKRS(4),
             KTOKD(4),
             ANRED(15),
             NAME1(35),
             SORTL(10),
             STRAS(35),
             ORT01(35),
             PSTLZ(10),
             LAND1(3),
             SPRAS(2),
             AKONT(10),
           END OF IT_FFCUST.
    *--Internal Table to Store Error Records.
    DATA : BEGIN OF IT_ERRCUST OCCURS 0,
             KUNNR(10),
             EMSG(255),
           END OF IT_ERRCUST.
    *--Internal Table to Store Successful Records.
    DATA : BEGIN OF IT_SUCCUST OCCURS 0,
             KUNNR(10),
             SMSG(255),
           END OF IT_SUCCUST.
    *--Internal Table for Storing the BDC data.
    DATA : IT_CUSTBDC LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
    *--Internal Table for storing the messages.
    DATA : IT_CUSTMSG LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    DATA : V_FLAG1(1) VALUE ' ',
    "Flag used for opening session.
           V_TLINES LIKE SY-TABIX,
           "For storing total records processed.
           V_ELINES LIKE SY-TABIX,
           "For storing the no of error records.
           V_SLINES LIKE SY-TABIX.
           "For storing the no of success records.
             Selection screen                                            *
    SELECTION-SCREEN BEGIN OF BLOCK B1.
    PARAMETERS : V_FNAME LIKE RLGRAP-FILENAME,
                 V_SESNAM  LIKE RLGRAP-FILENAME.
    SELECTION-SCREEN END OF BLOCK B1.
             Start-of-selection                                          *
    START-OF-SELECTION.
    *-- Form to upload flatfile data into the internal table.
      PERFORM FORM_UPLOADFF.
           TOP-OF-PAGE                                                   *
    TOP-OF-PAGE.
      WRITE:/ 'Details of the error and success records for the transaction'
      ULINE.
      SKIP.
             End of Selection                                            *
    END-OF-SELECTION.
    *-- Form to Generate a BDC from the Uploaded Internal table
      PERFORM FORM_BDCGENERATE.
    *--To write the totals and the session name.
      PERFORM FORM_WRITEOP.
    *&      Form  form_uploadff
        Form to upload flatfile data into the internal table.
    FORM FORM_UPLOADFF .
    *--Variable to change the type of the parameter file name.
      DATA : LV_FILE TYPE STRING.
      LV_FILE = V_FNAME.
    *--Function to upload the flat file to the internal table.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          FILENAME                      =  LV_FILE
        FILETYPE                      = 'ASC'
          HAS_FIELD_SEPARATOR           = 'X'
        HEADER_LENGTH                 = 0
        READ_BY_LINE                  = 'X'
        DAT_MODE                      = ' '
      IMPORTING
        FILELENGTH                    =
        HEADER                        =
        TABLES
          DATA_TAB                      = IT_FFCUST
        EXCEPTIONS
          FILE_OPEN_ERROR               = 1
          FILE_READ_ERROR               = 2
          NO_BATCH                      = 3
          GUI_REFUSE_FILETRANSFER       = 4
          INVALID_TYPE                  = 5
          NO_AUTHORITY                  = 6
          UNKNOWN_ERROR                 = 7
          BAD_DATA_FORMAT               = 8
          HEADER_NOT_ALLOWED            = 9
          SEPARATOR_NOT_ALLOWED         = 10
          HEADER_TOO_LONG               = 11
          UNKNOWN_DP_ERROR              = 12
          ACCESS_DENIED                 = 13
          DP_OUT_OF_MEMORY              = 14
          DISK_FULL                     = 15
          DP_TIMEOUT                    = 16
          OTHERS                        = 17
      IF SY-SUBRC = 0.
    *--Deleting the headings from the internal table.
        DELETE IT_FFCUST INDEX 1.
    *--Getting the total number of records uploaded.
        DESCRIBE TABLE IT_FFCUST LINES V_TLINES.
      ENDIF.
    ENDFORM.                    " form_uploadff
    *&      Form  Form_bdcgenerate
        Form to Generate a BDC from the Uploaded Internal table
    FORM FORM_BDCGENERATE .
    *--Generating the BDC table for the fields of the internal table.
      LOOP AT IT_FFCUST.
        PERFORM POPULATEBDC USING :
                                    'X' 'SAPMF02D' '0105',
                                    ' ' 'BDC_OKCODE'  '/00' ,
                                    ' ' 'RF02D-KUNNR' IT_FFCUST-KUNNR,
                                    ' ' 'RF02D-BUKRS' IT_FFCUST-BUKRS,
                                    ' ' 'RF02D-KTOKD' IT_FFCUST-KTOKD,
                                    'X' 'SAPMF02D' '0110' ,
                                    ' ' 'BDC_OKCODE'  '/00',
                                    ' ' 'KNA1-ANRED'  IT_FFCUST-ANRED,
                                    ' ' 'KNA1-NAME1' IT_FFCUST-NAME1,
                                    ' ' 'KNA1-SORTL'  IT_FFCUST-SORTL,
                                    ' ' 'KNA1-STRAS' IT_FFCUST-STRAS,
                                    ' ' 'KNA1-ORT01' IT_FFCUST-ORT01,
                                    ' ' 'KNA1-PSTLZ' IT_FFCUST-PSTLZ,
                                    ' ' 'KNA1-LAND1' IT_FFCUST-LAND1,
                                    ' ' 'KNA1-SPRAS' IT_FFCUST-SPRAS,
                                    'X' 'SAPMFO2D' '0120',     
                                    ' ' 'BDC_OKCODE'  '/00',
                                    'X' 'SAPMF02D' '0125',     
                                    ' ' 'BDC_OKCODE'  '/00',
                                    'X' 'SAPMF02D' '0130',     
                                    ' ' 'BDC_OKCODE'  '=ENTR',
                                    'X' 'SAPMF02D' '0340',     
                                    ' ' 'BDC_OKCODE'  '=ENTR',
                                    'X' 'SAPMF02D' '0360',
                                    ' ' 'BDC_OKCODE'  '=ENTR',
                                    'X' 'SAPMF02D' '0210',     
                                    ' ' 'KNB1-AKONT'  IT_FFCUST-AKONT,
                                    ' ' 'BDC_OKCODE'  '/00',
                                    'X' 'SAPMF02D' '0215',
                                    ' ' 'BDC_OKCODE'  '/00',
                                    'X' 'SAPMF02D' '0220',     
                                    ' ' 'BDC_OKCODE'  '/00',
                                    'X' 'SAPMF02D' '0230',     
                                    ' ' 'BDC_OKCODE'  '=UPDA'.
    *--Calling the transaction 'fd01'.
        CALL TRANSACTION 'FD01' USING IT_CUSTBDC MODE 'N' UPDATE 'S'
        MESSAGES INTO IT_CUSTMSG.
        IF SY-SUBRC <> 0.
    *--Populating the error records internal table.
          IT_ERRCUST-KUNNR = IT_FFCUST-KUNNR.
          APPEND IT_ERRCUST.
          CLEAR IT_ERRCUST.
    *--Opening a session if there is an error record.
          IF V_FLAG1 = ' '.
            PERFORM FORM_OPENSESSION.
            V_FLAG1 = 'X'.
          ENDIF.
    *--Inserting the error records into already open session.
          IF V_FLAG1 = 'X'.
            PERFORM FORM_INSERT.
          ENDIF.
    *--Populating the Success records internal table.
        ELSE.
          IT_SUCCUST-KUNNR = IT_FFCUST-KUNNR.
          APPEND IT_SUCCUST.
          CLEAR IT_SUCCUST.
        ENDIF.
    *--Displaying the messages.
        IF NOT IT_CUSTMSG[] IS INITIAL.
          PERFORM FORM_FORMATMSG.
        ENDIF.
    *--Clearing the message and bdc tables.
        CLEAR : IT_CUSTBDC[],IT_CUSTMSG[].
      ENDLOOP.
    *--Getting the total no of error records.
      DESCRIBE TABLE IT_ERRCUST LINES V_ELINES.
    *--Getting the total no of successful records.
      DESCRIBE TABLE IT_SUCCUST LINES V_SLINES.
    *--Closing the session only if it is open.
      IF V_FLAG1 = 'X'.
        PERFORM FORM_CLOSESESS.
      ENDIF.
    ENDFORM.                    " Form_bdcgenerate
    *&      Form  populatebdc
          FOrm to Populate the BDC table.
    FORM POPULATEBDC  USING    VALUE(P_0178)
                               VALUE(P_0179)
                               VALUE(P_0180).
      IF P_0178 = 'X'.
        IT_CUSTBDC-PROGRAM = P_0179.
        IT_CUSTBDC-DYNPRO = P_0180.
        IT_CUSTBDC-DYNBEGIN = 'X'.
      ELSE.
        IT_CUSTBDC-FNAM = P_0179.
        IT_CUSTBDC-FVAL = P_0180.
      ENDIF.
      APPEND IT_CUSTBDC.
      CLEAR IT_CUSTBDC.
    ENDFORM.                    " populatebdc
    *&      Form  FORM_OPENSESSION
          Form to Open a session.
    FORM FORM_OPENSESSION .
    *--Variable to convert the given session name into reqd type.
      DATA : LV_SESNAM(12).
      LV_SESNAM = V_SESNAM.
    *--Opening a session.
      CALL FUNCTION 'BDC_OPEN_GROUP'
       EXPORTING
         CLIENT                    = SY-MANDT
         GROUP                     = LV_SESNAM
         HOLDDATE                  = '20040805'
         KEEP                      = 'X'
         USER                      = SY-UNAME
         PROG                      = SY-CPROG
    IMPORTING
       QID                       =
       EXCEPTIONS
         CLIENT_INVALID            = 1
         DESTINATION_INVALID       = 2
         GROUP_INVALID             = 3
         GROUP_IS_LOCKED           = 4
         HOLDDATE_INVALID          = 5
         INTERNAL_ERROR            = 6
         QUEUE_ERROR               = 7
         RUNNING                   = 8
         SYSTEM_LOCK_ERROR         = 9
         USER_INVALID              = 10
         OTHERS                    = 11
      IF SY-SUBRC <> 0.
        WRITE :/ 'Session not open'.
      ENDIF.
    ENDFORM.                    " FORM_OPENSESSION
    *&      Form  FORM_INSERT
          fORM TO INSERT ERROR RECOED INTO A SESSION.
    FORM FORM_INSERT .
    *--Inserting the record into session.
      CALL FUNCTION 'BDC_INSERT'
        EXPORTING
          TCODE                  = 'FD01'
        POST_LOCAL             = NOVBLOCAL
        PRINTING               = NOPRINT
        SIMUBATCH              = ' '
        CTUPARAMS              = ' '
        TABLES
          DYNPROTAB              = IT_CUSTBDC
        EXCEPTIONS
          INTERNAL_ERROR         = 1
          NOT_OPEN               = 2
          QUEUE_ERROR            = 3
          TCODE_INVALID          = 4
          PRINTING_INVALID       = 5
          POSTING_INVALID        = 6
          OTHERS                 = 7
      IF SY-SUBRC <> 0.
        WRITE :/ 'Unable to insert the record'.
      ENDIF.
    ENDFORM.                    " FORM_INSERT
    *&      Form  FORM_CLOSESESS
          Form to Close the Open Session.
    FORM FORM_CLOSESESS .
      CALL FUNCTION 'BDC_CLOSE_GROUP'
        EXCEPTIONS
          NOT_OPEN    = 1
          QUEUE_ERROR = 2
          OTHERS      = 3.
      IF SY-SUBRC <> 0.
      ENDIF.
    ENDFORM.                    " FORM_CLOSESESS
    *&      Form  FORM_FORMATMSG
          Form to format messages.
    FORM FORM_FORMATMSG .
    *--Var to store the formatted msg.
      DATA : LV_MSG(255).
      CALL FUNCTION 'FORMAT_MESSAGE'
        EXPORTING
          ID        = SY-MSGID
          LANG      = SY-LANGU
          NO        = SY-MSGNO
          V1        = SY-MSGV1
          V2        = SY-MSGV2
          V3        = SY-MSGV3
          V4        = SY-MSGV4
        IMPORTING
          MSG       = LV_MSG
        EXCEPTIONS
          NOT_FOUND = 1
          OTHERS    = 2.
      IF SY-SUBRC = 0.
        WRITE :/ LV_MSG.
      ENDIF.
      ULINE.
    ENDFORM.                    " FORM_FORMATMSG
    *&      Form  form_writeop
          To write the totals and the session name.
    FORM FORM_WRITEOP .
      WRITE :/ 'Total Records Uploaded :',V_TLINES,
               / 'No of Error Records :',V_ELINES,
               / 'No of Success Records :',V_SLINES,
               / 'Name of the Session :',V_SESNAM.
      ULINE.
    ENDFORM.                    " form_writeop
    Don't forget to reward if useful..

  • FindChangeByList script question, re: when a style is part of a style group

    Hi,
    I'm using InDesign's FindChangeByList script and am running into a problem.
    Here is the problem line:
    grep {findWhat:"^."} {appliedParagraphStyle:app.activeDocument.paragraphStyleGroups.item("Text").paragraphStyles.item("Body2.TextIndent"), changeConditionsMode:1919250519} {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:true} //Change everything to Text.indent2 style
    What I am trying to do is format every paragraph with the style called "Body2.TextIndent" which is located in my style sheets under a group called "Text"
    This line is not working for me; I get a JavaScript  "Error #17. Error string: variable name expected."
    Please note that I CAN get this line to work just fine if I use a style that is NOT in a group. For instance, this line works fine for me:
    grep {findWhat:"^."} {appliedParagraphStyle:"Body2.TextIndent", changeConditionsMode:1919250519} {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:true} //Change everything to Text.indent2 style
    The problem is apparently that the FindChangeByList script doesn't like style groups. I found this by Googling the internet and found this link:
    http://www.listsearch.com/indesign/Thread/index.lasso?17986
    Can anyone help?
    Thanks.

    Kasyan, it works for me now! THANKS! One thing... I notice that in your line, you removed the part "changeConditionsMode:1919250519". Maybe that was the problem? I'm new to scripting. What does that line do? Can I leave it out?
    p.s. I'm using CS4 on Windows XP Pro

  • Another glitch in script using Style Groups

    Hello,
    Everythig was going fine till it started to get complex. I was hoping to adapt a script for cleaning up multiple character styles so that it would work with character styles in a style group, but I get an undefined variable error. Not quite sure how to get round this. It fails on line 3 of the below (this has been simplified for clarity). I'm obviously missing something in terms of defining the Style Group properly as a variable (I get the error "undefined is not an object"). What have I missed?
    var CharStyle = app.activeDocument.characterStyleGroups.item(STYLE GROUP NAME').characterStyles.item['STYLE 1', 'STYLE 2', 'STYLE 3'];
    var myFind = ['(?<=\\w)\\s(?!.)', '(?<=.)[,;:\\.]\\s?(?!.)', '(?<!.)\\s(?=.+)', '(?<!.)[\\s,;:\\.](?!.)'];
    for (var i = 0; i < CharStyle.length; i++){
    app.findGrepPreferences.appliedCharacterStyle = CharStyle[i];
        for (var k = 0; k < myFind.length; k++){
        app.findGrepPreferences.findWhat = myFind[k];
        var f = app.activeDocument.findGrep();
            for (var j = 0; j < f.length; j++){
            f[j].appliedCharacterStyle = myDoc.allCharacterStyles[0];
            f[j].fillColor = f[j].appliedParagraphStyle.fillColor;

    Hi I have figured it out on my own just today coz what apple suggested didn't help much so I just have to do it by myself.
    This is what you need to do:
    open your computer and search for autoplay, it will open rightaway and then scroll down look for your device then change "ask everything" to "import photos and videos in windows" connect your ipad again then tthe import box will open.. and your good!
    i hope this will help you. Good luck! :-)

  • How can I do a group email

    Want to know how I can send a group email from mail on my iPad. Have the group set up but will it send as a group as in mail on my MacBook?

    Hi David
    I am afraid you can't do that as standard on iPad.
    There are a number of apps available that will allow you to create email groups and send them available on the App Store. Most of these use their own emailing program to send emails to groups.
    Our app "MailShot" is the only app that can use them to create special contacts in your address book that can then be used from most apps on your iPad (including Mail, Photos etc.) It also provides the only way to forward emails with all their attachments on to groups. It can also now import groups straight from your address book into MailShot groups.
    It is free to try for a small number of contacts, and with an in-app upgrade to Pro it can handle up to 50 groups of 50 or more contacts. Try it out on http://www.itunes.com/apps/mailshot.
    In the interests of full disclosure, I am the developer of MailShot and may benefit from its sale.
    Cheers
    Peter
    Soluble Apps

  • How can I force a group of checkboxes using imported PDF forms

    how can I force a group of checkboxes when using imported PDF forms,
    My checkboxes are single fields rather than a group, the form is design using indesign?

    The PDF file format doesn't support grouping check-boxes into a multi-choice field. Because of that, FormsCentral just represents them as check boxes.
    Randy

Maybe you are looking for

  • Anchor a button upper right in a panel?

    Have to anchor a button upper right in a panel.  Need it to stay anchored even when I use resize and move effects on the panel.  Want the button up top, not in the panel's content pane. The only way I know to get a button up there is to put it in the

  • Users with a https home page are not redirected when using web-passthrough on WLC 5508

    I have a Cisco 5508 running version 7.0.116.0.  This controller hosts an open public wifi that requires users to accept a terms agreement via a Web-Passthrough setup that redirects them to the terms splash page.  For most people this works without an

  • Images disappearing / being painted over

    Hi, Not especially familiar with images and am having issues with images being painted over when ever I move or adjust the size of my GUI. I built a majority of the GUI using the Form Designer included with Netbeans. Would really appreciate any advic

  • Cumulative results

    Hi 1. can any one explain me what do we mean by cumulative results for payroll. 2. How to retreive payroll data report, Are there any specific function modules to US payroll results. Thanks

  • Subcontracting Release

    Hi, In subcontracting PO when i am transferring material to SC by MB1B system allows me to transfer even if PO is not released, but while accepting i.e at time of GRN it doesn't allow me to do GRN system says PO not released. Why does system allow me