Line item access

Hello Guys!
From some examples of the salesordercollection I know how to build line-items-lists.
The model would look somewhat like this (Lineitems as attribute and substructure of the main Object)
  "SalesOrderCollection": [
  "SoId": "300000097",
  "ApprovalStatus": "",
  "LineItems": [
  "SoItemPos": "300000000",
  "Quantity": "10",
And in the detailview you have something like
        <Table
                            headerText="{i18n>LineItemTableHeader}"
                            items="{LineItems}" >
Now I have data structure like this
Objectlist
ObjectID
Name
LineItem
LineitemID
Name
ObjectID (foreign key)
How do I bind/implement the items now, so that only the line items for a specific object appear?
Thank you in advance
Regards,
Chung

Hi,
you can refer this blog How to consume Sales Order Demo Gateway using ODataModel and display using SAP UI5 views having header and items details example.
Regards,
Chandra

Similar Messages

  • Access control on Sales Orders - Line items

    Is it possible to control access to users from deleting line items in sales orders?
    (since Julius would reply saying a "YES" or a "NO" , i will complete my question )
    If it is feasible to control, could some one make a suggestion on how to do this and help me, please?

    Hi Manjula,
    Thanks for trying to help and for sending the link, but unfortunately, the link doesnt help me for my question.
    the discussion in the link you sent is more on the stock situations that is a mis-match in MD04, when a order line item is rejected then the stock of the line item should be refelcted in MD04 and since this doesnt happen the program was supposed to be eecuted for consistency ==> this was the issue in the link
    Now, coming to the problem on hand: If i create a sales order with 25 line items and make a delivery of 22 line items , do a PGI for the 22 and then , i check for the other 3 line items in the Order, realize that the schedule lines in the order are for a date that doesnt meet the date of goods issue of the other 22 items - i delete the 3 line items in the order <== this is what i want to restrict, users shouldnt be able to delete line items of a order that has a subsequent document.
    I know i can manage doing this via ABAP based on a few validations on the document flow, but i wanted to know if there is an alternate method of achieving this.
    I vaguely remember a situation where i had a user who couldnt enter line items in Purchase orders although he had all required transactions, org,values.......after much research and quite a few trial and error methods i got to a solution by adding/deleting (i dont remember corretly) a parameter value to the user and he could add line items. The curiosity i have is in knowing if there is some parameter value or an other Authorization object, that could help me achieve my objective
    Although it could be efficient, ABAP would be my last option
    Do keep posting, any help is good help

  • User Exit with access to all line items in sales order

    Hi,
    Is there any user exit/BADI, where we have access to all line items at the same time?
    Thanks
    Kamal

    In the Transaction is VA01/2/3 u can use program  MV45AFZZ.
    this is user exit for SO.
    regards
    Prabhu

  • Problem accessing RFx Response Line Item - Item Specification Group

    Hi There,
    How does one access the BUYER_SPEC_GROUP collection on the Rfx Line Item Response (ID 772) object?  I've read other posts where people are having difficulty but I wasn't clear on their approach.  I think I'm accessing the BUYER_SPEC_GROUP collection correctly, and in fact I can see the correct size(); however, when I iterate over the collection I get a null object reference. 
    I appreciate any help - I've been stumped for days
    My code is as follows (output is documented as comments), and I'm triggering on the RFX Response Save:
    displayName = doc.getDisplayName();
    log.setLogMessage("***** display name: " + displayName);
    Logger.info(log); 
    // correctly returns the RFX Response display name
    // get line item collection
    lineItemCollectionMetaData = doc.getCollectionMetadata("COLLN_LINEITEM");
    log.setLogMessage("***** lineItemCollectionMetaData : " + lineItemCollectionMetaData );
    Logger.info(log);
    // returns com.sap.odp.api.ibean.common.AbsIBean$ IBeanCollectionMd@68f2f4c3
    lineItemCollectionName = lineItemCollectionMetaData.getCollectionLogicalName();
    log.setLogMessage("***** line item collection name: " + lineItemCollectionName);
    Logger.info(log);
    // returns COLLN_LINEITEM
    lineItemCollectionValue = lineItemCollectionMetaData.get(doc);
    log.setLogMessage("***** line item collection size: " + lineItemCollectionValue.size());
    Logger.info(log);
    // correctly returns the size (I've tested with single and multiple line items)
    try{
         log.setLogMessage("***** get(doc) returns " + lineItemCollectionMetaData.get(doc));
         Logger.info(log);
            // returns com.sap.odp.doc.iapi.IapiLocator$@2f81a09d
         LIIterator = lineItemCollectionMetaData.get(doc).iterator();
         log.setLogMessage("***** LIIterator  returns " + LIIterator );
         Logger.info(log);
            // returns com.sap.odp.api.ibean.common.AbsCollection$BeanIterator@6757bbc8
         while(LIIterator.hasNext()){
              LICollectionBean = (Object) LIIterator.next();
              if(null != LICollectionBean){
                            // never makes it here
                   log.setLogMessage("***** LI Collection Bean:" + LICollectionBean);
                   Logger.info(log);
              else     {
                            // always returns the following:
                   log.setLogMessage("***** LI Collection Bean is NULL");
                   Logger.info(log);
    catch (Exception e) {
         log.setLogMessage("***** ERROR " + e);
         Logger.info(log);
    Edited by: skaura on Feb 2, 2012 4:51 PM
    Edited by: skaura on Feb 2, 2012 4:53 PM

    HI implement this note and see since this note correction may not available in sp04.
    SAPKIBKV06 ..
    Muthu

  • How to trigger Condition Access sequence multiple times for one line item?

    Hi,
    We have a situation that, User will enter a Promo code (custom Field) in Sales order Header Additional data B tab to apply discount for line items.
    Logic goes like this:
    1. For each Promo code .. there may be multiple sale deals (Max 3 at this point).
    2. For each line item (refering to tkomp table) we have to apply the sale deals (found above) the Condition access sequence will pick the right sale deal to apply the line item.
    3.we have enhanced the tkomp structure to hold the sale deal.
    Challenge:
    As we have the standard logic to trigger the condition access sequence once for each line item, how we can apply 3 sale deals for single line item. Is there any logic or way to trigger the condition access sequence multiple times for single line item with diffrent sale deals. ~ There may be one valid sale deal for one line.
    Functional team maintained diffrent access tables in the access sequence!!!
    Fnds, please help me to get some clue
    Thanks,
    Sunil Y

    Hi Eduardo , Thanks for the response.
    I am trying to explain again, this is the requirment given by the functional guys.
    we have Promo code in Hearder Addtional data B tab --> Have to retrieve Sale Deals -->
    At this point of time we may have at max 3 Sale Deals. we don't know which sale deal is vallied for which item we have in TKOMP.  We have enhanced the TKOMP structure to hold one sale deal only (ZZPROMO).
    We have enhanced USEREXIT_PRICING_PREPARE_TKOMP in RV60AFZZ to populate the value in TKOMP. Then it will go for diffrent access sequence to find the proper condition.
    Our challenge is that, for each line item we have 3 sale deals, we don't know which one is valid for which line. but we have to apply the vallied sale Deal to the line items.  Line item 10  may have Sale Deal 2 , item 20 may have Sale Deal3 and 30 may have sale deal 1.
    We may have solution, by fixing some thing in the code or through config. But i am confused that is it a valid requirment?
    Please help me ...
    Thanks,
    Sunil Y

  • Line item Ship-to Info is not the same in Header Ship-to Party During Sales Order Creation via IDOC

    We have observed that during creation of sales order using idoc, the line item ship-to party is not the same with header ship-to. The ship-to party info in line item is equivalent to the header's sold to party. To give you a quick background, Sold to party info is given in idoc and ship to party is being determined using table EDPAR. In this specific scenario, sold to customer is not the same with ship to customer.
    Initial checking on the code leads us in function module VIEW_KUAGV. This FM populates partner details of sales order header and line item in program LVEDAF1Z
    Below is the code for Sales order Header. Notice that WE_INPUT parameter which contains Ship to party is passed as exporting parameter in FM VIEW_KUAGV. This is the reason why Ship to Party is populated correctly in sales order header but not in sales order item.
    Initially, it first set to Sold-To Party. However, if WE_INPUT is given or provided, partner details is set to Ship-To Party.
    Please advise on how we can make the ship to party info in header and line item be consistent. This is SAP Standard program which why we are hesitant to make change on the program. If there is a configuration to make this happen, kindly advise.
    Regards,
    Rommel

    Hi Jayesh,
    If I understand you correctly, you want that when creating SO from Quoatation
    the Ship to Party also follow/copy Ship to Party from Quotation, right?
    Just to confirm with you, when you creating SO reference from Quotation, you
    use copy/follow-up function, am I right?
    You can do this by setting in configuration of Copy Control (like mentioned by Hui).
    Step as follow :
    1. Go to IMG->CRM->Transactions->Basic Settings->Copying Control for
        Business Transactions
    2. Create your BAdi (Business Add-In for Copying Control), such as get Ship to
        Party value from source document and use it in current document
    3. Use this Rule you have created in BAdi (no. 2), in copy control transaction type
        IMG->CRM->Transactions->Basic Settings->Copying Control for
        Business Transactions-> Define Copying Control for Transaction Types
    4. Here you set Copying Routine for your transaction types (put name of your Badi
        created in step no. 2)
    Or alternatively, you can set it on access sequence in Partner Function
    Ship to Party in configuration. You can define access sequence the Ship
    to Party is taken from Preceeding Document -> Ship To Party
    1. Go to Partner Function access sequence :
        IMG->CRM->Basic Functions->Partner Processing->Define Access Sequence
    2. Create new access sequence with following entry :
        - Source COM_PARTNER_A (PrecedingPartner)
        - Check Mapping for Partner Being search
        - Partner Function in Source  = Ship To Party
    3. Assign this Access Sequence in you Partner Function used in Sales Order Transaction
       Type.
    Tell me if this is what you looking for
    Gun.

  • Difference on KE33 and Line item/summarization

    Experts,
    please help me.  
    We have cost based COPA report. Where the rows are defined as distribution channel (by type of sales, example whole sale, retail, inter-company etc) which is a characteristic and the columns are value fields (Gross rev, QTY etc).  
    We also have user defined characteristics for PH Product Hierarchy category which is linked to MVKE- PRODH.  
    A summarization level is defined @ Product hierarchy category and with other values.
    Now my problem is, when I ran the KE33/KE30 report the gross value is less than the line item (this is when I navigate to line item from the ke33).  The difference is at product hierarchy level.  Now I have document level details only at line item level. But, I only have total from ke33.  I tried accessing CE3XXXX table. But, couldn't find a reason for the difference. I verified the currency also.  
    Please help me in finding the difference.

    The Gross rev/gross billing column is keyfigure value field where a forula is defined in keyfigure scheme.  The formula is not working.

  • FBL5N - in Rule set - It is a Display customer line items

    Dear All,
    We observed that FBL5N - Display customer line items in Standard SoD rule set under function AR07  addressing a risk of S022.
    Unless there are t-codes of FD03 or FB02 this t-code does not allow to change the payment terms of the customer.
    We are having a challenge from the client that FBL5N is a display t-code and why it is there in rule set.
    Has anybody came across this scenario? If yes, what is the underlying risk for this FBL5N independently.
    Is there any SAP Note for this t-code like ME23N from SAP.
    Thanks and Best Regards,
    Srihari.K

    Hi Christian,
    We checked the authorization objects as well enabled in GRC rule set as below:
    F_BKPF_BUK - Docume t Authorization document for company codes - 01 or 02 - Enable.
    Inspite of this access, FBL5N cannot be used to change the document for payment terms and assignments without FB02 t-code
    assignment in the role.
    Independently FBL5N cannot be used for any change or create activity except Display customer line items.
    Please advise
    Thanks and Best Regards,
    Srihari.K

  • Send all line items of a sales order to IPC along with condition lines data

    We wrote some pricing routines in R/3, where while doing he calculations for condition line item, we needed to pull in the material information for previous line items. So we exported vbap and imported it inside the routine to be able to have access to all the line items in the sales order. Now, we need to put in the same kind of logic in CRM/IPC. My question is what would be the equivalent of SAP's(import/export) commands for internal tables in case of IPC. I looked at the BADI CRM_COND_COM_BADI but still do not see how I can send all the line items  data to IPC. So I guess, the question comes down to, how do I send all the line items of the sales order (whole VBAP in R/3 terms) to IPC along with the condition line data? Can someone please help?
    Thanks

    Hi Vaibhav,
    If you can get the list of Sales orders which has deleted line items and force completion status. You can manage them in BI via lookup  or navigation attribute.
    Just my views I am sharing .
    Thanks,
    KDJ

  • G/L ACCOUNT LINE ITEM ERROR

    hello experts,
    i am working on  FI DATASOURCE trying to extract the data for the 1st time since we went live
    the datasource is G/L Accounts: Line Items  0FI_GL_40
    i have executed the infopack and got more than 2.5 crore records in PSA
    now when i am executing the DTP to load the data to DSO
    its giving short dump within 30 mins of execution showing below details
    Runtime Errors         UNCAUGHT_EXCEPTION
    Except.                CX_SY_NO_HANDLER
    Date and Time          05.03.2011 13:31:40
    Short text
         An exception occurred that was not caught.
    What happened?
         The exception 'CX_SY_NO_HANDLER' was raised, but it was not caught a
          along
         the call hierarchy.
         Since exceptions represent error situations and this error was not
         adequately responded to, the running ABAP program
          'CL_RSBK_CMD_X=================CP' has to be
         terminated.
    What can you do?
         Note down which actions and inputs caused the error.
         To process the problem further, contact you SAP system
         administrator.
         Using Transaction ST22 for ABAP Dump Analysis, you can look
         at and manage termination messages, and you can also
         keep them for a long time.
    rror analysis
       An exception occurred which is explained in detail below.
       The exception, which is assigned to class 'CX_SY_NO_HANDLER', was not caught
        and
       therefore caused a runtime error.
       The reason for the exception is:
       An exception with the type CX_SY_OPEN_SQL_DB occurred, but was neither handle
       locally, nor declared in a RAISING clause
       The occurrence of the exception is closely related to the occurrence of
       a previous exception "CX_SY_OPEN_SQL_DB", which was raised in the program
        "CL_RSODSO_SEMANTIC_PACKETIZER=CP",
       specifically in line 79 of the (include) program
        "CL_RSODSO_SEMANTIC_PACKETIZER=CM002".
       The cause of the exception was:
       The database returned a value containing an error
       how to correct the error
       If the error occures in a non-modified SAP program, you may be able to
       find an interim solution in an SAP Note.
       If you have access to SAP Notes, carry out a search with the following
       keywords:
       "UNCAUGHT_EXCEPTION" "CX_SY_NO_HANDLER"
    "CL_RSBK_CMD_X=================CP" or "CL_RSBK_CMD_X=================CM00S"
    "IF_RSBK_CMD_X~GET_DATAPACKAGE_GENERAL"
    If you cannot solve the problem yourself and want to send an error
    notification to SAP, include the following information:
    1. The description of the current problem (short dump)
       To save the description, choose "System->List->Save->Local File
    (Unconverted)".
    2. Corresponding system log
       Display the system log by calling transaction SM21.
       Restrict the time interval to 10 minutes before and five minutes
    after the short dump. Then choose "System->List->Save->Local File
    (Unconverted)".
    3. If the problem occurs in a problem of your own or a modified SAP
    program: The source code of the program
       In the editor, choose "Utilities->More
    Utilities->Upload/Download->Download".
    4. Details about the conditions under which the error occurred or which
    actions and input led to the error.
    please suggest what is the error and how to Rectify the same as it is needed on priority
    thanks in advance
    Edited by: Tarakz on Mar 5, 2011 12:11 PM

    hello ,
    i have got the data correctly but the request is still showing Red although when i monitor nothing is red inside but still request showing red
    and i have semantic keys and in filter option i am unable to take any selection
    how to take selection
    plzzz explain
    thankssss

  • Error while deleting contract line item

    Hi All,
    In ME32K when I try to delete the line item of the contract it goes to runtime error. Pls help me why I get that error.
    It has 3 PO`s created in 2010.

    Error analysis
    A RAISE statement in the program "CL_HANDLE_MANAGER_MM==========CP" raised the
    exception
    condition "FAILURE".
    Since the exception was not intercepted by a superior program
    in the hierarchy, processing was terminated.
    Short description of exception condition:
    For detailed documentation of the exception condition, use
    Transaction SE37 (Function Library). You can take the called
    function module from the display of active calls.
    How to correct the error
    You may able to find an interim solution to the problem
    in the SAP note system. If you have access to the note system yourself,
    use the following search criteria:
    "RAISE_EXCEPTION" C
    "CL_HANDLE_MANAGER_MM==========CP" or "CL_HANDLE_MANAGER_MM==========CM005"
    "GET"

  • Line item pricing based on total value of the order

    Hi,
    We need to charge as a separate line item (material) 'Insurance' as a % based on the total value of the order less one line item. Our orders are created on the web and posted via a BAPI.
    (a) depending on where the customer is located, we charge a certain added shipping cost.
    (b)  the customer has the choice to ask for insurance or not.
    The actual order may be 10 lines totaling $1,000 and due to location, the BAPI slaps on an added line item of $100. If the customer chose the insurance option, the BAPI needs to slap on another line item whose value would be, say 2% of the total order, i.e. 2% of 1000 (instead of on 1000+100). Of course, if the customer doesn't choose this option he is not charges this extra line and further if the customer is not in the particular region, the 100 charge may also not be there.
    The 2% can vary time to time so needs to be driven by a condition record based on %.
    How can we achieve this in the pricing procedure? The logic of how the BAPI will function is clear to us, we are stuck on the pricing procedure configuration.
    Glad to answer any further questions you may need for clarifications.
    Many thanks!

    Ideally insurance would be levied on end customer based on Inco Terms like CIF, DDU etc.,
    So you can have an access sequence for which you can make use of tables like 033 & 034 in V/07.  In VK11, for this combination, maintain the required insurance percent.
    In condition type V/06, for this condition type, maintain "C" for Manual entries, since you have indicated that customer has the choice.  Otherwise, this can be populated automatically in sale order.
    Similarly, for shipment cost also, you can have the Inco2 as one of the combination so that based on region, this condition type will be populated in sale order.  If you have shipment cost configured, then this can be achieved.
    In your pricing procedure, you have to assign the shipment cost condition type next to insurance and assign the From-To step accordingly.
    thanks
    G. Lakshmipathi

  • Line Item: After reading all your links and discussions

    From the links and the discussions I was referred to in a previous post, please correct me if I am wrong. I understood that with if a characteristic is going to have several values (defined in that case as "has cardinality"), then it is better to make that characteristic a line item.
    It has some advantages as a result of the fact that the line item dimension has no dimension table but only SID table.
    1--Does this make loading data faster Or, running queries faster?
    2--I also read that "line dimension on means that this dimension becomes part of fact table", can you explain this?
    3--Some of the experts said you create line item when the characteristics in the dimension is 20 or 30 % that of the fact table. Is this 20 or 30? And, are we comparing all the characteristics in all the dimensions in the Cube or just the one dimension which we want to make the line item?
    4--Also, I get the 20 or 30% of the Dimension but what it being compared to in the Fact Table?
    5--I didn't get the cardinality stuff well so any hints other than links will help.
    6--Finally, won't this easily make the designer run out of the 13 (16-3 reserved) available dimensions?
    7--If the Rule of thumb is dimension table size should be smaller than fact table, and line item dimensions makes this possible, isn't it in the same token killing the ratio of 16 dimension to 1 Fact table in a cube?
    8--Is this a consideration after data has been loaded into Cubes or during the design phase of the Cube?
    9--If this consideration is applicable only when there is data then how can you factor this into your design? How to wait until you are in trouble to fix the problem?
    Thanks

    HI Caud,
    1] Query reading performance will be improved. As it can access only Master data table and Fact table.
    Setting it as a Line Item dim also causes a b-tree index to be built instead of a bitmap index, but also embeds SID directly in the fact table, eliminating the dimension table.
    2] Line item Diemsion- when ever ur Dimension table contains a single Char then it is better to join ur master data table with the Fact table. So there will be connection with SID.
    3]U chooses the line item when ever there is a high cardinality. i.e if ur DIM table is 10%of Fact table then u will go with the Line item Dim.
    the percentage is w.r.t the number of records.
    4] its total number of records.
    5]Cardinality creates indexes on the Dimension table entries and there by you would see an improvement in performance.
    With Cardinality, you can assign a Dimension containing Multiple Characteristics
    6] It depends based ur business requirement and the type of data that u use.
    8] It is before loading into the cube.
    9]it is better to design at the initial stage it self.
    Refer this link..
    http://help.sap.com/saphelp_nw04/helpdata/en/a7/d50f395fc8cb7fe10000000a11402f/frameset.htm
    Regards-
    MM
    Assign points if it helps.
    It is better to assign points to all who ever replies to u. As they spent lot of time on these Threads.
    Message was edited by: vishnuC

  • Details from Billing doc line item in COPA

    Hi,
    We are posting billing docs with multiple ship-to parties on the different line items. In COPA I need to get hold of the ship-to party. There are no sales orders created in the process.
    In neither the derivations (KEDR) nor in the user-exit am I able to get hold of the billing doc line item nr, as that is what I need to determine the ship-to party from the VBRP table.
    Any ideas on how I can pick up the ship-to party from the billing doc?
    Thanks in advance
    Piet Strydom

    HI,
    Thanks for your response.
    Yes, we have ship-to party at the line-item level. Technically it is stored on VBPA, but the access into VBPA is the billing doc and line item number.
    I have not been able to find good (SAP) documentation for exit COPA0005, but what I did find warned against changing characteristics? That should be done in COPA0001. However, the RBELN and RPOSN fields are not populated yet.

  • Need to apply a separate credit line item in Invoice doc.

    Dear SAP experts,
    Is it possible to apply a separate credit line item on a invoice document to reduce the net amount billed against that invoice and it has to show in invoice ouput form.
    Thanks and regards,
    Hari Challa.

    Hi,
    Yes it is possible.create a condition type of discount with access sequence containing Billing document type and say sales org.
    And in copy control maintain the pricing type to redertermine pricing.So this condition type will get executed in billing document only and not in sales order.
    Reward points if useful
    Regards,
    Amrish Purohit

Maybe you are looking for