User exit for va01/va02 for std program

Hi ,
how are u all....
here is my problem...
i created a customized screen for va01.
this screen gets called after user saves the order.
in this screen i provided 4 options .
1. accept the order
2 change the order
3.reject the order
4 release unconfirmed.
i am calling this screen in user exit userexit_refresh_document.
before this am capturing the order number .
once user clicks on first radion button i.e on accept.
then i am passing the order number and removing the block using BAPI_salesorder_change.
but here bapi is passing the error message as plese enter the order number ....
my doubt is the userexit whr am calling the screen is correct ?
can we do the same using BDC ..?
if anybody working actions on user entry for va01 and va02..
please let me know whr and how u r writing the code... sooon
thx in advance...
regards
sanjay

what are u doing ? , u cannt call BAPI in the same user exit.
if user accepts the order --->then u have to unblock the order ?
then u have to activate Credit Control User exits ->SPRO->SD->System Modifications>Credit Control User exits.
regards
Peram

Similar Messages

  • User-exit in VA01/VA02 to add order item and condition price

    Hi experts,
       I have an urgent requirement to add an order item and pricing for VA01/VA02 when certain logic are met. Do you know a user-exit in VA01/VA02 to add sales order item and condition price for an order?
    I am currently using user-exit USEREXIT_SAVE_DOCUMENT_PREPARE but I can only add the required order item to xvbap but I also need to add a condition code and condition price for the added item (in xkomv). Your response are very much appreciated.
    Thanks in advance!

    Hi Leo,
      Check out few more exits:
    Exit Name           Description
    SDTRM001            Reschedule schedule lines without a new ATP check
    V45A0001            Determine alternative materials for product selection
    V45A0002            Predefine sold-to party in sales document
    V45A0003            Collector for customer function modulpool MV45A
    V45A0004            Copy packing proposal
    V45E0001            Update the purchase order from the sales order
    V45E0002            Data transfer in procurement elements (PRreq., assembly)
    V45L0001            SD component supplier processing (customer enhancements)
    V45P0001            SD customer function for cross-company code sales
    V45S0001            Update sales document from configuration
    V45S0003            MRP-relevance for incomplete configuration
    V45S0004            Effectivity type in sales order
    V45W0001            SD Service Management: Forward Contract Data to Item
    V46H0001            SD Customer functions for resource-related billing
    V60F0001            SD Billing plan (customer enhancement) diff. to billing plan
    SDAPO001            Activating Sourcing Subitem Quantity Propagation
    Reward points if this helps.
    Manish

  • User Exit/BADI name required for changing schedule lines (VA01 and VA02)

    Hi all,
    Please tell me an exit or badi for modifying VBEP date i.e. VBEP-EDATU which triggers for a change in any of the following fields:
    1. VBAK-KUNNR;   2. VBAK-VDATU  and   3. VBAP-WERKS
    Currently I tried using USEREXIT_MOVE_FIELD_TO_VBEP and FORM USEREXIT_CHECK_VBEP but nothing is giving me the results as desired.
    Pls help, points will b awarded for helpful ans.
    thanks
    Sangharsh

    Have a look at below link which gives details related to user exits in VA01/VA02.
    http://help.sap.com/saphelp_46c/helpdata/en/1c/f62c7dd435d1118b3f0060b03ca329/content.htm
    I hope it helps.
    Best Regards,
    Vibha
    *Please mark all the helpful answers

  • Menu exit for va01/va02/va03

    Hi All,
    can anyone gives menu-exit for va01/va02/va03. Please give me screen-shots how to implement menu exit for va01/va02.
    Thanks,
    Dinesh

    Hi Dinesh
    Sales order exit is MV45AFZZ. Depending on the data that you will manipulate, consider the exit area related (i.e changes to VBKD should be considered at USER_EXIT_MOVE_FIELD_TO_VBKD).
    Regards
    Gabriel

  • User exit in VA01 for changing the status profile

    Hi Experts,
    I want a user-exit in VA01 wherein i can change the status profile (Screen field name = JOSTD-STSMA ) based on some logic.
    Thanks in Advance:-
    Santosh

    Hi, Santhosh,
    You can use function module "STATUS_PROFILE_CHANGE"
    see the code,
    CALL FUNCTION 'STATUS_PROFILE_CHANGE'
      EXPORTING
        OBJNR                          =  XVBAK-OBJNR
        STSMA                          =  G_STATUS
      NO_CHECK                       =
    EXCEPTIONS
       OBJECT_NOT_FOUND               = 1
       NO_STSMA_CHANGE_POSSIBLE       = 2
       STSMA_NOT_FOUND                = 3
       OTHERS                         = 4
    where G_STATUS is your new status profile. It will update in your screen also.
    Hope this will help u.

  • User-Exit/Badi/Funtion Module for update Batch in transaction CORK

    Hi Gurus,
      when an IDoc 'Z' is executed to do a confirmation using the FM CO_RU_ORDER_CONFIRMATION, the values of transaction CORK are modified.
      I'd like to update the field batch number so when you enter a process order in transaction CORK and then you click on Components, you'll see the list of component and the batch number updated throught the custom IDoc.
      Does anyone knows any user-exit or Badi or maybe a FM to implement so when the first confirmation is done, the batch numbers are updated?
    Thanks in advance.

    Hi,
    You can copy and paste the Report code below. This will give the list of User Exits and BADIs available for the Transcation code. Very usefull program.
    Below code will give a list of BADIs for particular transaction.
    =============START
    *& Report ZNEGI16 *
    REPORT ZNEGI16 .
    TABLES : TSTC,
    TADIR,
    MODSAPT,
    MODACT,
    TRDIR,
    TFDIR,
    ENLFDIR,
    SXS_ATTRT ,
    TSTCT.
    DATA : JTAB LIKE TADIR OCCURS 0 WITH HEADER LINE.
    DATA : FIELD1(30).
    DATA : V_DEVCLASS LIKE TADIR-DEVCLASS.
    PARAMETERS : P_TCODE LIKE TSTC-TCODE,
    P_PGMNA LIKE TSTC-PGMNA .
    DATA wa_tadir type tadir.
    START-OF-SELECTION.
    IF NOT P_TCODE IS INITIAL.
    SELECT SINGLE * FROM TSTC WHERE TCODE EQ P_TCODE.
    ELSEIF NOT P_PGMNA IS INITIAL.
    TSTC-PGMNA = P_PGMNA.
    ENDIF.
    IF SY-SUBRC EQ 0.
    SELECT SINGLE * FROM TADIR
    WHERE PGMID = 'R3TR'
    AND OBJECT = 'PROG'
    AND OBJ_NAME = TSTC-PGMNA.
    MOVE : TADIR-DEVCLASS TO V_DEVCLASS.
    IF SY-SUBRC NE 0.
    SELECT SINGLE * FROM TRDIR
    WHERE NAME = TSTC-PGMNA.
    IF TRDIR-SUBC EQ 'F'.
    SELECT SINGLE * FROM TFDIR
    WHERE PNAME = TSTC-PGMNA.
    SELECT SINGLE * FROM ENLFDIR
    WHERE FUNCNAME = TFDIR-FUNCNAME.
    SELECT SINGLE * FROM TADIR
    WHERE PGMID = 'R3TR'
    AND OBJECT = 'FUGR'
    AND OBJ_NAME EQ ENLFDIR-AREA.
    MOVE : TADIR-DEVCLASS TO V_DEVCLASS.
    ENDIF.
    ENDIF.
    SELECT * FROM TADIR INTO TABLE JTAB
    WHERE PGMID = 'R3TR'
    AND OBJECT in ('SMOD', 'SXSD')
    AND DEVCLASS = V_DEVCLASS.
    SELECT SINGLE * FROM TSTCT
    WHERE SPRSL EQ SY-LANGU
    AND TCODE EQ P_TCODE.
    FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.
    WRITE:/(19) 'Transaction Code - ',
    20(20) P_TCODE,
    45(50) TSTCT-TTEXT.
    SKIP.
    IF NOT JTAB[] IS INITIAL.
    WRITE:/(105) SY-ULINE.
    FORMAT COLOR COL_HEADING INTENSIFIED ON.
    Sorting the internal Table
    sort jtab by OBJECT.
    data : wf_txt(60) type c,
    wf_smod type i ,
    wf_badi type i ,
    wf_object2(30) type C.
    clear : wf_smod, wf_badi , wf_object2.
    Get the total SMOD.
    LOOP AT JTAB into wa_tadir.
    at first.
    FORMAT COLOR COL_HEADING INTENSIFIED ON.
    WRITE:/1 SY-VLINE,
    2 'Enhancement/ Business Add-in',
    41 SY-VLINE ,
    42 'Description',
    105 SY-VLINE.
    WRITE:/(105) SY-ULINE.
    endat.
    clear wf_txt.
    at new object.
    if wa_tadir-object = 'SMOD'.
    wf_object2 = 'Enhancement' .
    elseif wa_tadir-object = 'SXSD'.
    wf_object2 = ' Business Add-in'.
    endif.
    FORMAT COLOR COL_GROUP INTENSIFIED ON.
    WRITE:/1 SY-VLINE,
    2 wf_object2,
    105 SY-VLINE.
    endat.
    case wa_tadir-object.
    when 'SMOD'.
    wf_smod = wf_smod + 1.
    SELECT SINGLE MODTEXT into wf_txt
    FROM MODSAPT
    WHERE SPRSL = SY-LANGU
    AND NAME = wa_tadir-OBJ_NAME.
    FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
    when 'SXSD'.
    For BADis
    wf_badi = wf_badi + 1 .
    select single TEXT into wf_txt
    from SXS_ATTRT
    where sprsl = sy-langu
    and EXIT_NAME = wa_tadir-OBJ_NAME.
    FORMAT COLOR COL_NORMAL INTENSIFIED ON.
    endcase.
    WRITE:/1 SY-VLINE,
    2 wa_tadir-OBJ_NAME hotspot on,
    41 SY-VLINE ,
    42 wf_txt,
    105 SY-VLINE.
    AT END OF object.
    write : /(105) sy-ULINE.
    ENDAT.
    ENDLOOP.
    WRITE:/(105) SY-ULINE.
    SKIP.
    FORMAT COLOR COL_TOTAL INTENSIFIED ON.
    WRITE:/ 'No.of Exits:' , wf_smod.
    WRITE:/ 'No.of BADis:' , wf_badi.
    ELSE.
    FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
    WRITE:/(105) 'No userexits or BADis exist'.
    ENDIF.
    ELSE.
    FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
    WRITE:/(105) 'Transaction does not exist'.
    ENDIF.
    AT LINE-SELECTION.
    data : wf_object type tadir-object.
    clear wf_object.
    GET CURSOR FIELD FIELD1.
    CHECK FIELD1(8) EQ 'WA_TADIR'.
    read table jtab with key obj_name = sy-lisel+1(20).
    move jtab-object to wf_object.
    case wf_object.
    when 'SMOD'.
    SET PARAMETER ID 'MON' FIELD SY-LISEL+1(10).
    CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.
    when 'SXSD'.
    SET PARAMETER ID 'EXN' FIELD SY-LISEL+1(20).
    CALL TRANSACTION 'SE18' AND SKIP FIRST SCREEN.
    endcase.
    ================END
    <b>Reward POints if this helps.
    Manish</b>

  • User exit at item level for billing block field default for VA41 or VA42

    Hi All,
    I want user exit at item level for contract (VA41or VA42) for the field Billing Block in the Billing document tab
    which has to populate with some default value.
    Which user exit i need to check.
    Regards
    Jai

    Hi,
    Use subroutine USEREXIT_FIELD_MODIFICATION in Include MV45AFZZ.
    Make sure this is for only tcodes VA41 and VA42 because this wil trigger for sales order also.
    Regards,
    Ashok.

  • User exit or a badi for checking the vendor email id in me22n on me29n

    hi all,
    can anybody suggest me a user exit or a badi  for checking the email id of the vendor in me21n or me22n or me29n.
    i.e. a user exit or a BADI which gets hit either at the time of creation or release of a purchase order.
    plz suggest me a solution its urgent.
    regards,
    santosh

    Hi Santosh,
    Have you looked BADI <b>ME_PROCESS_PO_CUST</b> or user exits <b>EXIT_SAPMM06E_016</b> / <b>EXIT_SAPMM06E_017</b>?
    Hope this will help.
    Regards,
    Ferry Lianto
    Please reward points if helpful.

  • User-exit on APO side for the deliveries that are coming from R/3

    Hi,
    When a delivery is created in ECC for a VMI customer, it creates an EI order in APO. We need to record some details of these orders on the APO side.   Can you please let me know the user exit/BADI that gets triggered when a delivery comes to APO through CIF which we can use for our requirement?
    Thanks in advance.

    Hi,
        You can use APOCF006(EXIT_/SAPAPO/SAPLCIF_PU_001) CIF User exit on APO side for CF_OBJECTTYPE = B(Delivery).
    I hope this will help you.
    Regards,
    Saurabh

  • USER-EXIT on SAVE event for IE01

    Hi,
    I need USER-EXIT on SAVE event for t-code IE01.
    EXIT IEQM0003 work only first time after pressing "SAVE".
    IF i press "SAVE"  second time equipment will be created.
    Edited by: andriy.hulyk on Jan 26, 2012 12:45 PM

    Here is my code:
    IF DATA_ILOA-TPLNR IS INITIAL.
      AUTHORITY-CHECK OBJECT 'ZZ_MC_FLC'
      ID 'ZZFLC' FIELD '*'.
      CASE SY-SUBRC.
        WHEN 0."SAP-ALL User
          EXIT."OK
        WHEN 12."User without restriction
          EXIT."OK
        WHEN OTHERS.
          AUTHORITY-CHECK OBJECT 'ZZ_MC_FLC'
          ID 'ZZFLC' FIELD '01'.
            CASE SY-SUBRC.
              WHEN 0."Create eq. only with FL for some work centers
                MESSAGE E250(ZPM) WITH 'test' RAISING POSTING_NOT_ALLOWED_EXT.
            ENDCASE.
        ENDCASE.
    ENDIF.
    If i press "SAVE" firs time it work great. But next pressing just create new equipment. My restriction does not work(

  • Different availability check for VA01 as for VA02

    Hello,
    For the availability check, during sales order creation (VA01), the system takes into account the requirements transferred to MRP. In some cases, an order cannot be confirmed, even if there is sufficient stock according to CO09.
    If I change the order (VA02) and run the availability check again, now the system can confirm the order.
    It seems that SAP performs a different type of availability check during VA01 as for VA02. Does anybody know where in SPRO I can customize the settings for this?

    Hi there,
    In VA01 system doesnot confirm the order even the stock are available because the available stocks are reserved for other orders which are logged in prior to your order.
    There is no separate availability check for VA01 & VA02.
    If at all items are confirmed in VA01, why again you have to do availability check in VA02?
    When you say that when you change the order in VA02, what changes you have made? Changes to any material data, customer master or delivery dates will again trigger availability check.
    In VA02 if you want to see the available quantity you have to click on display availability. Not Check Item availability. If you click on Check item availability, tehn system will again carry availability check.
    Regards,
    Sivanand

  • User-exit in va01(real time problem)

    Hi Experts,
    suppose that while creating a sales order i have 4 material in it.
    now what i want that if the price(kbetr) of any material is below 50 then it should give a error message that 'price for this material is below 50' and that sales order can't be created.but if we delete that material from the sales order or there is no material whose value is less then 50 then we can save it.
    Please help me on this issue.which user-exit should i use for it.
    it give be much better if any one1 can provide me the code do it plus the name of the user-exit.
    please help me out its very urgent.
    necessary points will be awarded,
    Thanxs In Advance,

    i m trying to check the price for some conditions for every material. if any of the price is less then 50 Rs the it should gimme an error message that the SO can't be  created.
    i am writing code in this user-exit
      FORM USEREXIT_SAVE_DOCUMENT_PREPARE 
    and the code is
    data val type i.
      SELECT KNUMH  FROM A501 INTO WA_ITEM-KNUMH WHERE MATNR = VBAP-MATNR
                                                       AND   WERKS = VBAP-WERKS
                                                       and kschl = 'ZCPR'
                                                       and AUART_SD = vbak-AUART
                                                       and kunwe = vbak-kunnr.
           SELECT SINGLE kschl KBETR FROM KONp INTO (kschl ,KBETR ) WHERE KNUMH = WA_ITEM-KNUMH.
    val = kbetr / 100.
      CASE KSCHL.
        WHEN 'ZCPR'.
        if ( val >= 50 ).
          message 'sales order created' type 'S'.
        else.
        message 'sales order cant be created' type 'E'.
          endif.
        ENDCASE.
                ENDSELECT.
    but this is only checking for the last material only.
    what change should i make that it will check all material in the sales order instead of the last one

  • USER EXIT/BADI for blocking pop up in VA01/VA02 for unloading point

    Hi,
    Please see details below with an example
    Following the below steps will execute the popup.
    1. VA01 (Sales Doc Create)
    Document type can be anything.This pop-up should be blocked for 'CRQ' and 'CR' types.
    2. Input “CRQ” or “CR” in the Order Type field and execute.
    3. Within the document:
    Input customer “194” as the Sold-to and Ship-to parties
    Input the PO Date field with today’s date
    Input material “475410m” and a Target Quantity of “1”
    Press Enter
    If the ship-to party has more than one unloading point  a pop up would show both values to choose one(these values come from KNVA-ABLAD).
    The code details are as follows:
    Program SAPMV45A--> Include  MV45AF0K_KUAGV_SELECT---->CALL FUNCTION 'VIEW_KUAGV'
    2)CALL FUNCTION 'VIEW_KUAGV' uses CALL FUNCTION 'SD_PARTNER_SINGLE_MODIFY' for ship-to(WE)
    3) IN FM 'SD_PARTNER_SINGLE_MODIFY'  the following sub-routine is called:
    *-- proceed inserting a partner -
    create a new xvbpa-segment
    PERFORM XVBPA_ENTRY_FILL USING LVF_VKORG LVF_VTWEG LVF_SPART
    LVF_VBELN
    fif_posnr
    LVF_KUNNR_NEW
    FIF_MANUAL_ADDRESS
    FIF_MANUAL_ADDRESS_ORIGIN
    FIF_PARVW FIF_PARGR
    LVF_PARTNER_USER
    FIF_KNREF_PARNR
    FIF_PRFRE
    FIF_BOKRE
    FIF_HISTUNR
    FIF_HZUOR
    FIF_NO_DIALOG
    LVT_XVBADR
    LVF_ACTION_TODO
    LVS_OLD_XVBPA-CNTPA
    CHANGING LVS_NEW_XVBPA
    LVT_XVBPA.
    4)This subroutine uses FM 'SD_PARTNER_ABLAD_SELECTION'  to determine unloading points for ship-to and also  brings up the pop-up using 'REUSE_ALV_POPUP_TO_SELECT'.
    partner is ship-to, so determinate unloading point
    CALL FUNCTION 'SD_PARTNER_ABLAD_SELECTION'
    EXPORTING
    FIF_KUNNR = LVS_XVBPA-KUNNR
    FIF_NO_DIALOG = LVF_NO_DIALOG
    IMPORTING
    FES_KNVA = LVS_KNVA
    EXCEPTIONS
    NO_UNLOADING_POINT = 1
    NO_SELECTION_DONE = 2
    OTHERS = 3.
    LVS_XVBPA-ABLAD = LVS_KNVA-ABLAD.
    Any help in this regard is highly appreciated.
    Sincere Regards,
    Sai.

    Have a look at below link which gives the details abt the user exits related to VA01/VA02.
    http://help.sap.com/saphelp_46c/helpdata/en/1c/f62c7dd435d1118b3f0060b03ca329/content.htm
    Best Regards,
    Vibha
    *Please mark all the helpful answers

  • User exit for VA01/VA02

    Hi, all.
    Please give me advise.
    1. We want to decide "Sales office"/"Sales group" in SO without "Sold to party".
    ( Partner func is additional value "Zx" )
    2. And, if "Sales office"/"Sales group" is changed by user, we want to use changing value.
    3. If "Zx" partner was changed, resetting the values.
    I think it needs using the user-exit.
    ( USEREXIT_MOVE_FIELD_TO_VBAK or USEREXIT_CHECK_VBAK)
    But we can't do "2.".
    Pls give me some idea.
    (Sorry my bad English...)

    HI,
    Thanks Agaiin.
    I need to change the Qty for a Material(slash code). Actually when a return delivery is created, by default Qty is assigned to the first slash code.
    What i need to do is i need to assign the Qty to the right slash code as it is in the original delivery. For this i need to get the user exit.
    I tried in another exit, there If i  modify the xlips structure for Qty, it doesn';t work. Actaully Qty is assigned to teh field LIPSD-g_LFIMG.
    So can you pls help me on this issue too.
    Thanks
    Ram
    Pls help.

  • Reg user exits exit_saplogdl_005 and exit_saplogsl_007 for va01 tcode

    Hi All,
    I have a requirement to add new fields to additional dataB fields for the transactions va01,va02 and all that we can do with screens 4462 of main screen 8459 and we can write the code in the user exit userexit_move_field_to_vbap in program MV45AFZZ. But in our requirement they also mentioned we have to write the code in the fun mod exits  "exit_saplogdl_005" and "exit_saplogsl_007"
    These exits I am able to find only in my version ECC6.O not in 4.7 and all and also I don't find any parameters for this function module exits. Can any body throw some idea how I can use of this fun mod exits.
    Thanks&Regards
    Mahesh

    Hi All,
    I have a requirement to add new fields to additional dataB fields for the transactions va01,va02 and all that we can do with screens 4462 of main screen 8459 and we can write the code in the user exit userexit_move_field_to_vbap in program MV45AFZZ. But in our requirement they also mentioned we have to write the code in the fun mod exits  "exit_saplogdl_005" and "exit_saplogsl_007"
    These exits I am able to find only in my version ECC6.O not in 4.7 and all and also I don't find any parameters for this function module exits. Can any body throw some idea how I can use of this fun mod exits.
    Thanks&Regards
    Mahesh

Maybe you are looking for

  • How do I install iLife 8 and what happens to all my old projects?

    I want to buy and install iLife 8 but as I have never upgraded to a new version before I don't know how you do this (apart from purchasing it of course). Step by step, how do you install the disc? What happens to all my existing and work in progress

  • Trouble Printing from a network printer

    I recently purchased a MacBook and I am having problems printing using the network printer. It's a HP Color LaserJet CM1017 (or 1015) and my MacBook connects to the printer yet never prints. In the queue it says "On hold authentication required" Plea

  • Late 2010 Unibody MacBook -- Resolution problems with external display...

    Hi Apple Community, I have a late 2010 white unibody which I've been using with my 30" LCD TV, both as a secondary monitor and in clamshell mode. I connect with an apple display to hdmi cable. I've been using this setup for a few months and it has al

  • PI removing blank spaces at the end of the lines in a plain text file

    Hi - I have an interface that transfers a file via FTP. I defined both the sender and receiver to transfer either Text or Binary but the interface removes every blank space I have after the last character. The file is a fixed lenght file. Example: Or

  • Setting the date and time on my Verve 450 answerin...

    I have set the time and date on all the handsets, but when we pick up a voicemail, the date and time on the message bears no relation to reality!  The instructions do not provide any advice on setting the date and time on the answering machine.