How to get price list line id for service contract line(subline)

Does some one know how to find a price list line id for service contracts line (sub line)?
There is actually a column in table okc_k_lines_b which is called price_list_line_id, but it looks like it is never used (all columns values are NULL). I have tried to investigate reprice API's which are used in contracts authoring form, but they are too huge and it didn't lead to nay result. There is a way (bad hack), by calling OKS_QP_INT_PVT.COMPUTE_PRICE it is possible to get price list line id by which contract line is priced, it would be kina fine if I would need to find line id for some rows, but it wont work for thousands!
Is there some proper way how could I get price list line id by which is service contract line priced?

Hi,
Check out the following query that gets the price_list_id on subline_level and more.
The price_list_Id is stored as a rule.
SELECT
chd.contract_number
, par.party_number
, par.party_name
, ldf.pas_nummer
, ldf.pas_houder     
, rh.object1_id1 hdr_price_list_id
, rsl.object1_id1 sl_hdr_price_list_id
, pld.parkeerterrein
, msi.segment1
, sit.description
FROM
okc_k_headers_b chd
, okc_k_lines_b clt
, okc_k_lines_b cls
, okc_k_lines_b_dfv ldf
, okc_k_items cit
, okc_rule_groups_b rgh
, okc_rules_b rh
, okc_rule_groups_b rgt
, okc_rules_b rtl
, okc_line_styles_b lst
, okc_rule_groups_b rgs
, okc_rules_b rsl
, okc_line_styles_b lss
, qp_list_headers_b plh
, qp_list_lines pll
, qp_list_lines_dfv pld
, qp_pricing_attributes pat
, mtl_system_items_b msi
, mtl_system_items_tl sit
, hz_cust_accounts cac
, hz_parties par
WHERE
rgh.chr_id = chd.id
AND rh.rgp_id = rgh.id
AND rh.jtot_object1_code = 'OKX_PRICE'
AND cac.cust_account_id = rtl.object1_id1
AND par.party_id = cac.party_id
AND clt.chr_id = chd.id
AND clt.lse_id = lst.id
AND lst.lty_code = 'SERVICE'
AND rgt.cle_id = clt.id
AND rtl.rgp_id = rgt.id
AND rtl.jtot_object1_code = 'OKX_CUSTACCT'
AND cls.cle_id = clt.id
AND cit.cle_id = cls.cle_id
AND cit.jtot_object1_code = 'OKX_SERVICE'
AND cls.lse_id = lss.id
AND lss.lty_code = 'COVER_ITEM'
AND cls.id = rgs.cle_id
AND rgs.id = rsl.rgp_id
AND rsl.jtot_object1_code = 'OKX_PRICE'
AND plh.list_header_id = rsl.object1_id1
AND plh.list_header_id = pll.list_header_id
AND pll.rowid = pld.row_id
AND pat.list_header_id = pll.list_header_id
AND pat.list_line_id = pll.list_line_id
AND cit.object1_id1 = pat.product_attr_value
AND cit.object1_id2 = chd.authoring_org_id
AND msi.inventory_item_id = cit.object1_id1
AND msi.organization_id = cit.object1_id2
AND sit.inventory_item_id = msi.inventory_item_id
AND sit.organization_id = msi.organization_id
AND sit.language = userenv('LANG')
AND cls.rowid = ldf.row_id
Hth,
Martin
Edited by: mvdons on 4-sep-2008 2:13

Similar Messages

  • How do I "run" an ldt file for Service Contracts?

    Ref. BugNo. 4450150
    How do I “run” an .ldt file for Service Contracts?
    Do I use FNDLOAD and if so is this the way to do it
    FNDLOAD apps/apps_password 0 Y UPLOAD @FND:OKS_TOP/patch/115/import/US/okskfinv.ldt
    Thanks

    See Note:142483.1
    Subject: How to Define the ORACLE_SERVICE_ITEM_FLEXFIELD

  • How to get the list of values for a dynamic parameter using Web Services SDK?

    <p>I am struggling to get the list of values for a dynamic parameter of a report.</p><p>I am using Java Web Services SDK ... I tried to use PromptInfo.getLOV().getValues() method but it does not work.</p><p>First of all ... is this possible (to get the list of values for a dynamic param) using Web Services?</p><p>Second of all, if this is possible, how should I do it ... it seems it works fine when running the report from CMC. It asks for DB logon info and after that it provides a list of values.</p><p>Thx </p>

    <p>Your assumption is correct. We are trying to get the LOVs from the Crystal Report. I was not aware that this is not supported by Web Services SDK.</p><p>We used Web Services SDK to integrated the Crystal Reports in our web application. We implemented some basic actions for reports: schedule, view instances, run ad-hoc reports.</p><p>We encountered this problem when trying to run/schedule reports with dynamic parameters (a list of values from DB). We were unable to get the LOVs.</p><p>Please let me know if you can think of an alternative to look at.</p><p>Thanks a lot,</p><p>Catalin </p>

  • How to get message Target value exceeded for value contract in consignment

    Hi Gurus,
    I have created a value contract in consignment process.
    When the TOTAL VALUE of the release orders exceed the TARGET value of the value contract, system is NOT alerting me with message "Target Value Exceedded".
    In normal value contracts, system throws error message while creating release order if target value is exceeded.
    How such message can be generated in case of consignment process?
    Is there is any configuration involved for item category 'K' for this requirement?
    Thanks in advance,
    Regards,
    Sastry

    Hi,
    Thanks for the reply.
    Those messages are already configured and they are working fine for my normal contracts.
    I need such messages for value contracts in consignment process (item category 'K').
    As there is  no net price in consignment PO, such messages are not generated even though required messages are already configured.
    Is there any other thing I need to do for CONSIGNMENT process
    Regards,
    Sastry

  • How to get inner or outer stroke for an unclosed line?

    Hi,
    I've been struggling to use stroke alignment for unclosed lines in Illustrator CC 2014. It is not possible as I can see, only centered is active.
    First of all, is there any normal miracle way to do that?
    Secondly, I've seen some scripts that can change Illustrators coordinate system(Instead using Top-Bottom coordinate system, it can allow to use Top-Right) So, maybe it is possible to change stroke alignment by coding? is there anyone who know something about that?
    (My trouble is, I have 120 shapes drawn by me before not knowing the alignment restriction. Currently, I am in a deep trouble to use those icons with different stroke sizes because, icon's size is been changed)
    thank you by now,
    regards.

    @rcraighead Monika Gause thank you for your help!

  • How to get the list of users who has access for list of tcodes.

    How to get the list of users who has access for list of tcodes.

    Go to transaction SUIM, this has a number of reports for users/authorisations
    open the Where used>Autorization Values>In Users
    and double click to execute
    in authorisation object, enter S_TCODE
    then press the "Enter Values" button
    It will offer entry boxes to put the transaction code you are interesed in.
    Then execute and the list of users with access to this transaciton code will be returned.

  • How to get the list of deployed projects in OSB through commond line

    How to get the list of deployed projects in OSB through commond line; as we are able to get in weblogic.

    You can go with standard JMX API using WLST
    http://www.oracle.com/technology/sample_code/products/osb/index.html
    http://download.oracle.com/docs/cd/E14571_01/apirefs.1111/e15033/index.html
    or you can try a little bit tricky way like
    ls $DOMAIN_HOME/osb/config/core/ | grep -v ^_:-)

  • How do I get a list of users for a specific role in EP 6.0

    Hi,
    I'm trying to find a table or an API that I can use to get a list of users for a role that I have created in the portal. There are about 940 users tied to this role that I would like to dump to an excel or text file. My goal is to get these users into a security group and tie the role to the group instead of each user. Thanks!

    Hi Chris,
    first, welcome on SDN!
    UMFactory.getInstance().getRoleFactory(roleID).getUserMembers() returns the users which are members of the role, see http://media.sdn.sap.com/html/submitted_docs/60_sp2_javadocs/ume/com/sap/security/api/IRole.html
    addGroupMember(...) adds a group.
    removeUserMember(...) removes a user from a role.
    Corresponding method exist for the groups.
    Hope it helps
    Detlev
    PS: Please consider rewarding points for helpful answers on SDN. Thanks in advance!
    PPS: Wrong forum, should have been EP DEV for example. It's not a question in conjunction with KM.

  • How to set price list to use in a Document

    Hi all,
    I have a simple question. I'm trying to insert a draft document into SAP B1 via DI API. I can't seem to find the correct property to set in order to change the price list to use for that draft.
    Example: The price list in the Supplier BP is 'Price List 01' and I want to change it only for the current document to 'Price List 02'.
    Can you guys help me?
    Thanks.
    Edited by: Pedro Magueija on Aug 28, 2009 6:11 PM
    Edited by: Pedro Magueija on Aug 28, 2009 6:41 PM

    That's too bad, since it is possible to do it in SAP B1.
    OK, but since I can only change the price for the item, line by line is it possible to force a .UnitPrice = 0 and .PriceAfterVAT = 100.00?
    The reason I ask is, the document I'm trying to insert get's it's prices from a source where only VAT included prices are present. So instead of the unit price, I want to set the price after VAT and have SAP B1 calculate the unit price.
    I set the BP default price list to a list where no prices are defined, and it works. But has you can imagine, when doing a document in SAP B1 this will cause it to set the prices to 0 on the lines, and the users might get angry at it.
    So if you guys have any ideas on how to go around this some other way, please do tell.
    Thanks in advance.

  • How to get the list of  Quotations...???

    Hi MM Gurus,
    How to get the list of Used Quotations & Non Used Quotations.
    i am not talking about Open quotation ,closed quotation..
    if once i created PO through quotation it should be used quotation. i not created PO through quotation
    it s should be Non used quotation. how to get this list through when we create PO through ME21N
    document over view. is there any opetion in Dynamic selection or somthing ..???
    Thanks in Advance..
    Anthyodaya.

    Hi Shailesh,
    Thanks for the mail...
    but the problem is different. ...i wanted a list of used quotations and not used quotations saparate list.
    because we have same vendor for same material different price .
    so when we create PO we should use Quotation only one time.
    poen RFQ and closed RFQ is different .i means RFQ not at maintained in ME47. not at received the price from vendor or not at enterd the price. ... so that is different..
    if the non used quotation will display in ME21N  document overview it should be very usefull...
    Thanks in advance.
    Anthyodaya.

  • How to get a list of every application on my computer?

    I'm trying to figure out how to get a list of every application on my computer using applescript. I know it is possible for the system to do this, as evidenced by the dialog you get when you use the "choose application" function. Other examples are doing a spotlight search for "kind:app" or programs like Namely or QuickSilver.
    Is there a way to do this in applescript? The only solution I've come up with so far is to use the command:
    <pre>set everyapplicationaliases to choose application as alias with multiple selections allowed</pre>
    and manually select all on the resulting dialog. I can then take the results and go from there, however there are a few significant problems with this approach.
    1. It requires user interaction. (I have an idea for some future applications that could use this functionality if it can be done without user input.)
    2. It's horribly slow. As a test run I choose all the applications from the dialog, extracted some basic info and put the result on the clipboard. It took a couple of minutes to complete this relatively basic task. In comparison, running the aforementioned spotlight search took maybe ten seconds.
    Thanks in advance!
    best,
    peter

    For these specific queries my results are...
    set appList to paragraphs of (do shell script "mdfind \"(kMDItemKind = 'application'c) || (kMDItemKind = 'widget'c)\"")
    3082
    set appList to paragraphs of (do shell script "mdfind \"(kMDItemKind = 'Application'c) || (kMDItemKind = 'Widget'c) ||
    ((kMDItemContentTypeTree = 'com.apple.application') && (kMDItemContentType != com.apple.mail.emlx) && (kMDItemContentType != public.vcard))\"")
    3115
    I think I finally found some numbers that make sense!
    When I search for Kind:Application by the Command+F method in the Finder, I get a total of 2521 items, of which 2477 are "Applications" and 44 are "Other".
    (Just by eyeballing it, "Other" seems to include some Classic Apps and some .bundle files.)
    The total # found by this method (2521) plus the number of Widgets found using mdfind (318) equals the number of total number of items found by spotlight (2839).
    I also noticed that these numbers almost equal the spotlight number:
    mdfind results for kMDItemKind:
    Widgets: 318
    Applications: 1684
    Classic*: 795
    and
    Command+F "Other" items: 44
    3181684+79544 = 2841
    It may be a fluke that this is so close to the 2839 spotlight gives, or maybe there's an overlap somewhere...
    Tying this back into my initial question, it seems like the original mdfind command for Applications is probably the best answer for what I was looking for,
    since I wasn't really thinking about Classic apps and Widgets anyway.

  • How to get the list of materials from Sap r/3

    Hi Experts,
    I have one doubt, here iam implementing
    HTTP TO RFC scenario.
    My doubts are------
    1. Should we create DT MT MI and all (OR) not
    2.In Request DT how the message structure wil be to get the list of materials from sap r/3 system as Response(Ex: Fields in the source structure).
    3.Or the second thing is how to get the list of materials start with some alphabate.
    Please reply me for each and every questions mentioned above. Please clarify me.
    Helpful answers wil be rewarded.
    Reagards
    khanna

    Hi Khanna,
    <i> 1. Should we create DT MT MI and all (OR) not</i>
        Yes U need to create for HTTP site...for RFC U need to import..
    <i>2.In Request DT how the message structure wil be to get the list of materials from sap r/3 system as Response(Ex: Fields in the source structure).</i>
        You create your own structres for Request and respoce.. and Map it with RFC..
    <i>3.Or the second thing is how to get the list of materials start with some alphabate.</i>
        I think it will come with acending order....
      for more help go through this link
    /people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit - File to RFC
    regards,
    Ansar.

  • How to Get a list of pending deferred tasks

    Hi all
    there is a bunch of unfinished threads here asking how to get a list/report of deferred tasks that are associated with user objects and scheduled for future execution.
    I need this list and I can't find out how to get it anyway.
    I don't care if it's a SJSIM report, a database query or a SJSIM log mining exercise.
    Does anyone know how to do this?
    My org has just gone live with SJSIM and I want to report on the number of legacy resource accounts that have had deferred tasks created against them for future disabling/deletion (our consultants added this workflow based on rules with an email warning, a disabling deferred task set for 2 weeks from now and a deleting deferred task for 6 months after that). Hopefully I can say "look, 5,000 legacy accounts are going to be cleaned up!
    Thanks in advance

    You can do it with a custom workflow, something like this:
         <Activity>
            <Action id='0' class='com.waveset.session.WorkflowServices'>
              <Argument name='op' value='queryObjectNames'/>
              <Argument name='type' value='User'/>
              <Argument name='attributes'>
                 <list>
                        <new class='com.waveset.object.AttributeCondition'>
                           <s>deferredTaskDate</s>
                           <s>isPresent</s>
                        </new>
                  </list>
               </Argument>
            <Action id='1' process='Check User'>
              <Iterate for='currentUser' in='queryResult'/>
              <Argument name='accountId' value='$(currentUser)'/>
            </Action>
         </Activity>And:
           <WFProcess name='Check User'>
             <Variable name='accountId' input='true'/>
             <Activity id='0' name='start'>
               <Transition to='Check User'/>
             </Activity>
             <Activity id='1' name='Check User' hidden='true'>
               <Action id='1' name='Get User View' application='com.waveset.session.WorkflowServices'>
                 <Argument name='op' value='getView'/>
                 <Argument name='type' value='User'/>
                 <Argument name='id' value='$(accountId)'/>
                 <Argument name='authorized' value='true'/>
               </Action>
               <Transition to='Got One'>
                   <notnull>
                           <ref>view.accounts[Lighthouse].properties.tasks[Legacy Cleanup].date<ref>
                    </notnull>
                 </Transition>
                 <Transition to='end'/>
              </Activity>
              <Activity id='2 name='Got One'>
                 <ActionResult name='users' type='message' overwrite='false'>
                    <ref>accountId</ref>
                  </ActionResult>
              </Action>
              <Transition to='end'/>
            </Activity>
         </WFProcess>This just gives a rough idea of how it can be done. It might be best to bring your consultants back in to implement this.
    Edited by: PaulHilchey on Feb 25, 2009 10:35 AM

  • How to get reading list in my all my devices and computer (window 7). i have installed ios 6 on iphone and icloud control panel on both PC's (home and office) but i dont get updated reading list on all my devices.

    how to get reading list in my all my devices and computer (window 7). i have installed ios 6 on iphone and icloud control panel on both PC's (home and office) but i dont get updated reading list on all my devices.

    Hi bluegrandpanash,
    Thanks for visiting Apple Support Communities.
    If you backed up your iPhone to iCloud before updating the software, first try the steps under "Restore from an iCloud backup" in this article to recover your data:
    iOS: Back up and restore your iOS device with iCloud or iTunes
    http://support.apple.com/kb/HT1766
    Best Regards,
    Jeremy

  • How to get the list of active devices in current wifi network?

    Hi All,
    I am going to a start a new Network based app. So please any one give me an idea on the below question.
    How to get the list of active devices in current wifi network?

    Nope I want the log-in user to retrieve its Group where he is belong. I have this following code
    strUsername = Request.getParameter("username").toLowerCase().trim()+"@dev.test.com.ph";
    strPassword = Request.getParameter("password").toLowerCase().trim();
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, INITCTX);
    env.put(Context.PROVIDER_URL, MY_HOST);
    env.put(Context.SECURITY_AUTHENTICATION, "simple");
    env.put(Context.SECURITY_PRINCIPAL,strUsername);
    env.put(Context.SECURITY_CREDENTIALS, strPassword);
    // enable tracing
    env.put("com.sun.naming.ldap.trace.ber", System.err);
    // Create the initial context
    DirContext initCtx = new InitialDirContext(env);
    // Get the target context
    DirContext targetCtx = (DirContext)initCtx.lookup("");
    SearchControls constraints = new SearchControls();
    constraints.setSearchScope(SearchControls.SUBTREE_SCOPE);
    // Perform the search on the target context
    NamingEnumeration enum = targetCtx.search("","(userPrincipalName="+strUsername+")",constraints);
    javax.naming.directory.Attributes attrs;
    NameClassPair item;
    String[] attrIds = new String[]{"MemberOf"};
    // For each answer found, get its "Groups" attribute
    // If relative, resolve it relative to the target context
    // If not relative, resolve it relative to the initial context
    while (enum.hasMore()) {
    item = (NameClassPair)enum.next();
    Out.println(item);
    attrs = targetCtx.getAttributes(item.getName(), attrIds);
    Out.println(attrs + "<br>");
         initCtx.close();
    It returns all this string :
    {memberof=memberOf: CN=CMCanadaRD,OU=Groups / Teams,DC=dev,DC=test,DC=com,DC=ph, CN=iMngrCanadaRW,OU=Groups / Teams,DC=dev,DC=test,DC=com,DC=ph, CN=Domain Users,CN=Users,DC=dev,DC=test,DC=com,DC=ph, CN=Backup Operators,CN=Builtin,DC=dev,DC=test,DC=com,DC=ph, CN=Administrators,CN=Builtin,DC=dev,DC=test,DC=com,DC=ph}
    How can i retrieve the Group named CMCanadaRW and CMCanadaRD on the Attribute?
    Thanks

Maybe you are looking for