Populate an Invoice from a variable length transaction file

I have a transaction file which has labor rows and material rows which need to be posted onto an invoice.  Column A in transaction file has an L if labor and a M if a material record:
Transaction file:
L Labor = 123.45
L Labor = 234.56
M Part1
 = 333.33
L Labor = 22.25
M Part2  = 12.45
M Part3  = 56.45
On the Invoice spreadsheet which this data must be 'posted' to:
The VARIABLE number of Material rows must be on top and go down an UNLIMITED number of rows.  The labor will end up being just one summary line at the bottom of the invoice or right after the end of the Material lines.
INVOICE  EXAMPLE:
Description Amount
Part1 333.33
Part2   12.45
Part3   56.45
TOTAL Labor 380.26

Hi,
I try to reproduce your needs, check the below image if it is you wanted.
If it is, we need to do some steps:
1.Copy the transaction data to column A.
2.Split the original data. Formula:
B1:=LEFT(A1,FIND("=",A1,1)) C1:FIND("=",A1,1)))
3.We need some VBA code to realize two behaviors.
List the material record to column F.
Sum the labor record
If you need further help about the VBA coding/programing, please post your questions to MSDN forum.
http://social.msdn.microsoft.com/Forums/en-US/home?forum=exceldev&filter=alltypes&sort=lastpostdesc
Regards,
George Zhao
TechNet Community Support

Similar Messages

  • External Table for Variable Length EBCDIC file with RDWs

    I am loading an ebcdic file where the record length is stored in the first 4 bytes. I am able to read the 4 bytes using the db's native character set, ie;
    records variable 4
    characterset WE8MSWIN1252
    data is little endianBut I have to then convert each string column individually on the select, ie;
    convert(my_col, 'WE8MSWIN1252', 'WE8EBCDIC37')If I change the character set to ebcdic;
    records variable 4
    characterset WE8EBCDIC37
    data is little endianI get the following error reading the first 4 bytes;
    ORA-29913: error in executing ODCIEXTTABLEFETCH callout
    ORA-29400: data cartridge error
    KUP-04019: illegal length found for VAR record in file ...We can not use the ftp conversion as the file contains packed decimals.
    There are other options for converting the file but I am wondering if was able to get an external table to read a native ebcdic file without a pre-process step.

    I am loading an ebcdic file where the record length is stored in the first 4 bytes. I am able to read the 4 bytes using the db's native character set, ie;
    records variable 4
    characterset WE8MSWIN1252
    data is little endianBut I have to then convert each string column individually on the select, ie;
    convert(my_col, 'WE8MSWIN1252', 'WE8EBCDIC37')If I change the character set to ebcdic;
    records variable 4
    characterset WE8EBCDIC37
    data is little endianI get the following error reading the first 4 bytes;
    ORA-29913: error in executing ODCIEXTTABLEFETCH callout
    ORA-29400: data cartridge error
    KUP-04019: illegal length found for VAR record in file ...We can not use the ftp conversion as the file contains packed decimals.
    There are other options for converting the file but I am wondering if was able to get an external table to read a native ebcdic file without a pre-process step.

  • Import data from a Fixed Length File into Oracle database

    Hi,
    I would like to import data from a Fixed Length text file into a table using HTML DB application.
    As of now, i have a .sql file(that uses external table) to import the data into Oracle tables
    I would like to integrate this in my HTML DB application so that the user can directly import the data into the table.
    Sample data
    XXXYYYYZZZZZ
    Data should be read to table that has
    Col1 Col2 Col3
    XXX YYYY ZZZZZ

    Hi,
    I would like to import data from a Fixed Length text
    file into a table using HTML DB application.AFAIK, fixed length imports are not something you can do directly with the HTML DB tools or available APIs.
    As of now, i have a .sql file(that uses external
    table) to import the data into Oracle tables
    I would like to integrate this in my HTML DB
    application so that the user can directly import the
    data into the table.Any fixed-length data needs to have a specification associated with it that indicates which character position begins a new column and what each column represents. Some also include what datatype should be used for each of those.
    If you really want to do this I would suggest that you create a table that you can store the file spec in. It would probably have columns for field name, start position, length or end position, datatype and any alias/column name you might want to apply. You would then use this table in a PL/SQL procedure (probably a package with the main processing procedure and various supporting procedures/functions) to read the file into memory, apply the file spec to each line and then do inserts into your table.
    Obviously, this is just a concept or strategy. Implementing it will depend on your PL/SQL skills and determination. If you want to pursue this strategy I'm sure you can find some jump-starts by doing a search on the PL/SQL forum.
    This may not sound like an answer - but the answer is you need to code it to fit your requirements. Hope that helps.
    Earl

  • Configuring unicode charcterset for fixed length control file

    Hi all,
    we are setting our control file to support any language characters while data loading, we all set with our database configuration , need to configure our control file which is fixed length, we are using CHARACTERSET UTF8 and and also tried with CHARACTERSET AL32UTF16, its working fine for variable length control file but for fixed length the foriegn charecers like latin-I,greek, danish charactrers are taking more byte and affecting to next position data. and our data file is in UTF8 (not in regular ANSI formatt).
    please advise
    here is our control file example:
    options (errors=999,SKIP=0)
    Load DATA
    CHARACTERSET UTF8
    append
    INTO TABLE TABLE_NAME
    TRAILING NULLCOLS
    field_name1 position(1:30) "trim(:fiels_name1)",
    field_name2 position(247:306) "trim(:field_name2)",
    )

    I think you should move thread to: {forum:id=732}.

  • While trying to invoke the method java.lang.String.length() of an object loaded from local variable 'payload'

    Hi,
    Our PI is getting data from WebSphere MQ and pushing to SAP. So our sender CC is JMS and receiver is Proxy. Our PI version is 7.31.
    Our connectivity between the MQ is success but getting the following error while trying to read the payload.
    Text: TxManagerFilter received an error:
    [EXCEPTION]
    java.lang.NullPointerException: while trying to invoke the method java.lang.String.length() of an object loaded from local variable 'payload'
           at com.sap.aii.adapter.jms.core.channel.filter.ConvertJmsMessageToBinaryFilter.filter(ConvertJmsMessageToBinaryFilter.java:73)
           at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:204)
           at com.sap.aii.adapter.jms.core.channel.filter.InboundDuplicateCheckFilter.filter(InboundDuplicateCheckFilter.java:348)
           at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:204)
    I have searched SDN but couldn't fix it. Please provide your suggestion.
    With Regards
    Amarnath M

    Hi Amarnath,
    Where exactly you are getting this error?
    If you are getting at JMS Sender communication channel, try to stop and start the JMS communication channel and see the status, also use XPI Inspector to get the exact error log.
    for reference follow below blogs:
    Michal's PI tips: ActiveMQ - JMS - topics with SAP PI 7.3
    Michal's PI tips: XPI inspector - help OSS and yourself
    XPI Inspector

  • Approval task SP09: Evaluation of approvalid failed with Exception: while trying to invoke the method java.lang.String.length() of an object loaded from local variable 'aValue'

    Hi everyone,
    I just installed SP09 and i was testing the solution. And I found a problem with the approvals tasks.
    I configured a simple ROLE approval task for validate add event. And when the runtime executes the task, the dispatcher log shows a error:
    ERROR: Evaluation of approvalid failed with Exception: while trying to invoke the method java.lang.String.length() of an object loaded from local variable 'aValue'
    And the notifications configured on approval task does not start either.
    The approval goes to the ToDO tab of the approver, but when approved, also the ROLE stays in "Pending" State.
    I downgraded the Runtime components to SP08 to test, and the approvals tasks works correctly.
    Has anyone passed trough this situation in SP09?
    I think there is an issue with the runtime components delivered with this initial package of SP09.
    Suggestions?

    Hi Kelvin,2016081
    The issue is caused by a program error in the Dispatcher component. A fix will be provided in Identity Management SP9 Patch 2 for the Runtime component. I expect the patch will be delivered within a week or two.
    For more info about the issue and the patch please refer to SAPNote 2016081.
    @Michael Penn - I might be able to assist if you provide the ticket number
    Cheers,
    Kristiyan
    IdM Development

  • FQ event to populate invoicing party in DFKKOP during invoicing from EASIBI

    Hi Experts,
    I am looking for an event to update invoicing party field in DFKKOP table during invoicing from transaction 'EASIBI'. As per standard process Invoicing party field is populated in DFKKOP when Invoicing party at contract level is a third party.
    In my case invoicing party at contract is not third party but still invoicing party field need to be populated in DFKKOP. I tried event 402 and 432 but these are not workig.
    Any help on this is appreciated.
    Thanks for your help in advance!!!
    Vibhor

    Hi Vibhor,
    Try using the event R408\R433.
    The event is called up after the posting document for consumption billing has been created.
    Here, you are getting the FICA document no. (DFKKOP-OPBEL) against which the invoicing has happened.
    Once you get the FICA document no., you can update the corresponding INVOICING PARTY field in DFKKOP by using any std FM.
    Hope it helps...
    Thanks,
    Amlan

  • Bank statement: problem to load variable length field

    we have many bank accounts with different banks, and we would like to use the bank reconciliation module to do bank reconciliation.
    we have problem in load the MT940 bank statement. All these banks are providing so called standard SWIFT940 format, which not able to give fixed length field.
    we have problem on line 61 which have a lot of variable length fields.
    line 61 comprise of 7 fields, which are:
    A) Value date - fixed 6 chars.
    B) Entry date - fixed 4 chars.
    C) Credit/debit - variable 1-2 chars.
    D) Fund Code - fixed 1 char
    E) Transaction amount - variable 15 chars
    F) Transaction code/type - fixed 4 chars
    G) MID, cheque#, BIS - variable 16 chars
    How can we write the SQL Loader script if there is no delimiter, and the start position of the fields are not fixed?
    we can load A and B easily, but C onwards we will have problems.
    please help.
    INTO TABLE ce_stmt_int_tmp
    WHEN rec_id_no = '61'
    TRAILING NULLCOLS
    (rec_no RECNUM,
    rec_id_no POSITION(1:2) CHAR,
    column1 POSITION(4:9) CHAR,
    column2 POSITION(10:13) CHAR,
    column3 ??
    column4 ??
    column5 ??
    column6 ??
    column7 ??
    ------

    Hi Linda,
    As said by gupta, please check, whether the bank statement has the statement 62F:
    If not, please get the statement again from bank and ensure that the end statement 62F exists in the statement..
    This will help you to overcome your problem..
    Regards,
    Praisty

  • How to save blob data (variable length string) in a customized table?

    Dear Friends
    I have written a very simple program to update table with 2 fields which
    looks as follows.
    ========================================================
    Table name ZTESTBLOBDATA
    Field         Key          Init    Data Element   Data Type  Length  
    ID          Checked                 ZID                 NUMC        2
    BLOB                                   ZBLOB           STRING       0
    =========================================================
    FOllowing is the sample program that I have written (Transaction SE38).
    =========================================================
    REPORT ZTESTBLOBPROG
    TABLES: ZTESTBLOBDATA
    data :  itab like ZTESTBLOPDATA occurs 1 with header line.
    select * from ztestblobdata into table itab.
    ztestblobdata-id  =   sy-dbcnt +1.
    ztestblobdata -blob = 'abcdefghijklmnopqrstuvwxyz.'.
    insert ztestblobdata.
    =========================================================
    When I try to save and activate the program, I get the following
    error message
    'ztestblopdata' must be a flat structure. You cannot use internal
    tables, strings, references, or structures as components.
    ==========================================================
    Using the data type STRING is a must since it is a variable length
    data which varies from few characters to few gig.
    How can go around this problem.
    Any feedback will be highly appreciated.
    PS. I have checked old postings on SDN, spoken to my ABAP contacts and also couple of instructors from SAP when I took XI courses but didn't get a satisfactory answers.
    Edited by: Ram Prasad on Oct 15, 2008 12:28 PM

    Thanks a lot for the response.
    The string that we are getting is from another application via netweaver XI integration and is being sent as a string which has to be saved in an SAP table. I am not sure if IDOC option will suit our needs, but will definitely read more about it.
    If there is any other suggestion of feedback I would appreciate it a lot.;
    Tks
    Ram

  • How can you add data from a variable into a column in a data flow?

    I need to populate a table with data from a variable. The data type of the variable is String. I'm running into issues doing it the way I am. I have variable
    User:VariableName = "Some moderately sized string of data"
    When I try to use a Derived Column Transformation Editor to insert the variable into the data flow as a new column, SSIS forces the Data Type to be Unicode String[DT_WSTR] and I can't change it. Additionally the length is 0 and I also can't change that.
    When I run the package it errors with a truncation error. If the length is 0 then that makes sense but then why can't I change it to something that makes more sense?
    What is the correct way to go about this?

    Use advanced editor to change data type and length.
    http://www.sureshjoshi.com/development/ssis-string-variables-in-derived-columns/

  • CER for multisite variable length on-net dialplan customer

    Hello -
    I am working to deploy CER for a large customer.  They have a CCM cluster supporting, as expmple, 10 sites with the following characteristics:
    1. each site has 4 digit DNs
    2. each site has it's own phone partition
    3. sites have overlapping DNs
    4. calling from one site to another requites "8" +"3 digit site code"
    5. CCM 7.x;
    6. CER 8.0
    CER is populated with switches from multiple sites so therefore will have CER database entry for DN=4000 in site1, site2, and site 7.
    Question are:
    1. If site2, DN 4000 phone calls 911, how does CER associate this caller with ERL2?
        - I am not sure what parameters are passed in the JTAPI messaging to the 911 CER Route Point to make this association?
        - assume the basics are signalled like calling/called numbers, but is additional info like mac address passed allowing CER to map ERL accurately
    2. PSAP Callback
       -assuming ERL is mapped correctly on the outbound 911 call, if PSAP calls  back and ELIN is routed back to CER properly ...
       - CER would perform callback using ELIN<=>Phone cached mapping
                      o hence CER would send JTAPI call request to CCM for x4000
                      o x4000 exists in 3 partitions
       - if I have the CER911 CTI Route Point CSS populated with each sites phone partition, it would seem that CCM would incorrectly ring the first partition listed that contained x4000
    SRND for variable length onnet design has section on CER but nothing of value (at least that I could find).   Same with the CER docs.
    Any guidance here would really be appreciated.
    Thanks
    Andy

    So, while the switchport is pecified and used to populate the CER db, that is all done before any call is made.  At that point, CER has DN, MAC, IP,...
    Correct, you build CER configuration to your design
    Phone makes 911 call, and at this point, CER has to tie this "inbound call" to a phone in the database.  That association has to use information from the JTAPI messaging which I assume to be standard compliant.  I could be way off here because we just did a test where a phone, defined in CER using switch port, was matched up properly even though I totally changed the callerid on 911 call (i.e. phone dn=4613, phone translation for 911 prefixed changed to 1111 so CER sees calling num=1111).  This callerID was not stored anywhere in CER database but it did match up the correct zone.  I have no idea how.  JTAPI must pass in mac/IP which CER uses.
    For outbound call, when phone dials 911 and the call is routed to CER via CTI RP, CER maps this call to a phone that dialed 911 through discovered DN from the Switch via SNMP/CDP, it then identifies which port the phone is connected to, looks at what ERL is assigned to the port and uses next available ELIN on that ERL to mask ANI to it and route it to CUCM. CUCM routes the call via Route Pattern to CUCM with the modified Caller ID.
    When the call drops and 911 agent needs to call back, they dial the ELIN DID, call is routed to CUCM, matches translation pattern that routes the call to CER via another CTI RP (usually 913XXXXXXXXXX), CER sees the call coming in with ELIN and checks internal db for who last called out using this ELIN, and extends the call to that phone DN, it keeps that relationship for up to 3 hours after the call was made.
    HTH, please rate all useful posts!
    Chris

  • Changing a variables length for text input in Captivate 6

    I am using eLearning CS6 (non-subscription I believe, but no one at my office can confirm) and use a machine where all software is deployed via push from IT. The ability to check for updates has been removed from me.
    I need to be able to have users enter data into the course and have it both be forwarded on to our database AND appear in later segments of the course.
    I recall being able to update the TEB variable length in previous versions but can not find the option anywhere in CS6. or perhaps I'm imaging it.
    I am running version 6.0.1.240 and there is no Format option in my TEB properties. I do not see alignment options, and instead see Characters as a menu above the Shadow & Reflection option.
    I do know where to set the value in a text caption box. However, I seem to be limited to entering a single variable in the caption field in order for this to be option. However, there are times where we'd rather have multiple variables strung together on a single line, or a word or two of static text appearing before or after the variable.
    If I want to string the user entered data from multiple variables into a single caption box there appears to be no way to change the variable's character length from 15 to a higher value.
    Does anyone know of another way to work around this other than through the use of multiple caption boxes?
    I've been driving myself a bit batty trying to think of a way around the 1 caption 1 variable limit...
    Thanks.
    Note: Please don't advise me to upgrade. I've already been told the office will not pay for an update to the software so quickly on the heels of our upgrade from CS 5.5 to CS6 (happened within a 6 month span).

    15 characters is the default when you insert the variable into a text caption.  But you can set this to anything from 1 to about 250...as long as you use the Insert Variable icon in the Properties tab > Format accordion to insert the variable.  Look for the field in the dialog that allows you to specify the variable's display length.

  • Internal Error when adding Invoice from DI-API

    Hello All,
    I am trying to add an invoice using DI-API. I hv populated the object using XML and than adding it. Upon adding the error Internal Error (-10) is coming. I hv checked everything but am certainly missing something. Following is the XML of the invoice and the code to add it
    <?xml version="1.0" encoding="utf-16" ?>
    <BOM>
      <BO>
        <AdmInfo>
          <Object>13</Object>
          <Version>1</Version>
        </AdmInfo>
        <OINV>
          <row>
            <U_EntryId>1</U_EntryId>
            <DocType>I</DocType>
            <DocDate>20110923</DocDate>
            <DocDueDate>20111023</DocDueDate>
            <CardCode>JM0004</CardCode>
            <CardName>GAYAN BHARTI</CardName>
            <NumAtCard></NumAtCard>
            <DiscPrcnt>0.000000</DiscPrcnt>
            <DocTotal>755.000000</DocTotal>
            <Comments></Comments>
            <U_BranchTrans>1</U_BranchTrans>
            <SlpCode>-1</SlpCode>
            <IsICT>N</IsICT>
            <Series>40</Series>
            <TaxDate>20110923</TaxDate>
            <TrackNo></TrackNo>
            <SeqCode>0</SeqCode>
            <U_SlpName></U_SlpName>
            <U_WebCreated>N</U_WebCreated>
            <U_Territory></U_Territory>
            <U_InvType>C</U_InvType>
          </row>
        </OINV>
        <INV1>
          <row>
            <ItemCode>A003</ItemCode>
            <Dscription></Dscription>
            <Quantity>5.000000</Quantity>
            <DiscPrcnt>0.000000</DiscPrcnt>
            <WhsCode>JSP-FG</WhsCode>
            <PriceBefDi>11.000000</PriceBefDi>
            <TaxCode>NonTax</TaxCode>
            <U_WebCreated>N</U_WebCreated>
            <U_RetQty></U_RetQty>
            <U_SaleQty></U_SaleQty>
            <U_LineType>S</U_LineType>
          </row>
          <row>
            <ItemCode>A005</ItemCode>
            <Dscription>Ace Visual Dictonary 2</Dscription>
            <Quantity>10.000000</Quantity>
            <DiscPrcnt>0.000000</DiscPrcnt>
            <WhsCode>JSP-FG</WhsCode>
            <PriceBefDi>70.000000</PriceBefDi>
            <TaxCode>NonTax</TaxCode>
            <U_WebCreated>N</U_WebCreated>
            <U_RetQty></U_RetQty>
            <U_SaleQty></U_SaleQty>
            <U_LineType>S</U_LineType>
          </row>
        </INV1>
      </BO>
    </BOM>
    Program Code to add
                Dim oSapObject As SAPbobsCOM.Documents
                oCompany.XMLAsString = True
                oSapObject = oCompany.GetBusinessObjectFromXML(Body, 0)
                If oSapObject.Add <> 0 Then
                    Throw New Exception(oCompany.GetLastErrorDescription & " [" & oCompany.GetLastErrorCode & "]")
                End If
    Any help would be greatly appreciated. This is sort of urgent and needs to be done immediately.
    Regards,
    Rahul Jain
    PS: The error is coming on oSapObject.Add - it is able to read the invoice from XML, the error comes when trying to add it. All relevant values mentioned in XML are present in the database, and I am able to add an Invoice from the UI.
    Edited by: Rahul Jain on Sep 24, 2011 1:29 PM

    I realize this might not be to much help but everytime I have ever gotten an internal error code it has always turned out to be a SQL error. For instance there could be something in transaction notification that doesnt jive with your submission or something along those lines. Perhaps you could try a more simplified invoice as a test such as just send one item with a price and no UDFs .
    Sorry if that is not much help.

  • Issue in creating Credit Note for road carrier invoice from SAP TM system

    Dear All,
    I am facing issue in creating Credit Note for road carrier invoice from SAP TM system.
    The following steps I have performed:
    1)  
    1)    1) Create Freight order with Amount 20,100
    2)     2) Create Freight Settlement Doc and send it to ECC. Hence PO and SES will be created in ECC with Amount 20,100
    3)     3) Invoice verification (MIRO) done w.r.t. FO in ECC with Amount 20,100 and following entries posted :
    Carrier A/c - 20,100Cr
    GR/IR A/c – 20,100 Dr
    4)    4) Created Credit Note in SAP TM against freight order with Amount 1,010 and transfer it to SAP ECC.
    5)    5)  By this a new PO and SES was created with negative values (with amount 1,010) in SAP ECC
    6)    6)  In transaction MIRO, Credit Memo was created against the freight order.
    7)    7)  By this it is showing value 21,110 by adding the line items of Original Purchase Order and Credit Note Purchase Order as 20,100 and 1,010 respectively.
    8)    8)  By posting this following are the accounting entries which is not correct:
    Carrier A/c – 21,110 Dr
    GR/IR – 20,100 Cr
    GR/IR – 1,010 Cr
    9)    9)  In report FBL1N which is showing the remaining liability of value 1,010(21,100 – 20,100) instead of 19,090 (20,100-1,010=19,090) for the carrier.
    Please suggest how to resolve the issue and get the correct accounting for credit memo?
    Regards,
    Vibhu Gupta

    Hello,
    Like my reply in Linkedin group, I got the same issue and solved with BADI in TM side(REQREQ...).
    Regards, Marcelo Lauria

  • ODI - Setting file name from a variable

    Hi,
    I am working on a data integration where I have to fetch data from a database table
    and write it to a flat-file (Fixed length text file). I have succeeded in creating the file.
    I could connect to the database, fetch data and write it to a flat-file in the format I need.
    1. After doing this, can I rename the file or move to file to somewhere, where the filename
    is something like 'File_yyyyMMDDHHmmss.txt'?
    2. To Achieve this, can I use a variable in the ODI project?
    Please help as this is needed urgently for a delivery.
    Thanks,
    Leo

    Hi,
    Thanks for the response. I used it in the same way. But, when I validate the query, it says invalid format description. I am putting this query in the "Select query" text item in "Refreshing" tab of the variable definition screen.
    Thanks,
    Leo

Maybe you are looking for

  • How do I find out what "Other" is, in the "About this Mac", storage details bar graph?

    My new Mac Book Pro with 250 GB Flash Storage is already full with only adding a few apps. I purchased the new Final Cut Pro X, but store all video data on an external drive. Whats up? Why is 146 GB used up with "Other"? What is "Other!?" How can I f

  • Ipad mini retina cannot share hot spot with Bluetooth for Iphon5

    Ipad mini retina cannot share hot spot with Bluetooth for Iphon5 But When my Iphon5 share hot spot with Bluetooth for Ipad, I can share.

  • How do I get pages 4 for my new mac pro?

    I have a new Mac Pro (running Mavericks) that comes packaged with the unusable Pages5.  I use Pages4 on my Macbook Pro and also want to use it on my Mac Pro.  Since it's no longer available for purchase, can someone please tell me how I can get a ver

  • Is it possible to save your iTunes/iPad sync selection?

    Hi, Basically, as the subject line suggests, is it possible to save/restore a list of albums/artists/playlists, etc. that I have selected to sync with my iPod, so that I can have multiple sync lists? i.e. a sync list for when we are on holiday, a syn

  • Importing analog video problems

    I'm trying to import some old 8mm Sony video into imovie and it only gets imported as Black & White video. I'm using a new Canopus ADVC 110. setup - analog inputs into the front of the canopus and firewire cable, one supplied, out the back to thefire