Move function from c++

I have function in C++ this below.
int SGclass::FormatBCD_Byte(unsigned char sInput, int iNumByte, char sOutput)
     for(int i=0;i < iNumByte;i++){
          printf("Value = %02X\n",*(sInput+i));     
     while( iNumByte > 0 )
          sprintf(sOutput, "%02X", *(sInput+iNumByte-1));
          sOutput += 2;
          iNumByte--;
     return(0);
please help me for convert to methode in java language .
Thank you.

Thank you for reply below display all sourcecode.
#include "mms.hxx"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
MMS::MMS()
MMS::~MMS()
int MMS::Convert(char *sFileName)
     return(0);
int MMS::Dump(char *sFileName)
     unsigned int i, iRecNumber;
     FILE *pMMS_File;
     unsigned char sDataBuff[CDR_BLOCK_SIZE];
     char sTmp[80];
     char *pEndPtr;
     pMMS_File = fopen(sFileName, "r");
     iRecNumber = 1;
     while( fread(sDataBuff, sizeof(sDataBuff), 1, pMMS_File) )
          i = 0;
          while( i <= sizeof(sDataBuff) )
               if( (sDataBuff==0x79)&&(sDataBuff[i+1]==0x00)&&(sDataBuff[i+2]==0x00)&&(sDataBuff[i+3]==0xFF) )
                    printf("(%06d) ******************************[ HEADER ]******************************\n", iRecNumber);
                    pMMS_Header = (struct MMS_HeaderStruct *)&sDataBuff[i];
                    printf("(%06d) %33s : [%ld][%02Xh]\n", iRecNumber, "RECORD LENGTH", pMMS_Header->hwRecordLength, pMMS_Header->hwRecordLength);
                    FormatHEX_Byte(pMMS_Header->hbRecordType, sizeof(pMMS_Header->hbRecordType), sTmp);
                    printf("(%06d) %33s : [%ld][%sh]\n", iRecNumber, "RECORD TYPE", strtol(sTmp, &pEndPtr, 16), sTmp);
                    FormatHEX_Byte(pMMS_Header->hbSpare, sizeof(pMMS_Header->hbSpare), sTmp);
                    printf("(%06d) %33s : [%ld][%sh]\n", iRecNumber, "SPARE", strtol(sTmp, &pEndPtr, 16), sTmp);
                    FormatHEX_Word(pMMS_Header->hwTapeBlockType, sTmp);
                    printf("(%06d) %33s : [%ld][%sh]\n", iRecNumber, "TAPE BLOCK TYPE", strtol(sTmp, &pEndPtr, 16), sTmp);
                    printf("(%06d) %33s : [%ld][%02Xh]\n", iRecNumber, "DATA LENGTH IN BLOCK", pMMS_Header->hwDataLengthInBlock, pMMS_Header->hwDataLengthInBlock);
                    FormatBCD_Byte(pMMS_Header->bbExchangeID, sizeof(pMMS_Header->bbExchangeID), sTmp);
                    printf("(%06d) %33s : [%sh]\n", iRecNumber, "EXCHANGE ID", sTmp);
                    FormatBCD_Byte(pMMS_Header->bbFirstRecordNumber, sizeof(pMMS_Header->bbFirstRecordNumber), sTmp);
                    printf("(%06d) %33s : [%ld][%Xh]\n", iRecNumber, "FIRST RECORD NUMBER", strtol(sTmp, &pEndPtr, 10), strtol(sTmp, &pEndPtr, 10));
                    FormatBCD_Byte(pMMS_Header->bbBatchSequenceNumber, sizeof(pMMS_Header->bbBatchSequenceNumber), sTmp);
                    printf("(%06d) %33s : [%ld][%Xh]\n", iRecNumber, "BATCH SEQUENCE NUMBER", strtol(sTmp, &pEndPtr, 10), strtol(sTmp, &pEndPtr, 10));
                    FormatBCD_Byte(pMMS_Header->bbBlockSequenceNumber, sizeof(pMMS_Header->bbBlockSequenceNumber), sTmp);
                    printf("(%06d) %33s : [%ld][%Xh]\n", iRecNumber, "BLOCK SEQUENCE NUMBER", strtol(sTmp, &pEndPtr, 10), strtol(sTmp, &pEndPtr, 10));
                    FormatBCD_DateTime(pMMS_Header->bbBatchStartTime, sTmp);
                    printf("(%06d) %33s : [%s]\n", iRecNumber, "BATCH START TIME", sTmp);
                    FormatBCD_Byte(pMMS_Header->bbFormatVersion, sizeof(pMMS_Header->bbFormatVersion), sTmp);
                    printf("(%06d) %33s : [%ld][%sh]\n", iRecNumber, "FORMAT VERSION", strtol(sTmp, &pEndPtr, 16), sTmp);
//                    FormatHEX_Byte(pMMS_Header->hbBitMask, sizeof(pMMS_Header->hbBitMask), sTmp); // Too long
//                    printf("(%06d) %33s : [%sh]\n", iRecNumber, "BIT MASK", sTmp);
                    i += pMMS_Header->hwRecordLength;
               else if( (sDataBuff[i]==0x00)&&(sDataBuff[i+1]==0x00)&&(sDataBuff[i+2]==0x00)&&(sDataBuff[i+3]==0xB4) )
                    printf("(%06d) *******************************[ DATA ]*******************************\n", iRecNumber);
                    pMMS_Data = (struct MMS_DataStruct *)&sDataBuff[i];
                    FormatHEX_Byte(pMMS_Data->hbRecordLength, sizeof(pMMS_Data->hbRecordLength), sTmp);
                    printf("(%06d) %33s : [%ld][%sh]\n", iRecNumber, "RECORD LENGTH", strtol(sTmp, &pEndPtr, 16), sTmp);
                    FormatHEX_Byte(pMMS_Data->hbRecordType, sizeof(pMMS_Data->hbRecordType), sTmp);
                    printf("(%06d) %33s : [%ld][%sh]\n", iRecNumber, "RECORD TYPE", strtol(sTmp, &pEndPtr, 16), sTmp);
                    FormatBCD_DateTime(pMMS_Data->bbLoggingTime, sTmp);
                    printf("(%06d) %33s : [%s]\n", iRecNumber, "LOGGING TIME", sTmp);
                    FormatHEX_Byte(pMMS_Data->hbNodeID, sizeof(pMMS_Data->hbNodeID), sTmp);
                    printf("(%06d) %33s : [%ld][%sh]\n", iRecNumber, "NODE ID", strtol(sTmp, &pEndPtr, 16), sTmp);
                    FormatHEX_Byte(pMMS_Data->hbOIW_Type, sizeof(pMMS_Data->hbOIW_Type), sTmp);
                    printf("(%06d) %33s : [%ld][%sh]\n", iRecNumber, "OIW TYPE", strtol(sTmp, &pEndPtr, 16), sTmp);
                    FormatHEX_Byte(pMMS_Data->hbDIW_Type, sizeof(pMMS_Data->hbDIW_Type), sTmp);
                    printf("(%06d) %33s : [%ld][%sh]\n", iRecNumber, "DIW TYPE", strtol(sTmp, &pEndPtr, 16), sTmp);
                    FormatBCD_DateTime(pMMS_Data->bbIncomingTime, sTmp);
                    printf("(%06d) %33s : [%s]\n", iRecNumber, "INCOMING TIME", sTmp);
                    FormatHEX_Byte(pMMS_Data->hbSuccessIndicator, sizeof(pMMS_Data->hbSuccessIndicator), sTmp);
                    printf("(%06d) %33s : [%ld][%sh]\n", iRecNumber, "SUCCESS INDICATOR", strtol(sTmp, &pEndPtr, 16), sTmp);
                    FormatHEX_Byte(pMMS_Data->hbErrorCause, sizeof(pMMS_Data->hbErrorCause), sTmp);
                    printf("(%06d) %33s : [%ld][%sh]\n", iRecNumber, "ERROR CAUSE", strtol(sTmp, &pEndPtr, 16), sTmp);
                    FormatHEX_Byte(pMMS_Data->hbTariffClass, sizeof(pMMS_Data->hbTariffClass), sTmp);
                    printf("(%06d) %33s : [%ld][%sh]\n", iRecNumber, "TARIFF CLASS", strtol(sTmp, &pEndPtr, 16), sTmp);
                    FormatHEX_Byte(pMMS_Data->hbMsgLen, sizeof(pMMS_Data->hbMsgLen), sTmp);
                    printf("(%06d) %33s : [%ld][%sh]\n", iRecNumber, "MSG LEN", strtol(sTmp, &pEndPtr, 16), sTmp);
                    FormatHEX_Byte(pMMS_Data->hbApplication, sizeof(pMMS_Data->hbApplication), sTmp);
                    printf("(%06d) %33s : [%ld][%sh]\n", iRecNumber, "APPLICATION", strtol(sTmp, &pEndPtr, 16), sTmp);
                    FormatHEX_Byte(pMMS_Data->hbMessageClass, sizeof(pMMS_Data->hbMessageClass), sTmp);
                    printf("(%06d) %33s : [%ld][%sh]\n", iRecNumber, "MESSAGE CLASS", strtol(sTmp, &pEndPtr, 16), sTmp);
                    FormatHEX_Byte(pMMS_Data->hbServiceType, sizeof(pMMS_Data->hbServiceType), sTmp);
                    printf("(%06d) %33s : [%ld][%sh]\n", iRecNumber, "SERVICE TYPE", strtol(sTmp, &pEndPtr, 16), sTmp);
                    FormatBCD_DateTime(pMMS_Data->bbDesiredDeliverTime, sTmp);
                    printf("(%06d) %33s : [%s]\n", iRecNumber, "DESIRED DELIVER TIME", sTmp);
                    FormatHEX_Byte(pMMS_Data->hbSenderChargingType, sizeof(pMMS_Data->hbSenderChargingType), sTmp);
                    printf("(%06d) %33s : [%ld][%sh]\n", iRecNumber, "SENDER CHARGING TYPE", strtol(sTmp, &pEndPtr, 16), sTmp);
                    FormatHEX_Byte(pMMS_Data->hbRecipientChargingType, sizeof(pMMS_Data->hbRecipientChargingType), sTmp);
                    printf("(%06d) %33s : [%ld][%sh]\n", iRecNumber, "RECIPIENT CHARGING TYPE", strtol(sTmp, &pEndPtr, 16), sTmp);
                    FormatHEX_Byte(pMMS_Data->hbSenderPrepaidStatus, sizeof(pMMS_Data->hbSenderPrepaidStatus), sTmp);
                    printf("(%06d) %33s : [%ld][%sh]\n", iRecNumber, "SENDER PREPAID STATUS", strtol(sTmp, &pEndPtr, 16), sTmp);
                    FormatHEX_Byte(pMMS_Data->hbRecipientPrepaidStatus, sizeof(pMMS_Data->hbRecipientPrepaidStatus), sTmp);
                    printf("(%06d) %33s : [%ld][%sh]\n", iRecNumber, "RECIPIENT PREPAID STATUS", strtol(sTmp, &pEndPtr, 16), sTmp);
                    FormatHEX_Byte(pMMS_Data->hbChargedParty, sizeof(pMMS_Data->hbChargedParty), sTmp);
                    printf("(%06d) %33s : [%ld][%sh]\n", iRecNumber, "CHARGED PARTY", strtol(sTmp, &pEndPtr, 16), sTmp);
                    FormatHEX_Byte(pMMS_Data->hbContentAdaptation, sizeof(pMMS_Data->hbContentAdaptation), sTmp);
                    printf("(%06d) %33s : [%ld][%sh]\n", iRecNumber, "CONTENT ADAPTATION", strtol(sTmp, &pEndPtr, 16), sTmp);
                    FormatHEX_Byte(pMMS_Data->hbDeliveryReport, sizeof(pMMS_Data->hbDeliveryReport), sTmp);
                    printf("(%06d) %33s : [%ld][%sh]\n", iRecNumber, "DELIVERTY REPORT", strtol(sTmp, &pEndPtr, 16), sTmp);
                    FormatHEX_Byte(pMMS_Data->hbReadReply, sizeof(pMMS_Data->hbReadReply), sTmp);
                    printf("(%06d) %33s : [%ld][%sh]\n", iRecNumber, "READ REPLY", strtol(sTmp, &pEndPtr, 16), sTmp);
                    FormatString(pMMS_Data->sMsgID, sizeof(pMMS_Data->sMsgID), sTmp);
                    printf("(%06d) %33s : [%s]\n", iRecNumber, "MSG ID", sTmp);
                    FormatString(pMMS_Data->sOADDR, sizeof(pMMS_Data->sOADDR), sTmp);
                    printf("(%06d) %33s : [%s]\n", iRecNumber, "ORIGINATOR ADDRESS", sTmp);
                    FormatString(pMMS_Data->sDADDR, sizeof(pMMS_Data->sDADDR), sTmp);
                    printf("(%06d) %33s : [%s]\n", iRecNumber, "DESTINATION ADDRESS", sTmp);
                    FormatHEX_Word(pMMS_Data->hwCheckSum, sTmp);
                    printf("(%06d) %33s : [%ld][%sh]\n", iRecNumber, "CHECK SUM", strtol(sTmp, &pEndPtr, 16), sTmp);
                    i += (pMMS_Data->hbRecordLength[0]*4096)+(pMMS_Data->hbRecordLength[1]*256)+(pMMS_Data->hbRecordLength[2]*16)+pMMS_Data->hbRecordLength[3];
               else if( (sDataBuff[i]==0x18)&&(sDataBuff[i+1]==0x00)&&(sDataBuff[i+2]==0x10)&&(sDataBuff[i+3]==0xFF) )
                    printf("(%06d) *****************************[ TRAILER ]******************************\n", iRecNumber);
                    pMMS_Trailer = (struct MMS_TrailerStruct *)&sDataBuff[i];
                    printf("(%06d) %33s : [%ld][%02Xh]\n", iRecNumber, "RECORD LENGTH", pMMS_Trailer->hwRecordLength, pMMS_Trailer->hwRecordLength);
                    FormatHEX_Byte(pMMS_Trailer->hbRecordType, sizeof(pMMS_Trailer->hbRecordType), sTmp);
                    printf("(%06d) %33s : [%ld][%sh]\n", iRecNumber, "RECORD TYPE", strtol(sTmp, &pEndPtr, 16), sTmp);
                    FormatBCD_Byte(pMMS_Trailer->bbExchangeID, sizeof(pMMS_Trailer->bbExchangeID), sTmp);
                    printf("(%06d) %33s : [%sh]\n", iRecNumber, "EXCHANGE ID", sTmp);
                    FormatBCD_DateTime(pMMS_Trailer->bbBatchEndTime, sTmp);
                    printf("(%06d) %33s : [%s]\n", iRecNumber, "BATCH END TIME", sTmp);
                    FormatBCD_Byte(pMMS_Trailer->bbLastRecordNumber, sizeof(pMMS_Trailer->bbLastRecordNumber), sTmp);
                    printf("(%06d) %33s : [%ld][%Xh]\n", iRecNumber, "LAST RECORD NUMBER", strtol(sTmp, &pEndPtr, 10), strtol(sTmp, &pEndPtr, 10));
                    i += pMMS_Trailer->hwRecordLength;
               else if( (sDataBuff[i]==0xFF)&&(sDataBuff[i+1]==0xFF)&&(sDataBuff[i+2]==0xFF)&&(sDataBuff[i+3]==0xFF) )
                    break;
               else
                    printf("Unknow type!!!\n");
                    break;
               iRecNumber++;
     fclose(pMMS_File);
     return(0);
int MMS::FormatBCD_Byte(unsigned char sInput, int iNumByte, char sOutput)
     for(int i=0;i < iNumByte;i++){
          printf("Value = %02X\n",*(sInput+i));     
     while( iNumByte > 0 )
          sprintf(sOutput, "%02X", *(sInput+iNumByte-1));
          sOutput += 2;
          iNumByte--;
     return(0);
int MMS::FormatHEX_Word(unsigned short usInput, char *sOutput)
     sprintf(sOutput, "%02X", usInput);
     return(0);
int MMS::FormatBCD_DateTime(unsigned char sInput, char sOutput)
     sprintf(sOutput, "%02X%02X-%02X-%02X %02X:%02X:%02X", *(sInput+6), *(sInput+5), *(sInput+4), *(sInput+3), *(sInput+2), *(sInput+1), *sInput);
     return(0);
int MMS::FormatHEX_Byte(unsigned char sInput, int iNumByte, char sOutput)
     while( iNumByte > 0 )
          sprintf(sOutput, "%02X", *(sInput++));
          sOutput += 2;
          iNumByte--;
     return(0);
int MMS::FormatString(unsigned char sInput, int iNumByte, char sOutput)
     memcpy(sOutput, sInput, iNumByte);
     *(sOutput+iNumByte) = 0;
     return(0);

Similar Messages

  • ABAP Function Module Example to move data from one Cube into Another

    Hi experts,
    Can any please help out in this ..?
    A Simple ABAP Function Module Example to move data from one Cube into Another Cube
    (How do i send the data from one client to another client using Function moduel).
    Thanks
    -Upen.
    Moderator message: too vague, help not possible, please describe problems in all technical detail when posting again, BI related? ("cube"), also search for information before asking.
    Edited by: Thomas Zloch on Oct 29, 2010 1:19 PM

    This is the start routine to duplicate records in two currencies.
    DATA: datew   TYPE /bi0/oidateto,
          datew2  TYPE rsgeneral-chavl,
          fweek   TYPE rsgeneral-chavl,
          prodhier TYPE /bi0/oiprod_hier,
          market  TYPE /bic/oima_seg,
          segment TYPE /bic/oizsegment.
    DATA: BEGIN OF S_DATA_PACK OCCURS 0.
            INCLUDE STRUCTURE /BIC/CS8ZSDREV.
    DATA: END OF S_DATA_PACK.
    S_DATA_PACK[] = DATA_PACKAGE[].
      REFRESH DATA_PACKAGE.
      LOOP AT S_DATA_PACK.
        move-corresponding s_data_pack to DATA_PACKAGE.
        if DATA_PACKAGE-loc_currcy = 'EUR'.
          DATA_PACKAGE-netval_inv = DATA_PACKAGE-/bic/zsdvalgrc.
          DATA_PACKAGE-CURRENCY = 'USD'.
          APPEND DATA_PACKAGE.
          DATA_PACKAGE-netval_inv = DATA_PACKAGE-/bic/zsdvalloc.
          DATA_PACKAGE-CURRENCY = 'EUR'.
          APPEND DATA_PACKAGE.
        else.
          DATA_PACKAGE-netval_inv = DATA_PACKAGE-/bic/zsdvalgrc.
          DATA_PACKAGE-CURRENCY = 'USD'.
          APPEND DATA_PACKAGE.
        endif.
      ENDLOOP.
    This is to load Quantity field
    RESULT = COMM_STRUCTURE-BILL_QTY.
    This is to load Value field
    RESULT = COMM_STRUCTURE-NETVAL_INV.
    UNIT = COMM_STRUCTURE-currency.

  • Call actionscript file function from actions panel of a movie clip

    i have a movie clip with an actions layer
    can i call a function from an actionscript file from the actions panel?

    does that actionscript file specify a class or not?
    if not, then use:
    include "yourpath/yourfilename.as"
    on any timeline.
    any function in that as file will be added to the timeline that has the include statement and you reference that function with normal dot syntax from your calling timeline.

  • How to move functions and procedures from packages into a schema?

    Hello,
    I have below requirements for a homework and my question is if someone can point me in the right direction to find documentation which can help me solve the below. Any information will be very much appreciated. Thank you.
    Write procedures and functions (included or not in packages)under the form scripts  .txt or .sql . Once they have been launched in SQL developer they should more the functions and the procedures from the packages in the current schema. If the current schema contains only 2 packages, pac1( with procedures p11,p12 and the functions f11,f12,f13) and pac2( contains the following procedures p21,p22,p23 and the functions f21 and f21( overloading cases), the execution of the scripts will generate the following effects:
    The procedures p11,p12,p21,p22 ,p23 and the functions f11,f12 and f13 will be created in the current schema.
    pac2 will contain 2 instances of the overloading function- f21; they will be kept in the package, without being created in the current schema; so all the procedures/functions overloaded will be kept in the original packages
    If pac1 contains variables, cursors and public types, we will keep only the package specifics( and delete the body);generally if the packages do not contain procedures or functions overloaded the body will be deleted and if no variables, cursors, public types then we will delete the header.
    If in the triggers, procedures, functions  we will call procedures/functions from the packages(the procedures and the functions moved in the current schema) they reference will need to be updated ( via amending the body or recompile) for example if pa1.p12 will need to be replaced with p12.
    The scripts will have to have numbers in the following series( 01....n) and characters that explain the content.

    My only advice would be to remember that these are public forums and if YOU can find them, so can your instructors.
    Also, those are horrible procedure and function names
    This assignment seems to be around overloading pl/sql objects and order of precedence...do a search on the Oracle Docs around overloading and inheritence
    http://docs.oracle.com/cd/B28359_01/appdev.111/b28371/adobjplsql.htm#i21148

  • Calling a function from a DLL, exectution in background mode.

    Dear Experts,
    We have created an ABAP report the calls a function from a DLL file. If the report is executed in on-line mode the program calls and executes the function from the DLL, but if the ABAP programa is executed in background mode it doesnt calls the DLL function.
    Do you know a way to solve the problem when executing in background mode?
    Best regards.
    Antonio

    Hi Gabriel,
    Let me explain in details about my DLL function.
    We are importing the business partners from legacy system into the SAP CRM system, so at the moment we created the BP master data via BAPI, I get the name of the BP and this moment I call the function in the DLL file. I export the parameter name and I receive back a simplified string with the name reduced to a code. This code I get back from the dll it is insert in a Z table, so there is no interaction in the screen, all must be executed in background mode, because there are a lot of business partners to be converted in SAP system.
    I am sending my code for your considerations.
    Instancia a DLL
      CREATE OBJECT dll 'MTCODE.CPFONET'.
      IF sy-subrc NE 0.
        RAISE without_dll.
      ENDIF.
    Move para a tabela interna IT_NAME os valores recebidos na TI_NAME
      it_name[] = ti_name[].
    Para cada registro importado
      LOOP AT it_name.
        CLEAR v_string_ret.
        wa_matchcode-zregid     = it_name-zregid.
        wa_matchcode-name1_text = it_name-name1_text.
        v_string = it_name-name1_text.
        CONDENSE  v_string.
        TRANSLATE v_string TO UPPER CASE.
        CALL METHOD  OF dll 'SetNome' EXPORTING #1 = v_string.
        CALL METHOD  OF dll 'ExecMatch'.
        CALL METHOD  OF DLL 'GetMCData' = v_string_ret.
        FREE OBJECT dll.
      Preenche os campos do match-code de acordo com o retorno da DLL
        SPLIT v_string_ret
        AT '|'
        INTO wa_matchcode-zparmcln
             wa_matchcode-zparmcfn
             v_empty
             wa_matchcode-name_first
             wa_matchcode-name_last
             wa_matchcode-namemiddle.
      Adiciona o registro com o match-code correspondente na TE_MATCHCODE
        APPEND wa_matchcode TO te_matchcode.
      ENDLOOP.

  • Can't move document from one folder to another

    In the previous incarnation of Pages, right when it first developed Folders (a long overdue development), I was able to easily move a document from one folder to another on my MacBook, as well as my iPad.
    Now, whenever I grab a document and try to drag and drop it into a new folder to move it, it won't let.
    Did Apple actually remove this functionality from Pages?

    Didn't have the Yosemite MBA powered up, so verified this on Mavericks with Pages v5.2.2. Since Apple has essentially frozen the Pages v5 codebase, figured this would also work on Yosemite.
    Any application (e.g. TextEdit) that takes advantage of this titlebar feature can move documents in this manner.
    In the Finder, you can move a document from one location to another by depressing the command key while dragging the file.
    In Pages v5.2.2, with the document chooser open, I can use the preceding sentence move technique to move a file from an open folder into the Pages document chooser and it will automatically switch the Pages document chooser to inside that external folder — without launching the document. But, the command+drag feature does not work to move a document visible in the Pages v5.2.2 document chooser to another Finder location, or even into a folder visible within the document chooser.

  • Move files from one folder to another

    I am brand new to the application and have spent a ton of time googling various topics, but need some additional help. Seems easy enough, but I can't figure out how to do it...
    I would like to move pics from one folder to another. I can drag files from one folder to another, but they still reside in the original folder as well. Is there a way to cut and paste or a similar function to accomplish this move?
    Thanks.

    Hey, HawaiianHaole, as a multidecade Mac user, let me tell you, Aperture is about the worst example of Mac-iness one could imagine. Ironic, as it's (of course) made by Apple. But it is so inflexible, and insists so vociferously on making the user learn its peculiar interface conventions it reminds me most of something out of that famous company in Redmond.
    Want your Projects in an order you choose? Sorry! Want to arrange your windows so you can see your list of chat buddies while you're working in Aperture? Nope, can't do it! Aging eyes have trouble reading tiny grey type on a grey background? Hey buddy, it was your choice to grow old, don't blame us!
    But all is not lost. Aperture has gotten considerably better of late (versions up to 2.0 were fundamentally unusable in many ways) and will hopefully continue to improve. (ie Maybe they'll fix the printing thing...)
    Please don't make Aperture the basis for your judgement of the Mac OS. Many long time Mac users are having as much trouble with Aperture as you. Mac OSX has significantly reduced customizability but at the benefit of much improved stability and indeed usability. Old school Mac users had to learn to accept this, which most did. You'll hear people talk about the "Way of the Steve". As irksome as Aperture can be, you'll actually have a better time of it if you adopt the Way of the Steve, and accept that you can't do things the way you might want to. This is imho antithetical to the original Mac many of us knew and loved, but it's the way things are today, so we mostly shut up and take it. You can fight with your software all day, or just accept that there are ways you have to adopt and adapt to them.
    Welcome to the Bright Side, hope your Mac experience improves.

  • How do you move pictures from one catalog to another?

    How do you move pictures from one catalog to another?  I have just got the program and have moved pictures into the default catalog. I have now created several new catalogs and want to move pics from the default into the new catalogs. I don't see this answer in the general help or my "dummies" book.

    pspack1 wrote:
    How do you move pictures from one catalog to another?  I have just got the program and have moved pictures into the default catalog. I have now created several new catalogs and want to move pics from the default into the new catalogs. I don't see this answer in the general help or my "dummies" book.
    It's not a good idea to create multiple catalogs. For one thing, this defeats the purpose of the Organizer as a way to search for and find your photos; the search can only operate within a single catalog. Also, there are no functions in PSE that work across multiple catalogs. And even though you can "manually" combine the catalogs if you so desire, you lose information such as collection/album membership, stacks, version sets, creations and a few other things.

  • Is there a way to move files from one folder to another without copying and pasting and then going back to delete the original?

    Is there a way to move files from one folder to another without copying and pasting and then going back to delete the original?  The cut and paste function is not available and there's no "move to" function.  Am I missing something?  It was so easy with Windows.

    Drag the files, or press Option when pasting them; this accesses the Move To function.
    (124070)

  • How do I move pictures from 1 offline folder to another offline folder?

    My Elements 8 pictures are on the root directory of a 16 gig usb drive.  I would like to move them to a new folder on that same drive.  I tried to do it in the folder view by selecting the pics in the root folder and dragging them to the new folder.  That action was not allowed.  I could drag the pics to a C drive folder, but not to a usb drive folder.
    I then used the move function.under the File menu.  It did the move, but changed the name of each item by adding a "-1" to it.  And for each picture it added 1 or 2 small new files to the new folder.  I then had to erase the small new files because they caused me to run out of space.
    How can I easily move items from one external folder to another on my usb drive?

    Thanks for your response... 
    I tried the Move function.  It did not work very well either. 
    I successfully moved several groups of pictures, but PSE added a "-1" to all the files it created in the folder I was moving the items to, and it created 1 or 2 small jpg files for each of the files I moved.  This caused my usb drive to fill up and I had to erase all the extra files.  Eventually the "Move" failed in the last group of pictures I tried to move.  It copied all of them to the new folder, but failed as it tried to delete them from the original folder.  Thus, I now have 2 copies of those picture files on my usb drive.
    By adding the "-1" to the file names, PSE does not appear to recognize folders on a usb drive.  And I  have no idea why it creates the extra small copies of the files...
    Any other ideas?

  • How to move cursor from one textfield to another textfield byusing enterkey

    hii all,
    I have a problem in java script.
    To move cursor from one textbox to another text box ,I have take the length of the textboxes of the first column.I used onkeyDown event .
    in the function ,firest i checked the condition like
    for(i=0;i<form1.box.length;i++) //box is the name of the textboxes
    if(event.keyCode==13)
    form1.box[i+1].focus();
    return false;
    by using this the cursor is moving from first text box to secon textbox and stops.
    if i use event.returnValue=false; instead of return false ,then the cursor automatically going to the laxt textbox of the column.
    my problem is how i can focus the cursor from one textbox to another textbox one after the other till the end.
    if any one has solution please help me.
    also if we can do in another way also,please help me.
    thanx.>

    try the following code :
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
    <HEAD>
    <TITLE> New Document </TITLE>
    <META NAME="Generator" CONTENT="EditPlus">
    <META NAME="Author" CONTENT="">
    <META NAME="Keywords" CONTENT="">
    <META NAME="Description" CONTENT="">
    </HEAD>
    <SCRIPT language="Javascript">
    function fnTest(str)     {     
              if(event.keyCode==13)          {
                   if(str == 4)     {
                        formHeader.box[0].focus();
                   else     {
                        formHeader.box[parseInt(str)+1].focus();
                   return false;
    </SCRIPT>
    <BODY>
    <FORM name="formHeader">
    <CENTER>
    <INPUT TYPE="TEXT" name="box" value="" onKeyDown="javascript:fnTest('0');">
    <br>
    <INPUT TYPE="TEXT" name="box" value="" onKeyDown="javascript:fnTest('1');">
    <br>
    <INPUT TYPE="TEXT" name="box" value="" onKeyDown="javascript:fnTest('2');">
    <br>
    <INPUT TYPE="TEXT" name="box" value="" onKeyDown="javascript:fnTest('3');">
    <br>
    <INPUT TYPE="TEXT" name="box" value="" onKeyDown="javascript:fnTest('4');">
    </CENTER>
    </FORM>
    </BODY>
    </HTML>
    ----------------------------------------------

  • Move data from one table to another table

    Hi all,
    I  had a custom table called sales_data in that table there are  columns like JAn,FEB,upto DEC including other columns so in each month there is some data total data is  23000 count but each month has has specific data like JAn-2500,FEB-2000 like that it has total 23000 records
    My Requirement  is i have to move data from one table to another table that too if i will pass jan only jan data should move like that feb,march,.....
    in my table there is no month column i had get it from another table called gl_periods and by using cursor and case function i have written the code
    well while when i am inserting data am passing year,month as parameters but 23000 data is moving it should get like that.
    Please suggest me.its urgent
    Thank You

    Hi hamid,
                   Please go through the below procedure.
    CREATE OR REPLACE PROCEDURE APPS.copy_sales_to_forecast(p_fiscal_year varchar2,p_month number)
    IS
    CURSOR C1 IS select period_year,period_num,start_date,end_date from apps.gl_periods
                 where period_set_name='Accounting'
                 and   period_year=p_fiscal_year
                 and   period_num<=p_month;
    type type1 is table of xxc_forecast_data%rowtype;
    t1 type1;
    BEGIN
    FOR CREC IN C1 LOOP
    BEGIN
    DELETE FROM xxc_forecast2
    where fiscal_year = crec.period_year
      and attribute1='Copied From Sales to Forecast Table of Month '||crec.period_num;
    END;
    SELECT
      product_category           ,
      product_sub_category       ,
      product_line               ,
      product_style              ,
      item_number                ,
      item_description           ,
      customer_name              ,
      customer_number            ,
      sales_channel              ,
      null      ,
      CASE
        WHEN crec.period_num=1 THEN sales_amount_month1
        ELSE 0
      END Transaction_quantity_period1,
      CASE
        WHEN crec.period_num=1 THEN sales_cost_month1
        ELSE 0
      END item_cogs_period1,
      CASE
        WHEN crec.period_num=1 THEN sales_mtl_cost_month1
        ELSE 0
      END item_material_cogs_period1 ,
      CASE
        WHEN crec.period_num=1 THEN sales_mtl_ovhd_cost_month1
        ELSE 0
      END item_mtl_ovhd_cogs_period1,
      CASE
        WHEN crec.period_num=1 THEN sales_res_cost_month1
        ELSE 0
      END item_resource_cogs_period1,
      CASE
        WHEN crec.period_num=1 THEN sales_op_cost_month1
        ELSE 0
      END item_op_cogs_period1,
      CASE
        WHEN crec.period_num=1 THEN sales_ovhd_month1
        ELSE 0
      END item_ovhd_cogs_period1,
      CASE
        WHEN crec.period_num=1 THEN sales_units_month1
        ELSE 0
      END extended_amount_us_period1,
      CASE
        WHEN crec.period_num=2 THEN sales_amount_month2
        ELSE 0
      END Transaction_quantity_period2,
      CASE
        WHEN crec.period_num=2 THEN sales_mtl_cost_month2
        ELSE 0
      END item_material_cogs_period2,
      CASE
        WHEN crec.period_num=2 THEN sales_mtl_ovhd_cost_month2
        ELSE 0
      END item_mtl_ovhd_cogs_period2,
      CASE
        WHEN crec.period_num=2 THEN sales_res_cost_month2
        ELSE 0
      END item_resource_cogs_period2,
      CASE
        WHEN crec.period_num=2 THEN sales_op_cost_month2
        ELSE 0
      END item_op_cogs_period2,
      CASE
        WHEN crec.period_num=2 THEN sales_ovhd_month2
        ELSE 0
      END item_ovhd_cogs_period2,
       CASE
        WHEN crec.period_num=2 THEN sales_units_month2
        ELSE 0
      END extended_amount_us_period2,
      CASE
        WHEN crec.period_num=3 THEN sales_amount_month3
        ELSE 0
      END Transaction_quantity_period3,
      CASE
        WHEN crec.period_num=3 THEN sales_mtl_cost_month3
        ELSE 0
      END item_material_cogs_period3,
      CASE
        WHEN crec.period_num=3 THEN sales_mtl_ovhd_cost_month3
        ELSE 0
      END item_mtl_ovhd_cogs_period3,
      CASE
        WHEN crec.period_num=3 THEN sales_res_cost_month3
        ELSE 0
      END item_resource_cogs_period3,
      CASE
        WHEN crec.period_num=3 THEN sales_op_cost_month3
        ELSE 0
      END item_op_cogs_period3,
      CASE
        WHEN crec.period_num=3 THEN sales_ovhd_month3
        ELSE 0
      END item_ovhd_cogs_period3,
      CASE
        WHEN crec.period_num=3 THEN sales_units_month3
        ELSE 0
      END extended_amount_us_period3,
      CASE
        WHEN crec.period_num=4 THEN sales_amount_month4
        ELSE 0
      END Transaction_quantity_period4,
      CASE
        WHEN crec.period_num=4 THEN sales_mtl_cost_month4
        ELSE 0
      END item_material_cogs_period4,
      CASE
        WHEN crec.period_num=4 THEN sales_mtl_ovhd_cost_month4
        ELSE 0
      END item_mtl_ovhd_cogs_period4,
      CASE
        WHEN crec.period_num=4 THEN sales_res_cost_month4
        ELSE 0
      END item_resource_cogs_period4,
      CASE
        WHEN crec.period_num=4 THEN sales_op_cost_month4
        ELSE 0
      END item_op_cogs_period4,
      CASE
        WHEN crec.period_num=4 THEN sales_ovhd_month4
        ELSE 0
      END item_ovhd_cogs_period4,
      CASE
        WHEN crec.period_num=4 THEN sales_units_month4
        ELSE 0
      END extended_amount_us_period4,
      CASE
        WHEN crec.period_num=5 THEN sales_amount_month5
        ELSE 0
      END Transaction_quantity_period5,
      CASE
        WHEN crec.period_num=5 THEN sales_mtl_cost_month5
        ELSE 0
      END item_material_cogs_period5,
      CASE
        WHEN crec.period_num=5 THEN sales_mtl_ovhd_cost_month5
        ELSE 0
      END item_mtl_ovhd_cogs_period5,
      CASE
        WHEN crec.period_num=5 THEN sales_res_cost_month5
        ELSE 0
      END item_resource_cogs_period5,
      CASE
        WHEN crec.period_num=5 THEN sales_op_cost_month5
        ELSE 0
      END item_op_cogs_period5,
      CASE
        WHEN crec.period_num=5 THEN sales_ovhd_month5
        ELSE 0
      END item_ovhd_cogs_period5,
      CASE
        WHEN crec.period_num=5 THEN sales_units_month5
        ELSE 0
      END extended_amount_us_period5,
      CASE
        WHEN crec.period_num=6 THEN sales_amount_month6
        ELSE 0
      END Transaction_quantity_period6,
      CASE
        WHEN crec.period_num=6 THEN sales_mtl_cost_month6
        ELSE 0
      END item_material_cogs_period6,
      CASE
        WHEN crec.period_num=6 THEN sales_mtl_ovhd_cost_month6
        ELSE 0
      END item_mtl_ovhd_cogs_period6,
      CASE
        WHEN crec.period_num=6 THEN sales_res_cost_month6
        ELSE 0
      END item_resource_cogs_period6,
      CASE
        WHEN crec.period_num=6 THEN sales_op_cost_month6
        ELSE 0
      END item_op_cogs_period6,
      CASE
        WHEN crec.period_num=6 THEN sales_ovhd_month6
        ELSE 0
      END item_ovhd_cogs_period6,
       CASE
        WHEN crec.period_num=6 THEN sales_units_month6
        ELSE 0
      END extended_amount_us_period6,
      CASE
        WHEN crec.period_num=7 THEN sales_amount_month7
        ELSE 0
      END Transaction_quantity_period7,
      CASE
        WHEN crec.period_num=7 THEN sales_mtl_cost_month7
        ELSE 0
      END item_material_cogs_period7,
      CASE
        WHEN crec.period_num=7 THEN sales_mtl_ovhd_cost_month7
        ELSE 0
      END item_mtl_ovhd_cogs_period7,
      CASE
        WHEN crec.period_num=7 THEN sales_res_cost_month7
        ELSE 0
      END item_resource_cogs_period7,
      CASE
        WHEN crec.period_num=7 THEN sales_op_cost_month7
        ELSE 0
      END item_op_cogs_period7,
      CASE
        WHEN crec.period_num=7 THEN sales_ovhd_month7
        ELSE 0
      END item_ovhd_cogs_period7,
      CASE
        WHEN crec.period_num=7 THEN sales_units_month7
        ELSE 0
      END extended_amount_us_period7,
      CASE
        WHEN crec.period_num=8 THEN sales_amount_month8
        ELSE 0
      END Transaction_quantity_period8,
      CASE
        WHEN crec.period_num=8 THEN sales_mtl_cost_month8
        ELSE 0
      END item_material_cogs_period8,
      CASE
        WHEN crec.period_num=8 THEN sales_mtl_ovhd_cost_month8
        ELSE 0
      END item_mtl_ovhd_cogs_period8,
      CASE
        WHEN crec.period_num=8 THEN sales_res_cost_month8
        ELSE 0
      END item_resource_cogs_period7,
      CASE
        WHEN crec.period_num=8 THEN sales_op_cost_month8
        ELSE 0
      END item_op_cogs_period8,
      CASE
        WHEN crec.period_num=8 THEN sales_ovhd_month8
        ELSE 0
      END item_ovhd_cogs_period8,
      CASE
        WHEN crec.period_num=8 THEN sales_units_month8
        ELSE 0
      END extended_amount_us_period8,
      CASE
        WHEN crec.period_num=9 THEN sales_amount_month9
        ELSE 0
      END Transaction_quantity_period9,
      CASE
        WHEN crec.period_num=9 THEN sales_mtl_cost_month9
        ELSE 0
      END item_material_cogs_period9,
      CASE
        WHEN crec.period_num=9 THEN sales_mtl_ovhd_cost_month9
        ELSE 0
      END item_mtl_ovhd_cogs_period9,
      CASE
        WHEN crec.period_num=9 THEN sales_res_cost_month9
        ELSE 0
      END item_resource_cogs_period7,
      CASE
        WHEN crec.period_num=9 THEN sales_op_cost_month9
        ELSE 0
      END item_op_cogs_period9,
      CASE
        WHEN crec.period_num=9 THEN sales_ovhd_month9
        ELSE 0
      END item_ovhd_cogs_period9,
       CASE
        WHEN crec.period_num=9 THEN sales_units_month9
        ELSE 0
      END extended_amount_us_period9,
      CASE
        WHEN crec.period_num=10 THEN sales_amount_month10
        ELSE 0
      END Transaction_quantity_period10,
      CASE
        WHEN crec.period_num=10 THEN sales_mtl_cost_month10
        ELSE 0
      END item_material_cogs_period10,
      CASE
        WHEN crec.period_num=10 THEN sales_mtl_ovhd_cost_month10
        ELSE 0
      END item_mtl_ovhd_cogs_period10,
      CASE
        WHEN crec.period_num=10 THEN sales_res_cost_month10
        ELSE 0
      END item_resource_cogs_period10,
      CASE
        WHEN crec.period_num=10 THEN sales_op_cost_month10
        ELSE 0
      END item_op_cogs_period10,
      CASE
        WHEN crec.period_num=10 THEN sales_ovhd_month10
        ELSE 0
      END item_ovhd_cogs_period10,
      CASE
        WHEN crec.period_num=10 THEN sales_units_month10
        ELSE 0
      END extended_amount_us_period10,
      CASE
        WHEN crec.period_num=11 THEN sales_amount_month11
        ELSE 0
      END Transaction_quantity_period11,
      CASE
        WHEN crec.period_num=11 THEN sales_mtl_cost_month11
        ELSE 0
      END item_material_cogs_period11,
      CASE
        WHEN crec.period_num=11 THEN sales_mtl_ovhd_cost_month11
        ELSE 0
      END item_mtl_ovhd_cogs_period11,
      CASE
        WHEN crec.period_num=11 THEN sales_res_cost_month11
        ELSE 0
      END item_resource_cogs_period11,
      CASE
        WHEN crec.period_num=11 THEN sales_op_cost_month11
        ELSE 0
      END item_op_cogs_period11,
      CASE
        WHEN crec.period_num=11 THEN sales_ovhd_month11
        ELSE 0
      END item_ovhd_cogs_period11,
      CASE
        WHEN crec.period_num=11 THEN sales_units_month11
        ELSE 0
      END extended_amount_us_period11,
      CASE
        WHEN crec.period_num=12 THEN sales_amount_month12
        ELSE 0
      END Transaction_quantity_period12,
      CASE
        WHEN crec.period_num=12 THEN sales_mtl_cost_month12
        ELSE 0
      END item_material_cogs_period12,
      CASE
        WHEN crec.period_num=12 THEN sales_mtl_ovhd_cost_month12
        ELSE 0
      END item_mtl_ovhd_cogs_period12,
      CASE
        WHEN crec.period_num=12 THEN sales_res_cost_month12
        ELSE 0
      END item_resource_cogs_period12,
      CASE
        WHEN crec.period_num=12 THEN sales_op_cost_month12
        ELSE 0
      END item_op_cogs_period12,
      CASE
        WHEN crec.period_num=12 THEN sales_ovhd_month12
        ELSE 0
      END item_ovhd_cogs_period12,
        CASE
        WHEN crec.period_num=12 THEN sales_units_month12
        ELSE 0
      END extended_amount_us_period12,
      CASE
        WHEN crec.period_num=2 THEN sales_cost_month2
        ELSE 0
      END item_cogs_period2,
       CASE
        WHEN crec.period_num=3 THEN sales_cost_month3
        ELSE 0
      END item_cogs_period3,
       CASE
        WHEN crec.period_num=4 THEN sales_cost_month4
        ELSE 0
      END item_cogs_period4,
       CASE
        WHEN crec.period_num=5 THEN sales_cost_month5
        ELSE 0
      END item_cogs_period5,
      CASE
        WHEN crec.period_num=6 THEN sales_cost_month6
        ELSE 0
      END item_cogs_period6,
      CASE
        WHEN crec.period_num=7 THEN sales_cost_month7
        ELSE 0
      END item_cogs_period7,
       CASE
        WHEN crec.period_num=8 THEN sales_cost_month8
        ELSE 0
      END item_cogs_period8,
      CASE
        WHEN crec.period_num=9 THEN sales_cost_month9
        ELSE 0
      END item_cogs_period9,
       CASE
        WHEN crec.period_num=10 THEN sales_cost_month10
        ELSE 0
      END item_cogs_period10,
       CASE
        WHEN crec.period_num=11 THEN sales_cost_month11
        ELSE 0
      END item_cogs_period11,
      CASE
        WHEN crec.period_num=12 THEN sales_cost_month12
        ELSE 0
      END item_cogs_period12,
      a.fiscal_year   ,
      a.budget_entity  ,
      a.organization_code,
      a.customer_id  ,
      a.inventory_item_id ,
      NULL,
      NULL,
      a.created_by ,
      a.last_updated_by ,
      a.creation_date ,
      a.last_update_date ,
      'Copied From Sales to Forecast Table of Month '||crec.period_num,
      a.attribute2,
      a.attribute3 ,
      a.attribute4 ,
      a.attribute5 ,
      a.attribute6 ,
      a.attribute7 ,
      a.attribute8 ,
      a.attribute9 ,
      a.attribute10,
      a.attribute11,
      a.attribute12,
      a.attribute13,
      a.attribute14,
      a.attribute15
      bulk collect into t1
      FROM  xxc_sales_data a 
      where  a.fiscal_year          = crec.period_year
    having CASE
                 WHEN crec.period_num=1  THEN sum(sales_amount_month1)
                 WHEN crec.period_num=2  THEN sum(sales_amount_month2)
                 WHEN crec.period_num=3  THEN sum(sales_amount_month3)
                 WHEN crec.period_num=4  THEN sum(sales_amount_month4)
                 WHEN crec.period_num=5  THEN sum(sales_amount_month5)
                 WHEN crec.period_num=6  THEN sum(sales_amount_month6)
                 WHEN crec.period_num=7  THEN sum(sales_amount_month7)
                 WHEN crec.period_num=8  THEN sum(sales_amount_month8)
                 WHEN crec.period_num=9  THEN sum(sales_amount_month9)
                 WHEN crec.period_num=10 THEN sum(sales_amount_month10)
                 WHEN crec.period_num=11 THEN sum(sales_amount_month11)
                 WHEN crec.period_num=12 THEN sum(sales_amount_month12)
                END !=0;
      FORALL i IN t1.first .. t1.last
      INSERT INTO xxc_forecast2 VALUES t1(i);
    --commit;
    END LOOP;
    END;
    Thank You

  • HT1848 Trying to move files from iPad to new MacBook

    Hi.
    I'm trying to move my music etc from an iPad to my new Macbook. My previous computer (PC) died some time ago, so I have no backups of the info on my iPad. (Well, a backup from about a year ago!) I lost my iPad data once before, after doing an OS update on it, and it was only my own ideas and not AppleCare that helped me to sort the problem out. That said, I'm a bit nervous now that I don't have any backups of the data.
    OK, so I've tried following the steps in the article about this. I've also turned off the automatic sync function now because I'm scared it'll immediately sync to an empty iTunes. But even having done this, I'm still getting the 'sync in progress' message on my iPad. The Macbook isn't giving me the message to 'transfer', but asking if I want to update the OS on the iPad.
    So ... Is the iPad actually sync-ing if it says it's sync-ing or is it just in the initial stages of connection and hasn't done anything yet? Can I leave the devices connected?
    And if I just say no to the OS update, will I then get the message I'm supposed to get?
    *** Oh, and it was opening iPhoto too. I've now followed the instructions to stop this from opening. Would that have been why I was getting the 'sync in progress' message?

    You can use a third-party Mac application like Senuti to move music from your iPad to your iTunes library.
    It's normal for iPhoto to start when you connect an iPad with photos in its camera roll.

  • [CS3 JS]  Move pages from one document to another?

    First, a brief explanation of what I am trying to do. I have several individual chapters that I am including in an INDD book. However, I also want to be able to allow those individual chapters to stand alone, meaning that I want to add a cover/title page to each chapter file (these two pages would be placed before the current page 1 of each chapter).
    My preference would be to write a script that would open the cover/tp file and open the first chapter file; this part is no problem. Where I am running into trouble however, is the second step: moving the cover/tp pages (2 pages) over into the chapter file.
    Manually, I would open Cover.indd, activate the "move pages" menu, "Move pages: 1-2", "Destination: Before_Page 1", "Move to: Chapter1.indd".
    With over 100 chapters in the book, however, I would prefer to automate the process. I have looked into the Page.move and PageItem.move elements, but both look like they would require a location in the current document (either in (x,y) form or using "AT_BEGINNING".
    If I cannot get this to work, I will likely try to insert two blank pages, then cut/paste with a script, but I would prefer the "move" functionality, if it is possible.
    A couple of answers to potential questions:
    I can't simply place the INDD cover file b/c it uses a text variable to pull the chapter name; this personalizes each stand-alone chapter.
    Same answer to why I can't just slap the 2-page .pdf on the front of each. I need the text variable to still be active.
    Has anyone tried to move pages from one document to another using scripting? I tried to explain what I am trying to do, but if it doesn't make sense, I can try again. :)
    thanks!
    Matt

    ok here we are
    I get a raw skeleton that you will have to adjust but it's functional.
    Use a PDF for placement as you can specify the page that you want to place.
    I don't know if you can do the same for indesign files.
    So basically, it starts adding 2 pages and placeing the pdf in the same time.
    After that, it creates the textVariable and the frame that will receive it.
    Here you are:
    //If a document is open
    if(app.documents.length!=0)
    var ad = app.activeDocument;
    //Pages placement
    for(i=0; i<2; i++)
    //Add 2 pages on top of the document;
    var tmpPg = ad.pages.add(LocationOptions.BEFORE, ad.pages[0]);
    //Here you place your pdf
    app.pdfPlacePreferences.pageNumber = i;
    tmpPg.place(File(cover.pdf), false)
    //You should specify page x and page y but ain't found yet the way to go.
    //Text variable creation
    //Check if the textVariable named "txtVar" does not already exist...
    if(ad.textVariables.item("txtVar")==null)
    //if not found, create the text variable named "txtVar"
    var txtVar = ad.textVariables.add();
    txtVar.variableType =VariableTypes.CUSTOM_TEXT_TYPE;
    txtVar.name = "txtVar";
    //Set the contents of the text variables to the string "test"
    ad.textVariables.item("txtVar").variableOptions.contents = "test";
    //these coordinates don't care aboutyour units but you may adjust them to your needs
    var y1 = ad.marginPreferences.left;
    var x1 = ad.marginPreferences.top;
    var y2 = y1+5;
    var x2 = x1+25;
    var myFrame = ad.pages[0].textFrames.add({geometricBounds:[y1,x1,y2,x2]});
    //Set the contents of the frame to the text variables "txtVar"
    myFrame.contents=ad.textVariables.item("txtVar").variableOptions.contents;
    //You may want to stylize the txtVar
    //In this case, either you use a existing characterStyle or you create one in the script
    Bye Loic

  • How to call pl/sql function from element values

    EBS 11.5.10.2
    XMLP 5.6.3
    Hello,
    I noticed that the output of the rdf-to-data template conversion process makes use of an undocumented feature of data templates, and I would like to get input from experts as to which situations this feature is usable.
    The closest thing I can find in the documentation is a sample in the user guide. There is a "General Ledger Journals Data Template Example" that has a <dataStructure> section that contains <element> nodes which are NOT children of a <group> node. I can't find any explanation of this in the user guide.
    I've noticed from converted templates that in these un-grouped elements you can make calls to PL/SQL functions in the "value" attribute, like this:
    <dataStructure>
      <group name="G_LINES" source="Q_MAIN">
        <element name="Line_Num"           value="Line_Num"/>
      </group>
      <element name="C_CALCULATED_VALUE" dataType="number" value="XX_CUSTOMPROCS.SOME_FUNCTION"/>
    </dataStructure>Has anyone had any success being able to call PL/SQL functions from grouped elements? Whenever I try, it doesn't seem to work.
    When I try something like this:
    <dataStructure>
      <group name="G_LINES" source="Q_MAIN">
        <element name="Line_Num"           value="Line_Num"/>
        <element name="some_calculation"   value="XX_CUSTOMPROCS.SOME_FUNCTION"/>
        <element name="some_calculation_b" value="XX_CUSTOMPROCS.SOME_FUNCTION_B(:Line_Num)"/>
      </group>
      <element name="C_CALCULATED_VALUE" dataType="number" value="XX_CUSTOMPROCS.SOME_FUNCTION"/>
    </dataStructure>The <SOME_CALCULATION/> and <SOME_CALCULATION_B/> nodes come out empty in the output data xml file, but <C_CALCULATED_VALUE> would have a value as desired.

    ah - perfect. That makes sense. Thank you for the response!
    But what about when we need to pass parameters to those functions whos values are the results of aggregate element values?
    This happens a lot in the converted data templates, where pl/sql package functions are meant to replace formula columns from the original Oracle Report. Take this example from the conversion of ARXAGMW.rdf (Aging Report, 7 Buckets):
    (note the function call in the value of "Set_Percent_Inv_Inv" is using aggregate results from subgroups)
      <group name="G_INV_INV" dataType="varchar2" source="Q_Invoice">
        <element name="Total_Inv_Inv_Amt" function="sum" dataType="number" value="G_Invoice.C_Amt_Due_Rem_Inv"/>
        <element name="Total_Inv_Inv_B0" function="sum" dataType="number" value="G_Invoice.C_Inv_B0"/>
        <element name="Total_Inv_Inv_B1" function="sum" dataType="number" value="G_Invoice.C_Inv_B1"/>
        <element name="Total_Inv_Inv_B2" function="sum" dataType="number" value="G_Invoice.C_Inv_B2"/>
        <element name="Total_Inv_Inv_B3" function="sum" dataType="number" value="G_Invoice.C_Inv_B3"/>
        <element name="Total_Inv_Inv_B4" function="sum" dataType="number" value="G_Invoice.C_Inv_B4"/>
        <element name="Total_Inv_Inv_B5" function="sum" dataType="number" value="G_Invoice.C_Inv_B5"/>
        <element name="Total_Inv_Inv_B6" function="sum" dataType="number" value="G_Invoice.C_Inv_B6"/>
        <element name="Set_Percent_Inv_Inv"  dataType="number"  value="XX_CUSTOMPROCS.XXC_ARXAGMW.set_percent_inv_invformula(:Total_Inv_Inv_Amt, :Total_Inv_Inv_B0, :Total_Inv_Inv_B1, :Total_Inv_Inv_B2, :Total_Inv_Inv_B3, :Total_Inv_Inv_B4, :Total_Inv_Inv_B5, :Total_Inv_Inv_B6)"/>
        <element name="Sum_Percent_B0_Inv" dataType="number" value="XX_CUSTOMPROCS.XXC_ARXAGMW.Sum_Percent_B0_Inv_p"/>
        <element name="Sum_Percent_B1_Inv" dataType="number" value="XX_CUSTOMPROCS.XXC_ARXAGMW.Sum_Percent_B1_Inv_p"/>
        <element name="Sum_Percent_B2_Inv" dataType="number" value="XX_CUSTOMPROCS.XXC_ARXAGMW.Sum_Percent_B2_Inv_p"/>
        <element name="Sum_Percent_B3_Inv" dataType="number" value="XX_CUSTOMPROCS.XXC_ARXAGMW.Sum_Percent_B3_Inv_p"/>
        <element name="Sum_Percent_B4_Inv" dataType="number" value="XX_CUSTOMPROCS.XXC_ARXAGMW.Sum_Percent_B4_Inv_p"/>
        <element name="Sum_Percent_B5_Inv" dataType="number" value="XX_CUSTOMPROCS.XXC_ARXAGMW.Sum_Percent_B5_Inv_p"/>
        <element name="Sum_Percent_B6_Inv" dataType="number" value="XX_CUSTOMPROCS.XXC_ARXAGMW.Sum_Percent_B6_Inv_p"/>
        <group name="G_Cust_Inv" dataType="varchar2" source="Q_Invoice">
          <group name="G_Site_Inv" dataType="varchar2" source="Q_Invoice">
            <group name="G_1" dataType="varchar2" source="Q_Invoice">
              <group name="G_Invoice" dataType="varchar2" source="Q_Invoice">
                <element name="C_Amt_Due_Rem_Inv" dataType="number" value="C_Amt_Due_Rem_Inv"/>
                <element name="C_Inv_B0" dataType="number" value="C_Inv_B0"/>
                <element name="C_Inv_B1" dataType="number" value="C_Inv_B1"/>
                <element name="C_Inv_B2" dataType="number" value="C_Inv_B2"/>
                <element name="C_Inv_B3" dataType="number" value="C_Inv_B3"/>
                <element name="C_Inv_B4" dataType="number" value="C_Inv_B4"/>
                <element name="C_Inv_B5" dataType="number" value="C_Inv_B5"/>
                <element name="C_Inv_B6" dataType="number" value="C_Inv_B6"/>
              </group>
            </group>
          </group>
        </group>
      </group>
      ...All of these groups and sub-groups are based on one single query, so I am not sure how I would move the function call into the query without changing the results of the function.
    In the example above, elements Sum_Percent_B0_Inv through Sum_Percent_B6_Inv grab the results of the calculation done in set_percent_inv_invformula. Here is the essence of that function:
      sum_percent_b0_inv := ROUND ((total_inv_inv_b0 / total_inv_inv_amt) * 100, 2);
      sum_percent_b1_inv := ROUND ((total_inv_inv_b1 / total_inv_inv_amt) * 100, 2);
      sum_percent_b2_inv := ROUND ((total_inv_inv_b2 / total_inv_inv_amt) * 100, 2);
      sum_percent_b3_inv := ROUND ((total_inv_inv_b3 / total_inv_inv_amt) * 100, 2);
      sum_percent_b4_inv := ROUND ((total_inv_inv_b4 / total_inv_inv_amt) * 100, 2);
      sum_percent_b5_inv := ROUND ((total_inv_inv_b5 / total_inv_inv_amt) * 100, 2);
      sum_percent_b6_inv := ROUND ((total_inv_inv_b6 / total_inv_inv_amt) * 100, 2);The only solution I can think of is to have separate queries, one for each subgroup, that do the "sum" in sql; but that seems terribly inefficient.

Maybe you are looking for

  • Jabber and dial from IE yet?

    Does Jabber support direct dialling from IE yet? Trawled through previous discussions and release notes but doesn't look promising. Can I get a quick Yes/No with reference for 5 points please? :) CUCM 10.5 Jabber 10.6 Cheers Rich

  • IMac G5 no Bluetooth on waking from Sleep

    I have an iMac G5 2 Ghz model with a wireless Mighty Mouse and Apple wireless keyboard and have recently been encountering a problem with the bluetooth connections to them on waking form sleep. Although I have searched and found threads detailing sim

  • Schdule_ship_date should not be updatable when we change a request_date

    Hi all , can you please help to resolve this issue? In OM module Sales order form we have request_date and schdule_ship_date and they are some default rules are defined as sysdate for both the dates and thses should be effected once you save the form

  • After importing from iPhoto, how would you eliminate the photos?

    I have installed Aperture adn like it quite a bit. I imported from iPhoto (which copies over the pictures...not move.) I have backed up the photos in iPhoto to an external hard drive in case Aperture blows up on me and I need to go back to iPhoto. Bu

  • 1.3 Update Error "An error occurred when attempting to change modules"

    Good evening, Recently updated to 1.3, and now, when starting, Lightroom won't open up a catalog. When I go t manually do this (File-Open), I get this error: An error occurred when attempting to change modules Sometimes, I can get the program to disp