User exit to set user status

Hi,
We have a requirement to implement our own status management for SD orders. I have configured a new SD item object status profile in transaction BS02. Now I need to program the logic to update the item object status when the user is saving the sales order. I have looked at the relevant user exits in MV45AFZZ, but not found a way to update the item status upon saving. 
Has anyone faced a similar problem and know a good way to update the item object status upon sales order save?
Thanks in advance!
Kind regards,
Geir Kronkvist

I had accomplished this requirement as follows.
Step 1:-
There is an SAP function module STATUS_UPDATE. This FM should be invoked in update task.
Reason: SAP internally invokes this FM as an update task during the Sales order save process. Hence your updates should follow SAP's status update process.
Step 2:
Created a report program with 2 form routines to export and import JEST entries as follows.
form set_usrstat tables it_jest_upd structure jest_upd.
Export internal table into memory
export it_jest_upd to memory id 'it_jest_upd'.
Execute only after the next commit statement
perform zset_status on commit.
endform.
*&      Form  set_status
      Form for updating status after commit
form zset_status.
data: it_jest_ins like jest_upd occurs 0,
      it_jest_upd  like jest_upd occurs 0 with header line,
      it_jsto_ins  like jsto  occurs 0,
      it_jsto_upd  like jsto_upd occurs 0,
      it_obj_del like   onr00 occurs 0.
Import data from Memory
import it_jest_upd from memory id 'it_jest_upd'.
Run function module to update the status
CALL FUNCTION 'STATUS_UPDATE' in update task
  TABLES
    jest_ins       = it_jest_ins
    jest_upd       = it_jest_upd
    jsto_ins       = it_jsto_ins
    jsto_upd       = it_jsto_upd
    obj_del        = it_obj_del
endform.                    " zset_status
Step 3:
If you want to set a user status fill the i_jest_upd internal table accordingly and invoke the perform statement as follows.
Execute only after the commit
            PERFORM set_usrstat(zsd_status_update) TABLES  i_jest_upd.

Similar Messages

  • User exit to set user status for quote

    Hi,
    I need to update the user status in the header of quotation (using VA22) based on some conditions. I checked the user exit's under 'MV45AFZZ' but no use.
    Could any one please provide me where I can write the code to put the conditions before upating user status in header
    Thanks
    Thang Tran

    Hi,
    Is there anyone can give me some suggestions?
    Thanks in advanced
    Regards,
    Thang

  • User Exit to update user status at VA01/VA02

    Hi Expert
    Please help identify any User Exit to update User Status stored in tables (JSTO/JEST), at time of sales order (Business Object 2032) creation / change.
    Requirement is to set check mark on a specific user status in case of a material master is missing HTS code.
    Regards-Aamir

    Hi,
    If your requirement is to set the check the HTS field in the material master, you can make the field as Mandatory without which the  Material cant be saved
    You can make this field mandatory in OMS9 transaction code with field status as 89 and the field is MARC-STAWN
    Please revert if you need more details
    regards,
    santosh

  • User exit for Production Order status

    Hi all ,
    Pl tell me about the : user exit for Production Order status
    ( i want CLSD status after settlement of the Production order .)
    regards,

    Hi,
    for production order you have exits PPCO0001 - PPCO0023. In transaction SMOD you can see the documentation for all this exits. Actually I think exit PPCO0007 could be a possiblity for you. This exit is called by saving the order.
    But maybe it would be better for you to use a special status profile? A user status is set if settlement status is set.
    Also BADI WORKORDER_UPDATE could be interessting for you.
    Regards,
    Sabine

  • User exit for WBS User status ?

    Hi All,
    I want to trigger emails from WBS user status settings.
    If the WBS user status is 'AA' it should trigger emails to a business unit with a message, if it is set to 'BB' it should trigger e-mail to another business unit with a message.
    Which user exit should i use?
    Please help.
    Thanks,
    San

    Ramesh,
    Thanks again for your response.
    The problem with my project is, i am <b>not using any networks</b> at all !
    I am using project with only WBS (about 20) for easy cost planning functionality to generate quotation based on DIP profile.
    Business team needs communication linked with WBS user status settings.
    Your suggestion may work for project which has networks of category 20, but here, i am afraid it wont work.
    comments please.
    Thanks,
    Santosh

  • User-Exit for document changes (status)

    Hi!
    I'm looking for an user-exit where I can check if the status of the document has been changed. Therefore I found the exit "EXIT_SAPLCV110_004" with the include "ZXCV110U04" which is triggered when a document (transaction CV02N) is saved. The problem is that there is no structure of the document provided so I cannot check the status of it! The interface if this exit is just
    FUNCTION EXIT_SAPLCV110_004.
    ""Lokale Schnittstelle:
    *" CHANGING
    *" REFERENCE(PFX_OKCODE) TYPE SY-UCOMM
    INCLUDE ZXCV110U04 .
    ENDFUNCTION.
    Is there another exit or how can I check if the status has changed for each document?
    Thanks,
    Konrad

    You can code in EXIT_SAPLCV00_001. Write your code in the program  ZXCV001U01. This has DRAW structure valeus and also DRAZ Item details.
    FUNCTION EXIT_SAPLCV00_001.
    ""Lokale Schnittstelle:
    *"       IMPORTING
    *"             VALUE(I_DRAW) LIKE  DRAW STRUCTURE  DRAW OPTIONAL
    *"             VALUE(I_OK_CODE) OPTIONAL
    *"             VALUE(SOURCEPATH) LIKE  DRAW-FILEP OPTIONAL
    *"             VALUE(SOURCEFILE) LIKE  DRAW-FILEP OPTIONAL
    *"             VALUE(TARGETPATH) LIKE  DRAW-FILEP OPTIONAL
    *"             VALUE(TARGETFILE) LIKE  DRAW-FILEP OPTIONAL
    *"       TABLES
    *"              I_INTDRAZ1 STRUCTURE  DRAZ OPTIONAL
    *"              I_INTDRAZ2 STRUCTURE  DRAZ OPTIONAL
    *"       EXCEPTIONS
    *"              ERROR
    INCLUDE ZXCV001U01 .
    ENDFUNCTION.
    Hope this will help you to check the conditions.

  • User exit for setting tax indicator in Sale order

    Hi All,
    I want to know if there is a way (user exit) that could look at the Sales Order Type , particular Item Pricing Condition  and Ship-to party State and set the materialu2019s tax classification (VBAP/TAXM1) to u201C0u201D (Exempt) ?
    Thanks in Advance!
    Sonali.

    Hi Ramesh,
    I have put the code in the user exit, and I am able to set the tax classification indicator but I have a problem... Before setting the indicator I need to check for the Usage code of the line item (This code I am using instead of checking the Pricing condition) . I am able to read all the values of line item in VBAP structure in the user exit except for the first time this user exit is hit as soon as a line item is entered it is not picking up the Usage code. That field is blank.
    But if add another line item and go into the user exit I can see the previous line item Usage code in XVBPA table.
    Do you have any idea why usage code is missing in VBAP structure in the user exit or is there any other table or structure where I can get the usage code?
    Thanks in Advance!
    Sonali.

  • EXIT_SAPLEBND_002 of M06E0004 User exit to Reset Release Status if PO

    Hi All,
    I have implemented a user-exit EXIT_SAPLEBND_002 of M06E0004, as advised, which can reset/cancel the release status of a certain PO document when a certain field has been changed aside from the quantity and price fields.
    I would just like to ask if how woud the exit know if something in the document has been changed by the user if he goes to me22n? Basically, the requirement was that everytime a user changes the partially released PO in the header data and other fields aside from price and quantity, the release status should be reset to start all over again.
    I have this code, but this should only be ran if a partially released PO has been changed in most of its fields (header/item).
    DATA: wa_ekpo TYPE ekpo,
          wa_bekpo TYPE ekpo,
          lv_frgke TYPE ekko-frgke,
          tx_ekko TYPE char200,
          tx_ekbe TYPE char200,
          lv_frgzu TYPE ekko-frgzu.
    FIELD-SYMBOLS: <fs_ekko>  TYPE ekko.
    tx_ekko = '(SAPLMEPO)ekko'.
    ASSIGN (tx_ekko) TO <fs_ekko>.
    If <fs_ekko>-frgke = '1' AND
       <fs_ekko>-frgzu IS NOT INITIAL.
    <fs_ekko>-frgke = '2'.
    <fs_ekko>-frgzu = space.
    ENDIF.
    UNASSIGN <fs_ekko>.
    Kindly send some recommendations.
    Regards,
    RE

    Add this code in user exit exit_saplbend_002 .
    Code=> This code use to change release status on PO amount decrease and increase.
    ================================
    **** Start of changes for Release status change on PO amount decrease .
    E_CEKKO = I_CEKKO .
    DATA : wa_bekpo type BEKPO,
           wa_ekpo TYPE ekpo,
           WA_CEKKO TYPE CEKKO,
           w_reset(1) TYPE c VALUE 'X'.
    if sy-tcode eq 'ME22N' OR sy-tcode eq 'ME22'.
    WA_CEKKO = I_CEKKO .
    IMPORT WA_CEKKO = WA_CEKKO FROM MEMORY ID 'ZREL_COST'.
    IF SY-SUBRC NE 0.
      EXPORT WA_CEKKO = WA_CEKKO TO MEMORY ID 'ZREL_COST'.
    ENDIF.
    ENDIF.
    if ( sy-tcode eq 'ME22N' OR sy-tcode eq 'ME22' )
      and sy-ucomm eq 'MESAVE' or sy-ucomm eq 'MECHECKDOC'.
    *Import/Export the origninal values.
    *Check if the limit is passed.
    LOOP AT it_bekpo INTO wa_bekpo .
    SELECT SINGLE NETWR FROM ekpo INTO wa_ekpo-netwr WHERE ebeln eq wa_bekpo-ebeln and ebelp eq wa_bekpo-ebelp.
    IF SY-SUBRC EQ 0.
    IF wa_bekpo-netwr < wa_ekpo-netwr.
        w_reset = 'X'.
      endif.
    ENDIF.
    ENDLOOP.
    *IF limit passed - reset the value to high limit beyond tolerance.
    IF w_reset = 'X'.
    E_CEKKO-GNETW = WA_CEKKO-GNETW + 1000000.
    ENDIF.
    endif.
    **** End of changes for Release status change on PO amount decrease .

  • User exit to change user status in IQ01/02 after full installation EG31

    Hi Experts,
    In iq01 there are two fields 1 device status 2 user status . device status will be automatically changed (avlb to insl) by system  after full installation  but  i need to change the user status (AVLB, NTAV) in iq01.I have created one bdc for iq02 and that will be properly changing the staus if i run seperately  but when  i am calling this bdc in user exit(EDMDI001,EDMDI002,EDMDI003) this shows one error '
    device is already blocked bu user ---" reason being i have to use that device at the time of full installation and user exit that will change the staus also working on  the same device during full installaion .
    So Please resolve.
    Thanks in advance
    Edited by: dilipgupta on Jan 12, 2011 3:02 PM

    Hello
    dilipgupta
    try this:
    Exit Name           Description
    E07                 IS-U: Geräteinstallation und Anlagenstruktur
    EDMDI001            Kundeneigene Vorschlagswerte für Einbau, Ausbau, Wechsel
    EDMDI002            Kundeneigene Prüfungen für Einbau, Ausbau, Wechsel
    EDMDI003            Kundeneigene Daten zur Warenbewegung bei Ein-und Ausbau
    regards
    Chris

  • PO Item User Exit to set Blocked Stock

    Hallo,
    is there a User Exit on PO by which I can default Blocked Stock on field INSMK on the PO item level, during PO creation?
    Or is there any other why to achieve the same result?
    thank you in advance,
    Regards,
    marco

    Hi Friend,
    Check the BADI, ME_PROCESS_PO_CUST, it will solve your problem.  I had same kind of requirement, and i had imeplemented thsi BADI, and used PROCESS_ITEM method.
    Here you can pass default value 'S' (blocked stock) to EKPO structure.
    Regards
    Krishnendu

  • User exit to set  GR field in PO while creation

    Hi All,
    I have requirement where we have to tick check box for GR under delivery tab in line item details of Purchase order depending on some conditions.
    Say, if company code is 'X' and material group is 'Y' then only this check box should get ticked automatically before saving the PO.
    Can any buddy tell me which User Exit we can use to fulfill this requirement or how we can search for this user exit.
    Note: Problem is we want user exit which we tick this field before saving the PO.
    regards,
    Rahul

    Hi Rahul,
    I have the same requirement of yours in my project.
    could you please share me the solution, how you solved the same.
    You can update the forum
    Need to know the user exit to change unlimited check box in delivery tag
    Reward points assured.
    Thanks and Regards,
    Baburaj

  • User Exit to add user-defined selection critieria onto VL10G

    Does anyone know how to add user-defined selection criteria onto <b>VL10G</b> - Sales and purchase order display screen? OSS note <b>524424</b> states the userexit to transfer user-defined selection criteria from the selection screen to the report but no information on how to add the selection criteria on the screen. Is that something can be done through configuration or user-exit?
    Any advice or sample is greatly appreciated.

    I was in a hurry, I forgot to add, the user role specific selection screen assignment to VL10G is done at "delivery scenario" level
    The delivery scenarios that are predefined in the system can be found under Logistics Execution -> Outbound Process -> Goods Issue for Outbound Delivery -> Outbound Delivery -> Create -> Collective Processing of Documents for Shipment.
    You can make the following settings in a delivery scenario:
    <b>Selection screen</b>
    You can use the selection screen parameters to define the appearance of the selection screen used to select the delivery list.
    There are three combinations of selection parameters available that each include a different number of tabs.
    A long selection screen with no tabs
    A selection screen with three tabs
    A selection screen with six tabs
    The selection criteria is the same on all three screens in the standard system, it is simply arranged differently.
    This parameter also triggers scheduling of the report for processing the delivery list, with the same three available tab options.
    Customer enhancements are also possible in the LV50R_PREFZ1 program, which should be triggered from a delivery scenario.
    <b>User role</b>
    In the standard system, a predefined user role is assigned to each delivery scenario. If necessary, you can copy these user roles into your own user roles, make changes as required, and then assign them to a delivery scenario of your choice.
    If the user role assignment for a delivery scenario is changed in Customizing, the new settings are valid for all users that carry out this delivery scenario.

  • User Exit for display User fields in MM03

    Peace to All,
    I was able to place user fields in Purchase View of MM03.
    Question , how do I pull data from ZMARA table  of my master data so that I can display it on MM03.
    I will appreciate your help on this. Does anyone has a sample program to do so.
    Thanks in advance,
    Shilpa

    Hi Shilpa,
    Check the following user exit for MM03:
    MGA00001            Material Master (Industry): Checks and Enhancements 
    MGA00002            Material Master (Industry): Number Assignment       
    MGA00003            Material Master (Industry and Retail): Number Display.
    Hope this will help you....

  • Populate user exit Variable with User Authorizations using ABAP?

    Hi, Does anyone know of a way to populate a user exit variable (with ABAP) with the Authorization Values for a user running a report?  I am turning off authorizations for our InfoProvider using RSSM and want to populate a variable instead and use the variable as a filter.

    Hi Kenneth ,
    You need dynamic authorization in your report .This can be done at query runtime by using exit variable and writing cmod code for the same .
    This code will read authorization maintained at runtime of query in i_step = 1 and will pass input var values accordingly .
    For step by step information you can access this document .
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0f9f33c-0f17-2d10-d3a2-ae52ccd00780?quicklink=index&overridelayout=true
    Hope this will be helpful .
    Regards,
    Jaya Tiwari

  • User exit to check user variable values

    Hi All,
    We have a user exit variable based on CALYEAR (to have the  last year as default value).
    Therefor, the user could choose another value (year)  but not values later than 2 last years.
    For instance, in 2010, the default value is 2010, and the user could choose 2009 or both 2010 and 2009.
    How can we check the user variable entries, and how can we prevent the user to do this.
    In other words, could you please give us the step number when we have put this checking (1, 2 or 3), and
    If itu2019s possible the ABAP programme to do this.
    Thank you in advance.
    Radjech.

    hi Radjech
    you can reach that with the i_step = 3.
    The step 3 is used for validation. This step checks the variable value keyed in by the user to see if you allow him to proceed the query.
    Here is an example.
    This code it to be included after the i_step = 1 where you give the default value of the year.
    Anyway the I_step = 3 is called only once.
    The case endcase is declared for the whole coding in the user exit. So for example you have
    Case i_vnam
    if i_step = 1.
    your treatment for default value.
    Endif.
    Then you give in the below coding.
    if i_step = 3.
    read table i_var_range into s_var_range with key vnam = zvar_calyear. " here I assume you have defined your simple and unique variable with the same technical name.
    if sy-subrc = 0.
    l_queriedyear = l_s_var_range-low(4) " here you retrieve the value of the variable in a local variable.
    endif.
    l_currrentyear =sy-datum(4). " here you take the current date and put it in a variable.
    if l_currrentyear - l_queriedyear > 2. " here you make the comparison of the current system date and the year of the variable. if it is > to 2 then raise the validation
    raise wrong_value. " here you can use  a raise wrong value
    Endif.
    Endif.
    Or you can combine a message with a raise like follows
    therefore example should be
    if i_step = 3.
    read table i_t_var_range into l_s_var_range with key vnam = zvar_calyear.
    if sy-subrc = 0.
    l_queriedyear = l_s_var_range-low(4)
    endif.
    l_currrentyear =sy-datum(4).
    if l_currrentyear - l_queriedyear > 2.
    Call functinn 'RRMS_MESSAGE_HANDLING'
    Exporting
    I_class = 'RSBBS'
    I_TYPE = 'I'
    I_number = '000'
    I_MSGV1 = 'Year value to big'.
    Raise wrong_value.
    Endif.
    Endif.
    eNDCASE.
    Boujema

Maybe you are looking for

  • How to call a AM method with parameters from Managed Bean?

    Hi Everyone, I have a situation where I need to call AM method (setDefaultSubInv) from Managed bean, under Value change Listner method. Here is what I am doing, I have added AM method on to the page bindings, then in bean calling this Class[] paramTy

  • Combining Two Internal Tables??

    How do you combine two internal tables(not by append statement)...if any one knws please let me know..thanks in advance..

  • Videos only show the upper left-hand portion of the image when playing.

    When I attempt to play a video in Firefox (23.0) on my Mac, all I can see is the upper left-hand fourth of the video image. When I attempt to view the same video in Safari it works fine. The entire image is rendered. Mac OS X 10.8.4

  • Error loading large field with sql loader for 8i

    I want to load a large field (30K) to a database, where I use "long" datatype for it. But I can't because it loads hexadecimal characters, or it get stuck in a loop and does not load anything. I have tried using clob and long in the database and usin

  • Request for development team

    I really need a spelling checking and automated hyphenation in TLF components. I hope that squiggly will have these features on the to-do list. I have a number of projects that need these features. Are these important to enough to make them high on t