SErvice POS

In case of service Purchase Orders we can give service reference in text column in the item-level tab of PO.  Again we assign different service masters in the service tab of PO.
Our clients requirement is that for one purchase order, it should allow only one service master.
How to configure this?

Hii,
This is standard process
If you want to restrict, you use any exit to control this.
Regards,
Kumar

Similar Messages

  • Creation of Service POs using BAPI_PO_CREATE1

    Hi Friends,
    I am trying to create service POs through BAPI (BAPI_PO_CREATE1). I am facing different errors like Please maintain service or limits eve though I am providing the details in POSERVICES. Can any one suggest me the fields which we have to provide for creating the service POs.
    I am using this BAPI in LSMW.
    Thanks,
    Gagan Chodhry

    Check this it may help u.
    DATA: BEGIN OF po_header OCCURS 0.
    INCLUDE STRUCTURE BAPIEKKOC.
    DATA: END OF po_header.
    DATA: BEGIN OF po_iteam OCCURS 10.
    INCLUDE STRUCTURE BAPIEKPOC.
    DATA: END OF po-items.
    DATA: BEGIN OF PO_ITEM_SCHEDULES OCCURS 0.
    INCLUDE STRUCTURE BAPIEKET.
    DATA: END OF PO_ITEM_SCHEDULES.
    DATA: BEGIN OF I_BAPIRETURN OCCURS 0.
    INCLUDE STRUCTURE BAPIRETURN.
    DATA: END OF I_BAPIRETURN.
    CALL FUNCTION 'BAPI_PO_CREATE'
    EXPORTING
    PO_HEADER = PO_HEADER
    SKIP_ITEMS_WITH_ERROR = 'X'
    TABLES
    PO_ITEMS = PO_ITEMS
    PO_ITEM_SCHEDULES = PO_ITEM_SCHEDULES
    RETURN = I_BAPIRETURN
    EXCEPTIONS
    OTHERS = 1.
    Regards

  • PO item overview with item details for service POs

    Hi experts,
    Is there any standard report to see the PO Item overview short description data with Item-services details in case of service POs.
    We raise the service pos with service short description in  Item overview and against that short description we maintain service nos in item-services.
    we want to see the PO wise item overview short description with item services in one report.
    we have already seen ME2S,MSRV1 to 6,ME80FN, but its not serve our purpose.

    hi
    go to me80fn
    here press shift F4
    then u will get fields to add here at item level select the item cat and acct assignment
    now give item cat 9 and acct assignment as k
    then execute
    now u will get the report ,choose po histry mode here u will get what u want
    similarly u can try it with me2n
    regards
    kunal

  • Enter Invoice before Service Entry for Service POs?

    Hi,
    I have a question that I am hoping someone can answer.
    As per standard process, in order to enter an invoice for a service PO, the service entry should be posted and accepted.  This is the standard service procurement process, i.e. a 3 way match process for service POs (PO - Service Entry - Invoice).
    We have a request to be able to enter an invoice for a service PO (that will go on block) before entering the service entry sheet; once the service entry sheet is entered and accepted, the invoice should be unblocked and paid.
    Currently, based on our testing in ECC 5.00, the system does NOT allow the user to enter an invoice for a service PO unless:
    1.  the service entry has been posted and accepted in the system (when using GR-IV checked, GR checked); or
    2.  the service PO is created such that the GR is non-valuated (where GR-IV is unchecked):
         a.  GR-IV unchecked
         b.  SR-IV unchecked
         c.  GR checked
         d.  GR non-valuated checked
    In option 2 above, since it is GR non-valuated, as soon as the invoice is posted, the consumption account is hit, and offset by the vendor account (the GR/IR account is not impacted in this scenario).  When the service entry is created and accepted, no accounting postings are made as it is GR non-valuated.  Therefore, it looks very similar to a 2 way match process.
    We also read in SAP Note 1166693 that says an invoice cannot be entered before service entry unless you activate Enterprise Public Sector, however, this conflicts with option 2 mentioned above.
    Has anyone come across a similar requirement, implemented Public sector, option 2 above, or have any other solutions?  Does anyone see any negative impacts with implementing option 2 above?
    Cheers,

    Hi,
    I think you can use this functionality using LIV tolarance key DW ,please explore Spro>MM>LIV>Invoice block>set tolerence limits
    By creating PO IV based you can block invoice till GR is posted, check it
    Thanks
    Diwakar

  • Uploading Service POs....

    Hi All,
    I am trying to upload open purchase orders and service POs using BDC. If any one can provide the info regarding the coding part it would be helpful to me as it is urgent.
    regards
    PSNG

    Hii,
    This is standard process
    If you want to restrict, you use any exit to control this.
    Regards,
    Kumar

  • Pricing procedure for service pos

    Hi guys,
    WE have defined two pricing procedures i.e. for domestic and for import.  When we create a service PO, domestic pricing procedure is being populated.  Is this the standard functionality or do we need to use a separate pricing procedure for service POs?  If that is the case, how to do it?
    We are using the same document type and same purchase organisation for purchase order for services and materials
    thanks in advance

    Normaly the std domestic price will work for the service but you have service pricing also,
    for the std service pricing
    SPRO-MM-External service management-Maintain conditon for services
    here you will find the service schema and which will defualt in the service PO
    If want to see the service condtion
    go to PO service tab and click on condition icon at the bottom of the screen and it will show you the service conditon with schema

  • Tax calculation in Service POs

    Dear All,
    While creating a service PO I am maintaining Tax code at invoice Tab. But while clicking on Taxes button to see the tax calculation it is not apperaing. Also at condition tab total taxes condition type showing no amount.
    For the same tax code if i create a Material PO then system is showing tax calculation after clciking on Taxes button also i can see the same amonunt at condition tab against condition type.
    is it stnadard that we can not see tax calculation in service POs, only while doing SES we can see the tax calculations.
    If not what could be the reason that i couldnt see tax calculations in service POs.
    Please guide
    Regards,
    Rakesh

    Hi,,
    Check you are doing service PO  and this require Account assignmnet cat-K  and Itemcat-D
    and mandatory is -Material Group.
    If you are using TAXINN  -Then you need to maintain Service tax -conditions like,-Example -JSRT,JEC3,JSE3-
    Service tax  ,Ecess on service tax,SHECess on service tax  has to maitain for
    Plant and material Group Access sequence . in FV11.
    Then only you can get.
    where as for the material you are already conditions are maitained so you are getting the tax details.
    If you are using TAXINJ- For blank  you maintain chaper ID with Plant in J1ID  then you will get the taxdetais.
    i think you are clear what i mean to say
    with regrads
    Shrinivas Gangoor

  • Keeping control over large service POs

    Hi everybody,
    In our organization, we are implementing a shared service center, and I was wondering if you had any ideas about the handling of large service POs.
    We are using a three way match for almost all purchasing. The order and receipts are booked in individual plants, and the invoices will be booked in the SSC.
    A good example to illustrate the problem is transportation. Usually, a large service PO is created for a longer period of time, e.g. 6 months. When the goods receipt is booked using the invoice, how do you know the invoice is thoroughly checked? The receipient might not do a good job here, and if he/she doesn't, this will result in the payment of the said invoices.
    This is a pretty significant risk, given the large number of service POs and their large values. I was hoping you might have some ideas to tackle this problem, while keeping the auditors and the purchases happy.
    Regards,
    Richard

    If you just want to know where the allocation is coming from, it could
    be possible to find that using JRA.
    Create a JRA recording. Make sure the JRA recording covers one of your
    large allocation events. Open the JRA recording and look at the GC
    General tab.
    Now, you should be able to find the stack trace for your large
    allocation in the "Garbage collection call tree" pane.
    If your JVM terminates due to OOME when the large allocation happens, I
    don't know whether or not the GC will be part of the JRA recording.
    Regards //Johan
    Marko Milicevic skrev:
    Is there any support in Mission Control (or JRockit itself), to help identify the root cause of large transient memory allocations?
    eg. There is a service request that is allocating a set of large temporary buffers (>200megs). Once the call competes, the memory is no longer reachable (is collectable).
    Ideally i would like to be able to create an alert that fires if the amount of reachable memory has increase by X-megs over Y-time interval. The alert would also include a heap dump for offline analysis, or at least a dump of all the current stack traces.
    A similar feature seems to be available for Weblogic.
    http://e-docs.bea.com/wls/docs92/ConsoleHelp/taskhelp/monitoring/LogLowMemoryConditions.html
    Is this Weblogic feature inherited from Mission Control, JRockit, or something unique to Weblogic?
    Thank you.

  • FM to get service POs

    Hi,
    Is there any FM available in SRM to get all the service POs created in system during a specified time period.
    We are in ECS SRM 4.0 .
    Thanks in advance
    Prasad

    I don't think there is readily available FM for your purpose. It might be better off for you to write your own routine by searching through DB table, such as BBP_PDIGP (with product_type = 02, among other criteria you might have).

  • GR for Service POS

    HI i would like to know the GR process for Services pos (standard )
    thank you
    ash

    HI  Ashok,
    During Vendor code creation in T-code XK01 of Purchasing  Data Screen under Control Data TAB the following option to be tick marked are as follows.
    GR - Based Inv.Verif.      to be tick marked
    Srv.Based Inv.Ver           to be tick marked
    then the purchase order creating for that vendor and the PO - Item Detail menu Invoice TAB the following option automatically ticked marked based on the above vendor creation option ticked are as follows.
    GR-Bsd IV
    S.Based IV
    After that PO released, if supply PO - GRN made using T-code MIGO and if service PO - Service Entry Sheet (SES) made using T-code ML81N. Based on the above option tick marked GR process internally made for service PO's.
    Hope, it is very useful for you.  
    Regards,
    K.Rajendran

  • GR Based IV Tick for SERVICE POs

    Hi Friends,
    How can we avoid GR Based IV Tick tht is defaulted by system for SERVICE POs with item category D.
    When i tried to remove this Tick, system given error message, ": Combination of GR/IR Control not allowed for valuated GR"
    I want to remove this GR Based IV Tick for service PO to enable successful automatic removal of invoice blocking for such POs when GR is posted for required balance qty in system after 1st invoice is blocked by system for Price variance.
    in short, how can we have SERVICE PO without GR Based IV Tick ?

    1 ) when we remove GR Tick& GR Based IV Tick,
    If you dont want to post GR and GR Based IV Tick, is required for post the invoice.Practically this combination is not possible.
    2 ) When we tick Non valuated GR & Remove GR Based IV Tick
    .if you want to post GR and you dont want to any accounting document for perticular GR.Remove GR Based IV Tick will help you PO based invoice verfication.

  • Wrong 'Still to be delivered' & 'Still to be invoiced' quantities against service POs in ME2* reports

    Hello All,'
    I have come across some strange issue in all ME2* reports when I am checking the service POs.
    Few of the service POs are showing zero quantity for still to be delivered & invoiced when the service entry sheet is yet to be created & invoice has to be posted. However the amount for both i.e. still to be delivered & still to be invoiced are showing for those POs. In few of the POs where the service entry sheet has been created the still to be invoiced is showing as zero. The 'Delivery Schedule' tab page it shows correct open quantity.
    Please do note that we have indicator ' service-Based invoice verification' is marked & GR non valuated is not marked. Delivery completed & final invoice indicators are not set.
    I have searched the forum as well as SAP market place & came across few threads & notes but non of them has helped yet. The details are as follows,
    Notes-
    1855902
    706149
    1336237
    1449459
    1852810
    Threads
    ME2K - Still to be Invoice.........
    ME2N Report was showing wrong info
    Timely help will be appreciated.
    Manoj P.

    Hi Dev,
    Thanks for the information.
    ME2S won't be of much help for us as we want to know the pending quantity or still to be delivered quantity on item level & not on services level in one go for all the POs (including service, material POs too).
    Pleas find the screen shots below,
    Also check out the details in the 'Delivery schedule' tab page.
    Thanks
    Manoj P.

  • Problem creating Service POs with BAPI_PO_CREATE1

    Hi.
    I'm trying to create service POs with data that i read from an excel file, to do this I'm using the bapi: <b>BAPI_PO_CREATE1</b> I'm passing the following parameters:
    IMPORT:
    - poheader
    - poheaderx
    TABLES:
    - return
    - poitem
    - poitemx
    - poaccount
    - poaccountx
    - poservices
    - posrvaccessvalues
    - poservices text
    - extensionin
    When I execute the bapi, I'm getting the following messages into table return:
    <i>W - Error transferring ExtensionIn data for enhancement CI_EKKODB
    E - No instance of object type PurchaseOrder has been created. External reference:
    E - PO header data still faulty
    E - Purchase order date is in the past
    I - Change WBS Element could not be effected
    E - You cannot maintain service specs. due to incomplete transfer structure</i>
    Can anybody, please say me what am i doing wrong? How this bapi works?
    Regards.
    Gregory.

    Hello My friend
    Check this code:
    Code listing for: LZMMIUP001F01
    Description: Include LZMMIUP001F01
    ***INCLUDE LZMMIUP001F01 .
    *&      Form  fill_item
          text
         -->P_WA  text
    FORM fill_item  TABLES:  poitem STRUCTURE bapimepoitem "Item Data
                             poitemx STRUCTURE bapimepoitemx "Item Data (Change Parameter
                    USING wa STRUCTURE zlo_mmcnv009
                          package.
    item number
      poitem-po_item = wa-itemnum.
      poitemx-po_itemx = 'X'.
      poitemx-po_item = wa-itemnum.
      IF package <> ''.
        poitem-pckg_no = package.
        poitemx-pckg_no = 'X'.
      ENDIF.
    *Account Assignment Category
      IF wa-category <> ''.
        poitem-acctasscat = wa-category.
        poitemx-acctasscat = 'X'.
      ENDIF.
    *Item Category in Purchasing Document
      IF wa-itemcat <> ''.
        poitem-item_cat = wa-itemcat.
        poitemx-item_cat = 'X'.
      ENDIF.
    *Short Text
      IF wa-sortxt <> ''.
        poitem-short_text = wa-sortxt.
        poitemx-short_text = 'X'.
      ENDIF.
    *Material Number
      IF wa-material <> ''.
        poitem-material = wa-material.
        poitemx-material = 'X'.
      ENDIF.
    Unit of Measure
      IF wa-undmesure <> ''.
        poitem-po_unit = wa-undmesure.
        poitemx-po_unit = 'X'.
      ENDIF.
    *Purchase Order Quantity
      IF wa-quantity <> ''.
        poitem-quantity = wa-quantity.
        poitemx-quantity = 'X'.
      ENDIF.
    *Net Price in Purchasing Document
      IF wa-netprice <> ''.
        poitem-net_price = wa-netprice.
        poitemx-net_price = 'X'.
      ENDIF.
    *Plant
      IF wa-plant <> ''.
        poitem-plant = wa-plant.
        poitemx-plant = 'X'.
      ENDIF.
    *Material Group
      IF wa-matgrp <> ''.
        poitem-matl_group = wa-matgrp.
        poitemx-matl_group = 'X'.
      ENDIF.
    *Free Item
      IF wa-free <> ''.
        poitem-free_item = wa-free.
        poitemx-free_item = 'X'.
      ENDIF.
      APPEND poitem.
      APPEND poitemx.
    ENDFORM.                    " fill_item
    *&      Form  fill_header
          text
         -->P_WA  text
    FORM fill_header  USING wa STRUCTURE zlo_mmcnv009
                        poheader STRUCTURE bapimepoheader "Header Data
                        poheaderx STRUCTURE bapimepoheaderx. "Header Data (Change Toolbar)
      DATA: dia(2), mes(2), ano(4),
            vendor(10) TYPE n.
      dia = wa-docdate(2).
      mes = wa-docdate+2(2).
      ano = wa-docdate+4(4).
      CONCATENATE ano mes dia INTO wa-docdate.
      dia = wa-datestart(2).
      mes = wa-datestart+2(2).
      ano = wa-datestart+4(4).
      CONCATENATE ano mes dia INTO wa-datestart.
      dia = wa-datend(2).
      mes = wa-datend+2(2).
      ano = wa-datend+4(4).
      CONCATENATE ano mes dia INTO wa-datend.
    Document Type
      IF wa-doctyp <> ''.
        poheader-doc_type = wa-doctyp.
        poheaderx-doc_type = 'X'.
      ENDIF.
    vendor number
      IF  wa-vendor <>  ''.
        IF NOT ( wa-vendor CA sy-abcde ).
          vendor = wa-vendor.
          poheader-vendor = vendor.
          poheaderx-vendor = 'X'.
        ELSE.
          poheader-vendor = wa-vendor.
          poheaderx-vendor = 'X'.
        ENDIF.
      ENDIF.
    Document Date
      IF wa-docdate <> ''.
        poheader-doc_date = wa-docdate.
        poheaderx-doc_date = 'X'.
      ENDIF.
    purchasing organization
      IF wa-organiz <> ''.
        poheader-purch_org = wa-organiz.
        poheaderx-purch_org = 'X'.
      ENDIF.
    Purchasing Group
      IF wa-purgroup <> ''.
        poheader-pur_group = wa-purgroup.
        poheaderx-pur_group = 'X'.
      ENDIF.
    Start of Validity Period
      IF wa-datestart <> ''.
        poheader-vper_start = wa-datestart.
        poheaderx-vper_start = 'X'.
      ENDIF.
    End of Validity Period
      IF wa-datend <> ''.
        poheader-vper_end = wa-datend.
        poheaderx-vper_end = 'X'.
      ENDIF.
    Company Code
      IF wa-compcode <> ''.
        poheader-comp_code = wa-compcode.
        poheaderx-comp_code = 'X'.
      ENDIF.
      Status of Purchasing Document
      IF wa-status <> ''.
        poheader-status = wa-status.
        poheaderx-status =  'X'.
      ENDIF.
    ENDFORM.                    " fill_header
    *&      Form  fill_account
          text
         -->P_WA  text
    FORM fill_account  TABLES  poaccount STRUCTURE bapimepoaccount
                               poaccountx STRUCTURE bapimepoaccountx
                       USING wa STRUCTURE zlo_mmcnv009.
      DATA: account(10) TYPE n.
      poaccount-po_item = wa-itemnum.
      poaccountx-po_item = wa-itemnum.
    *Cost Centre
      poaccount-costcenter = wa-coscenter.
      poaccountx-costcenter = 'X'.
    *Order Number
      poaccount-orderid = wa-ordernumb.
      poaccountx-orderid = 'X'.
    *"G/L Account Number
      IF wa-accnumb <> ''.
        account = wa-accnumb.
        poaccount-gl_account = account."wa-accnumb.
        poaccountx-gl_account = 'X'.
      ENDIF.
      IF NOT ( wa-coscenter = '' AND
         wa-ordernumb = '' AND
         wa-accnumb = '' ).
        APPEND poaccount.
        APPEND poaccountx.
      ENDIF.
    ENDFORM.                    " fill_account
    *&      Form  fill_schedule
          text
         -->P_WA  text
    FORM fill_schedule  TABLES  poschedule STRUCTURE bapimeposchedule
                                poschedulex STRUCTURE bapimeposchedulx
                        USING wa STRUCTURE zlo_mmcnv009.
      DATA: dia(2), mes(2), ano(4).
      dia = wa-delivdate(2).
      mes = wa-delivdate+2(2).
      ano = wa-delivdate+4(4).
      CONCATENATE ano mes dia INTO wa-delivdate.
    *Delivery Date
      poschedule-po_item = wa-itemnum.
      poschedulex-po_item = wa-itemnum.
      poschedule-delivery_date = wa-delivdate.
      poschedulex-delivery_date = 'X'.
      IF NOT wa-delivdate = ''.
        APPEND poschedule.
        APPEND poschedulex.
      ENDIF.
    ENDFORM.                    " fill_schedule
    *&      Form  fill_header_contract
          text
         -->P_WA  text
         -->P_HEADER  text
         -->P_HEADERX  text
    FORM fill_header_contract  USING wa STRUCTURE zlo_mmcnv009
                                 coheader STRUCTURE bapimeoutheader
                                 coheaderx STRUCTURE bapimeoutheaderx.
      DATA: dia(2), mes(2), ano(4).
      dia = wa-datestart(2).
      mes = wa-datestart+2(2).
      ano = wa-datestart+4(4).
      CONCATENATE ano mes dia INTO wa-datestart.
      dia = wa-datend(2).
      mes = wa-datend+2(2).
      ano = wa-datend+4(4).
      CONCATENATE ano mes dia INTO wa-datend.
    Purchasing Document Date
      coheader-doc_date = sy-datum.
      coheaderx-doc_date = 'X'.
    *Item Number Interval
      coheader-item_intvl = '10'.
      coheaderx-item_intvl = 'X'.
    Currency Key
      coheader-currency = 'BHD'.
      coheaderx-currency =  'X'.
    languaje
      coheader-langu = 'EN'.
      coheaderx-langu = 'X'.
    Document Type
      IF wa-doctyp <> ''.
        coheader-doc_type = wa-doctyp.
        coheaderx-doc_type = 'X'.
      ENDIF.
    vendor number
      IF  wa-vendor <>  ''.
        coheader-vendor = wa-vendor.
        coheaderx-vendor = 'X'.
      ENDIF.
    purchasing organization
      IF wa-organiz <> ''.
        coheader-purch_org = wa-organiz.
        coheaderx-purch_org = 'X'.
      ENDIF.
    Purchasing Group
      IF wa-purgroup <> ''.
        coheader-pur_group = wa-purgroup.
        coheaderx-pur_group = 'X'.
      ENDIF.
    Start of Validity Period
      IF wa-datestart <> ''.
        coheader-vper_start = wa-datestart.
        coheaderx-vper_start = 'X'.
      ENDIF.
    End of Validity Period
      IF wa-datend <> ''.
        coheader-vper_end = wa-datend.
        coheaderx-vper_end = 'X'.
      ENDIF.
    ENDFORM.                    " fill_header_contract
    *&      Form  fill_item_contract
          text
         -->P_WA  text
         -->P_COITEM  text
         -->P_COITEMX  text
    FORM fill_item_contract  TABLES: coitem STRUCTURE bapimeoutitem
                                     coitemx STRUCTURE bapimeoutitemx
                             USING  wa STRUCTURE zlo_mmcnv009.
    item number
      coitem-item_no = wa-itemnum.
      coitemx-item_no = wa-itemnum.
      coitemx-item_nox = 'X'.
    *Material Number
      IF wa-material <> ''.
        coitem-material = wa-material.
        coitemx-material = 'X'.
      ENDIF.
    *Target Quantity
      IF wa-quantity <> ''.
        coitem-target_qty = wa-quantity.
        coitemx-target_qty = 'X'.
      ENDIF.
    *Net Price in Purchasing Document
      IF wa-netprice <> ''.
        coitem-net_price = wa-netprice.
        coitemx-net_price = 'X'.
      ENDIF.
      APPEND coitem.
      APPEND coitemx.
    ENDFORM.                    " fill_item_contract
    *&      Form  fill_service
          text
         -->P_POSERVICES  text
         -->P_T_ITEM  text
         -->P_ITEMNUM  text
    FORM fill_service  TABLES   poservices STRUCTURE bapiesllc
                                t_item STRUCTURE zlo_mmcnv009
                                poservices_2  STRUCTURE  bapiesklc
                       USING    itemnum packno.
      DATA: line(10) TYPE n,
            service(18) TYPE n,
            packno2(10) TYPE n.
      poservices-pckg_no = packno.
      packno2 = packno.
      packno = packno + 1.
      poservices-line_no = '0000000001'.
      poservices-outl_ind = 'X'.
      poservices-subpckg_no = packno.
      APPEND poservices.
      line = '0000000002'.
      LOOP AT t_item WHERE itemnum = itemnum.
        IF t_item-activity <> ''.
          IF NOT ( t_item-activity CA sy-abcde ).
            service = t_item-activity.
            poservices-service = service.
          ELSE.
            poservices-service = t_item-activity.
          ENDIF.
        ELSE.
          poservices-service = t_item-activity.
        ENDIF.
        poservices-pckg_no = packno.
        poservices-line_no = line. "itemnum.
        poservices-ext_line = t_item-line.
        poservices-quantity = t_item-quantity1.
        poservices-base_uom = t_item-undmed.
        poservices-gr_price = t_item-price.
        poservices-short_text = t_item-shortxt.
        poservices-subpckg_no = '0000000000'.
        poservices-outl_ind = ''.
        APPEND poservices.
        poservices_2-pckg_no = packno.
        poservices_2-line_no = line.
      poservices_2-SERNO_LINE =
      poservices_2-SERIAL_NO =
        poservices_2-quantity = t_item-quantity1.
        poservices_2-net_value = t_item-price.
        APPEND poservices_2.
        line = line + 1.
      ENDLOOP.
    ENDFORM.                    " fill_service
    *&      Form  fill_pocond
          text
         -->P_POCOND  text
         -->P_POCONDX  text
         -->P_WA  text
    FORM fill_pocond TABLES  pocond      STRUCTURE bapimepocond
                             pocondx STRUCTURE bapimepocondx
                       USING wa STRUCTURE zlo_mmcnv009.
    *Net Price in Purchasing Document
      IF wa-netprice <> ''.
        pocond-itm_number = wa-itemnum.
        pocondx-itm_number = wa-itemnum.
        pocond-cond_value = wa-netprice.
        pocondx-cond_value = 'X'.
        pocond-currency = 'BHD'.
        pocondx-currency = 'X'.
        pocond-cond_type = 'PBXX'.
        pocondx-cond_type = 'X'.
    *COND_TYPE
        APPEND pocond.
        APPEND pocondx.
      ENDIF.
    ENDFORM.                    " fill_pocond

  • Exit/badi for Material group validation on service POs

    Hi Gurus,
    The requirement is to put validation on 'MATERIAL GROUP' at item level as well as service sub line item level.I have used EXIT_SAPMM06E_017 for line level validation.
    For service sub line level 'MATERIAL GROUP' i tried using EXIT_SAPLMLSP_030 but validation is not working properly as
    EXIT_SAPLMLSP_030 is triggered before EXIT_SAPMM06E_017.
    Kindly suggest any alternatives.
    Thanks in advance
    Deepika

    Hi,
    I had finally used BADI ME_PROCESS_PO_CUST method CHECK and PROCESS_ITEM for enjoy transactions i.e ME21N ME22N ME23N and written code in EXIT EXIT_SAPLMLSP_030 for service item validations.
    IF sy-tcode = 'ME21N' OR sy-tcode = 'ME22N' OR sy-tcode = 'ME23N' OR sy-tcode = 'MASS' OR sy-tcode = 'ME29N'.
        DATA: wa_zmm_mat_grp TYPE zmm_mat_grp.
        EXPORT header_data-aedat FROM header_data-aedat TO MEMORY ID 'ZDAT24933'.
        EXPORT header_data-bsart FROM header_data-bsart TO MEMORY ID 'ZBRT24933'.
        IF header_data-aedat GE '20090810'.         " Material group mandatory appplicable date.
          IF ( header_data-bsart = 'SRV' OR header_data-bsart = 'SRVF' OR header_data-bsart = 'SRVI') AND ( header_data-bsart NE ' ')  AND
             ( re_data-loekz EQ 'S' OR re_data-loekz EQ ' ' ).
            SELECT SINGLE  *  FROM zmm_mat_grp INTO wa_zmm_mat_grp WHERE matkl = re_data-matkl AND
                                                                         bsart = header_data-bsart.
            IF sy-subrc NE 0.
              MESSAGE e005(ze1).
            ENDIF.
          ENDIF.
          IF header_data-bsart IS NOT INITIAL.
            IF ( header_data-bsart NE 'SRV') AND ( header_data-bsart NE 'SRVF') AND ( header_data-bsart NE 'SRVI') AND
               ( re_data-loekz EQ 'S' OR re_data-loekz EQ ' ' ).
              SELECT SINGLE  *  FROM zmm_mat_grp INTO wa_zmm_mat_grp WHERE matkl = re_data-matkl.
              IF sy-subrc EQ 0.
                MESSAGE e006(ze1).
              ENDIF.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDIF.
    For service subline item following code:
    DATA: wa_zmm_mat_grp TYPE zmm_mat_grp,
          v_bsart TYPE ekko-bsart,
          v_packno TYPE esll-packno,
          v_ebeln TYPE ekpo-ebeln,
          v_aedat TYPE ekko-aedat.
    IF sy-tcode = 'ME21N' OR sy-tcode = 'ME22N' OR sy-tcode = 'ME23N' OR sy-tcode = 'MASS' OR sy-tcode = 'ME29N'.
      IF srv_esll-matkl IS NOT INITIAL.
        IMPORT header_data-bsart TO v_bsart FROM MEMORY ID 'ZBRT24933'.
        IMPORT header_data-aedat TO v_aedat FROM MEMORY ID 'ZDAT24933'.
        IMPORT re_data-bsart TO v_bsart FROM MEMORY ID 'ZBRT24933'.
        IMPORT re_data-aedat TO v_aedat FROM MEMORY ID 'ZDAT24933'.
        IF v_bsart IS INITIAL OR v_aedat IS INITIAL.
          SELECT SINGLE packno FROM esll INTO v_packno WHERE sub_packno = srv_esll-packno.
          IF sy-subrc EQ 0.
            SELECT SINGLE ebeln FROM ekpo INTO v_ebeln WHERE packno = v_packno.
            IF sy-subrc EQ 0.
              SELECT SINGLE bsart aedat FROM ekko INTO (v_bsart, v_aedat) WHERE ebeln = v_ebeln.
            ENDIF.
          ENDIF.
        ENDIF.
        IF v_aedat GE '20090810'.         " Material group mandatory appplicable date.
          IF ( v_bsart EQ 'SRV' ) OR ( v_bsart EQ 'SRVI' ) OR ( v_bsart EQ 'SRVF' ) AND ( v_bsart NE ' ' )
          AND srv_esll-del = ' '.
            SELECT SINGLE  *  FROM zmm_mat_grp INTO wa_zmm_mat_grp WHERE matkl = srv_esll-matkl AND
                                                                         bsart = v_bsart.
            IF sy-subrc NE 0.
              MESSAGE e005(ze1).
            ENDIF.
          ENDIF.
          IF ( v_bsart NE 'SRV' ) AND ( v_bsart NE 'SRVI' ) AND ( v_bsart NE 'SRVF' ) AND ( v_bsart NE ' ' )
          AND ( srv_esll-del = ' ').
            SELECT SINGLE  *  FROM zmm_mat_grp INTO wa_zmm_mat_grp WHERE matkl = srv_esll-matkl .
            IF sy-subrc EQ 0.
              MESSAGE e006(ze1).
            ENDIF.
          ENDIF.
        ENDIF.
      ENDIF.
    ELSEIF sy-tcode = 'ME21' OR sy-tcode = 'ME22' OR sy-tcode = 'ME23'.
      IF srv_esll-matkl IS NOT INITIAL.
        IMPORT i_ekko-bsart TO v_bsart FROM MEMORY ID 'ZPOT24933'.
        IMPORT i_ekko-aedat TO v_aedat FROM MEMORY ID 'ZDTA24933'.
        IF v_bsart IS INITIAL OR v_aedat IS INITIAL.
          SELECT SINGLE packno FROM esll INTO v_packno WHERE sub_packno = srv_esll-packno.
          IF sy-subrc EQ 0.
            SELECT SINGLE ebeln FROM ekpo INTO v_ebeln WHERE packno = v_packno.
            IF sy-subrc EQ 0.
              SELECT SINGLE bsart aedat FROM ekko INTO (v_bsart, v_aedat) WHERE ebeln = v_ebeln.
            ENDIF.
          ENDIF.
        ENDIF.
        IF v_aedat GE '20090810'.         " Material group mandatory appplicable date.
          IF ( v_bsart EQ 'SRV' ) OR ( v_bsart EQ 'SRVI' ) OR ( v_bsart EQ 'SRVF' ) AND ( v_bsart NE ' ' )
          AND srv_esll-del = ' '.
            SELECT SINGLE  *  FROM zmm_mat_grp INTO wa_zmm_mat_grp WHERE matkl = srv_esll-matkl AND
                                                                         bsart = v_bsart.
            IF sy-subrc NE 0.
              MESSAGE e005(ze1).
            ENDIF.
          ENDIF.
          IF ( v_bsart NE 'SRV' ) AND ( v_bsart NE 'SRVI' ) AND ( v_bsart NE 'SRVF' ) AND ( v_bsart NE ' ' )
          AND ( srv_esll-del = ' ').
            SELECT SINGLE  *  FROM zmm_mat_grp INTO wa_zmm_mat_grp WHERE matkl = srv_esll-matkl .
            IF sy-subrc EQ 0.
              MESSAGE e006(ze1).
            ENDIF.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDIF.
    hope this will help u.

  • Multiple Account Assignment issue with BAPI_PO_CREATE1 for service POs

    Whle creating service PO through BAPI_PO_CREATE1, The account assignments at the service line items were not being added correctly at the item level, instead they are getting split further wrt tax jurisdiction. This is occuring when an item have multiple service line items with mutltiple account assignments.
    The sample code is below, and the all the internal tables and structure were related to BAPI_PO_CREATE1. Tried with BADI ME_TAX_FROM_ADDRESS and User Exit enhancement SAPL2012, which were not helpful for this particular scenario.
    Item Details
    W_BAPI_ITEM-PO_ITEM = 1.
    W_BAPI_ITEMX-PO_ITEM = 1.
    W_BAPI_ITEM-ITEM_CAT = D.
    W_BAPI_ITEMX-ITEM_CAT = 'X'.
    W_BAPI_ITEM-ACCTASSCAT = K.
    W_BAPI_ITEMX-ACCTASSCAT = 'X'.
    W_BAPI_ITEM-PLANT = USMP. Tax Jurisdiction code 3604931001
    W_BAPI_ITEMX-PLANT = 'X'.
    W_BAPI_ITEM-MATL_GROUP = IT37.
    W_BAPI_ITEMX-MATL_GROUP = 'X'.
    W_BAPI_ITEM-QUANTITY = 1.
    W_BAPI_ITEMX-QUANTITY = 'X'.
    W_BAPI_ITEM-PRICE_UNIT = 1.
    W_BAPI_ITEMX-PRICE_UNIT = 'X'.
    W_BAPI_ITEM-PO_UNIT = LE.
    W_BAPI_ITEMX-PO_UNIT = 'X'.
    W_BAPI_ITEM-NET_PRICE = 100.
    W_BAPI_ITEMX-NET_PRICE = 'X'.
    W_BAPI_ITEM-PCKG_NO = 3456.
    W_BAPI_ITEMX-PCKG_NO = 'X'.
    W_BAPI_ITEM-PREQ_NAME = RTPTS02.
    W_BAPI_ITEMX-PREQ_NAME = 'X'.
    APPEND W_BAPI_ITEM TO IT_BAPI_ITEM.
    APPEND W_BAPI_ITEMX TO IT_BAPI_ITEMX.
    Delivery address details - Tax Jurisdiction 3305923401
    W_BAPI_ADDRDEL-PO_ITEM = 1.
    W_BAPI_ADDRDEL-NAME = COR.
    W_BAPI_ADDRDEL-NAME_2 = Chairman.
    W_BAPI_ADDRDEL-BUILD_LONG = 1001R
    W_BAPI_ADDRDEL-CITY = plainview.
    W_BAPI_ADDRDEL-STREET = old country road.
    W_BAPI_ADDRDEL-POSTL_COD1 = 11803.
    W_BAPI_ADDRDEL-COUNTRY = US.
    W_BAPI_ADDRDEL-REGION = NY.
    APPEND W_BAPI_ADDRDEL TO IT_BAPI_ADDRDEL.
    First Account Assignment - 3310300441
    W_BAPI_POACNT-SERIAL_NO = 1.
    W_BAPI_POACNTX-SERIAL_NO = 1.
    W_BAPI_POACNTX-SERIAL_NOX = 'X'.
    W_BAPI_POACNT-CREAT_DATE  = 11/03/2010.
    W_BAPI_POACNTX-CREAT_DATE  = 'X'.
    W_BAPI_POACNT-QUANTITY = 0.75.
    W_BAPI_POACNTX-QUANTITY  = 'X'.
    W_BAPI_POACNT-DISTR_PERC = 75.
    W_BAPI_POACNTX-DISTR_PERC  = 'X'.
    W_BAPI_POACNT-NET_VALUE = 75 .
    W_BAPI_POACNTX-NET_VALUE  = 'X'.
    W_BAPI_POACNT-PO_ITEM = 1.
    W_BAPI_POACNTX-PO_ITEM = 1.
    W_BAPI_POACNTX-PO_ITEMX = 'X'.
    W_BAPI_POACNT-GL_ACCOUNT = 641099.
    W_BAPI_POACNTX-GL_ACCOUNT  = 'X'.
    W_BAPI_POACNT-COSTCENTER =  10010394.
    W_BAPI_POACNTX-COSTCENTER = 'X'.
    W_BAPI_POACNT-CO_AREA = 1234.
    W_BAPI_POACNTX-CO_AREA = 'X'.
    APPEND W_BAPI_POACNT TO IT_BAPI_POACNT.
    APPEND W_BAPI_POACNTX TO IT_BAPI_POACNTX.
    Second Account Assignment
    W_BAPI_POACNT-SERIAL_NO = 2.
    W_BAPI_POACNTX-SERIAL_NO = 2.
    W_BAPI_POACNTX-SERIAL_NOX = 'X'.
    W_BAPI_POACNT-CREAT_DATE  = 11/03/2010.
    W_BAPI_POACNTX-CREAT_DATE  = 'X'.
    W_BAPI_POACNT-QUANTITY = 0.25.
    W_BAPI_POACNTX-QUANTITY  = 'X'.
    W_BAPI_POACNT-DISTR_PERC = 25.
    W_BAPI_POACNTX-DISTR_PERC  = 'X'.
    W_BAPI_POACNT-NET_VALUE = 25 .
    W_BAPI_POACNTX-NET_VALUE  = 'X'.
    W_BAPI_POACNT-PO_ITEM = 1.
    W_BAPI_POACNTX-PO_ITEM = 1.
    W_BAPI_POACNTX-PO_ITEMX = 'X'.
    W_BAPI_POACNT-GL_ACCOUNT = 641099.
    W_BAPI_POACNTX-GL_ACCOUNT  = 'X'.
    W_BAPI_POACNT-COSTCENTER =  10010393.
    W_BAPI_POACNTX-COSTCENTER = 'X'.
    W_BAPI_POACNT-CO_AREA = 1234.
    W_BAPI_POACNTX-CO_AREA = 'X'.
    APPEND W_BAPI_POACNT TO IT_BAPI_POACNT.
    APPEND W_BAPI_POACNTX TO IT_BAPI_POACNTX.
    Service Item detials
    W_BAPI_SERVICE-OUTL_IND = 'X'.
    W_BAPI_SERVICE-SUBPCKG_NO =  3457.
    W_BAPI_SERVICE-LINE_NO = 1.
    W_BAPI_SERVICE-PCKG_NO = 3456.
    W_BAPI_SERVICE-EXT_LINE = 0000000000.
    W_BAPI_SERVICE-QUANTITY = 0.
    W_BAPI_SERVICE-BASE_UOM = 0.
    W_BAPI_SERVICE-PRICE_UNIT = 0.
    W_BAPI_SERVICE-GR_PRICE = 0.
    W_BAPI_SERVICE-SHORT_TEXT = 0.
    W_BAPI_SERVICE-MATL_GROUP = 0.
    W_BAPI_SERVICE-DISTRIB = 0.
    APPEND W_BAPI_SERVICE TO IT_BAPI_SERVICE.
    W_BAPI_SERVICE-OUTL_IND = 'X'.
    W_BAPI_SERVICE-LINE_NO = 2.
    W_BAPI_SERVICE-PCKG_NO = 3457.
    W_BAPI_SERVICE-EXT_LINE = 0000000010.
    W_BAPI_SERVICE-QUANTITY = 10.
    W_BAPI_SERVICE-BASE_UOM = STD.
    W_BAPI_SERVICE-PRICE_UNIT = 0.
    W_BAPI_SERVICE-GR_PRICE = 5.
    W_BAPI_SERVICE-SHORT_TEXT = Cabling Services1.
    W_BAPI_SERVICE-MATL_GROUP = IT37.
    W_BAPI_SERVICE-DISTRIB = 2.
    APPEND W_BAPI_SERVICE TO IT_BAPI_SERVICE.
    W_BAPI_SERVICE-OUTL_IND = 'X'.
    W_BAPI_SERVICE-LINE_NO = 3.
    W_BAPI_SERVICE-PCKG_NO = 3457.
    W_BAPI_SERVICE-EXT_LINE = 0000000020.
    W_BAPI_SERVICE-QUANTITY = 10.
    W_BAPI_SERVICE-BASE_UOM = STD.
    W_BAPI_SERVICE-PRICE_UNIT = 0.
    W_BAPI_SERVICE-GR_PRICE = 5.
    W_BAPI_SERVICE-SHORT_TEXT = Cabling Services2.
    W_BAPI_SERVICE-MATL_GROUP = IT37.
    W_BAPI_SERVICE-DISTRIB = 2.
    APPEND W_BAPI_SERVICE TO IT_BAPI_SERVICE.
    Service Account assignment details
    W_ACC_SERVICE-PCKG_NO = 3457.
    W_ACC_SERVICE-LINE_NO = 2.
    W_ACC_SERVICE-SERNO_LINE = 1.
    W_ACC_SERVICE-SERIAL_NO = 1.   "Account Assignment Link
    W_ACC_SERVICE-NET_VALUE = .
    W_ACC_SERVICE-QUANTITY = 50 .
    W_ACC_SERVICE-PERCENTAGE = 100 .
    APPEND W_ACC_SERVICE TO IT_ACC_SERVICE.
    W_ACC_SERVICE-PCKG_NO = 3457.
    W_ACC_SERVICE-LINE_NO = 3.
    W_ACC_SERVICE-SERNO_LINE = 1.
    W_ACC_SERVICE-SERIAL_NO = 1.   "Account Assignment Link
    W_ACC_SERVICE-NET_VALUE = .
    W_ACC_SERVICE-QUANTITY = 50 .
    W_ACC_SERVICE-PERCENTAGE = 50 .
    APPEND W_ACC_SERVICE TO IT_ACC_SERVICE.
    W_ACC_SERVICE-PCKG_NO = 3457.
    W_ACC_SERVICE-LINE_NO = 3.
    W_ACC_SERVICE-SERNO_LINE = 1.
    W_ACC_SERVICE-SERIAL_NO = 2.   "Account Assignment Link
    W_ACC_SERVICE-NET_VALUE = .
    W_ACC_SERVICE-QUANTITY = 50 .
    W_ACC_SERVICE-PERCENTAGE = 50 .
    APPEND W_ACC_SERVICE TO IT_ACC_SERVICE.
    EKKN table entries:
    When created thru ME21N with the same set of data,which is expected
    ZEKKN            MENGE            NETWR  SAKTO        KOSTL
    01               0.750            75.00  0000641099   0010010394
    02               0.250            25.00  0000641099   0010010393
    But through BAPI_PO_CREATE1, the below split is being done with respect to Tax Jurisdiction code.
    01               0.500            50.00  0000641099   0010010394
    02               0.250            25.00  0000641099   0010010394
    03               0.250            25.00  0000641099   0010010393
    Please advice the solution.
    PS: there were different tax jurisdiction codes were being determined.
    Plant, Cost Center and Delivery Address.

    Hi,
    To commit BAPI or to run it properly , you need to fulfill all required data for BAPI.
    You can go to BAPI documentation to check for mandetory parameters and also check with Function consultant for more data and confifuration/
    Reward if useful!

Maybe you are looking for