Why I am not getting the correct Account

I want to get the account of an item from sales order. The account should be the one that from fnd_flex_values_vl with set name XX_ACCOUNT.
This is my query:
select
ooh.transactional_curr_code,
gcc.segment1, gcc.segment2, gcc.segment3, gcc.segment4, gcc.segment5 account,
ooh.order_number so_number, ooh.header_id
from
mtl_parameters mp,
gl_code_combinations gcc,
mtl_transaction_types mtt,
mtl_material_transactions mmt,
mtl_system_items msi,
( select order_number, transactional_curr_code, ship_to_org_id, header_id from oe_order_headers_all where order_number = 12345678 ) ooh,
oe_order_lines_all ool
where 1=1
and mmt.distribution_account_id = gcc.code_combination_id
and mmt.transaction_type_id = mtt.transaction_type_id
and mmt.organization_id = mp.organization_id
and mmt.inventory_item_id = msi.inventory_item_id
and mmt.organization_id = msi.organization_id
and ooh.header_id = ool.header_id
and mmt.trx_source_line_id = ool.line_id
and mmt.inventory_item_id = ool.inventory_item_id

Perhaps you mean the Sales Account defined in the item master?
Example:
select
ooh.header_id,
ooh.order_number so_number,
ool.line_id,
ool.line_number || '.' || ool.shipment_number as line_number,
ooh.transactional_curr_code,
msi.segment1 as item,
gcc.concatenated_segments sales_account
from
oe_order_headers_all ooh,
oe_order_lines_all ool,
mtl_system_items msi,
gl_code_combinations_kfv gcc
where 1=1
and ooh.header_id = ool.header_id
and ool.inventory_item_id = msi.inventory_item_id
and ool.ship_from_org_id = msi.organization_id
and msi.sales_account = gcc.code_combination_id
{code}
I don't know what you mean with "Sales Order Account". I am not a financial specialist, but as far as I know OM does not do any accounting, just the other modules like inventory or AR. Inventory will do some "sales order issue" transaction on shipments which will get accounted (cost manager etc) and AR will generate accounts when the invoice gets created...
And pay attention to the above query, as there might be order lines where ship_from_org_id is null, e.g. bill-only orders.
regards,
David.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • TS4022 why am I not getting the Advance options when I am in my iCloud account?

    Why am I not getting the "Advance" option when I am in my iCloud account?

    There is no 'Advanced' option at icloud.com. Is this a question of changing the default email address? I quote:
    In iOS 6
    Go to Settings > iCloud > Account (your Apple ID) >Advanced: Mail.
    Under iCloud Account Information, tap your email address.
    From the list of addresses available, tap the @icloud.com email address you would like to use as the default address for sending mail from iCloud Mail.
    In OS X Mountain Lion or Lion v10.7.2 (or later)
    Go to Mail Preferences > Composing.
    Click the Send new messages from drop-down and select the @icloud.com email address you’d like to use.
    At iCloud.com
    Go to the Mail app.
    Click the Action (gear icon) menu and choose Preferences.
    Under Composing, click the Set a default address drop-down and select the @icloud.com address you’d like to use.

  • Why can I not get a gmail account on my macmnini?

    Why can I not get a gmail account on my macmnini?
    It tells me "unable to confirm account name or password.
    But the same name and password worked on my ipad 2.

    If you have a Gmail account and you've activated 2-step verification, you need to generate a new "application-specific password" in your Google account and enter it in place of your old password in the Keychain Access application.

  • Why can I not get the creative cloud to install on my MacBook Air? I keep getting an error saying I need to download a new copy

    Why can I not get the creative cloud to install on my MacBook Air? I keep getting an error saying I need to download a new copy

    Please read https://forums.adobe.com/thread/1499014
    -try some steps such as changing browsers and turning off your firewall
    -also flush your browser cache so you are starting with a fresh browser
    http://myleniumerrors.com/installation-and-licensing-problems/creative-cloud-error-codes-w ip/
    http://helpx.adobe.com/creative-cloud/kb/failed-install-creative-cloud-desktop.html
    or
    A chat session where an agent may remotely look inside your computer may help
    Creative Cloud chat support (all Creative Cloud customer service issues)
    http://helpx.adobe.com/x-productkb/global/service-ccm.html

  • Not getting the correct data at reciever side

    Hi
    I have done mail adapter... My senario is Mail --> XI --> File... In this mail adapter is sender. i have give the url as pop://<ip address> the xi server is picking up the file...
    Source File Is:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Mail_Message_Type xmlns:ns0="http://mailtofiledemo.com/ravi">
       <Order>
          <Header>
             <Name>Ravi</Name>
             <Address>Vsp</Address>
          </Header>
          <Item>
             <material>Computer</material>
             <units>3</units>
             <price>90000</price>
          </Item>
       </Order>
    </ns0:Mail_Message_Type>
    Target File is:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:File_Message_Type mlns:ns0="http://mailtofiledemo.com/ravi">
    <row>
       <name>Ravi</name>
       <address>Vsp</address>
       <material>Computer</material>
       <units>3</units>
       <price>90000</price>
    </row>
    I have  an unread mail in my Inbox and i have attached the source file to that mail... the server is picking up the file but in receiving side i am not getting the correct target file... i am getting the target file like:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:File_Message_Type xmlns:ns0="http://mailtofiledemo.com/ravi"></ns0:File_Message_Type>
    </ns0:File_Message_Type>
    eventhough if i dont have any unread mails in my inbox i am getting the same file at target side continuosly...so please give me the solution as early as possbile or else my folder will going to be overflow with that target file
    Thanks & Regards
    Ravi Shankar

    Ravi,
    Have to check the Transport Protocol used by internal Mail Server. The parametes you pass to the mail adapter should be same to the internal mail sever where you are trying to send and also check with XIPAYLOAD option.
    If this helps to u. Allot the points please.
    Thanks
    Gowri K

  • Why am I not getting the buttons of Hide/Show, Refresh, Back, Home, Options ?

    Gorgeous Hello All,
    If anyone of you can please provide me a solution for the following, will help me in plentious and galore.
    Am using Adobe RoboHelp, Version 10 and IE version being 10.
    A hurdle :-
    When I File -> View -> Primary Layout : I am getting only these options of Search, Hide, Contents, Index, Glossary, Print being displayed on the screen, eventhough I have ticked for Hide/Show, Refresh, Back, Home (Home -> Advanced Properties -> Home : and declared the respective url as well) , Options  courtesy View -> Pods -> Project Set-up -> Double Click on Windows -> Double Click on NewWindow.
    Why am I not getting the buttons of Hide/Show, Refresh, Back, Home, Options when I File -> View -> Primary Layout ?
    Cheese - Vipin Nambiar

    Hey Piyush Buddy, where were you since my morning !!! :-) :-) :-)   Your simple question here made me realize where did I make the slip of my brain and now all the desired buttons are appearing on my screen. 
    I just made simple parameter changes called View -> Pods -> Single Source Layouts -> Right Click On Microsoft HTML Help -> Setted as Primary Layout (earlier my Primary Layout was setted up for Multiscreen HTML 5).
    THANKS GALORE Piyush buddy - Your simple question to me made a mammoth and galores of help to get my train on track.

  • Why can I not get the normal firefox start page instead of the "yourall-in-one page I currently have

    why can I not get the normal firefox start page I had with my old computer (operating XP) instead of the "your all-in-one page" I have now I have moved onto windows 7

    I have looked as suggested under the Firefox tab but find the following listed as my homepage
    http://uk.foxstart.com/?rls=en:uk:zp
    Have I actually installed firefox program/start page or have installes something else?

  • JRockit_160_05_R27.6.2-20 can not get the correct os name for windows 2008

    JRockit_160_05_R27.6.2-20 can not get the correct os name for Windows Server 2008 SP1 using System.getProperty("os.name").
    System.getProperty("os.name") will return Windows Vista instead of Windows Server 2008 when running on Windows Server 2008 SP1. Is it a bug of this jdk?
    I tested it on Sun JDK 1.6. It returns the correct name Windows Server 2008.
    Any suggestion will be welcomed. Thanks in advanced!
    Edited by: user4516182 on May 13, 2010 12:59 AM

    Staffan, thanks for your update.
    Do we have a workaround for it or fix it in new release?

  • I can not get the correct anser

    Hi, Please help me.  As the following sch I can not get the correct sqrt value.  if changing resistor of R1 I always get 12v direct flow output.
    Attachments:
    op_divider.zip ‏121 KB

    Thanks for your answers.  I want the sch to do the operation of square root.
     1. in my sch the inverting input is DC -5v, I want to get the square root of 5?
     2. In my feedback path I use a multiplier, I Originally thought it is a negative feedback?
     3. it Already have ground in the sch, I do not understand that you say "did not ground the scope"?
    Thanks again, Could you give me the further pointing. if possible Could you give me a correct sch.
    (in fact, I get the sch from a rough sch in a textbook(the rough sch not for multisim). I just give the values for the all components)

  • HT2905 can someone please tell me why I do not get the delete from disk option when trying to delete duplicate items

    can someone please tell me why I do not get the delete from disk option when trying to delete duplicate items

    The content must be in the iTunes directory structure for that option to appear.

  • Why can I not get the Web Icon for some of my saved Bookmarks

    Many of my saved Bookmarks have their correct Web Icons.
    However many fail to save their Web Icon leaving the Icon blank.
    The Web Sites in question do have specific Web Icons.
    I have tried deleting the Bookmarks in question and saving them again without success.
    Why can I not get these icons to be saved in the Bookmarks?

    No problem here with that TalkTalk website, the favicon image saves immediately when I save it as a bookmark. It uses a conventional favicon.ico image in the root directory <br />
    link rel="SHORTCUT ICON" href="/favicon.ico" /
    With Barcalays iBank I can't figure out where the website image in the Location bar is being loaded from.
    With Barclaycard, the favicon saves with the new bookmark, even though that image is in a non-standard location. <br/>
    link rel="shortcut icon" href="assets/images/favicon.ico" type="image/vnd.microsoft.icon"

  • Why do I not get the checkout option for a pdf type document when clicking on the document link in the SharePoint workflow task?

    We are trying to use workflows to review and edit pdf files in sharepoint 2010. We are having a couple of issues and am hoping someone has the answer.....
    1)  When myself and coworkers click on the pdf document in the library, we get the check out option as expected.  However when we click on the document
    link in a workflow task (on the sharepoint site), the pdf opens as a temporary file and we do not get the check out option.  Why does this happen????? 
    2)  The same thing happens when we click on the document link in the workflow task email;   HOWEVER,  one of our co-workers does get the
    check out option when clicking on the link in the email task.  Why would she get the checkout option using the email and not when clicking on the link in the task list on the sharepoint site ????  We have compared our internet settings and adobe
    settings to ours and found no differences.
    We are using Sharepoint 2010, Windows 7, IE8, Adobe Reader X or XI.  Some of us have Adobe Pro X and have the same issues.

    Hi,
    According to your post, my understanding is that you could not get the checkout option for a pdf type document when clicking on the document link in the SharePoint workflow task.
    I try to reproduce the issue, however, no matter when I click the pdf type document in the library or click on the pdf document link in the workflow task email, it download the pdf doucment and then I can open it.
    It will be better if you can descript how you
    get the check out option as expected when you click on the pdf document in the library.
    Then I upload a
    word type document to the library, no matter when I click the word type document in the library or click on the word document link in the workflow task email, I can open the word document directly and get the check out option as expected.
    I recommend to use the other type docuemts to check whether the check out option works.
    Thank you for your understanding.
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Why do I not get the checkout option when clicking on the document link in the SharePoint workflow task?

    We are trying to use workflows to review and edit pdf files in sharepoint 2010. We are having a couple of issues and am hoping someone has the answer.....
    1)  When myself and coworkers click on the pdf document in the library, we get the check out option as expected.  However when we click on the document link in a workflow task (on the sharepoint site), the pdf opens as a temporary file and we do not get the check out option.  Why does this happen????? 
    2)  The same thing happens when we click on the document link in the workflow task email;   HOWEVER,  one of our co-workers does get the check out option when clicking on the link in the email task.  Why would she get the checkout option using the email and not when clicking on the link in the task list on the sharepoint site ????  We have compared our internet settings and adobe settings to ours and found no differences.
    We are using Sharepoint 2010, Windows 7, IE8, Adobe Reader X or XI.  Some of us have Adobe Pro X and have the same issues.

    No the person who can check out using the link in the email has the same permissions as me.  We have looked at all kinds of settings, profile etc and nothing evident can be determined to explain the reason.  However, one difference we did notice is that this person does not have a default web browser set and thus when clicking on items to open, it always pops up a dialog box asking which program to use to open it with.  This person chooses Adobe Reader and it opens on the Sharepoint server as it should and she gets the checkout option in a dialog box just like clicking on the document in the library.  My theory is that this step of choosing the program to open with is interrupting the typical way a pdf file is handled when clicking on URL links to the document, which is…. it is opened as temporary internet file rather than on the Sharepoint server.   Hopefully someone can figure this out ☺

  • Why I do not get the verification email?

    I do everything you ask me but not up to my email verification message, if I can use face time and others but not the iCloud .... Because I happen? How I can fix it?
    I do not get the verification email from my account?

    Welcome to the Apple community.
    Look in your junk folder.

  • Why am I not getting the iOS 7.0.3 update?

    I use an iPhone 5 which is currently on iOS 7.0.2. Settings > General > Software Update just keeps checking or gives an error although iOS 7.0.3 is out since a long time. Why am I not geting the update??

    Yes dear friend, I'm performing iCloud backups regularly. But my camera roll isn't backed up because the other data takes up most of the space. I had a full data backup on my PC as well but it was old and not revertable to. So restoring data via iCloud didn't get my camera roll and it was an unpleasant experience. This happened when updating via iTunes so I'd stick with OTA, unless necessary.

Maybe you are looking for