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

Similar Messages

  • 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

  • User status transfer for sales orders from ECC to CRM

    Hi,
    We use business process with CRM sales orders that are transfer to ERP.
    Users can change user status in the sales orders in ERP.
    How we can replicate custom user status from ECC Sales Order to CRM Sales Order?
    What is the steps to do this for CRM 7.0?
    Denis

    Hi,
    We are creating quotation ZPQT in CRM which is then get replicated to ECC on saving it on “Accepted” status. In ECC we then create sales order of type ZPOR. Sales order gets replicated in CRM and also updates document flow. This sales order is called as “Project Sales Order”. PS team assigns WBS element to this order and does billing later on. Upon billing document is created sales order status in ECC changes to “Completed”. This is system status. But the issue is status of order ZPOR is CRM remains in status “Inprocess”. We want it to change to “Completed”.
    We have similar scenario with order type ZOR. In this order after delivery and billing ECC assigns status “Completed” to sale order and same gets replicated to CRM.
    In CRM for user status Completed we have assigned system status as FINI. Both ZPOR and ZOR has same status profile assigned at header and item level.
    Our concern is if status is changing back in CRM for ZOR then why not for ZPOR. What is stopping system to do so?

  • 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

  • Revenue Recognition based on User Status of assigned Sales Order line item

    Dear Community members,
    We have requirement to recognize / de-recognize revenue posted to WBS for calculation of RA, based on the 'User status' of the assigned Sales Order line item.
    To elaborate requirement further -
    1) WBS Element - XXX - 10 ( with operative indicator - Plan/Bill/Account Assign)
    2) Sales Order(SO) Line Items assigned to the above WBS -
    - SO No -  123 Line Item 10 - Actual Rev - $ 300 - User Status - EXE (Meaning this work is in progress , partial payment received thus actual revenue for RA at WBS is 'Zero'
    - SO No -  124 Line Item 20 - Actual Rev - $ 400 - User Status - COMPL(Meaning this work is Complete , all payment received thus actual revenue for RA at WBS is $400
    - SO No -  125 Line Item 10 - Actual Rev - $ 800 - User Status - EXE (Meaning this work is in progress , partial payment received thus actual revenue for RA at WBS is 'Zero'
    As per WBS reports Actual Revenue posted to WBS XXX-10 is $ 1500 ( $300$400$800) , however since two SO line items ( SO 123 /line item 10 and SO 125 / line Item 10 ) are NOT having User status 'COMPLETE', the actual revenue posted by those line items $ 1100/- ($300 + 800)  should not be included as Actual Revenue for RA at WBS level.
    Thus Actual Revenue for RA at WBS XXX-10 should be $ 400 /- ( the revenue posted by SO 124/line item 20 which has user status as 'COMPLETE')
    How do above can be achieved?? Is there any standard solution for this?? Is any SAP Note available for this (I too am looking for one but not found any ) ?? do we need any enhancement , Customer exit etc
    Thanks in advance
    with regards

    Hi,
    Thanks. You are right that the 'Completed Contract Method' would defer revenue recognition. However, the status checked would be of the RA object (WBS Element in this case, as RA key is on WBS and RA is being calculated on the WBS).
    However, our requirement is to check the user status of the Sales Order Line items assigned to the WBS element and filter the revenues posted based on the active user status of individual Sales Order Line item.
    Please give you inputs.
    Thanks in advance
    With regards

  • 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

  • Status profiles for sales order

    Dear all:
      I use  status profiles to do sales order approve(BS02)
    who can tell me which business transaction can settle Sales Order can or not make to MD04?
    the standard business transcation:
    Acct. assignment order/project
    Activate final billing doc.
    Actual activity allocation
    Actual overhead (periodic)
    Actual settlement
    Automat. WIP/results analysis
    Change configuration data
    Complete
    Confirm order
    Create billing document
    Create changeable copy
    Create delivery
    Create inquiry
    Thanks a lot .

    hi,Imran  and rohit rathi
    thank you very much for you help,
    maybe I have't depict the problem,
    I use user status profiles to do sales order approve, i have defined a status profiles and assigned it to sales document type ,  i have defined two statuses  A00 and B00 in the  status profiles .
    I hope if the sales order in status A00,it'can make to MD04,when the sales order approved to status B00,It can make to MD04.
    but I don't know which business transaction  shoud I choose when defining the profiles' status A00 by t-code BS02.
    thanks and Best wishes.
    zeng
    Edited by: zeng zeng on May 31, 2008 11:37 AM

  • Status profile in sales order

    Dear All,
    I have a requirement  as below
    In status profile  maintained 5 statuses in the sales order when the user  releases 4th status system should not allow to change the sales order .

    Hi
    Your requirement can be fulfilled through a User exit.
    You write the logic as below, All the data related to statuses are stored in JCDS and JEST tables.
    So you can pass the OBJNR from VBAK to JCDS table there you have to get the status for the fourth profile and look for the fields
    INACT and CHIND,  if for the fouth status if the CHIND is U then there should not be nay modifications
    regards
    Prashanth

  • Change in status profile of internal order

    I've changed the status profile assigned to an order type because of new requirements for disallowed transactions.  The new profile settings/ user status worked for new IO master data created.  However, for existing IO master data, the user status was not updated with the new status profile.  What's the transaction to reconstruct/correct the user status of old IO master data?

    Hi,
    Once you assign the sttus profile for an order type,this should work for all the orders assigned to that specific ord-type.
    create a new session and work.The orders will respond to the new status profile.
    Hope this helps.
    Regards,
    Ramesh

  • User status profiles for work orders and sub-orders

    Hi Experts,
    I have the following question regarding status profiles for SAP PM work orders (but I guess it relates to all user status profiles).
    Customizing
    A status profile is defined for order type "PM_A", which contains an authorization key "OP" for certain user states (to be set by the ordering party)
    Situation
    The ordering party A creates an order of type PM_A for contractor B, and B then creates a sub-order of type PM_A for contractor C
    Problem
    - If I assign the authorization key "OP" only to roles of party A, then party B can't set the user states reserved for the ordering party (correct for the order A->B, but not for the sub-order B->C)
    - If I assign the authorization key "OP" to roles of party A and party B, then B could set certain user states reserved for the ordering party in the order A->B, which is also wrong
    Question
    Is there a way to restrict sub-orders differently than "non-sub-orders", or do I have to create a "sub-order order-type" for each order type, in order to assign them different status profiles and authorization keys?
    Thanks a lot!

    hi
    since you have 3 roles to be assigned to the same order type with different authorization ,it is better you create an seperate order type for sub order and assign the user status with authorization for B and C
    regards
    thyagarajan

  • User Status Profile for Process Order Operations

    Hello Experts.
    I have a need to set up a User Status at the Process Order Operation level that will prevent operation confirmation when the status is Active .
    I have been successful at the following:
       --- Created a new Status Profile (transaction BS02),
       --- Creating a u201CHoldu201D status,
       --- Defined the Influence on Business Transactions,
       --- Set the allowed Object Types for the profile.
       --- In an individual Process Order operation, I can now select the Status Profile, and set the Hold status, and it functions correctly.
    My problem is that I canu2019t figure out how to set my new profile as a default for Process Order Operations.  For Production Orders, this is done in the IMG definition for the Order Type (transaction OPJH), updating field T003O-VRG_STSMA.  However the Order Type definition for Process orders (transaction CORN) only has a field for a status profile at the header level.  Iu2019ve searched through Configuration and the Recipe, and the Production Version, and the Control Key, but can find no where to set the default status profile for a Process Order Operation..
    As a final desperate act, I manually edited a T003O record for a Process Order Type in our test system, but even this failed to set a default Operation Status Profile for subsequently created Process Orders.
    If you have any knowledge about this, then please help.

    As of this date, we have still not implemented a fix, but I did get some information from someone else who has.
    I'll post his information here for all to see.  Hope you find it helpful.
    From: Joe
    Yes we managed to do it.
    After several false starts and CMOD/projects which suffered because only the default keys (for order number, aufpl etc) were in place and not the actual, we coded up the IN_UPDATE method in the WORKORDER_UPDATE badi. This gives us the final format after the DB save (but before the commit). The update of the STATUS using the SAP std function module was actioned successfully but the status profile was not actually passed through. We assumed that this was because of the update task - so we introduced an INSERT into JSTO instead (a bit naughty I know, but desperate needs etc). If you require anything more let me know.
    Best Regards
    Joe

  • How to restrict status profile for sales order.

    Dear Friends,
    Pl suggest me for follwoing scenario
    ►     As per business process for tender/ institutional sales and exports, the order is complete once the complete delivery and invoicing for the same has been performed.
    ►     It was also observed that a sales order may be modified (material, quantity, price etc) even after complete invoicing of the same has been performed in SAP.
         The requirement is  Possibility to enable a control to restrict any amendments to the sales order after complete delivery and invoicing will be explored as per business requirements.
    Is there any solution above scenario without writing any code.
    Regards,
    Atul
    Edited by: atul thakur on Oct 28, 2009 5:09 AM

    Mr Atul,
    My understanding is, you don't want your user to be able to change the pricing and order quantity once the order is complete, i.e Delivered and Shipped.
    The status profile will not help you in the above scenario, Price/Quantity changes will not come up as Business transactions that can be controlled at Status profile.
    Standard SAP restricts the price changes to a completed item of the order, so no need to worry about this.
    But order quantity can be increased any time.
    So to restrict the user to increase the order quantity you need to use the User-Exits that SAP provided.
    Use the MV45AFZB user-exit program and form  FORM userexit_check_vbap to code this.
    Hope this helps you.
    Regards,
    Aj.

  • Status profile in sales order  Re Release

    Hi Experts,
    Scenario is like this
    Iam using status profile ZETO1 in T.Code [BS02] for releasing sales order once Sales team person creates a sales order VA01. After this Fiance person will release through sales order  status in header (i have created status profile and authorisation key
    which will be with Finance person)
    I have status profile  like this step 10 and 20 in T.Code [BS02]
    10. created (initail status)
    20. released by finance
    once finace person release this delivery can happen.(i have used user exit for this)
    the problem is if sales team member again make changes in sales order then status of sales order again should go to step 10 then it should be again released by finance person.
    whether it is possible to re realese in status profile concept in SD???
    please help
    Thanks and Regards,
    kedar

    Hi
    Your requirement can be fulfilled through a User exit.
    You write the logic as below, All the data related to statuses are stored in JCDS and JEST tables.
    So you can pass the OBJNR from VBAK to JCDS table there you have to get the status for the fourth profile and look for the fields
    INACT and CHIND,  if for the fouth status if the CHIND is U then there should not be nay modifications
    regards
    Prashanth

  • User Status update on Sales Order Header

    Hi all,
    I need to update the "User Status" on sales order header when a sales order is saved. As user status reside in JEST, what available user exits are there to change/insert new user statuses? I don't believe the common exits like MV45AFZZ would do.
    To clarify, to get to these user statuses, you go to the header of the sales order, select on the 'Status' tab, then click on the "Object Status" pushbutton.
    Any help would be greatly appreciated in the form of points!
    Thank you.
    Liam

    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

Maybe you are looking for

  • Using Time Machine to back up an external hard drive dedicated to Adobe Lightroom 5

    I recently began to use Adobe Lightroom 5 (I continue to use Aperture, as I have for years).    All of the Lightroom image files and catalogs are on one external hard drive, which I use on my iMac, my Macbook Pro, and in the digital labs of a school

  • How can I arrange bookmarks in a grid format instead of a vertical line?

    Windows has a IE Favorites folder, containing favorite websites, and all of these favorite website folders and links can be viewed in a grid format (spread horizontally and vertically). Firefox Bookmarks: I can only get to display in a very long vert

  • Songs w/exclamation marks that won't play "file can't be found" Why??

    I am getting inundated with more and more songs daily, with exclamation marks beside them, stating "the original file can't be located". It asks if I want to recover the file,I answer yes, but nothing seems to happen! I am a DJ and rely heavily on iT

  • How to match edges of objects precisely?

    Hi all Okay, I have two objects, A and B, both with very irregular, jagged, edges. They should be contiguous and I want the edges to match exactly point for point, so when the border of A goes out, the border of B goes in. A is to the left of B, and

  • Failed PDF Creation due to Offending pdfmark

    I have a large book from which I need to create a PDF. I can create PDFs of individual files; however, when I go to distill the .ps file, creation fails with the following error message in the log file: %%[Page: 672]%% %%[ Error: ioerror; OffendingCo