Using a formatted search which incorporates copying data from base document

Hi
I have a user selling tiles.  They sell by sq meter but will only sell whole boxes.  I have a formatted search on the quantity field to calculate the number of sq meters in a box.  They also sell indivudual units and will key this value directly into the quantity field.  All this works fine.
However if I enter this as a sales order and copy to a delivery, then the formatted search fires and the quantity field gets refreshed.  This results in the incorrect value where the user had keyed data directly into the qty field in the base document.
Therefore I need to incorporate my base document values into my query where by if there is a base document, the query will pull the quantity data from the base document.  My query so far is as follows
SELECT (CAST($[$38.U_ActMtr.0] AS DECIMAL(10, 2))*CAST(T0.U_SqmBox AS DECIMAL(10, 2))) FROM OITM T0 WHERE T0.ItemCode = $[$38.1.0]
Any suggestions?
David

If I understand your requirements well, you want to save the base quantity, when the delivery is based upon a SO, and to compute it when the DLN is not copied.
Try to use this modified FS:
declare @q dec(19,6)
set @q=$[$38.11]
If $[$38.43]<>-1
Select @q
Else
SELECT (CAST($[$38.U_ActMtr.0] AS DECIMAL(10, 2))*CAST(T0.U_SqmBox AS DECIMAL(10, 2)))
FROM OITM T0 WHERE T0.ItemCode = $[$38.1.0]

Similar Messages

  • IP Exit Planning function copy data from cca to pca planning cubes

    Hello All,
    I have a requirement where I have to copy the characteristics and keyfigures of CCA plan cube data to pca plan cube data.The infoobjects in CCA aggregation level are are {0amount,0costcenter,0costelement,version,0calmonth,0infoprovider} which needs to be copied to corresponding infoobjects in PCA level  {0amount,0profitcenter,0account,0version,0calmonth,0infoprovider}.
    The CCA and PCA aggregation level are built on the top of the multiprovider.
    I can do it using the fox coding but 0costelement cannot be mapped to 0account as these two are different fields.Since I have to copy the values of 0costelement to 0account , I was wondering how can I do it using the exit function.
    As I have never used the exit function before, I was wondering if somebody can help me out with this.
    By the way, I have read the forums and figured out to create a class in se24 and use interface
    IF_RSPFLA_SRVTYPE_IMP_EXE and since I am generating some records , will be using the method IF_RSPLFA_SRVTYPE_IMP_EXEC~INIT_EXECUTE.
         By the way , I read in the forums where there are methods/function modules which can copy data from one aggregation level to another aggregation level.Anyways, can you tell how can I loop thru the records of CCA aggregation level and copy the records to the PCA aggregation level.
    Edited by: nazeer on Feb 22, 2009 12:04 PM

    This thread might help you.
    https://forums.sdn.sap.com/click.jspa?searchID=22634973&messageID=5317176

  • 2006 iMac running 10.4 OS. I copied files to ext. drive. Put in 10.6 disc and did a clean install (format) of 10.6. Copied data from ext. drive back to Mac. I didn't get all the files. CAN I REVERT BACK TO THE 10.4 OS SO I CAN COPY MY DATA PROPERLY?

    2006 iMac running 10.4 OS. I copied files to ext. drive. Put in 10.6 disc and did a clean install (format) of 10.6. Copied data from ext. drive back to Mac. I didn't get all the files. CAN I REVERT BACK TO THE 10.4 OS SO I CAN COPY MY DATA PROPERLY?

    How did you copy files to the external drive, and what files did you copy? Did you drag and drop in the Finder? Use a clone utility? What files did not successfully copy?
    If you reformatted the drive as part of your install, then you won't be able to recover any files from the drive. Reverting back to (reinstalling) 10.4 will not help you.
    Do you have a complete-drive backup of your old system?
    Matt

  • Problems using a formatted search to link order lines to order header

    Hi,
    I'm having a nightmare trying to get the main lines table to populate the header within a sales order using a formatted search.
    I have created a UDF on the header for total value, and where items entered onto the order are of a certain type I need the header UDF to be sumated.
    Basically I have three parts for packaging (PACK1, PACK2 and PACK3), and the header has a UDF called U_TotPack
    Someone did sugest the following query, but this doesn't appear to work either:
    select sum(t0.linetotal) from rdr1 t0 inner join ordr t1 on t0.docentry = t1.docentry
    where t1.docnum = $[ORDR.DocNum] and t0.itemcode in ('PACK1', 'PACK2', 'PACK3')
    If it is a problem for me to use the line total field (as it is a variable calculation) I am happy to total the quantities for the items found, but I just can't seem to build any form of relationship between the header and lines.
    Hope someone out there is able to help as this one has really got me stumped.
    Cheers,
    J

    Hi Julian,
    I'm assuming you are trying to populate the header UDF before the Order is added to the system? If yes then it is not possible to achieve this via a formatted search, only SDK. A header FS cannot properly access line information, it only works the other way around - header info to line level.
    I presume the reasoning is that which line should your header FS take a value from? The FS syntax also doesn't allow you to loop throught all lines.
    The SQL that someone else suggested would only work for a sales order already added to the database. Hope this helps.
    Regards,
    Andrew.

  • Formatted search which perform calculation

    hi all,
    i want to design formatted search which does Arithmatic calculation of two user defind field  and display result in third UDF.
    i have designed formatted search but it gives internal error .
    Is there diff. syntax for using arithmatic operator in formatted search.
    i want to add,sub,mul runtime values from two UDF and display result in third UDF.
    please give me example.
    TIA.
    Chetan.

    Hi Chetan,
    Use the following syntax after eliminating / from it,
    /$[/$38.U_UDF1.Number]-/$[/$38.U_UDF2.Number]
    Regards,
    /Siddiq

  • Copy data from a UDO form to Goods Receipt PO using UI API

    Hi, all
    I tried to copy data from a UDO form to Goods Receipt PO using UI API through following codes.
    It works fine while copying to a Item-type Goods Receipt PO.
    But when the doctype is set to service, I got errors.
    I use for-loop to copy two items, Description and LineTotal, into the matrix of Goods Receipt PO form, but both failed.
    any suggestion?
    Edited by: Chao-Yi Wu on Aug 25, 2009 5:50 AM

    Hi  Chao-Yi Wu ,
    SBO_Application.ActivateMenuItem("2306")
    Dim oFormGR As SAPbouiCOM.Form = SBO_Application.Forms.ActiveForm
    Dim omtxIQC, omtxGR As SAPbouiCOM.Matrix
    Dim oedIQC, oedGR, oed As SAPbouiCOM.EditText
    Dim ocbIQC, ocbGR As SAPbouiCOM.ComboBox
    oFormGR.Mode = SAPbouiCOM.BoFormMode.fm_ADD_MODE
    oedIQC = oFormIQC.Items.Item("13").Specific
    oedGR = oFormGR.Items.Item("4").Specific
    oedGR.Value = oedIQC.Value
    oedIQC = oFormIQC.Items.Item("21").Specific
    oedGR = oFormGR.Items.Item("24").Specific
    oedGR.Value = oedIQC.Value
    oedIQC = oFormIQC.Items.Item("edComments").Specific
    oedGR = oFormGR.Items.Item("16").Specific
    oed = oFormIQC.Items.Item("3").Specific
    oedGR.Value = oedIQC.Value + ", Goods Recript PO:" + oed.Value
    ocbIQC = oFormIQC.Items.Item("cbDocType").Specific
    ocbGR = oFormGR.Items.Item("3").Specific
    If ocbIQC.Selected.Value = "I" Then
         ocbGR.Select(0, SAPbouiCOM.BoSearchKey.psk_Index)
    Else
         ocbGR.Select(1, SAPbouiCOM.BoSearchKey.psk_Index)
    End If
    omtxIQC = oFormIQC.Items.Item("mtx_0").Specific
    For i As Integer = 1 To omtxIQC.RowCount
    omtxGR = oFormGR.Items.Item("38").Specific
           If ocbIQC.Selected.Value = "I" Then
                oedIQC = omtxIQC.Columns.Item("c_ItemCode").Cells.Item(i).Specific
                oedGR = omtxGR.Columns.Item("1").Cells.Item(i).Specific
                oedGR.String = oedIQC.String
                oedIQC = omtxIQC.Columns.Item("c_AQty").Cells.Item(i).Specific
                oedGR = omtxGR.Columns.Item("11").Cells.Item(i).Specific
                oedGR.String = oedIQC.String
                oedIQC = omtxIQC.Columns.Item("col_19").Cells.Item(i).Specific
                oedGR = omtxGR.Columns.Item("14").Cells.Item(i).Specific
                oedGR.String = oedIQC.String
       Else  
    omtxGR = oFormGR.Items.Item("39").Specific
               oedIQC = omtxIQC.Columns.Item("c_Descrp").Cells.Item(i).Specific
               oedGR = omtxGR.Columns.Item("1").Cells.Item(i).Specific
               oedGR.String = oedIQC.String
               oedIQC = omtxIQC.Columns.Item("col_16").Cells.Item(i).Specific
               oedGR = omtxGR.Columns.Item("12").Cells.Item(i).Specific
               oedGR.String = oedIQC.String
      End If
                Next
    for items the matrix is 38 and for service the matrix is 39
    Rgds
    Micheal

  • How to copy data from one table to another (in other database)

    Hi. I would like to copy all rows from one table to another (and not use BC4J). Tables can be in various databases. I have already 2 connections and I am able to browse source table using
    ResultSet rset = stmt.executeQuery("select ...");
    But I would not like to create special insert statement for every row . There will be problems with date formats etc and it will be slow. Can I use retrieved ResultSet somehow ? Maybe with method insertRow, but how, if ResultSet is based on select statement and want to insert into target table? Please point me in the right direction. Thanks.

    No tools please, it must be common solution. We suceeded in converting our BC4J aplication to PostgreSQL, the MSSQL will be next. So we want to write simple aplication, which could transfer data from our tables between these 3 servers.

  • XML script to copy data from one repository to another

    Hi all,
    a customer wants an xml script that copy all data from the repository A to the repository B. I think that this is not possible to do this with an xml script, because the script tags (add-item, update-item, query-item, import-item, load-item, remove-item) seems don't give this feature. The same for RQL, that doesn't give you a command like "SELECT INTO".
    But what i'm asking is: Is there a way to run the copy using the repository script tags?
    Thanks.
    Edited by: user10980894 on 11-lug-2011 3.33

    Please elaborate , If what you need is to copy data from between two dissimliar repositories then it is not possible , but if a and b are having the same structure then you might be able to do that using the following and tweaking the generated xml
    Both the repositories should have the same structure and name , please follow the below commands and you will be able to export the data in below format , see if this is all you want
    export using
    bin/startSQLReository -m module -export all outputfile.xml -repository repositoryA
    Change the reference to repositoryA in the file
    import using
    bin/startSQLRepository - m module - import outputfile.xml -repository repositoryB
    <add-item item-descriptor="priceList" id="plist4350003">
    <set-property name="description"><![CDATA[Group of Thirteen States which is generally called as L13 in AT&T]]></set-property>
    <set-property name="displayName"><![CDATA[L13]]></set-property>
    <!-- export is false <set-property name="version"><![CDATA[7]]></set-property> -->
    <set-property name="basePriceList"><![CDATA[listPrices]]></set-property>
    <set-property name="creationDate"><![CDATA[9/3/2010 07:38:49]]></set-property>
    <set-property name="lastModifiedDate"><![CDATA[9/10/2010 17:02:09]]></set-property>
    <set-property name="itemAcl"><![CDATA[Admin$role$administrators-group:list,write,write_owner,write_acl,read_owner,destroy,read_acl,read;Admin$role$everyone-group:list,read]]></set-property>
    </add-item>
    please refer to this section of ATG Repository guide for further info

  • Search result to get data from bing search and display it in sharepoint page.

    I have configured result source which gets data from bing site,i have given following url as source url
    http://www.bing.com/search?q={?searchterms}&format=rss&Market=en-Us
    but it returns only 8 results from RSS. i want to get all results of search and display it in my SharePoint search results page. 
    any pointers will be helpful. 

    Hi,
    According to your post, my understanding is that you wanted to search result to get data from bing search and displayed it in sharepoint page.
    To display more items, you can modify the item number when you add
    New Query Rule.
    To get all results, I recommend to use the “Show More”
    link in the result page.
    You can enter the URL when you add New Query Rule:
    "More" link goes to the following URL: http://www.bing.com/search?q={searchterms}
    Here is a great blog for your reference:
    http://sharepoint-community.net/profiles/blogs/integrate-bing-with-sharepoint-online-2013-search
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Copy data from one Table to another Table

    How can I copy data from one Oracle Table to another Oracle Table on a different server? Question 2: How can I clear all of the data in one Table with a single SQL script?
    Thanks...

    Question 1:
    I assume you have the privileges. If you don't, ask the DBA to give them to you. Then
    1. Login to database_source (It could be either the source or the target. Let's assume it's the source.)
    2. Create a database link to database_target: CREATE DATABASE LINK link_to_database_target CONNECT TO myuserid IDENTIFIED BY mypassword USING 'database_target'; Note the single quotes.
    3. Copy the table data: INSERT INTO targetowner.mytable@link_to_database_target SELECT * FROM sourceowner.mytable; COMMIT;
    Question 2:
    You have two options, but you may not have privileges for both.
    Option 1:
    DELETE FROM tableowner.tablename; COMMIT;
    Advantage: Since this is a DML (Data Manipulation Language) statement, you have to commit the transaction. Also, the data will be gone but the table size is NOT changed, so it's ready for accepting replacement data. DML statements can simply be executed not only from SQL scripts, but from PL/SQL scripts as well.
    Disadvantage: Slow, because all record deletion is logged, so you can recover from it by issuing a ROLLBACK; instead of the COMMIT; above. The table size is NOT changed, so if you are short of disk space or tablespace space, you have not resolved the issue.
    Option 2:
    TRUNCATE TABLE tableowner.tablename;
    Advantage: Since this is a DDL (Data Definition Language) command, you do NOT have to commit the transaction. (DDL commands automatically commit both before and after their execution.) The table size will be changed back to the initial extent size which is the minimum size a table can have and can only be set when the table is created. If it needs to be changed, the table has to be dropped and recreated with a different initial extent size. The statement execution of this command is not logged, therefore it's much faster then the DELETE.
    Disadvantage: No rollback. Being a DDL, this command cannot be executed straight from PL/SQL. If you need to issue this within PL/SQL, you will have to use dynamic SQL.

  • Clean install on new 1TB hdd, Yosemite keeps freezing when copying data from an ext drive and also from a usb

    Hi all,
    I'm trying to figure out why my macbook keeps freezing when I try to drag my data across to it (even small files from a USB).
    I've had to force restart over a dozen times today :/
    I ran EtreCheck and there are a couple of issues (I've no idea what they mean).
    If anybody could share some light into the report below I would be very grateful:
    Problem description:
    Macbook Pro mid 2010, Yosemite, blank new install on 1 TB hdd, keeps freezing when copying data from an ext drive and also from a usb
    EtreCheck version: 2.2 (132)
    Report generated 5/2/15, 4:55 PM
    Download EtreCheck from http://etresoft.com/etrecheck
    Click the [Click for support] links for help with non-Apple products.
    Click the [Click for details] links for more information about that line.
    Hardware Information: ℹ️
        MacBook Pro (13-inch, Mid 2010) (Technical Specifications)
        MacBook Pro - model: MacBookPro7,1
        1 2.4 GHz Intel Core 2 Duo CPU: 2-core
        8 GB RAM Upgradeable
            BANK 0/DIMM0
                4 GB DDR3 1067 MHz ok
            BANK 1/DIMM0
                4 GB DDR3 1067 MHz ok
        Bluetooth: Old - Handoff/Airdrop2 not supported
        Wireless:  en1: 802.11 a/b/g/n
        Battery: Health = Normal - Cycle count = 2061 - SN = W013358KQD3BA
    Video Information: ℹ️
        NVIDIA GeForce 320M - VRAM: 256 MB
            Color LCD 1280 x 800
    System Software: ℹ️
        OS X 10.10.3 (14D136) - Time since boot: 0:7:25
    Disk Information: ℹ️
        ST1000LM024 HN-M101MBB disk0 : (1 TB)
            EFI (disk0s1) <not mounted> : 210 MB
            Macintosh HD (disk0s2) / : 999.35 GB (968.00 GB free)
            Recovery HD (disk0s3) <not mounted>  [Recovery]: 650 MB
        HL-DT-ST DVDRW  GS23N 
    USB Information: ℹ️
        Apple Inc. Built-in iSight
        Apple Internal Memory Card Reader
        Apple Inc. BRCM2046 Hub
            Apple Inc. Bluetooth USB Host Controller
        Apple Computer, Inc. IR Receiver
        Apple Inc. Apple Internal Keyboard / Trackpad
    Gatekeeper: ℹ️
        Mac App Store and identified developers
    Problem System Launch Daemons: ℹ️
        [failed]    com.apple.mtrecorder.plist
    Launch Daemons: ℹ️
        [failed]    com.apple.spirecorder.plist
    User Launch Agents: ℹ️
        [failed]    com.apple.CSConfigDotMacCert-[...]@me.com-SharedServices.Agent.plist [Click for details]
        [loaded]    com.google.keystone.agent.plist [Click for support]
    User Login Items: ℹ️
        iTunesHelper    UNKNOWN Hidden (missing value)
        Caffeine    Application  (/Applications/Caffeine.app)
    Internet Plug-ins: ℹ️
        Default Browser: Version: 600 - SDK 10.10
        QuickTime Plugin: Version: 7.7.3
    3rd Party Preference Panes: ℹ️
        None
    Time Machine: ℹ️
        Time Machine not configured!
    Top Processes by CPU: ℹ️
            20%    WindowServer
             6%    com.apple.WebKit.WebContent(7)
             4%    Safari
             3%    hidd
             1%    launchd
    Top Processes by Memory: ℹ️
        1.07 GB    com.apple.WebKit.WebContent(7)
        439 MB    kernel_task
        90 MB    spindump
        57 MB    mdworker(5)
        57 MB    Safari
    Virtual Memory Information: ℹ️
        4.54 GB    Free RAM
        3.46 GB    Used RAM
        0 B    Swap Used
    Diagnostics Information: ℹ️
        May 2, 2015, 04:47:31 PM    Self test - passed
        May 2, 2015, 01:39:52 PM    /Library/Logs/DiagnosticReports/DesktopServicesHelper_2015-05-02-133952_[redact ed].cpu_resource.diag [Click for details]
        May 2, 2015, 01:23:20 PM    /Library/Logs/DiagnosticReports/com.apple.AmbientDisplayAgent_2015-05-02-132320 _[redacted].crash
    Regards
    Hoz

    Thanks - I had a 1TB hdd in my macbook for about 12 months but it started playing up a few days ago (I got the question mark folder on bootup) so I bought another 1TB hdd (same model) and started from scratch.
    My macbook is an early 2010... now I'm wondering if Yosemite is a bit too much for it?
    The ext hdd is my timemachine backup, so yes I have used it often and it has my TM backups - and the usb is a new usb which Ive used a few times.
    The issue seems to be when Im transferring files from an ext drive to my mac. I can use it fine and browse (worked find for 45 mins) then I tried to bring my data across.. and it copied a few gig over before total freeze.
    This has happened about a dozen times.
    I keep running disk utility and checking the disk. I also just ran the apple diagnostics tool that came in the apps cd - the hardware apears to be fine.
    I have a 250 gb partition for the OS and the rest is my second partition for data.
    I'm now wondering if I should reformat the first partition, install leopard from the CD, then upgrade to mavericks and leave it at that.
    Any thoughts would be awesome. Thank you for reading and replying!
    Hoz

  • How to copy data from one planning area to other planning area

    Hi ,
    I need to copy data from one planning area to other planning area, the MPOS for two planning areas are differant and  here my scenario is one planning area having extra key figures.
    First i need to release forecast data to CIP planning area and then,  i load the data from infocube  to MPS planning area and copy the data from CIP planning area. here both MPS and CIP planning areas having different MPOS .
    Please help me in this. Please give me the stepls i need to follow.
    Thanks in advance.
    Regards,
    Chandu

    Hi,
    You can use the transaction /sapapo/tscopy.
    In this you can configure your source plng area and destination plng area. You also have an option to map your KF. There is no problem if the MPOS are different as long as you are able to map the characteristics between the 2 MPOS.
    Alternatively, you can create an Infocube which shares common ground between the 2 planning areas and extract data from CIP plng area into the infocube and then copy teh data from infocube to MPS plng area using the the transaction /sapapo/tscube.
    Hope this helps.
    Thanks
    Mani Suresh

  • Way to Copy Doc,Due and Posting Date from Sale Document to Other Sale Doc

    Hey SAP B1 Community,
                                  Most of the users facing Problems When they create Sale Order and then want to create Del and Invoice Doc. They have to Change Doc and Del Date, There is solution to avoid to write  dates again.
    First Create UDF with the name ie "DDate", in DDate udf write FMS which get the Date From $[ORDR.DocDate]
    in Del and Invoice Form Create FMS for Del and Document Date which get Value form UDF "DDate"
    It ll decrease the time to Post Del and Invoice.
    Rahil Hassan
    0300-4655753

    this method is to avoid current date
    when
    they use "Copy to" Delivery and then Copy to Invoice the system fills

  • Copy data from mysql to oracle database help?

    Im an sql newb and trying to understand how I can automatically copy data from one dtabase to another systems database on the same server.
    We have two differnt applications, but both share customer information, but one is on a win server, while the other is on oracle.
    Each time a customer contacts us via online chat (win server, mysql), we want to copy their entire chat transcript into our CRM's (oracle) customer account. So the folks that use the CRM can see the past chat histories. I hope this makes sense.
    Where can i look to get started on this?
    Thanks

    You could look at Heterogeneous Services (see the forum here Heterogeneous Connectivity but if you want to push data from mysql to oracle you might be better looking at it from the mssql side. I don't know what they offer.
    It might be simpler to do it at the client end. ie cut and paste from the online chat application into a new utility which inserts into the oracle database.
    Incidentally, this forum is specifically for the SQLDeveloper tool. You might get more general help in the "database - general" or "sql and pl/sql" forums

  • How to copy data from mac to external hard

    how to copy data from mac to external hard

    ok - since you'll be sharing it with a PC - connect it to your windows pc - then format from there - instead of NTFS format - choose exFAT.
    or, you can read the link below on how to do it in dos mode.
    http://answers.microsoft.com/en-us/windows/forum/windows_7-files/how-can-i-forma t-external-drive-in-exfat-not-in/0f6bf19a-19d6-4470-ae05-53ddf26bb476?msgId=1860 eae3-3488-4eea-8326-f87b89d9851b
    once you've formatted it - you can now use it in both your macbook and windows computer.

Maybe you are looking for

  • Some recovered PDFs don't open in Adobe products; okay elsewhere

    I had a bunch of recovered files from a formatted disk, mostly PDFs, and slogged through them on my Mac, double-clicking to see what they were, where the default opener was Acrobat. Some were okay, and some were called "damaged" and could not be open

  • Combine rows?

    I'm trying to combine two rows under one column. using: oracle 10g Here is my code select     cr.report_id as report_id,     cr.report_name as report_name,     ei.info as info from SPSS.WEB_CLIENT_REPORTS_NFL CR,  spss.web_report_extra_info_nfl EI wh

  • Online preorder for Witcher 3 recieved without steelbook

    I was under the impression that all preorders for the Witcher 3 were supposed to have a steelbook. I canceled my preorder that I had for over a year from Amazon just for this reason. I have recieved the game in the mail and it was the standard PS4 ca

  • Multiple transport vendor.

    Hi We maintain a scheduling Agreement for a sub contracting item having planned delivery costs, After processing Sub contractor sends us the semi finished goods against SA either through Transporter A, B or C, Only after the goods’ reaches our plant

  • Using same string indicator in different stacked sequences

    Hi guys, I want to use the same string indicator in different stacked sequences. I tried to wire the output of every string constant through the sequence to my string indicator outside the sequence block but then I get an 'Wire connected to an undire