Help required in BAPI_ALM_ORDER_MAIN to change quantity

Hi,
I want ot change the service order quantity..
I am using BAPI_ALM_ORDER_MAINTAIN  
can any one help me with parameters to be passed to tjis bapi to change the order quantity??
Regards,
Himanshu.

DATA:IT_RETURN TYPE BAPIRET2 OCCURS 0 WITH HEADER LINE,
     IT_COMPONENT TYPE BAPI_ALM_ORDER_COMPONENT OCCURS 0 WITH HEADER LINE,
     IT_METHODS TYPE BAPI_ALM_ORDER_METHOD OCCURS 0 WITH HEADER LINE,
     IT_COMPONENT_UP TYPE BAPI_ALM_ORDER_COMPONENT_UP OCCURS 0 WITH HEADER LINE,
     ODR_NO LIKE BAPI_ALM_ORDER_HEADERS_I-ORDERID. " Order Number
*&--CHANGE COMPONENT--
  IF it_parts_tmp_ch[] IS NOT INITIAL.
    LOOP AT it_parts_tmp_ch INTO wa_parts.
      w_sy_tabix = sy-tabix.
      CLEAR:wa_resb.
      READ TABLE  it_resb
            INTO  wa_resb
        WITH KEY  rsnum = wa_afko-rsnum
                  aufnr = w_sord_num
                  posnr = wa_parts-itemno
                  xloek = ''.
Fill values in IT_METHODS
      IT_METHODS-METHOD = 'CHANGE'.
      IT_METHODS-REFNUMBER = w_sy_tabix.
      IT_METHODS-OBJECTTYPE = 'COMPONENT'.
      IT_METHODS-OBJECTKEY = w_sord_num.
      IT_METHODS-OBJECTKEY+12(4) = WA_AFVC_TMP-vornr.
      APPEND IT_METHODS.
      CLEAR: IT_METHODS.
      IT_COMPONENT-RESERV_NO = wa_resb-rsnum.
      IT_COMPONENT-RES_ITEM  = wa_resb-rspos.
      IT_COMPONENT-MATERIAL  = wa_parts-partno.
      IT_COMPONENT-PLANT     = wa_parts-plant.
      IT_COMPONENT-STGE_LOC  = wa_parts-sloc.
      IT_COMPONENT-BATCH     = wa_parts-batch.
      IT_COMPONENT-MOVEMENT  = 'X'.
      IT_COMPONENT-CURRENCY  = 'INR'.
      IT_COMPONENT-ITEM_CAT  = 'L'.
      IT_COMPONENT-ITEM_NUMBER  = wa_parts-itemno.
      IT_COMPONENT-ACTIVITY      = WA_AFVC_TMP-vornr.
      IT_COMPONENT-UNLOAD_PT  = wa_parts-usage.
      IT_COMPONENT-REQUIREMENT_QUANTITY = wa_parts-quantity.
      IT_COMPONENT-REQUIREMENT_QUANTITY_UNIT = wa_parts-unit.
      APPEND IT_COMPONENT.
      CLEAR: IT_COMPONENT.
      MOVE: 'X' TO IT_COMPONENT_UP-MATERIAL ,
            'X' TO IT_COMPONENT_UP-PLANT    ,
            'X' TO IT_COMPONENT_UP-STGE_LOC ,
            'X' TO IT_COMPONENT_UP-BATCH    ,
            'X' TO IT_COMPONENT_UP-MOVEMENT ,
            'X' TO IT_COMPONENT_UP-CURRENCY  ,
            'X' TO IT_COMPONENT_UP-ITEM_CAT,
            'X' TO IT_COMPONENT_UP-ITEM_NUMBER,
            'X' TO IT_COMPONENT_UP-ACTIVITY,
            'X' TO IT_COMPONENT_UP-UNLOAD_PT,
            'X' TO IT_COMPONENT_UP-REQUIREMENT_QUANTITY,
            'X' TO IT_COMPONENT_UP-REQUIREMENT_QUANTITY_UNIT.
      APPEND IT_COMPONENT_UP.
      CLEAR: IT_COMPONENT_UP.
    ENDLOOP.
COMMIT WORK AND WAIT.
  CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'
  TABLES
  IT_METHODS = IT_METHODS
  IT_COMPONENT = IT_COMPONENT
  IT_COMPONENT_UP =IT_COMPONENT_UP
  RETURN = P_it_RETURN.
*Commit BAPI
  CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
      WAIT = '5'.
It will help you .
Regards,
Swarup
Edited by: swarup basagare on Jun 6, 2008 10:54 AM

Similar Messages

  • Help required in BAPI_ALM_ORDER_MAINFm to change the service order quantity

    Hi,
    Can any one tell me Fm To change the srvice order quantity??
    I am using fm

    Hi,
    Can any one tell me Fm To change the srvice order quantity??
    I am using fm

  • Help required for Payment Term change report in SAP BI

    Dear Experts ,
    I have got a client requirement to develop a report to present all the purchase orders for which there has been a change in Payment Term. Could any one provide his input as which extractor can give me this information or where can I get this data to capture changes in Payment Term in ECC.
    Any suggestions welcome !
    Regards
    Anurag Krishna Dev

    HI,
    Purchase relavant information will be getting from
    2LIS_02_ITM     -  item level information
    2LIS_02_HDR   - Header level information
    2LIS_02_SCL   - schedule level information
    find the below link hope it will help you get more idea...
    http://help.sap.com/saphelp_sm32/helpdata/en/1d/f4383fdb800804e10000000a114084/frameset.htm
    Regards
    BVR

  • Help required in OCM-Order change management

    Hi All,
    I have to implement the Order change managment. I did few setting which are required and than i created ECR using release key. but using OCM it tells me to first make the changes in MATERIAL BOM than using transaction COCM i can make the changes in required production order.
    But my requirement is i want to change the Production BOM or Production routing directly without touching Material BOM .
    As sometime it happens only 1 or 2 Order BOM s are need to be changed only not the Material bom. So i want to track the Changes made in Order using OCM.
    What is the solution that i can change the Production Bom OR Production Routing directly using OCM and also how can i make the changes in Sales Order.
    Pls do the needful.
    Thanks
    Ravi Khurana

    Using Order Change Management (change management for production orders), it is possible to include existing procurement elements (production orders, planned orders, purchase orders) that are also affected by a change, in the change process.
    The change process in OCM is based on Initiating Objects. These initiating object records refer to changes in sales orders or in master data, which, in turn, necessitate changes to production orders.
    Thus, it is not possible to change the order directly using OCM.

  • Issue while updating(Changing) quantity on line at quick sales order form

    Hi,
    I am facing a issue while changing quantity ordered on the order line in quick sales order form. (R12.1.3)
    Although the same logic works exactly as required in 11.5.9.
    There is a custom logic, post booking line status is Awaiting Shipping.
    Now when quantity is changed +(Saved), the status changes to a custom state but at the same time a new row is created with the same line id but different reservation id in the MTL_RESERVATIONS.
    The quantity here is the difference between the original quantity and the new entered quantity.
    And post completion of the custom logic the original row is updated, but being there a additional row the quantity reserved at the shipping tab comes wrong.
    Our requirement is of update which is happening but not the additional insert which is going into MTL_RESERVATIONS.
    The logic is perfect in 11.5.9 and no additional insert is being made.
    Kindly help and give some ideas for the possible reason the issue.
    Please ask for more information if required.
    Thanks,
    Vishal

    Hi Mahendra,
    I have gone through the note id that you have given. sorry to say that, that is refering to diffrent issue.
    Actually what i did is, At form header level, I have hide the fileds using the folder options. once after changes I have closed the form and re-opened it. by that time I can see that Button names got changed in bottom of the "Quick sales order form". Not sure how it become changed. there five buttons over the form, only two button names got changed.
    Kindly suggest any other options.

  • Change quantity in periodic billing plan

    Hello Gurus,
    I have to map contract relevant billing with periodic billing plan. But here contract quantity and billing quantity can be differ. But as per the item category billing relevance "I - Order-relevant billing - billing plan" i can not change quantity while creating billing document.
    Can any one suggest me what should i do to change the billing quantity in this case ?...
    Any user exit or enhancement which can help me ?..what should be the logic ?..
    Regards,
    Tarpan

    Hello
    For your requirement, you can place a Billing Request Order in b/w Contract & Billing Document.
    Contract
    ->
    Billing Request (Sales Order)
    ->
    Invoice
    This will provide you a fexibility of changing quantities before invoicing the same.
    Regards
    JP

  • Help regarding code for title change

    Hi All,
    I have a requirement like whenever we change the PO ie., when we change the  line item data say for example, if there is a quantity like 20kg and if we want to update itto 30kg., the PO will be changed.
    In such change cases, the title of the PO should be changed to "Purchase Order Change". 
    In these cases, the changes will be recorded in the table CDHDR and CDPOS.
    Can anyone pl tell me of how to write the code for this in the script as well as in the subroutine ...
    Help will be rewarded the best..

    Done. Found out the solution

  • XSLT mapping Help Required.

    XSLT mapping Help Required.
    Hi Experts,
    I am New to XSLT Mapping. I am practising the below Example:
    InputXML File:
    <?xml version="1.0" encoding="UTF-8"?>
    <?xml-stylesheet type="text/xsl" href="Persons111.xsl"?>
    <ns0:MT_XSLT_Source xmlns:ns0="http://XYZ.com/gen">
    <Person>
    <FirstName>Anshul</FirstName>
    <LastName>Chowdhary</LastName>
    <Gender>Male</Gender>
    <Address>
    <Street>2nd Main</Street>
    <Houseno>83/b</Houseno>
    <City>Mysore</City>
    </Address> </Person>
    </ns0:MT_XSLT_Source>
    XSL StyleSheet File:
    <?xml version='1.0' encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://XYZ.com/Gen"
    Xmlns:ns1=”http://XYZ.com/Test”>
    <xsl:template match="/">
    <ns1:MT_XSLT_Target>
    <Title> <xsl:value-of select="ns0:MT_XSLT_Source/Person/Gender"/> </Title>
    <Name> <xsl:value-of select="concat(concat(ns0:MT_XSLT_Source/Person/FirstName,' '), ns0:MT_XSLT_Source/Person/LastName)"/>
    </Name>
    <Street> <xsl:value-of select="concat(concat(ns0:Mt_XSLT_Source/Person/Address/Houseno,' '),
    ns0:Mt_XSLT_Source/Person/Address/Street)"/> </Street>
    <City> <xsl:value-of select="ns0:Mt_XSLT_Source/Person/Address/City"/> </City>
    </ns1:MT_XSLT_Target>
    </xsl:template>
    </xsl:stylesheet>
    The Desired Output shuold be:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns1:MT_XSLT_Target xmlns:ns1="http://XYZ.com/Test">
    <Title>Male</Title>
    <Name>Anshul Chowdhary</Name>
    <Street>83/b 2nd Main</Street>
    <City>Mysore</City>
    </ns1:MT_XSLT_Target>
    I have refered the xsl in xml and i am getting the below Oupt in a Single line like this:
    Anshul Chowdhary Male 2nd Main 83/b Mysore
    I am Unable to display in Target XML Fomrat as shown above. Please check and do the needful.
    Regards,
    GIRIDHAR

    Hi,
    I have used below for testing.
    Input xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <?xml-stylesheet type="text/xsl" href="Persons111.xsl"?>
    <ns0:MT_XSLT_Source xmlns:ns0="http://XYZ.com/gen">
    <Person>
    <FirstName>Anshul</FirstName>
    <LastName>Chowdhary</LastName>
    <Gender>Male</Gender>
    <Address>
    <Street>2nd Main</Street>
    <Houseno>83/b</Houseno>
    <City>Mysore</City>
    </Address> </Person>
    </ns0:MT_XSLT_Source>
    xsl code:
    <?xml version='1.0' encoding="UTF-8"?> 
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://XYZ.com/gen" 
        xmlns:ns1="http://XYZ.com/Test"> 
        <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> 
        <xsl:template match="/"> 
            <ns1:MT_XSLT_Target> 
                <Title> <xsl:value-of select="ns0:MT_XSLT_Source/Person/Gender"/> </Title> 
                <Name> <xsl:value-of select="concat(concat(ns0:MT_XSLT_Source/Person/FirstName,' '), ns0:MT_XSLT_Source/Person/LastName)"/> 
                </Name> 
                <Street> <xsl:value-of select="concat(concat(/ns0:MT_XSLT_Source/Person/Address/Houseno,' '), 
                    /ns0:MT_XSLT_Source/Person/Address/Street)"/> </Street> 
                <City> <xsl:value-of select="/ns0:MT_XSLT_Source/Person/Address/City"/> </City> 
            </ns1:MT_XSLT_Target> 
        </xsl:template> 
    </xsl:stylesheet>
    For testing in PI ,change the extension from .txt to .xsl and zip it and upload into PI as an imported archive .
    Regards
    Venkat

  • SPEL? make REASON field required if user has changed the value in SALARY

    I have a requirement to make REASON field required if user has changed the value in SALARY field. Is it possible using spel? what are my options?

    Karan,
    You can change the Rendered Property through personalization.
    But in your requirement you need to attach the Spell through personalization & extend the existing CO to set the value of the SPELL based upon the condition.
    Note - Refer this thread http://forums.oracle.com/forums/thread.jspa?threadID=2176729&tstart=0. If you have worked on SSHRParams kindly help the user.
    Regards,
    Gyan

  • Help required - Sales order item is partially delivered but the item grayed

    I have a sales order 123 having say item10 with qty 1, item20 with qty 10 , item 30 qty 12
    Item 1 confirmed qty 1 and delivered qty is 1
    Item 2 confirmed qty 10 and delivered qty 10
    Item 3 confirmed qty 1 and delivered qty is 1
    Now the item3 still has open requirements of 11 to be delivered. But the item is GRAYED OUT already.
    even if I do ATP the qty is not confirming for the remaining 11 pieces.
    Why is that? How to make that item out from GRAY.
    How to confirm the remaining 11 qty for that item.
    Help required as early as possible.
    Appreciate ur help guys
    Radha

    hi Radha, how are you ?
         ---the partial deliveries in master data must have not been mentioned.
         ---the deliveries should be upto target quantity.
         ---check order type, item category and schedule line category.
         ---check unrestricted stock availability.
    thank you
    regards
    Khera.

  • Bapi parametrs to be passed in bapi_salesorder_change to change quantity

    Hi,
    how to change quantity of sales order by using bapi_salesorder_change.
    kindly Help us... to solve this Issue....(bapi parametrs to be passed in bapi_salesorder_change to change quantity)
    regards
    sathish Kumar.

    pass the updateflag = U
    pass the posnr,qty,mat in the item and pass the itemx= 'X' to these fileds.

  • Help Required - Oracle AS 10g

    hello,
    i have just downloaded oracle 10g softwares ...
    i installed database then developer suite ... everything was fine ... until i was unable to run forms ...
    a friend of mine told me that i need to install application server in order to run forms ...
    1st of all i want to know that is there any way i can run forms without using Oracle AS 10g ...
    2ndly i m facing problems in installation of Oracle AS 10g ...
    i have studied online documentation but it ain't so helpfull for me ...
    it seems like ... i have to install "Oracle AS infrastructure" first and then "Middle-tier: Business Intelligence and forms" ...
    i m using P-IV (AMD Athlon XP 2100+, MMX, 1.7GHz Processor) with 512 MB DD RAM and Windows XP Professional with Service Pack 2 as Operating System.
    During installation, the installer is warning dat only "Oracle Application Server (J2EE and Web Cache)" and "Oracle Application Server Developer Kits" are supported installations on dis platform ...
    what should i do ... urgent help required ...
    regards,
    yasir ([email protected])

    @ brusardl and rkogelhe
    thanx for replying ...
    brusardl
    i didn't changed da port while installing Oracle AS ...
    inspite i stopped all services using/listening from dat port ...
    now ... i guess there has been some conflict ... as database listner stops automatically just after starting !!!
    rkogelhe
    can u plz tell me what is BI version of Forms ...
    and can i view forms running on web without installing Oracle AS with OC4J bundled in Forms ???
    Another Problem:
    I re-installed Database, Developer suite and then Oracle AS infrastructure ...
    everthing went fine ...
    when i installed Oracle AS Middle Tier - Business Intelligence & Forms
    during installation ... some configuration assistants failed/skipped ...
    da OC4J configration assistant at 5th last position failed ... so remaining 4 configuration assistants were skipped ...
    at da end it said ... Installation Succesfull but with some configuration assistants failed/skipped ...
    is dis a installation useless ... can i fix dis ?
    regards,
    yasir

  • Help required...very urgent !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    Help required with an error message.
    "Table Z0CL_BATCLA for object class CHARGE does not exist"

    Hi
    It means your Z0CL_BATCLA is not assigned to object CHARGE, you have to create the linke between object and table in the table TCDOB.
    You can do it by trx SCDO, but in this case you have to change in standard object.
    Max

  • For those who have problems RE: My iPhone 4 on connecting to my pc shows my friends name in the DIGITAL camera Drive..It dsiplays my correct name when I`m on iTunes..PLEASE HELP ME HOW DO I CHANGE THE NAME IN THE DIGITAL CAMERA DRIVE??

    For those who have problems RE: My iPhone 4 connecting to my pc shows my friends name in the DIGITAL camera Drive..It dsiplays my correct name when I`m on iTunes..PLEASE HELP ME HOW DO I CHANGE THE NAME IN THE DIGITAL CAMERA DRIVE??
    SOLUTION:
    Iam pointing t0 windows7 os.
    1) go to control panel
    2) open hardware and sound
    3) In that open Devices and printers
    4)In that u can find Apple Iphone.
    5) now right click on this --> Hardware --> Properties --> General --> Uninstall --> ok.
    6) now unplug and plug in ur iphone again.There u go u iphone name changes to its original name.

    I am having this problem.  At first with the new iPhone 5, and then with the iPad 2.  I am not sure why this is happening. 
    My gut feeling is this is an iO6 issue and here's why -
    The problem mainly occurs with apps.  I have about 150 apps, and when I plugged in the phone, iTunes went to sync all of them.  The process would hang up after about 20 - 30 apps were loaded onto the phone. I could tell where about the process hung up because the apps on the phone showed up as "waiting".
    Then on the iPad 2 I plugged in to sync and saw there was a huge "Other" component in my storage.  It required me to restore the iPad 2 from backup.  With this restore the same issues occurred - putting the apps back on the iPad would hang up.  The videos on the iPad also got stuck - maybe after about 10 hours of videos transfered iTunes crashed.
    My solution has been to soft reset the device, restart Windows, and continue the process until it's complete.  This is remarkably inefficient and time-intensive but everything works with patience.
    I have been wondering if others have had these same problems. 

  • BAPI_OUTB_DELIVERY_CONFIRM_DEC problem in change quantity again?

    Dear all,
    I used BAPI_OUTB_DELIVERY_CONFIRM_DEC to PGI . And I also want to change the delivered quantity.
    But the bapi did not work . What's the problem?
    DATA: BAPI_Z05DOGI_DELIVERY LIKE BAPIOBDLVHDRCON-DELIV_NUMB ,
    BAPI_Z05DOGI_HEADER_DATA LIKE BAPIOBDLVHDRCON OCCURS 0 WITH HEADER LINE ,
    BAPI_Z05DOGI_HEADER_CONTROL LIKE BAPIOBDLVHDRCTRLCON OCCURS 0 WITH HEADER LINE,
    BAPI_Z05DOGI_ITEM_DATA LIKE BAPIOBDLVITEMCON OCCURS 0 WITH HEADER LINE,
    BAPI_Z05DOGI_ITEM_CONTROL LIKE BAPIOBDLVITEMCTRLCON OCCURS 0 WITH HEADER LINE ,
    BAPI_Z05DOGI_RETURN LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE .
    CLEAR: BAPI_Z05DOGI_DELIVERY , BAPI_Z05DOGI_HEADER_DATA , BAPI_Z05DOGI_HEADER_CONTROL , BAPI_Z05DOGI_ITEM_DATA ,BAPI_Z05DOGI_ITEM_CONTROL , BAPI_Z05DOGI_RETURN .
    REFRESH: BAPI_Z05DOGI_HEADER_DATA , BAPI_Z05DOGI_HEADER_CONTROL , BAPI_Z05DOGI_ITEM_DATA , BAPI_Z05DOGI_ITEM_CONTROL , BAPI_Z05DOGI_RETURN .
    BAPI_Z05DOGI_DELIVERY = ZMM_WB1-ISSUE .
    BAPI_Z05DOGI_HEADER_DATA-DELIV_NUMB = ZMM_WB1-ISSUE.
    APPEND BAPI_Z05DOGI_HEADER_DATA.
    BAPI_Z05DOGI_HEADER_CONTROL-DELIV_NUMB = ZMM_WB1-ISSUE.
    BAPI_Z05DOGI_HEADER_CONTROL-POST_GI_FLG = 'X'.
    APPEND BAPI_Z05DOGI_HEADER_CONTROL.
    BAPI_Z05DOGI_ITEM_DATA-DELIV_NUMB = ZMM_WB1-ISSUE.
    BAPI_Z05DOGI_ITEM_DATA-DELIV_ITEM = 10.
    BAPI_Z05DOGI_ITEM_DATA-DLV_QTY = XTAB-LFIMG.
    BAPI_Z05DOGI_ITEM_DATA-SALES_UNIT = XTAB-MEINS.
    BAPI_Z05DOGI_ITEM_DATA-DLV_QTY_IMUNIT = XTAB-LFIMG.
    APPEND BAPI_Z05DOGI_ITEM_DATA.
    BAPI_Z05DOGI_ITEM_CONTROL-DELIV_NUMB = ZMM_WB1-ISSUE.
    BAPI_Z05DOGI_ITEM_CONTROL-DELIV_ITEM = 10.
    BAPI_Z05DOGI_ITEM_CONTROL-CHG_DELQTY = 'X'.
    APPEND BAPI_Z05DOGI_ITEM_CONTROL.
    CALL FUNCTION 'BAPI_OUTB_DELIVERY_CONFIRM_DEC'
    EXPORTING
    DELIVERY = BAPI_Z05DOGI_DELIVERY
    HEADER_DATA = BAPI_Z05DOGI_HEADER_DATA
    HEADER_CONTROL = BAPI_Z05DOGI_HEADER_CONTROL
    TABLES
    ITEM_DATA = BAPI_Z05DOGI_ITEM_DATA
    ITEM_CONTROL = BAPI_Z05DOGI_ITEM_CONTROL
    RETURN = BAPI_Z05DOGI_RETURN.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
    WAIT = 'X'
    IMPORTING
    RETURN = BAPI_Z05DOGI_RETURN.
    Can anybody help me ? Thanks very much indeed.
    The error message is :
    I   |VU                  |014   |                                         <
    E   |VU                  |010   |                                         <
    E   |VL                  |605   |                                         <
    E   |VU                  |010   |                                         <
    Thanks and Best Regards.

    I have a mistake. Please see Topic "New! BAPI_OUTB_DELIVERY_CONFIRM_DEC problem in change quantity again?
    ".  Thanks, all.

Maybe you are looking for