Function Module available to get Stock lying against a Sale-Order

Dear Sir,
We have function module "KPKA_UTILS_PROJECT_STOCK_CHECK" for getting Stock lying against a WBS (Project Stock) .
We are looking for a function module to get the Stock lying against a Sale-Order (Sale-Order plus it's Line Item) .
We request SAP experts to kindly guide us about the availability of such Function Module please .
We will award full points for the suggested solution pl .
Rgds
B Mittal

Hi
table MSKA - Sales Order Stock is availble whcih will give the Stock pertainig to a sales Order & line item.
Hope this helps
Thanks & Regards
Kishore

Similar Messages

  • Stock reserved against the Sales ORder is not valuation in MC.9.

    Dear Experts.
    The valuation done in Mc.9 doesnot match with MB5B -valuated Stock. We are having export material , which is make -to-stock scenerio. In this as soon as the production confirmation is done, the stock is alloted to the specified Sales Order.
    The stock alloted to the Sales order doesnot get valuated in MC.9 report, where as the same can be seen in MB5B .
    For Example.
    MAterial - XYZ is in stock in storage location FG01 - 156 EA
                                     against Sales ORder                -  206 EA
                                    Total Stock valuated in MB5B    - 362  EA     whereas in Mc.9 it valuates for only 156 EA.
    Can any body guide .
    Thanks
    AVS

    Hi,
    In MC.9 stock is displayed based on periods in the selection screen
    Please make sure you are slecting proper period
    Thanks
    Diwakar

  • Reg: function module to fetch the overall taxs for  a sales order

    Hi Experts,
    I need a fuction module which fetches all the taxes for a sales order with the tax values.
    (i.e) i need a function module with displays the overall tax values and not line itemwise..
    Regards,
    Vikram.S

    Hi,
    Check if it works
    POS_SALES_DOCUMENT_HEAD_TAXES

  • BAPI/Function module TO block material which is mentioned in sales order

    Hi All
    Is there any BAPI to block material which is mationed in sales order....
    I am using BAPI_MATERIAL_AVAILABILITY to check material availibility
    how to block quantity if it is available whicl creating sales order via
    "BAPI_SALESORDER_CREATEFROMDATA2"
    ..Thanks

    The normal SAP ATP done in the sales orders use the figure ''committed qty'' meaning that if the ATP has been done and confirmed, that quantity will not appear in the next sales order as available.
    So if You're using the normal BAPI to create the sales order, the normal ATP function will be called in the processing.
    Nevertheless another solution to this issue is to have the MTO (Make-to-order) solution where the requirements are ''attached'' to one sales order/line only.....like this the problem of the stock being taken to another customer disappears.
    To do this you'll have to configure the following :
    - Go to SPRO and go to Sales and distribution -> Basic functions -> Availability check and transfer of requirements -> Determination of requirements using transaction - Here insert the entry with your sales order type - MRP type (from material master - you might want to consider create one only for this solution) and you should use one of the following:
      - KEL      Make-to-order, mat. variants
      - KELV     Make-to-ord.variant + consump
      - KP       Make-to-order with project 
    and choose the origin of your requirement - 1 - Item category + MRP Type
    - Than configure the association of the requirement type above to the requirement class (normally is the same code) transaction *OVZH*
    - Than configure the requirement class (this is what will tell the system the MTO) transaction *OVZG* - On the screen in the field Special stock - E - Sales order stock and please ask for help from an FI consultant because the area of *Account assignment is very important to be well configured*
    About the BAPI you're using - Its correct - That's the normal BAPI to be used, taking only into consideration the product allocation issue - MARA-KOSCH
    Explaining a little the BAPI you're using :
    The program should check if the selected material is allocated or non-allocated.
    This information is stored in a field MARA-KOSCH.
    We should check this field and if the field is not empty then material is allocated, otherwise is not:
           select kosch into l_kosch
            from mara
           where matnr = <VBAP-MATNR>. " Selected material
            if subrc = 0.
               if l_kosch is initial.
                  +" Perform calculation for non-allocated materials+
               else.
                  +" Perform calculation for allocated materials+
              endif.
           else.
         " Material not found, skip it ...
          endif.
    For allocated materials it will be checked allocation for the netting market of that Order.
    The calculation rules for allocated and non-allocated materials are different.
    For Non-allocated materials
    BAPI 'BAPI_MATERIAL_AVAILABILITY' should be used for getting the ATP quantity.
    Bapi should be called as follows --
    data: lfl_bapiwmdvs type bapiwmdvs,
    lit_bapiwmdvs type standard table of bapiwmdvs,
    lfl_bapiwmdve type bapiwmdve,
    lit_bapiwmdve type standard table of bapiwmdve,
    l_dialogflag type bapicm61v-diafl.
    call function 'BAPI_MATERIAL_AVAILABILITY'
    exporting
    plant = <VBAP-WERKS>
    material = <VBAP-MATNR>
    unit = <VBAP- VRKME>
    check_rule = 'A'
    +* STGE_LOC =+
    +* BATCH =+
    +* CUSTOMER =+
    importing
    +* ENDLEADTME =+
    +* av_qty_plt =+
    DIALOGFLAG = l_dialog
    +* RETURN =+
    tables
    wmdvsx = lit_bapiwmdvs
    wmdvex = lit_bapiwmdve.
    Please note that table lit_bapiwmdvs is the input table and to this following input should be passed -
    lfl_bapiwmdvs-req_date = sy-datum. "Current date
    lfl_bapiwmdvs- REQ_QTY = <Unconfirmed Quantity> in Sales Order Unit
    append lfl_bapiwmdvs to lit_bapiwmdvs.
    The return value l_dailog will be --
    ' ' --- Quantity can be Delivered -- Item to be displayed in the Report!
    'X' --- Complete quantity cannot be delivered -- ATP failed, Item not to be displayed.
    'N' --- Material not relevant for ATP --- Item not to be displayed in the Report.
    For Allocated materials
    For the allocated Materials, we have to first do the ATP check in same fashion as for Non-allocated Materials and then in addition to this ATP check, we have to also check for Allocation from SIS table S941.
    If ATP check fails, straight away the Item should be ignored from Output display.
    If ATP check passes, we further check allocation as follows --
    Valid entry should select from S941 as -
    data: l_period like s941-spbup,
    l_BUPER LIKE T009B-POPER,
    l_GJAHR LIKE T009B-BDATJ,
    lfl_s941 type t_s941.
    data: l_bukrs type tvko-bukrs,
    l_periv type t001-periv.
    * Select company code
    select single bukrs into l_bukrs
    from tvko
    where vkorg = <VBAK-VKORG>.
    * Select fiscal year variant
    select single periv into l_periv
    from t001
    where bukrs = l_bukrs.
    * Get Period
    CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
    EXPORTING
    I_DATE = sy-datum
    I_PERIV = l_periv
    IMPORTING
    E_BUPER = l_buper
    E_GJAHR = l_gjahr
    EXCEPTIONS
    INPUT_FALSE = 1
    T009_NOTFOUND = 2
    T009B_NOTFOUND = 3
    OTHERS = 4
    IF SY-SUBRC <> 0.
    * Ignore entry and skip further processing
    ENDIF.
    concatenate l_gjahr l_buper+1(2) into l_period.
    select single kcqty aemenge from s941
    into corresponding fields of lfl_s941
    where SPBUP = l_period
    and KONOB = 'OBJ_ALL_MATERIALS'
    AND MATNR = <VBAP-MATNR>
    and zzcnetmark = <VBAK-ZZCNETMARK>
    and VRSIO EQ '000'.
    IF SY-SUBRC <> 0.
    *Ignore entry and skip further processing
    ENDIF.
    Remaining Allocation = difference between product allocation quantity and incoming order quantity
    i.e. (S941-KCQTY - S941-AEMENGE). Now we have to compare this qty with the Unconfirmed qty.
    Ensure same Material UOM for quantity comparison as follows --
    IF <VBAP-VRKME> NE <S941-BASME>.
    CALL FUNCTION 'MD_CONVERT_MATERIAL_UNIT'
    EXPORTING
    i_matnr = <VBAP-MATNR>
    i_in_me = <VBAP-VRKME>
    i_out_me = <S941-BASME>
    i_menge = <Unconfirmed qty in Sales UOM>
    IMPORTING
    e_menge = l_menge
    EXCEPTIONS
    error_in_application = 1
    error = 2
    OTHERS = 3.
    IF sy-subrc <> 0.
    * Ignore entry and skip further processing
    ENDIF.
    ELSE.
    *If both Units are same no need for conversion
    l_menge = <Unconfirmed qty in Sales UOM>
    ENDIF.
    Then, compare if Remaining Allocation > = l_menge i.e. Unconfirmed quantity converted to S941-BASME unit, then there is enough allocation for this Material for the Unconfirmed quantity and should be displayed in the report.
    Else, the Item should be ignored.

  • Function Module or BAPI to update Short text  for sales order item(vl02n)

    Hi All,
    I need to update the Short text for sales order item in vl02n transaction from an internal table with Delivery number and other relevant details .
    Does any body know any Function Module or BAPI which can accomplish this purpose .
    Or else writing BDC is the only option I have got ? .
    Please clarify .
    Thanking you in advance .
    With Regards,
    Suriya .

    Hi
    You can try using BAPI_SALESORDER_CHANGE if you want to change sales order
    Regards
    MD

  • Need help on IDoc for Picking, Packing and PGI against the Sale order

    Hi All,
    I am new to this IDoc stuffs. Below is the scenario for which I would like to know the details of the IDoc...
    Business Case:
    1. Storage location is a HU Managed but not WM managed.
    2. This storage locations is managed by a third party
    3. Outbound delivery document against the SO will be created by our personnels in SAP for this storage location.
    4. Picking, Packing and PGI needs to happen/post via Idoc. (By packing here, i refer to assign the HUs that are already created for the materials and is available in the storage location and not repacking)
    Is there any standard IDoc that can be used here to Pick, Pack and post PGI. We would like to have picking and packing in a first idoc and PGI on the second idoc.
    Thanks,
    Prashant

    Hi Typewriter,
    Thanks for your reply on this post..
    The business process is as below (it was changed recently to have the creation of OBD, pick HUS and then post GI via single IDOC)
    1. We have a storage loc in our enterprise structure that is HU managed but not WM managed.
    2. This storage loc is being maintained by a third party.
    3. SO will be created to be shipped out of this plant/sloc.
    3. The stocks at this storage loc will be Special stock "E" against the sales order. And the stocks will be Packed in HUs.
    4. The third party is informed to deliver the stocks (HUs - that do have the special stock number which internally refers to the the SO number and the line item number) directly to ship to party address in SO.
    5. The 3rd party will physically ship the HUs to customer and send in the details that they have shipped goods against the sales order.
    6. The details sent by the 3rd party will be received in SAP to create OBD for the sales order, Pick, Pack and post GI. This can happen via a single IDOC..
    I am now planning to create a custom IDOC type referring to the standard IDOC type DELVRY03 and message type DESADV and to use a custom BAPI/FM.
    Do you think I am using the right ones?
    Thanks,
    Prashant Kumar

  • Is there any Function module available for GR IR for purchase order

    Hi
    Is there any function module available in SAP to get the list of Goods Received and Invoice Reciept for a purchase order.
    One way to create a custom fuction to fetch the details from MSEG and BKPF.
    Can somebody suggest a better solution.
    Thanks in advance.
    Ruhi Hira

    Which table in BAPI_PO_GETDETAILS exactly has these information ?
    PO_HEADER_TEXTS
    PO_ITEMS
    PO_ITEM_ACCOUNT_ASSIGNMENT
    PO_ITEM_SCHEDULES
    PO_ITEM_CONFIRMATIONS
    PO_ITEM_TEXTS
    PO_ITEM_HISTORY
    PO_ITEM_HISTORY_TOTALS
    PO_ITEM_LIMITS
    PO_ITEM_CONTRACT_LIMITS
    PO_ITEM_SERVICES
    PO_ITEM_SRV_ACCASS_VALUES
    RETURN
    PO_SERVICES_TEXTS
    EXTENSIONOUT
    NFMETALLITMS
    Regards
    Ruhi Hira

  • Using function module BBP_PD_SC_GETLIST to get list of carts for a plant

    Hi all,
    Im using  the function module BBP_PD_SC_GETLIST  to get the list of shopping carts created for a particular plant.Im passing the plant details like Business Partner Number,Business Partner GUID and Partner func. in the table I_PARTNERS of the FM.Im not passing any other data to the FM.However im not getting any entries in the o/p parameter.
    Can anyone suggest what am I doing wrong?
    Thanks.

    Hi,
    From table BBP_PDBEI  you can get the shopping carts belong to perticular plant. 
    Thanks
    prasad.s

  • Is there any delivered BAPI or Functional modules available for MCHB table

    Hi Experts,
    I have a requirement where I have to pull inventory data from MCHB table without custom code. Is there any delivered BAPI or Functional modules available for MCHB table?
    Kindly help!
    Thanks
    Gopal

    Hi,
    Can you check using the Fun Modules
    MG_BATCH_CHECK_STOCK
    VB_READ_BATCH_WITHOUT_STOCK
    VB_BATCH_GET_ALL_STOCKS
    Regards,
    Anji

  • Function Module / Method to Get Status of PO and Invoice status (Archived)

    Hi Experts,
    I have a requirement where I have to process mass collection of SO, PO and Invoices for certain output triggers based on user input in a Z program. However the requirement states that I need to skip processing for the documents which are archived. I got a method (CALL METHOD cl_sd_archived_sales_documents=>check_sales_doc_archived on ECC 6.4 system) to get Archived status of Sales Order, but could not find anything suitable for getting the same for a PO or Invoice documents. Whatever function module I am getting, requires an input called Archive Key or handle.
    But I will be only having the document number (like a purchase order number or a invoice number). Is there any inbuilt FM or Method in SAP which will let me determine if the document is already archived or not?
    Thanks for your time,
    Anid

    The function module looked promising, but it returns some weired error when I execute. I will check with Basis team, as I tried with multiple PO which are archived (and can not be viewed on ME23n)
    Error ID I got is:
    Exception       NOT_FOUND
    Message ID:          CMS                        Message number:           025

  • Function module to check whether Goods Receipt of a Purchase Order is done.

    Hi,
    Is there any function module to check whether Goods Receipt of a Purchase Order is already done?
    Taking into consideration reversals.
    Thanks.

    Hi,
    I think u can do this by using a simple select query.
    u have to go in EKBE table.
    put the PO no. in field EBELN + EBELP(line item)  and get the material docuement no.  in field BELNR + BUZEI(line item).
    Thanks
    Jitendra

  • Function module for calculating planned and actual cost of production order

    Hi ,
    Do we have any standard function module for calculating planned and actual cost for production order?
    i need to implement this in a Z-report.
    Thanks
    Srini

    Hi,
    try below function module
    CRMCO_GET_PLAN_ACTUAL_COSTS
    CO_IH_GET_PLANNED_COSTS_TOTAL
    Regards,
    Sankaran

  • How to resrve the stock to the customer against the sales order

    hi,
    sap gurus,
    good morning to all,
    how to reserve the stock to the customer against the sales order if this process is not MAKE TO
    ORDER SCENARIO.
    the prices of the products will be often changing drastically so
    he is following MAKE TO STOCK Process in his production process.
    so with out using m.t.o. process how to reserve it against the customer.
    for eg:
    in the market when the customer/dealer/stockist coems to know that prices are going to increase
    then obviously he tends to purchase in bulk quantities and reserve it in godown.
    so how to map that process.
    help me on this.
    regards,
    balaji.t
    09990019711

    Dear Balaji,
         This can be done By MM consultant through movement type. to move the stock from unresticted stock to customer stock.
    Regards,
    Sudhir

  • PO against valuated sales order stock posting to consumption account

    Hi All,
    I am creating a PO with account assignment against valuated sales order stock. However the posting happens to consumption account (GBB) instead of the stock account (BSX). The following settings exist
    1. The material type is both quantity and value update
    2. The account assignment category used in PO is E which has special stock = E, account modifier = VKA and consumption posting = E
    3. The requirement class (in SD) has account assignment = E and valuation = M (even tried with A)
    4. The valuation class for valuated SO stock has been maintained in the accounting view
    However the system picks up the account corresponding to GBB-VKA and not BSX. Can anyone point out any setting that may be mising here.
    Regards,
    Ketan

    Hi,
      Maintain the consumption posting as blank against the account assignment used in PO in OME9 and test the scenario again.
    Regards,
    AKPT

  • Function module to create Inbound delivery with reference to Purchase Order

    Hi experts,
    I want to create Inbound delivery with refernce to Purchase Order. But I want to create item wise. For example If one purchase order is there with 10 line items. 10, 20, 30, 40, 50......100.
    If I am showing report for Purchase Order with select option and if I select first 5 line items 10, 20, 30, 40, 50 then my program should be create one Inbound delivery for selected line items only. I have tried BDC for Tcode VL31N, but its not worked. Is there any Function module to create Inbound delivery with reference to Purchase Order for selected line items????????

    Hi,
    Try FM RV_DELIVERY_CREATE or GN_DELIVERY_CREATE.
    For creating a delivery wrt PO u 1st need to have a sales order i guess.
    Regards,
    Amit

Maybe you are looking for

  • Macbook Pro to TV

    I've been trying to hook up my Macbook Pro to the TV monitor with an HDMI chord and a mini displaport converter. It works with my roommates' Macbook Pros but not with mine, why is that?

  • How can you supress a subreport from opening?

    Hi All we are using vb.net 2005 and crystal reports 11.5 version. We have a crystal report which has two sub reports in it . The report is working fine. However once we run the report when the user clicks on any part of sub report in the main report

  • Flash Professional CS5 direct to YouTube ?

    Is Flash Pro CS5 from the Adobe Creative Suite 5 Design Premium able to save or export in a format which can be directly uploaded to YouTube ? Thanks for information, and best regards from the TURNATOR ®.

  • LDAP on SPA514G

    Hello All, I am trying to get my SPA514G to connect to the LDAP server. I have tried several different conifgurations, but I still receive the error message: LDAP Error: cannot connect to server Attached is a screenshot. Is there any glaring mistake

  • [solved]gnome-control-center doesn't start

    Upgraded to gnome 3.4 few hours ago. Can't open gnome-control-center 3.4.1.1 When i tried to start from terminal this is the output [candice@candice ~]$ gnome-control-center *** glibc detected *** gnome-control-center: free(): invalid pointer: 0x0000