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

Similar Messages

  • 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

  • Sales report based on Reason for Rejection

    Hi Guru's,
    I have a requirment to get the list of sales orders( Open/ Close) report based on Reason for Rejection.
    Please makesure it should be standard not customization and using tables.
    Thanks & Regards,
    Subbu.

    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

  • Change the Tax Code-  In Sales Order i have  Tax code for VAT

    In Sales Order i have  Tax code for VAT ( Condition type JIVP) it is reflecting "P4" instead of "A4".
    Where the "P4" Tax code is picking in Sales Order.
    How to change the Tax Code.
    Urgent

    Hi CHAKRI,
                     Check if the condition record is maintained with the appropriate taxclasssification.If yes, Go to sales order in change mode,then goto-header-billing-alternate taxcalssification and modify tax classification.It will pick up right tax code.
    Regards
    Ram Pedarla

  • 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.

  • Regarding changing of configuration data of Sales Order/item

    Hi,
    I have taken configuration data of sales order/item from VC_I_GET_CONFIGURATION function module, i should change some of the data and save them back,
    Can any one provide the function module name to save the configuration data in SAP sytem,
    Thanks in advance,
    With regards,
    P.Prasanth.

    Try with Function module
    CE_C_PROCESSING.also you can use
    CE_I_SET_CONFIGURATION
    CUCB_CHANGE_CONFIGURATION
    CUD0_CONFIGURATION_TO_DB

  • Change System Status of SO item dynamically based on Reason for Rejection

    Hi ppl,
    Our SAP user has raised a requirement as described below:
    In sales order (in creation mode (VA01) or change mode (VA02)), if at the item level, the reason for rejection is mentioned, then the system status for that item should be automatically set to Technically Complete SET (TECO); and if the user removes the reason for rejection for the item, then the system status Technically Complete should be RESET automatically.
    We are looking for any user-exit or BADI available which would be allow this dynamic change of system status based on the reason for rejection field. (No manual interaction for setting or resetting the system status).
    Technically, the functionality is based on the below fields:
    Reason for Rejection: VBAP-ABGRU
    System Status: JEST-STAT
    Please provide suitable inputs.
    Thanks,
    Dawood
    Edited by: Dawood.S.Ghasletwala on Jun 29, 2009 3:14 PM

    program: SAPMV45A
    User exit: USEREXIT_SAVE_DOCUMENT_PREPARE.
    loop at xvbap where updkz NE 'D'.
      if not xvbap-abgru is initital.
        "set your system state here.
      else.
       "reset your system state here.
      endif.
    endloop.
    hmmm you can as well try if you got all you need to know already in userexit: USEREXIT_CHECK_VBAP.
    Edited by: Florian Kemmer on Jun 29, 2009 11:53 AM

  • 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 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

  • Changes to sales order item not reflected if Call Transaction is used

    I m updating another Sales Order item quantity and reason for rejection programmatically from another sales order.
    The code is working fine and the quantity does get changed as well as the reason for rejection flag get set (if required). But if I go to the change log from the menu in VA02 for the order item which has been changed. It does not record the changes.
    I have tried using both BDC call transaction method as well as BAPI_SALESORDER_CHANGE in neither case the change log for the order which has been changed reflects the programmatically made changes?
    What m I doing wrong. Here is the code.
    IF v_update_order_flg = 'X'.
          REFRESH t_bdcdata.
          CLEAR s_bdcdata.
          REFRESH t_messtab.
          PERFORM bdc_dynpro USING 'SAPMV45A' '0102'.
          PERFORM bdc_field  USING 'VBAK-VBELN' <wa_r_rtb_posnrs>-zrtbvbeln.
          PERFORM bdc_field  USING 'BDC_OKCODE' '/00'.
          PERFORM bdc_dynpro USING 'SAPMV45A' '4001'.
       For Going to  specific Item Number
          LOOP AT t_schedule_lines.
            PERFORM bdc_field  USING 'BDC_OKCODE' '=POPO'.
            READ TABLE t_item_in WITH KEY itm_number = t_schedule_lines-itm_number.
            PERFORM bdc_dynpro USING 'SAPMV45A' '0251'.
            PERFORM bdc_field  USING 'RV45A-POSNR' t_schedule_lines-itm_number.
            PERFORM bdc_field  USING 'BDC_OKCODE' '=POSI'.
            PERFORM bdc_dynpro USING 'SAPMV45A' '4001'.
            v_ro_qty = t_schedule_lines-req_qty.
            CONDENSE v_ro_qty.
            PERFORM bdc_field  USING 'RV45A-KWMENG(01)' v_ro_qty.
            PERFORM bdc_field  USING 'VBAP-ABGRU(01)' t_item_in-reason_rej.
          ENDLOOP.
          PERFORM bdc_field  USING 'BDC_OKCODE' '=SICH'.
          v_call_transaction_flg = 'X'.
          EXPORT v_call_transaction_flg TO MEMORY ID 'call_transaction'.
          CALL TRANSACTION 'VA02'
                       USING t_bdcdata
                       UPDATE 'S'
                       MODE   'N'
                       MESSAGES INTO t_messtab.
          v_call_transaction_flg = space.
          FREE MEMORY ID 'call_transaction'.

    Hi Srikrisna,
    This is a typical problem with BDC for updating QUANTITY and CURRENCY fields.
    You need to create a character variable of the same length as your quantity field. Move your quantity value to the newly created Character variable.
    Now use this new char variable in the BDC.
    This correction should solve your problem.
    NOTE: BDC RECOGNIZES CHARACTER FIELDS ONLY.
    Regards,
    Prakash Pandey

  • Reason for rejection not changed in transaction MASS

    Hi everybody,
         I'm trying to update a sales order item with a reason for rejection (field VBAP-ABGRU) in transaction MASS but it doesn't work. I took a look in SAP notes and found similar problems but these notes (specially note 390105) don't apply to our version (4.7 support package 22). Before opening a note in SAP I would like to have someone's opinion about the issue.
         Thanks,
    Paulo

    Paul, it doesn't work because the field is not updated despite success message issued when the transaction is finished (I tried to change the field content from blank to other value). The field is available in transaction MASS and I have successfully tested it in another system (release 6.00). But now I found a note (regarding to the same problem in another field - MASSSDPOSVBKD-KURRF) that can be helpful. It's note 777746 and it applies to our release. So, I'm waiting for the basis team to implement it to see what happens.
    Thank you,
    Paulo

  • Sales Order Creation - Block - Reason For Rejection

    Hi Guru
    I want following fictionality
    1. User Creates Sales Order (VA01)
    2. Sales Order Items entered
    3. At Item Level, System should insert a required "Reason For Rejection" to item entered like a enitial value.
    4. Saving the Sales Order, all Item in that sales order will have a "Reason For Rejection"
    5. System should insert a desire value for "Reason for rejection" automatically so even if user forgot to enter, order will not be release for MRP.
    6. Then another user will remove this Reason for rejection using VA02.
    How to do this. Please suggest all possible ways.
    Rewards for solution.
    Thk.
    Edited by: Sunil Kolambkar on Dec 19, 2007 9:04 AM

    Hi
    1. Create a cust doc type
    2. For this go for field selection and have default value for Reason for rejection ( as there are multiple choices)
    Hope this will answer
    With regards
    Bhargava
    Reward if useful

  • Reg Open sales order item and the quantity

    Hi experts:
    I am getting open sales order item based on inner join of tables(vbak, vbap, vbep). Not using vbbe table in inner join as it doesnt carry all pending open records.
    can any one say how open sales order items  and their quantity can be retrieved?
    I searched forum and saw usage of vbuk and vbup tables, but it does not accomplish our scenario.
    Thanks in advance,
    Sashti.

    Hi,
    1) fetch the header information from VBAK table.
    2) Based on VBAK table fetch all the line items from VBAP table.
    3) Now fetch from VBFA table.
    *-Fetch from VBFA to get the delivered qty
      SELECT vbelv               " Preceding sales and distribution document
             posnv               " Preceding item of an SD document
             rfmng               " Referenced quantity in base UOM
        FROM vbfa
        INTO TABLE lt_vbfa
         WHERE vbelv   = gv_vbeln
           and vbtyp_n = 'J'.
    4) By comparing VBFA-POSNR just filter the records from the VBAP internal table. Remained lines are open lines of the sales order.
    Regards,
    ~Satya

  • Extractor for statuses of sales order items

    Hi Experts,
    If I want to report on different statuses of an sales order item which extractor you will use.
    Regards
    nagini

    hi,
    Use the following:
    2LIS_11_VASTH for header status and 2LIS_11_VASTI for item status.
    Cheers..

  • Sales order item data & sales order schedule data

    Hello,
    I have a Sales Orders cube which is pulling data from two DSOs (one for sales order item data and the other for sales order schedule data). The common fields between these two DSOs is the Sales Order number but in my cube I have dual entries for each Sales Order document (item and schedule info).
    Example of how the data looks now:
    Sales Order . . Item Cat. . . Article . . . Net Price . . . Delivery . . . Act GI Date
    1. . . . . . . . . ...TAN. . . . . ABC123. . . .10
    1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1 . . . . . . . . 01/01/2000
    2. . . . . . . . . ...TAN. . . . . CBA321. . . .15
    2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2 . . . . . . . . 01/02/2000
    How do I merge the data on the Sales Order number in the cube so it looks like below?
    Sales Order . . Item Cat. . . Article . . . Net Price . . . Delivery . . . Act GI Date
    1. . . . . . . . . ...TAN. . . . . ABC123. . . .10 . . . . . . . . . .1 . . . . . . . . 01/01/2000
    2. . . . . . . . . ...TAN. . . . . CBA321. . . .15 . . . . . . . . . .2 . . . . . . . . 01/02/2000
    Many thanks,
    Matt

    > Hello,
    >
    > I have a Sales Orders cube which is pulling data from
    > two DSOs (one for sales order item data and the other
    > for sales order schedule data). The common fields
    > between these two DSOs is the Sales Order number but
    > in my cube I have dual entries for each Sales Order
    > document (item and schedule info).
    >
    Two previous remarks:
    1) If you need to report on very detailed data consider doing an info-set joining both datastores. 2 reasons why:
    - not a good idea to report on very detailed information (sales order, GI dates) on cube level, if you have a scenario with lots of data. You end up with big dimension tables a poor report times;
    - there are better alternatives, like drill-through from cube query to DS query with report to report interface or Datastore-based reporting...so...
    With this solution you do not need to change the data model, I think, but test to be sure. See if the reporting times are acceptable. If not...
    2) First confirm your requirements, because what you show in your example as "to-be" have details that do not make sense, probably..
    - if you have more that one schedule line for each item then you would have many times the item information like material/price;
    - if not or if you could cope with that, then you can consider:
    2.1) create a new DS that agregattes from the previous on, with the same key of sales order item; do you have schedule line kf's? if so you these KF's should be additive in DS update; But if you may have more one scheduled line for 1 item then you have to decide what to do with the GI data (keep the last one posted, use code..) and other characteristics.
    2.2) update the shedule line datasource to the sales order item DS; same comments apply.
    2.3) maintain the missing data in the cube update rules from sheduled lines DS. Using code, refer to the respective item in the order item ODS. You would have to make sure that DS's data are correctly activated before updating the infocube.
    What solutions to choose?
    2.1 is better in terms of flexibility and architecture...because you could re-arrange the new DS to answer future needs, without loosing the 1st line DS's data;
    2.2 choose if data volumes and disk space are a concern...
    or
    2.3 it's OK, but i do not like it because of what explained in point 1...
    Message was edited by:
            Miguel Costa

Maybe you are looking for