How to change header status of a sales order

Hi people,
can anybody suggest me a FM for changing sales order header status (say from partailly complete to completed).
Regards,
Sandy

Use this FM SD_SALES_HEADER_MAINTAIN.
<b><REMOVED BY MODERATOR></b>
Regards.
Message was edited by:
        Alvaro Tejada Galindo

Similar Messages

  • How to change the status of a production order

    Dear All,
    May i know how to change the status of a production order.I want to de-active the status like OPGN (Operation generated).This status is updated as there was no routing assigned to that particular production order during its creation
    Thanks and Regards,
    Varun Siddharth

    Dear,
    When you create a production order, an operation created by the system is generated automatically if no routing is used for the creation. As a result the order header receives the status HOGAN; the operation created automatically also has this status.
    If you delete the operation created automatically and then do not have the status HOGAN.
    To avoid this maintain the Routing for the material or delete the setting of default operation from OPJG.
    Regards,
    R.Brahmankar

  • How to change the Profit Center in Sales Order

    Hi Gurus,
    Previously they setted the profit center (YB999) in sales order, now i want to change the profit center and need to give the amount into this profit center 100500.
    So, could you guide me how to change the profit center in sales order.
    Thank you for your replies.....
    Thanks & Regards,
    Chandrababu.B
    Edited by: Chandrababu Naidu on May 25, 2011 12:44 PM

    Hi
    If this SO is processed partially - i.e. transactions happened - You cant change it
    You can use ABAP and change it in Debug mode, but not advisable... Better to short close the SO and open a new SO for Balance qty
    br, Ajay M
    Edited by: Ajay Maheshwari on May 25, 2011 5:10 PM

  • Change header pricing condition in sales order

    Hi,
    I have an requirement in VA01 and VA02 to automatically edit one header pricing condition. The user can able to change the value of that condition type in header not in items . Does anyone know what user exit I can use for this requirement.
    Thanks

    Hi Sunil,
    Plealse find below 2 methods to change header pricing conditions in sales order.
    1.Goto SE38, give prog name as MV45AFZZ and in that write logic under USEREXIT_PRICING_PREPARE_TKOMK . (OR)
    2) The same can be done by creating a Alt Calculation type routine through VOFM and writng the logic in the routine, which will then be assigned to the pricing procedure in the condition type which will automatically calculate the condition.
    Try with the options mentioned above..
    Regards,
    KK

  • Changing the status of the sales order item based on reason for rejection

    Hi All,
    When a Sales order item is rejected then the status at the item level is changed as 'TECO'.When the reason for rejection is removed the status 'Teco' is reset.This status change can be achieved using the user exit 'MV45AFZZ'.But the exit does not allow re-atp calculation whenver a blocked item is release.I have use the exit 'MV45AFZB' ,through this the status change as well as re-atp calculation takes place.But the status changed(Based on reason of rejection) does not appear in the same screen.The change gets reflected only when the sakes order is saved and i open it again.
    I want the status change to appear in the same screen.I am doing my code in the form 'userexit_check_vbap' of the exit 'MV45AFZB'. Please let me know if there are any user exits or BADI's available for the same(Changing the status of the sales order item based on reason for rejection ).
    Regards,
    S.Subasree

    Hi subburamaiah
    If you want the report you can create a separate SIS report . In that take the input field  as a Reason for rejection.. and ask for the output the list of sales orders .Now when you check this user defined report you will give the reason for rejection and check what all orders got rejected on that reason for rejection.
    Regards
    Srinath

  • How to make the status of a sales order complete of which PART DELIVERY

    How to make the status of a sales order complete of which PARTIAL DELIVERY has already done. <b>(Assigning rejection status not accepted)</b>

    Hi Gyana
    There is no document with me. But I can confidently say that because I am using this functionality.
    In my case I have created a Order Reason as "Short Closed". once you short close this order only the balance quantity gets rejected (provided you have already made previous delivery and PGI).
    Try it in one of your test clients if you have. Once it is short Closed it wont also show in the orders due for processing in Production.
    Also you can generate reports based on this if your customer wants to know how many order he has short closed, qty of item short closed etc.
    Try it.
    Rgds
    Sunil

  • Problem after change item status procedure in sales orders.

    Hello experts,
    I have changed item status procedure for sales orders. But now all BDoc with queue name CSA_ORDER_xxxxx remain in state 'Written to qRFC Queue (intermediate state)' and needs to be reprocessed manually.
    No problem reprocessing.
    Have somebody any idea ?
    Best regards
    Juan Salom

    Hi,
       Is your inbound queue un-registered(type U)? Look at trx.
    SMQR
    and see if it is in un-registered. If yes, select the CSA_ORDER_*** queue and click on
    Registration
    button.
    If this does not help, re-generate your Bdoc services (for Bdoc BUS_TRANS_MSG) using
    SMOGGEN
    or
    using the generation workbench.
    Then try the delta once again and observe for queue and Bdoc status in the
    SMW01
    Hope it helps! Reward if helpful.
    Regards,
    Sudipta

  • Change User Status in the sales Order

    Hello Experts,
    I hope that somebody can help me.
    I search to change the field User Status in the sales Order in the transaction VA02 before that the order be displayed.
    I have searched in the UE MV45AFZZ, but i didn't found any form that i can use for my issue.
    I found one form 'USEREXIT_FIELD_MODIFICATION '  by what the program pass when i press enter in the transaction VA02.  but the problem that the status is changed in the data base only and not in the screen. In the screen i have always the same status as what was before, to have the new statut i must leave the transaction and execute it another time.
    I don't want use forms for saving.  What I want is the new status will be set when i press enter in the transaction VA02.
    If doesn't exit one form that can resolve my problem, Can i use the Profile Parameters? In this case How use them?
    Thank you very much.

    Hi,
    U can choose ur status in change status profile. Go to IMG-CRMTransactionsBasic SettingsStatus ManagementChange Status Profile for User Status.
    Here u hv to define ur new status for the transacxtion and assign it to ur transactio. If u r not clear tell.
    Reward points.
    Thanx
    Chinmaya

  • How to change sold to party in sales order

    Hi
    We have the below requirment of changing sold to party after creation of sales order...
    Below is the scenario
    Once sales order is created,purchase requisition is created autamatically and purchase order is created with reference to the purchase requisition..So when Goods receipt is done,the respective stock is getting reserved for that sales order...
    We wanted to change the sold to party option.
    After creation of purchase order,sold to party option in sales order is display only..
    Can u tell us how to make it changeable...
    Regards
    Sudha

    Hi,
    Why don't you try to make the Partner Function for Sold to Party as Modifible (Don't select Non Modifible) for the Sales Order Header in partner determination determintaion setting in customizing.
    You have to check with the partner determination procedure assigned to your sales order type and check accordingly.
    Reward points if it helps.
    Regards,
    Harsh

  • How to delete header condtion line of sales order by BAPI

    Hi,
    I want to delete the condtion line of sales order header using BAPI "BAPI_SALESORDER_CHANGE",
    it is work well in item level condition type, but it is not work for header condition type. show error message "missing item number" since of pass item number "000000" for header condition line.
    Below is reference source code, thanks in advance.
    *& Report  ZTEST_BAPI_SO_DELETECONDLINE
    *& Sample program to call BAPI_SALESODRER_CHANGE to
    *& delete condition line of so line item
    REPORT  ZTEST_BAPI_SO_DELETECONDLINE.
    ***--- Structures for create BAPI
    DATA: SALESDOCUMENT LIKE BAPIVBELN-VBELN.
    DATA: ORDER_HEADER_INX LIKE BAPISDH1X,
          BEHAVE_WHEN_ERROR LIKE BAPIFLAG-BAPIFLAG,
          SIMULATION LIKE BAPIFLAG-BAPIFLAG.
    DATA: BEGIN OF ORDER_ITEM_IN OCCURS 2.
            INCLUDE STRUCTURE BAPISDITM.
    DATA: END OF ORDER_ITEM_IN.
    DATA: BEGIN OF ORDER_ITEM_INX OCCURS 2.
            INCLUDE STRUCTURE BAPISDITMX.
    DATA: END OF ORDER_ITEM_INX.
    DATA: BEGIN OF SCHEDULE_LINES OCCURS 2.
            INCLUDE STRUCTURE BAPISCHDL.
    DATA: END OF SCHEDULE_LINES.
    DATA: BEGIN OF SCHEDULE_LINESX OCCURS 2.
            INCLUDE STRUCTURE BAPISCHDLX.
    DATA: END OF SCHEDULE_LINESX.
    DATA: BEGIN OF ORDER_CFGS_REF OCCURS 2.
            INCLUDE STRUCTURE BAPICUCFG.
    DATA: END OF ORDER_CFGS_REF.
    DATA: BEGIN OF ORDER_CFGS_INST OCCURS 2.
            INCLUDE STRUCTURE BAPICUINS.
    DATA: END OF ORDER_CFGS_INST.
    DATA: BEGIN OF ORDER_CFGS_VALUE OCCURS 2.
            INCLUDE STRUCTURE BAPICUVAL.
    DATA: END OF ORDER_CFGS_VALUE.
    DATA: BEGIN OF CONDITIONS_IN OCCURS 2.
            INCLUDE STRUCTURE BAPICOND.
    DATA: END OF CONDITIONS_IN.
    DATA: BEGIN OF CONDITIONS_INX OCCURS 2.
            INCLUDE STRUCTURE BAPICONDX.
    DATA: END OF CONDITIONS_INX.
    DATA: BEGIN OF EXTENSIONIN OCCURS 2.
            INCLUDE STRUCTURE BAPIPAREX.
    DATA: END OF EXTENSIONIN.
    DATA: BEGIN OF RETURN OCCURS 2.
            INCLUDE STRUCTURE BAPIRET2.
    DATA: END OF RETURN.
    DATA: TMP_POSNR  LIKE VBAP-POSNR,
          L_KNUMV    LIKE VBAK-KNUMV,
          L_KSCHL    LIKE KONV-KSCHL,
          L_STUNR    LIKE KONV-STUNR,
          L_ZAEHK    LIKE KONV-ZAEHK.
    ***--- Selection
    PARAMETERS: P_VBELN LIKE VBAK-VBELN OBLIGATORY MEMORY ID AUN DEFAULT '7000510', "'0001007443', " SO
                P_POSNR LIKE VBAP-POSNR OBLIGATORY DEFAULT '000000' , " so item
                P_CONDN LIKE  KONV-KSCHL  DEFAULT 'ZOSP',    " condition type
                P_CONDI LIKE  KONV-ZAEHK  DEFAULT '01',      " Condition item number
                P_TEST  AS CHECKBOX DEFAULT 'X'.             " test mode
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          INPUT         = P_VBELN
        IMPORTING
          OUTPUT        = P_VBELN.
      CLEAR: L_KNUMV.
      SELECT SINGLE KNUMV INTO L_KNUMV
      FROM VBAK
      WHERE VBELN  = P_VBELN.
      IF SY-SUBRC = 0.
        CLEAR: L_KSCHL,L_ZAEHK,L_STUNR.
        SELECT SINGLE KSCHL ZAEHK STUNR INTO (L_KSCHL, L_ZAEHK, L_STUNR)
        FROM KONV
        WHERE KNUMV = L_KNUMV
          AND KPOSN = P_POSNR
          AND ZAEHK = P_CONDI
          AND KSCHL = P_CONDN.
        IF SY-SUBRC <> 0.
          WRITE:/ 'Condition type or condition item is not exist.'.
          EXIT.
        ENDIF.
      ELSE.
        WRITE:/ 'Sales order number is not exist'.
        EXIT.
      ENDIF.
    IF L_ZAEHK IS INITIAL.
          WRITE:/ 'Condition type or condition item is not exist.'.
          EXIT.
    ENDIF.
    SALESDOCUMENT = P_VBELN.     " Sales order number
    ORDER_HEADER_INX-UPDATEFLAG = 'U'.   "U = change sales order
    ***Item Data
    ORDER_ITEM_IN-ITM_NUMBER = P_POSNR.
    APPEND ORDER_ITEM_IN.
    ORDER_ITEM_INX-UPDATEFLAG = 'U'.   "I = add, U= update, D=delete
    ORDER_ITEM_INX-ITM_NUMBER = P_POSNR.
    APPEND ORDER_ITEM_INX.
    ***--- Begin delete a condition line
    ***--- Make sure to use update flag 'D'. Here I = add, U= update, D=delete
    CLEAR: CONDITIONS_IN,CONDITIONS_INX.
    REFRESH: CONDITIONS_IN,CONDITIONS_INX.
    CONDITIONS_IN-ITM_NUMBER = P_POSNR.
    CONDITIONS_IN-COND_ST_NO = L_STUNR.
    CONDITIONS_IN-COND_COUNT = L_ZAEHK.
    CONDITIONS_IN-COND_TYPE  = L_KSCHL.
    APPEND CONDITIONS_IN.
    CONDITIONS_INX-UPDATEFLAG = 'D'.
    CONDITIONS_INX-ITM_NUMBER  = P_POSNR.
    CONDITIONS_INX-COND_ST_NO  = L_STUNR.
    CONDITIONS_INX-COND_COUNT  = L_ZAEHK.
    CONDITIONS_INX-COND_TYPE   = L_KSCHL.
    APPEND CONDITIONS_INX.
    ***--- End delete a condition line
    BEHAVE_WHEN_ERROR = 'P'.
    SIMULATION = P_TEST.   " Test mode or not
    "=== call BAPI
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
      EXPORTING
        SALESDOCUMENT               = SALESDOCUMENT
        ORDER_HEADER_INX            = ORDER_HEADER_INX
        LOGIC_SWITCH                = '    U'
      TABLES
        RETURN                      = RETURN
        ORDER_ITEM_IN               = ORDER_ITEM_IN
        ORDER_ITEM_INX              = ORDER_ITEM_INX
        CONDITIONS_IN               = CONDITIONS_IN
        CONDITIONS_INX              = CONDITIONS_INX .
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    WRITE: / 'Return code =', SY-SUBRC.
    SKIP 1.
    LOOP AT RETURN.
      WRITE: / RETURN-MESSAGE.
    ENDLOOP.
    Edited by: hank jiang on May 21, 2010 5:07 AM
    Edited by: hank jiang on May 21, 2010 5:25 AM
    Edited by: hank jiang on May 21, 2010 5:27 AM

    SALESDOCUMENT = P_VBELN.     "Sales order number
    ORDER_HEADER_INX-UPDATEFLAG = 'U'.   "U = change sales order
    ORDER_ITEM_IN-ITM_NUMBER = P_POSNR.
    APPEND ORDER_ITEM_IN.
    ORDER_ITEM_INX-UPDATEFLAG = 'U'.   "I = add, U= update, D=delete
    ORDER_ITEM_INX-ITM_NUMBER = P_POSNR.
    APPEND ORDER_ITEM_INX.
    "Begin delete a condition line
    "Make sure to use update flag 'D'. Here I = add, U= update, D=delete
    CLEAR: CONDITIONS_IN,CONDITIONS_INX.
    REFRESH: CONDITIONS_IN,CONDITIONS_INX.
    CONDITIONS_IN-ITM_NUMBER = P_POSNR.
    CONDITIONS_IN-COND_ST_NO = L_STUNR.
    CONDITIONS_IN-COND_COUNT = L_ZAEHK.
    CONDITIONS_IN-COND_TYPE  = L_KSCHL.
    APPEND CONDITIONS_IN.
    CONDITIONS_INX-UPDATEFLAG = 'D'.
    CONDITIONS_INX-ITM_NUMBER  = P_POSNR.
    CONDITIONS_INX-COND_ST_NO  = L_STUNR.
    CONDITIONS_INX-COND_COUNT  = L_ZAEHK.
    CONDITIONS_INX-COND_TYPE   = L_KSCHL.
    APPEND CONDITIONS_INX.
    "End delete a condition line
    BEHAVE_WHEN_ERROR = 'P'.
    SIMULATION = P_TEST.   " Test mode or not
    "=== call BAPI
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
      EXPORTING
        SALESDOCUMENT               = SALESDOCUMENT
        ORDER_HEADER_INX            = ORDER_HEADER_INX
        LOGIC_SWITCH                = '    U'
      TABLES
        RETURN                      = RETURN
        ORDER_ITEM_IN               = ORDER_ITEM_IN
        ORDER_ITEM_INX              = ORDER_ITEM_INX
        CONDITIONS_IN               = CONDITIONS_IN
        CONDITIONS_INX              = CONDITIONS_INX .
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    WRITE: / 'Return code =', SY-SUBRC.
    SKIP 1.
    LOOP AT RETURN.
      WRITE: / RETURN-MESSAGE.
    ENDLOOP.

  • How to change layout in List of Sales Orders (VA05)

    Hello,
    Does anybody knows how I can save layout changes or create new layout in transaction VA05 (List of Sales Orders)?
    Thanks for advance

    Hi,
    Goto VA05, enter values in selection screen press enter.
    In menu click on settings>layouts>Current  select the fields and save. Give layout name and description and press enter.
    You can choose your own layout  goto settings>layouts>Choose   click on layout from list of layouts.
    If you want to default your layout for VA05. settings>layouts>Administration. click on field default setting for your layout. Default you will get your own layout for VA05 transaction.
    Regards,
    Chandra

  • How to change Availability check (MTVFP) in sales order

    Hi,
    is it possible to change the Availability check on an material in an sales order?
    Some material have the value KP (no check) of Availability check in table MARC.
    If we use this material in sales orders somtimes we want change the Availability check
    from KP to 01 (Daily requirements). Is this possible or have i first change the material
    before i use it in sales order.
    Thanks.
    regards, dieter

    Its pre-define in material master, how particular will be treated in respective sales organization / Plant /
    So its always in material master , you cant change availability check n sales order.
    Once order is created, after that checkin group changed in material master, will be effective for future orders only. not effective in existing / old orders.
    Regards,
    Reazuddin MD

  • To change user status profile on sales order at run time.

    Hi Experts,
    We have defined status profile for Sales returns ( Doc type RE) which blocks the  return order on creation. There are two statuses here which are to remove the delivery block and to remove the billing block by authorised users.
    The requirement is now to have a three level block ( three statuses ) on the same document. We can create a new status profile and assign it to a new return sales order tpye  but we want to avoid creating new document types. Since this document type is used across various companies in the group we can not assign a new profile on the existing RE document as well.
    My question to all experts is
    Is it possible to dynamically change the status profile assigned to the document type based on characterstics like sales org or company code etc? If any body has done this please let me know the user exit , function module, BADI etc where the necessary coding has been done.
    Helpful answers will be rewarded with points.
    I look forward to your co operation.
    Regards,
    Kartik Shah

    Hi Liam,
    In the Program MV45AFZZ in the FORM userexit_save_document
    you use the following fn module to change the user status
    'STATUS_CHANGE_EXTERN'
    Example
    IF t180-trtyp = 'H'.  "Only creation time
      READ TABLE xvbap WITH KEY matnr = c_matnr.
      IF sy-subrc = 0.  "If above material exist then change status
        LOOP AT xvbap WHERE cuobj NE space
                       AND  matnr =  c_matnr.
          l_objnr = xvbap-objnr.
          CALL FUNCTION 'STATUS_CHANGE_EXTERN'
            EXPORTING
              objnr               = l_objnr
              user_status         = 'E0013'  "Send ej IDOC
              set_chgkz           = 'X'
            EXCEPTIONS
              object_not_found    = 1
              status_inconsistent = 2
              status_not_allowed  = 3
              OTHERS              = 4.
        ENDLOOP.
      ENDIF.
      sy-subrc = 0.  "Restore the previous condition
    ENDIF.
    Reward if helpful *********

  • How to change the pricing rate of Sales Order after delivery is created?

    Is it possible to update(change) the pricing rate which belong to a specific condition type, of the "Sales Orders"  after corresponding delivery is created ?
    number of the Sales Order to be changed is huge. How can I handle this situation ?
    immediate replies would be rewarded

    Repricing is only possible if your pricing record has a valid from date that is equal to or before the pricing date on the order. Otherwise, your pricing rate change will be applicable only from the begin date of that record.
    Assuming that it is allowed by config, you can go to VA02, go to conditions, and then there is small button at the bottom, that says 'Update'. By pressing that, your system will automatically reprice the sales order, provided, as I said, all pre-conditions are met. Once you know that you can do this, then you can adopt any of the technical solutions that Rich had suggested above to do the mass changes.

  • Change invoice status on old sales order?

    Hi,
    We are trying to archive old sales order but we got problem with some old sales orders.
    The sales orders aren't invoiced (for different reasons) so we can't archive them (Overall status: Being processed).
    Since the sale orders are very old we don't want to create invoice on them, just somehow fake or force the status so we can archive them.
    What's the easiest way to do this?
    Thank you!
    Best Regards
    Lars

    Hi,
    The easiest way is to maintain the reason for rejection for these orders.
    If they are small in number then maintain the reason for rejection individually.
    If the number of order is high,then got for the T.Code "MASS".
    Select the "Object type" as "BUS2032".
    Execute.
    Select "Sales Order Item Data" on "Tables" tab.
    Click on "Fields".
    Search for the field "MASSVBAP-ABGRU" and Select that line.Click on "Execute".
    Enter the document numbers range and maintain.
    Regards,
    Krishna.

Maybe you are looking for