Master Agreement- Line Item- Plant- Org Unit

Hi ,
Trying to get OrganisalUnit object associated with a plant using below code (Master Agreement-Line Item Tab)
lineItems=doc.getLineItems();
          for(int i=0;i<lineItems.size();i++){
               lineItem=lineItems.get(i);
               material=lineItem.getMaterialObjRef();
               materialHome=IBeanHomeLocator.lookup(session,material);
               materialBean=materialHome.find(material);
               plant=materialBean.getPlantObjRef();
               plantHome=IBeanHomeLocator.lookup(session,plant);
               plantBean=plantHome.find(plant);
                        businessUnitCollection=plantBean.getCollectionMetadata("COLLN:3:647").get(plantBean);
               for(int i=0;i<businessUnitCollection.size();i++){
                    businessUnitRow=businessUnitCollection.get(i);
businessUnitCollection object size is 1. But the object is null.
Please help!
Goverdhan Totawar

Got response from e-sourcing tech team. getCollectionMetadata can not be used for getting collection table.
Since the ORG Unit is standard object provided by esourcing, if an API method is not exposed we need to log a ticke, and SAP will provide a standard method.

Similar Messages

  • Unable to capture field values in Master agreement  Line Items

    I am trying to get the field values from master agreement line items page. I have written the following code to get the line item details which is working fine to capture part number and quantity->
    agreementBean = doc.getRootParentIBean();
    lineItemCollection = agreementBean.getLineItems();
    collectionsize = lineItemCollection.size();
    for(i=0;i<collectionsize;i++){
         collectionbean = lineItemCollection.get(i);
         partNum = ""+collectionbean.getPartNumber() ;
         Quantity = ""+collectionbean.getQuantity();     
         throw doc.createApplicationException(null,partNum + " , " + Quantity );
    Now, my problem is that I am unable to capture the following field item values in the master agreement > line items page.
    1. Price Unit
    2. Unit Price
    3. Product Category
    4. Plant
    Please help me to find the values.
    Thankx in Advance.
    Su
    Edited by: subrataindra on Aug 10, 2010 11:11 AM

    This will return the name of the plant.
    .getExtensionField("PLANT").get().getDisplayName(session);
    Check if this returns the product category
    collectionbean.getExtensionField("ITEM_CAT").get().getDisplayName();
    This will Return the Price
    collectionbean.getExtensionField("PRICE").get().getPrice();
    (return type :BigDecimal)
    This will return the currency
    collectionbean.getExtensionField("PRICE").get().getCurrency;
    (Return type:String)
    Similarly to retrieve other fields for which there are no standard functions, use .getExtensionField("Field ID")
    Hope this helps
    Regards,
    Immanuel

  • Troubles with multiple ESLL-SRVPOS in the same outline agreement line item!

    Hi all,
    Currently have an issue where the same service master is being used multiple times in a single outline agreement line item (set up with different groups in the service specifications with different rates).
    This is causing issues with drawing services into purchase orders.
    Eg: In ME57 when creating a PO from a PR, in the include LMLSPF5J /SEARCH_SRVPOS_CONT/ the system is checking if ESLL-KNT_INTROW is empty (which in my case it is, and message SE361 is displayed).
    The main thing thats happening is that ESLL_KNT_PACKNO and ESLL_KNT_INTROW, which hold the reference data to the outline agreement in the PO should get filled with the packno and introw from the oa service line but it isnt happening.
    I'm thinking of creating a validation so that the same service service number (ESLL-SRVPOS) CANNOT be used in the same outline agreement line item.
    Wondering if anyone has had this same issue and what path they went down to resolve it.
    Any ideas would be appreciated.
    Tim

    hi
    u cannot do this because different line items cannot be in same cell as they are variable and only one field can be there ata atime in one column while creating field catalog
    <b>u can do one thing. corresponding to sales order u can display its line items ion the secondary list and would make more sense also. for this make ur sales order number as HOTPOT on click of which will display its corres line items </b>
    regards
    ravish
    <b>reward if useful</b>
    Message was edited by:
            ravish goyal

  • Unable to delete master data line items - Master data object CCHIUSRAM

    Hello
    We have an issue with the Master data Object CCHIUSRAM - CC Hier User Auth Maintenance. It has only master data and no texts no hierarchy. It is not time-dependent. It has /BIC/PCCHIUSRAM, /BIC/SCCHIUSRAM as database table only. This master data is not being used in any infoproviders.
    In development client we are able to delete the line items of the Master data along with entering line items. RSRV check gives green for all checks.
    In Test / Production client we are not able to delete the line items of the Master data. We are only able to enter master data lines and if we change any item then it creates another entry in the table.
    Tried SE14 & RSDMD_DEL_MASTER_DATA - both does not help.
    Did ST05 trace, could not find something concrete.
    If any one has faced such an issue with any master data item then a response is much appreciated. It has become a bottleneck for us.
    Many Thanks in advance
    Pradip Parmar

    Thanks for the response.
    I can do this in EBD, but it is working fine in EBD. I cannot do this activity in EBP / EBT as the systems are closed and I cannot activate directly in EBT / EBP.
    Besides, I have recently transported active versions of the object in EBT / EBP all again twice to see if it changes anything.
    My guess is that, there is something stupid may be I am missing somewhere.
    Any help is much appreciated.
    Thanks

  • Fully Close Off Under Delivered Schedule Agreement Line Items

    Hi There,
    I am supporting a customer who is having an issue with line items on a scheduled agreement, which she has closed off, appearing in MIGO.
    Example: I have a scheduled line item of 100 EA.  I GR 90 EA but I am happy with this so I want to close off the line.
    I go into ME38, select the line item, click the delivery schedule icon, set the scheduled quantity to 90 and click the fixed check flag. I refresh the Schedule Agreement and re-release it.
    However when I go into MIGO and do a Goods Receipt for my scheduled agreement, MIGO is still proposing the 10 EA to me.
    I have two questions
    1) Are the steps I am doing the correct way to close off an under-delivered scheduled line item
    2) If 1 is correct, how come the 10 EA is still being proposed and how do I stop this happening?
    Many Thanks for any help provided,
    Colm

    No Answer

  • Link between Delivery Line Item to DTR Line Item to Freight Unit Number?

    Dear All,
    I am creating DTR with reference to delivery from ECC. As per my logic in FUBR, I am creating separate Freight Unit for every DTR line item.
    Now how to identify (At Table Level) that which DTR line item belongs to which Delivery Line Item?
    Also how to determine which Freight Unit belongs to which DTR Line item?
    Request to please share the above flow at table level in SAP TM System.
    Regards,
    Vibhu Gupta

    Hi Vibhu,
    First, you know which DTR item you have on hand and then you can find the corresponding FU item by association(TOR ITEM from TRQ item to FU item), after retrieving the data of FU item you can find the root key of every result data entry(FU item data) and you can also get the DTR item key/FU item key pair(which DTR item/which FU item), actually the root key is the FU root key, then you can user service manager to retrieve the root data of corresponding FU root key.
    Hope this helps.
    BR, Dawson

  • Aggregates for master data & Line item Dimension

    Hi i have question
    1     Can we create Aggregate for Master Data?
    2     Can we create Aggregate with Navigational Attributes?
    3     Can we create Aggregate with Line Item Dimension?
    4     How many dimension we can add with how many characteristics in it if we create a new Aggregate

    1 Can we create Aggregate for Master Data? - <b>No</b>
    2 Can we create Aggregate with Navigational Attributes? - <b>No</b>
    3 Can we create Aggregate with Line Item Dimension? - <b>No</b>
    4 How many dimension we can add with how many characteristics in it if we create a new Aggregate - <b>You can create a maximum of 13 dimensions in the cube.You can add as many characteristics for an aggregate,adding many characteristics in the aggregate is as good as having the query fetch data from the Cube instead of the aggregates.</b>
    Aggregates are subsets infocubes derived from the main InfoCube to increase the query performance.You can create as many aggregates you want in an InfoCube.
    For each aggregate,internally dimensions are created based on the selected characteristics.
    Take a look at this link for detail information...
    http://help.sap.com/saphelp_nw04/helpdata/en/7d/eb683cc5e8ca68e10000000a114084/content.htm

  • Personnel Cost Planning: creating cost item for Org unit

    Hi experts,
    I am trying to attach a cost item to an org unit by maintaing feature hcp02 but the somehow the cost item applies itself to both org unit and position. Could anyone please let me know the how this can be done?
    Thanks

    It is extremely difficult to answer your question without knowing all the details of your scenario.
    I can briefly explain the scenario I used:
    1. I have maintained IT1005 on job level to further distribute this information along the organization structure.
    2. First of all i had to run data collection on job level using method "Infotype planned compensation: 1005" and cost item that was a base for other items, e.g. basic salary. System creates records in infotype 5010 "Planning of Pers. Costs" for evaluated jobs.
    3. Then I collected cost items for positions using method "Data from related cost planning objects", calculation type A, basis that I previously set up, evaluation path O_O_S_C (I started from head org.unit) and object type source C. I did it for positions to have possibility to adjust cost items on position level using transaction PHCPDCUI - Edit Data, e.g. you can ask managers to review your defaults on position level before staring consolidation on org.unit level.
    4. Then you start data collection on org.unit level using cost items on position level. Process similar to step 3 but with different evaluation path and source object.
    5. When it's done you run cost planning (PHCPADMN - Manage) using special plan for planning based on OM data.
    There are plenty of other scenarios, so can't really give you exact answer on your question, as I don't which scenario you use.

  • Is there a BAPI that displays Scheduling Agreement line items?

    Hi,
    If a PO number is passed to BAPI_PO_GETITEMS, all line items are returned.
    Is there a BAPI that will do the same thing for a scheduling agreement?
    Thx.
    Andy

    Hi,
    try BAPI_PO_GETDETAIL
    Regards.
    David

  • Copy line items from Master Agreement to SubAgreement

    Dear all,
    As a requirement, we need to create a dummy line item at master agreement and subagreement level to be able to publish them to ERP without need
    to complete line items (they are completed in ERP via a development).
    We have created master agreement templates with a dummy line item but at subagreement level, templates are not available.
    What we are trying to develop is a script on post_create at agreement level to copy line items from Master Agreement to SubAgreement. We are able to get Master Agreement line items and copy them to the SubAgreement, but the subagreement is not created. This is the code we are using:
    import com.sap.odp.api.doccommon.masterdata.ValueListValueIBeanHomeIfc;
    import com.sap.odp.api.doccommon.masterdata.ValueListValueIBeanIfc;
    import com.sap.odp.api.doccommon.masterdata.ValueListTypeIBeanHomeIfc;
    import com.sap.odp.api.doccommon.masterdata.ValueListTypeIBeanIfc;
    import com.sap.eso.api.contracts.ContractIBeanHomeIfc;
    Mst_agreementBean = doc.getParentIBean();
    lineItemCollectionSub = doc.getLineItems();
    lineItemCollection = Mst_agreementBean.getLineItems();
    collectionsize = lineItemCollection.size();
    colln = Mst_agreementBean.getCollectionMetadata("MA_LINEITEMS").get(Mst_agreementBean);
    colln2 = doc.getCollectionMetadata("MA_LINEITEMS").get(doc)
    newProject = Mst_agreementBean.getIBeanHomeIfc().createFromAnother(Mst_agreementBean);
    newMember = colln.get(1);
    //  Get Values Line Item
    assCat = newMember.getAcctAssignCategory();
    actLimP         = newMember.getActualLimitPercent();
    delAdCity       = newMember.getDeliveryAddressCity();
    delAdCount    = newMember.getDeliveryAddressCountryRef();
    delAdDist       = newMember.getDeliveryAddressDistrict();
    //... (all fields included in the script)
    // Create Line
    newMember2 = newMember;
    AgreementHome = IBeanHomeLocator.lookup(session, doc.getObjectReference());
    AgreementHome.upgradeToEdit(doc);
    // Set Values
    newMember2.setAcctAssignCategory(assCat);
    newMember2.setActualLimitPercent(actLimP);
    newMember2.setDeliveryAddressCity(delAdCity);
    newMember2.setDeliveryAddressCountryRef(delAdCount);
    newMember2.setDeliveryAddressDistrict(delAdDist);
    //... (all fields included in the script)
    try{
    colln2.add(newMember2);
    AgreementHome.save(doc);
    AgreementHome.downgradeToView(doc);
    collectionbean = colln2.get(0);
    logInfo("Value of  collectionbeanSub " + collectionbean );
    }catch (ApplicationException e){
    logInfo("Error " + e.getClass() + ". " + e.getMessage());
    When we try to create an Agreement under a Master Agreement (clicking Add on Agreement tab), following error message is shown related to the line in blue:
    Facility=local4;sessionid=4e73bb8e73304d6284816f93f4e04522a7c387b; tenantid=#tenant.ecb#;username=LUGUELL; exception=Sourced file: inline evaluation of: ``// **   import com.sap.odp.api.doccommon.masterdata.ValueListValueIBeanHomeI ... '' : Method Invocation AgreementHome.save : at Line: 164 : in file: inline evaluation of: ``// **    import com.sap.odp.api.doccommon.masterdata.ValueListValueIBeanHomeI ... '' : AgreementHome .save ( doc )
    Target exception: java.lang.NullPointerException: while trying to invoke the method com.sap.eso.contracts.ContractTypeBo.getVendorVisible()
    of a null object returned from com.sap.eso.contracts.ContractCommonBo.getTypeBo()
    ;stacktrace=Sourced file: inline evaluation of: ``// *JLA*    import com.sap.odp.api.doccommon.masterdata.ValueListValueIBeanHomeI ... '' : Method Invocation AgreementHome.save : at Line: 164 : in file: inline evaluation of: ``// *JLA*    import com.sap.odp.api.doccommon.masterdata.ValueListValueIBeanHomeI ... '' : AgreementHome .save ( doc )
    Target exception: java.lang.NullPointerException: while trying to invoke the method com.sap.eso.contracts.ContractTypeBo.getVendorVisible()
    of a null object returned from com.sap.eso.contracts.ContractCommonBo.getTypeBo()
    Any ideas what is causing the error? What are we missing on our code to copy line items?
    Many thanks,
    Marc Romagosa
    Message was edited by: Marc Romagosa de Riba

    We managed to create a line item at VALIDATE script, but not at POST_CREATE. Either it is a bug or it is not possible at POST_CREATE script.

  • Unable to update profit center or plant code in the customer line item

    Hi,
    We require the profit center and plant code and division in FI
    documents (Posted through billing document or through direct FI entry)
    We are unable to input plant or profit center in the customer line item
    while using F-21 or any other FI transaction
    The plant and profit center is not appearing even in customer line item
    in RV document (From SD billing)
    We have made the Field status group as optional for the reconcilation
    accounts.
    Regards
    Sembian

    Hi
    Profit center / cost center are generally entered in revenue & expense line items (P&L items). Customer / vendor master and line items are balance sheet items which will not show profit / cost centers.
    Regards
    Neeraj

  • How to validate the line item values in OFR - quantity , unit price and UOM

    Hi All,
    Is there any possibility to validate the line items like quantity, unit price and UOM against the DB and stops those invoices at verifier (1 batch =10 invoices) level  if yes could you please let me know the process how to proceed further.
    due to this some the invoices are coming to OFR is with incorrect quantity, UOM and unit price different from PO lines information like quantity , UOM and unit price and those invoices are not validating from the DB and these are processed to EBS and it's effecting the GL and reporting.
    Regards,
    Anil

    Hi ,
    I did not get the exact requirement.Let me bit:
    In standard AP project lines validation will try to compare the quantity , unit price and UOM of line against the database for match which actually performed on export.
    So even if match fails batch will be exported.Now if you want to correct it before EBS,i think you can do it in the business process easily that you are consuming whether BPEL/BPM process.
    We have done this in several projects
    =========================
    But If you want that to be done from OFR side i think we need to code  UserExitPONumberValidate event to  compare the line items values against database.I need to test this also.

  • Copying Schedule Agreements lines to different plant

    Hello all, I am trying to copy schdule agreement lines from plant 'A' to a new plant 'B' in the same schedule aggreement.  I tried using BAPI_AGREEMENT_MAINTAIN but it won't let you change the plant.  I also tried using the copy funtion within ME32 but that doesn't let you change the plant either.  Is there any way to do this or will I have to code a BDC to do it as if you are doing it manually.  This will be very tedious to write and the chnce of error will be high.  I was hoping to find a more efficient way to accomplish this.
    Thanks, Troy

    Thank you Ramakrishna,
    I tried entering the data as you specified (below), but it still did not bring the rescheduled dates into the delivery schedule.  I tried increasing the days and %, still no change.   My rescheduled dates go back to March 07, but the delivery date still says 8/07. 
    A few questions:
    In the Tol. profile under Legnth in workdays, what does this mean if I enter 10.  Does it only check the previous 10 days?  and what does each period do?  Do I need to specify days and %'s in each period?
    <b>Tolerance Profile</b>
    You specify 10 days as the checking period for JIT schedules, since this corresponds to the release horizon. You enter 5% as upper and lower tolerance limits and choose Overall check.
    Regards,
    Elizabeth

  • Line items are not showing in fbl3n,fs10n,faglb03,fagll03

    hi experts,
    i am facing a problem to see the line item of inter unit clearing a/c. i am not able to see the line items in fbl3n,fs10n,fagll03 and faglb03. system response is "You have stored account 300000 in company code L001 as a clearing account. At the same time, you use line item management with this account" and"Error message issued because line item display cannot read data for an account in a ledger if line items exist partially in the entry view together with clearing items for which there are no line items. In such cases, only the data with line items would be selected"
    i do not understand the system response. can anyone please help me to solve this problem?
    thanks &regards
    konishko

    sir
    thanks for your reply. as per your suggestion i am trying to change in fs00 to uncheck the line item management but  i am unable to do that,system shows that i have to uncheck the open item managemt also but the said account contain the open item. so i am not able to change the same. is there any other way to do that. can you please suggest me in detail? and one more thing that i am able to see only the balaces in fs10n. but not able to see the line item.this is probably for missing the business area in line item.
    but i needs to see the line items.
    can you please tell me any alternate way in detail to solve this problem?
    thanks and regards
    konishko

  • Order creation logic how to pass line items

    experts
    i have the following data in iternal table itab.
    po number ,customer number, matnr,quantity ,order date.
    1212838383  7494749  8383938833   20  20032009
    1212838383  7494749  8383938832   10  20032009
    1212838382  7494749  8383938833   20  20032009
    1212838384  7494745  8383938823   30  22032009
    1212838384  7494745  8584858588   05  22032009
    now i want to populate this data into idocs orders segement .
    for all po the customer will be the same and i need to create one order for that.
    in the above data first 2 lines have same po so i need to create order with 2 line items.
    sales org,division,distribution channnel,ordertype will be same for all the records.
    loop at itab into workarea.
    at new po. "for same po, same header data so i am using AT NEW
    edi_dd40-segnum = 1.
    edi_dd40-segnam = 'E2EDK14 '.
    edi_dd40-mandt = sy-mandt.
    edi_dd40-psgnum = psgnum.
    e2edk14-qualf = '008' .
    e2edk14-orgid = 'NN21.
    MOVE e2edk14 TO edi_dd40-sdata.
    append edi_dd40 to itab_output.
    edi_dd40-segnum = 1.
    edi_dd40-segnam = 'E2EDK14 '.
    edi_dd40-mandt = sy-mandt.
    edi_dd40-psgnum = psgnum.
    e2edk14-qualf = '006' .
    e2edk14-orgid = 'ni.
    MOVE e2edk14 TO edi_dd40-sdata.
    append edi_dd40 to itab_output.
    endat.
    now the item data comes , so i need to create items with same po.and afetr this i need to submit this data to fm before another diffent  po comes.below same customer and po so need to consider as one sales order and submit to fm.
    item1  1212838383  7494749  8383938833   20  20032009
    item2  1212838383  7494749  8383938833   20  20032009
    call function 'MAST_IDOC_DISTRIBUTE'
    My concern is how to tell to the system for the same po create the order with multipl line items , do i need to use to AT NEW
    or some other commands above?
    endloop.

    i have used at end of po. but my matnr is becoming *************. no date is showing in the internal table while populating the matnr to segments.
    Loop at itab into workarea.
    at end of po.
    here i am filling the matnr to the segment. here  workarea-matnr is showing ***********  only stars,
    endat.
    endloop.
    If i remove the at end of po , then the matnr is comming .
    Please sugggest me what to do.
    my fields sequence are like this.
    kunnr " customer
    bstnk "po
    matnr " material
    currency
    kwmeng "order quantity
    podate
    orderdate
    so how to handle this please suggest.

Maybe you are looking for

  • Camera lock screen iPhone 5S not working properly after upgrade to iOS 8.1.3

    Actually, i upgrade my iPhone to 8.1.3. What i am trying achieve is, when my iPhone is locked i just need to access my camera without login. When i open camera when my iPhone is locked, camera displays for 2 seconds and then my screen will be black.

  • Why SIDs start with 2 in master data S Tables?

    Hello All, When we create infoobjects, S table(/BIC/S...) is created to store SIDs and respective values. However, these SIDs start with 2 and not 1. Please, can anyone tell what is reason for this.

  • How to export a pdf to ppt

    Trying to convert a pdf file to a powerpoint file.  When I open Adobe Reader, I see the option that says "convert to PPT" but when I click convert, it directs me to 'SIGN UP NOW' even though I just signed up 5 days ago and paid for a year subscriptio

  • Going from phone to PC on a sync...

    So, a while ago, I wiped my HD disc clean. It was catastrophic failure mode, and needed to give it a good scrubbing... I didn't really have a whole lot of "Gee, I should save this" time before it happened. Thus, everything that's on my Iphone is more

  • Passing objects

    Hi, I have an object in a jsp that I would like to pass to another jsp how can i do that without making a session bean out of the object? Thanks