Skip to Content
author's profile photo Former Member
Former Member

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 19, 2006 at 02:06 PM

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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 19, 2006 at 05:20 AM

    Hi Liam

    I remember in one my earlier project, i have seen coding done for Status Updation via user exits in include MV45AFZZ. So i can not totally rule out this option.

    Only point i want to highlight is that, you have to take care of the OBJNR incase of creating a new order via VA01 for internal number assignment. I mean there will be a temporary number in this case as the order is not yet saved to generate a new document.

    Kind Regards

    Eswar

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.