User Exits-Help Needed

Hi friends,
I need a small help.I am implementing a custom enhancement for Sales Orders.
For this,I am using the User Exit SAVE_DOCUMENT_PREPARE in the standard program MV45FZZ(Include in SAPMV45A).I wrote a small logic,that gets triggered each time a Sales Order is created or Changed through VA01 or VA02 respectively.
For <b>VA02</b> i.e., <b>change</b> my logic works pretty well.I am capturing the current Sales Order Number using <b>XVBAP-VBELN</b> and implementing my logic.
But while <b>creation</b> i.e., <b>VA01</b>,I am using the same logic and trying to capture current Sales Order through <b>XVBAP-VBELN</b>(not yet saved).
But,<b>XVBAP-VBELN</b> is blank when I am debugging.
Where does the Sales Order Number get saved,while it is being created i.e., before being saved.
Regards,
Imran.

check the value of <b>vbak-vbeln</b> in the subroutine <b>userexit_save_document</b>
Also make a note of the following
<b>USEREXIT_SAVE_DOCUMENT</b>
Use this user exit to fill user-specific statistics update tables.
The user exit is called up by the FORM routine BELEG-SICHERN before
the COMMIT command.
Note
If a standard field is changed, the field r185d-dataloss is set to
X. The system queries this indicator at the beginning of the safety
routine. This is why this indicator must also be set during the
maintenance of user-specific tables that are also to be saved.
<b>USEREXIT_SAVE_DOCUMENT_PREPARE</b>
Use this user exit to make certain changes or checks immediately
before saving a document. It is the last possibility for changing or
checking a document before posting.
The user exit is carried out at the beginning of the FORM routine
BELEG_SICHERN.

Similar Messages

  • Needs R/3 User-exit help when PO/PR created in Backend system

    Hi SRM/MM Experts,
    We are using ERP2005 and SRM 5.0 with classic scenario. Shopping cart converts the Purchase Requisition and Purchase Order in the backend system.
    R/3 system had a custom logic to blank out the Account assignment category, cost center information when particular material group(ZZZZ0001), plant(Z0001) and storage location(Z01) used in the PO/PR that are created by SRM SC. The custom logic is used in user-exit- EXIT_SAPLMEWP_002- INCLUDE ZXMEWU06 and
    EXIT_SAPLMEWQ_001-INCLUDE ZXMEWU04 of R/3 system. But now this custom functionality is not working. And I found out that when PO/PR is created by SRM’s SC, include- ZXMEWU06 & ZXMEWU04 are not being called.
    In which user-exit we should put custom logic in the R/3 system, so that it will be called for blanking out the Account assignment information, when SC is converted into PO/PR in the backend system
    Thank you!
    MP

    Disha,
    I figured out that we have to use user-exit:EXIT_SAPL2012_003 in R/3 system. Now here is what I am doing... If it is at non-stock material and it uses account assignment category-K and Cost Center-Z1000001, then I am blanking out the POITEM-ACCTASSCAT and POACCOUNT-DELETE_IND = 'X', but still it is not blanking out or deleting the account assignment information from PO.
    Please let me know if this is the correct BADI to use to blank out the account assignment information in PO created by SC(SRM 5.0) in ECC 6.0. If yes, what should I need to do to blank out the account assignment information.
    Any help is appreciated!
    Thanks!
    MP

  • User exit/ badi needed for planned order create/change,collective ATP check

    Dear All,
    I'm looking for a user exit/ badi which can be used for planned orders at the stage of
    mass collective availability check (COMAC tcode) update; or at some other relevant stages of mass update of planned orders.
    I need after collective availability check to perform the following:
    1) to copy date from "total comitment" field on header tab of planned order and paste it (replace old date) to order finish date on header screen
    then
    2) to start a scheduling.
    Very appreciate your help.
    Best Regards,
    Andrey
    Edited by: Andrey Kruglov on Apr 15, 2010 3:06 PM
    Edited by: Andrey Kruglov on Apr 15, 2010 3:07 PM

    Dear,
    Use the BAPI : BAPI_PLANNEDORDER_CHANGE
    Or use the function module MD_SET_ACTION_PLAF for Schedule planned order.
    and the transaction MDAC Execute action for planned order
    This function module includes the following actions:
    Explode BOM
    Explode BOM, check availability
    Check availability, only explode BOM in the case of a requirement
    Check availability, do not explode BOM
    Reset availability
    Change planned order data
    Schedule planned order
    Delete planned order
    Assign the key for the respective action control to the materials in the material master (MRP 4 view).
    Please refer this thread,
    Re: MDVP for collective orders
    Regards,
    R.Brahmankar

  • [Request] Special user-exit we need during creating purchase order

    Hi, Gurus!
    We need to make specific User-Exit during creating Purchase order.
    When user creates/change a PO document (ME21N/22N), SAP has to check the u2018CUSTOMERu2019 filed whether it is BLANK or NOT in Delivery Address tab at ITEM LEVEL.
    If there is no value in that field, system will automatically input right value with useru2019s business logic.
    Thatu2019s what we want to implement in the future.
    If you have any solution or recommendation for this, Please help us.
    I really appreciate your help in advance.
    Best Rgds;
    Ian

    For checking user exit - SMOD, you need to activate this exit via CMOD
    For Badi - SE18 to check & SE19 to implement
    Take the help of your abaper, give him / her your logic.
    Hope the above answers your query.
    Regards,
    Vivek

  • Free Goods Problem and User Exit if needed in Sales Order

    Hello All,
    The problem is related to Free Goods in Sales Order which is given with an example -
    We have maintained Free Goods ( T Code - VBN1) in inclusive scenario which is as follows -
    For 210 PAC (Pack) of Material A 18 PAC Free.
    Where 1 PAC = 20 BT (Bottle) and 20 PAC = 1 CV (Case Pack)
    In the material master of Material A the Base Unit Of Measurement (UOM) = PAC and Sales UOM = Blank so that we can use any conversion factor maintained for the material.
    The conversion factors maintained for Material A are as follows -
    1 BT = 1BT
    1 PAC = 20 BT
    1 CV = 20 PAC
    Now when we are raising sales order for 11 CV the free goods are not generated in the Sale Order.
    Again if we maintain the Sales UOM in CV and raise the sales order it is showing :
    10 CV as main item and 1 CV as Free which is wrong because in the conversion factor we have already maintained 1CV = 20 PAC , Whereas in the inclusive scenario it is given 11CV = 210 PAC and 210 PAC = 18 PAC is free.So in any case it is taking into account 2 more PACs.
    Please suggest what need to be done in this case in respect of User Exit or Source Code in ABAP if needed.
    Thanks & Regards
    Priyanka Mitra

    Hello Priyanka Mitra,
    We are facing a problem same as you.
    How did you solve this problem?
    We are very glad if you teach it concretely.
    Please advise your solution to us.
    Thanks.

  • User exit help..

    Hi All,
        UPF_VARIABLE_USER_EXIT is example for user exit for variable of type characteristic.  If variable type is attribute then is there any such example available?
        Also characteristic user exit variable "VALUE(ITO_CHANM) TYPE  UPC_YTO_CHA" is defined for import. Similar statement for "ITO_ATTR" is necessary, then what will be type for this.
        Thanks for your help.
    Regards,
    Shankar.

    Hello Shankar,
    For the "ITO_ATTR"  TYPE  UPC_YTO_ATTR
    you can find all the details of import and export parameters in the F1 help of exit variable.
    These are steps to find import and export parameters for exit function module.
    Step 1 : Take any Planning area ,double click on that area.
    Step 2 : go to the varibles tab ,and select one of your exit variable.
    step 3 : Double click on the exit variable ,place the cursor on the exit function module name check box  then press F1 ,then you will get details of  how many types of exit varibles we can create in the BPS,and what are the import and export parameters for exit function module.
    I hope this helps.....
    Thanks & Regards,
    Devi.
    Thanks for your help.
    Regards,
    Shankar.

  • 4.7 User exit help

    In 4.6b if you had to make a change in a user exit you found the exit, registered it and made your change. In 4.7 you have to put your change in a Z include and have it called by a function. I have put my code in the include but I cannot seem to get it called any suggestions

    You must activate the exit in CMOD/SMOD transactions.
    http://help.sap.com/saphelp_46c/helpdata/en/bf/ec079f5db911d295ae0000e82de14a/frameset.htm
    Regards,
    Rich Heilman

  • Problems with restricted users, urgent help needed

    Greetings,
    I represent a company called eChiron, a service desk company for several client companies.
    We have a client company that has bought between 100 to 200 cell phones, all Nokia 6233. They all run client PCs with windows XP SP2 and are all restricted users (mandatory).
    We've installed 2 nokia PC suites as pilot prior to mass deploying and have both failed to run correctly.
    They execute correctly if the user is changed to local admin (being that the method of instalation), but when reverting back to restricted user the application doesn't work correctly.
    It starts and (apparently) conects to the mobile phone trough bluetooth interface. In reality the conectivity is nonexistent (we've tested by turning off the mobile phone...) and the connection log reports "conection failed".
    As i mentioned before, it's not an hardware fault since it all works correctly in admin mode.
    Thanks in advance for any possible help,
    J
    Edit: the installed version is the latest (17/december) and the language is portuguese.
    Message Edited by echiron on 17-Dec-2007 02:27 PM

    This has always been a limitation in PC suite, I assume you've tried the latest version 6.85?
    You may want to take a look at the link below, it may suit your needs better.
    http://www.businesssoftware.nokia.com/pc_suite_downloads.php

  • PHP User Registration Help Needed

    Hello,
    I have a page user_registration.php that I've created in DW8
    that has a web form prompting the user to create their profile to
    gain access to the site. The web form fields are user name,
    password, email address, and registration type.
    The registration type is a list/menu that has 3 options.
    Based on the option chosen, I need the user's login credentials
    submitted to the MySQL database and for the user to be taken to the
    corresponding URL (ie. regpage1.php, regpage2.php or regpage3.php).
    I'm a newbie to DW8 and PHP and need some assistance on how
    to accomplish this. Thanks, in advance, for your help.

    Sid Childers wrote:
    > The registration type is a list/menu that has 3 options.
    Based on the option
    > chosen, I need the user's login credentials submitted to
    the MySQL database and
    > for the user to be taken to the corresponding URL (ie.
    regpage1.php,
    > regpage2.php or regpage3.php).
    Use the Log In User server behavior. Set "If login succeeds,
    go to" to
    the page that requires the higher login credentials. Set
    "Restrict
    access based on" to "Username, password, and access level".
    On the page that requires the higher credentials, set "If
    access denied,
    go to" to the page that requires the lower credentials.
    David Powers
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    Author, "Foundation PHP 5 for Flash" (friends of ED)
    http://foundationphp.com/

  • User-exit/BADI needed for SD related FI documents

    Hi ,
    does anyone know of a function-exit/BADI that is executed in FI document creation (SD related) at a point in the logic after EXIT_SAPLV60B_008?  I need to be able to manipulate internal table XACCIT after the standard FI item aggregation has occured but this exit is excuted prior to the aggregation.
    Many thanks,
    Annie

    thanks Brad - I decided to stick with the one I had and use alternative logic within it - seems to be working ok.
    thanks again, annie

  • Custom Exit  help needed

    HI ,
    I have developed a custom exit , to restrict based on USER who logs in and gets detais for him from my two ODS in the report
    the code is some thing like this
    FOR I_STEP = 2 .
    select zempno from /bic/azhrpe00100 into table itab1 where /bic/zspnm = sy-uname.
    select zempno from /bic/azhrpe00100 into table itab2 where /bic/zspnm = sy-uname.
    CLEAR L_S_RANGE.
    loop at itab1 into temp_zempno1.
    L_S_RANGE-LOW = temp_zempno1.
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'EQ'.
    APPEND L_S_RANGE TO E_T_RANGE.
    EXIT.
    ENDLOOP.
    CLEAR L_S_RANGE.
    loop at itab2 into temp_zempno2.
    L_S_RANGE-LOW = temp_zempno2.
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'EQ'.
    APPEND L_S_RANGE TO E_T_RANGE.
    EXIT.
    ENDLOOP.
    SORT E_T_RANGE.
    DELETE ADJACENT DUPLICATES FROM E_T_RANGE.
    ENDIF.
    this is my code , when i debug i can see E_T_RANGE getting the values , for the STEP 2 , but i am getting this error
    <b>Error: Error for variable in customer enhancement ZEMPLO</b>

    Hi,
    For what variable? (Remember => NOT ready for Input! and mandatory input)
    a.) encapsulate it by
    FOR I_STEP = 2.
    CASE I_VNAM.
    WHEN <Your Variable>.
    Your Coding
    endcase.
    b.) also assign a high value.
    L_S_RANGE-LOW = temp_zempno1.
    L_S_RANGE-HIGH = temp_zempno1. "as well as for zempno2.
    L_S_RANGE-SIGN = 'I'.
    hth
    cheers
    sven

  • Exception occuring during Application exit.Help needed fast

    The Error attached is printed on the console when I exit my Application.My Application is Swing application which reads two or more xml schemas at a time from a local directory and displays the schemas in Tree like structure using JTree,so that mapping can be done using java drag-n-drop apis.
    But during System.exit(1) (on Application Close) the exception Attached gets printed.I have invoked Syste.gc() to enforce garbage collection but to no effect.Please help to solve this problem.
    Thanks
    Pallav
    --ERROR printed on console
    An unexpected exception has been detected in native code outside the VM.
    Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x0
    Function name=(N/A)
    Library=(N/A)
    NOTE: We are unable to locate the function name symbol for the error
    just occurred. Please refer to release documentation for possible
    reason and solutions.
    Current Java thread:
         at sun.awt.windows.WToolkit.eventLoop(Native Method)
         at sun.awt.windows.WToolkit.run(WToolkit.java:183)
         at java.lang.Thread.run(Thread.java:479)
    Dynamic libraries:
    0x00400000 - 0x00405000      S:\software\jdk1.3.1_06\bin\java.exe
    0x77F80000 - 0x77FF9000      C:\WINNT\System32\ntdll.dll
    0x77DB0000 - 0x77E0A000      C:\WINNT\system32\ADVAPI32.dll
    0x77E80000 - 0x77F36000      C:\WINNT\system32\KERNEL32.DLL
    0x77D40000 - 0x77DAF000      C:\WINNT\system32\RPCRT4.DLL
    0x78000000 - 0x78046000      C:\WINNT\system32\MSVCRT.dll
    0x6D420000 - 0x6D4F9000      S:\software\jdk1.3.1_06\jre\bin\hotspot\jvm.dll
    0x77E10000 - 0x77E75000      C:\WINNT\system32\USER32.dll
    0x77F40000 - 0x77F7C000      C:\WINNT\system32\GDI32.DLL
    0x77570000 - 0x775A0000      C:\WINNT\System32\WINMM.dll
    0x6D220000 - 0x6D227000      S:\software\jdk1.3.1_06\jre\bin\hpi.dll
    0x6D3B0000 - 0x6D3BD000      S:\software\jdk1.3.1_06\jre\bin\verify.dll
    0x6D250000 - 0x6D266000      S:\software\jdk1.3.1_06\jre\bin\java.dll
    0x6D3C0000 - 0x6D3CD000      S:\software\jdk1.3.1_06\jre\bin\zip.dll
    0x6D020000 - 0x6D12A000      S:\software\jdk1.3.1_06\jre\bin\awt.dll
    0x77800000 - 0x7781D000      C:\WINNT\System32\WINSPOOL.DRV
    0x75E60000 - 0x75E7A000      C:\WINNT\System32\IMM32.dll
    0x77A50000 - 0x77B45000      C:\WINNT\system32\ole32.dll
    0x6D1E0000 - 0x6D21B000      S:\software\jdk1.3.1_06\jre\bin\fontmanager.dll
    0x10000000 - 0x10007000      D:\Program Files\Yahoo!\Messenger\idle.dll
    0x72800000 - 0x72846000      C:\WINNT\System32\ddraw.dll
    0x728A0000 - 0x728A6000      C:\WINNT\System32\DCIMAN32.dll
    0x0D4F0000 - 0x0D503000      D:\PROGRA~1\INCRED~1\bin\ImHook.dll
    0x779B0000 - 0x77A45000      C:\WINNT\system32\OLEAUT32.dll
    0x6D340000 - 0x6D348000      S:\software\jdk1.3.1_06\jre\bin\net.dll
    0x75050000 - 0x75058000      C:\WINNT\System32\WSOCK32.dll
    0x75030000 - 0x75044000      C:\WINNT\System32\WS2_32.DLL
    0x75020000 - 0x75028000      C:\WINNT\System32\WS2HELP.DLL
    0x77840000 - 0x7784C000      C:\WINNT\System32\rnr20.dll
    0x77980000 - 0x779A4000      C:\WINNT\System32\DNSAPI.DLL
    0x777E0000 - 0x777E8000      C:\WINNT\System32\winrnr.dll
    0x77950000 - 0x77979000      C:\WINNT\system32\WLDAP32.DLL
    0x777F0000 - 0x777F5000      C:\WINNT\System32\rasadhlp.dll
    0x77830000 - 0x7783E000      C:\WINNT\System32\RTUTILS.DLL
    0x74FD0000 - 0x74FE1000      C:\WINNT\system32\msafd.dll
    0x75010000 - 0x75017000      C:\WINNT\System32\wshtcpip.dll
    0x6D2C0000 - 0x6D2DB000      S:\software\jdk1.3.1_06\jre\bin\jpeg.dll
    0x77920000 - 0x77942000      C:\WINNT\system32\imagehlp.dll
    0x72A00000 - 0x72A2D000      C:\WINNT\system32\DBGHELP.dll
    0x690A0000 - 0x690AB000      C:\WINNT\System32\PSAPI.DLL
    Local Time = Thu May 29 17:43:20 2003
    Elapsed Time = 396
    # The exception above was detected in native code outside the VM
    # Java VM: Java HotSpot(TM) Client VM (1.3.1_06-b01 mixed mode)

    to bbritta,
    Sorry it did not help.By the way i am using windows 2000 Server.Application Server is Weblogic 7.0.No exception is shown in the Weblogic console also.
    There is no problem in drawing of maps.Drag-n-Drop is working perfectly.But during application exit this errors occuring.
    Thanks for your attempt.
    Pallav

  • User Authentication Help needs

    I want to give user login, where user/pass are stored in database table. But as i am using frame. So after login i am saving user information into session. But i see if i click on a menu in another frame, then session attributes relating to user lost, though i m not closing the browser. I see for each frame it creates separate session. In that case how i can maintain user information available throught the session?

    Just saw this link in another forum , thought it cud help you
    http://sqlblogcasts.com/blogs/jonsayce/archive/2007/11/06/Browsers_2C00_-processes_2C00_-cookies-and-session-state.aspx

  • New mac user, mail help needed please

    I have 2 mail accounts synched in my mail. My comcast account is operating fine. My mac account I am not receiving messages. I can send them, but I do not receive. I have a small circle with a small pie slice grayed out, beside my inbox which says messages stored on server. I have used the connection doctor and everything appears ok. I do get an error message when I close mail which says;
    _*Some actions taken while the account “[email protected]” was offline could not be completed online.*_
    _*Mail has undone actions on some messages so that you can redo the actions while online.*_
    _*Additional information: Operation could not be completed. (MFMessageErrorDomain error 1028.)*_
    Any help would be appreciated.
    thanks
    jeff

    Sorry. It was worth asking.
    How about this:
    In Mail preferences, click Accounts, select the dotMac account, click Advanced and un-check "Enable this account." Then quit Mail and launch it again, and go back and enable the dotMac account.
    In Mailbox Behaviors, un-check "Store sent messages on server" and "Store junk messages on server," and also "Store draft messages on server," if any are checked.
    Then quit Mail and re-launch.
    Check your dotMac mailbox by logging onto .Mac and make sure you have plenty of free disk space assigned to your mail account.
    Worth a try.

  • Vl31n & Vl32n user-exits checking to identify which one helps...how to do

    I have to make sure that the manufacturing date given while batch split has to be updated in the document details.
    Basically I have found 17user exits under vl31n tcode...
    except one user-exit all the other user-exits are not activated.
    I am not expert in user-exits.. I want to activate all the user exits and test any user-exits helps me.
    For that what I need to do initially .  Could you please help me ..?
    I need to create project in cmod ?
    Please guide me- thanks in advance.

    Hi,
    In VL31 program put break point at all occurrances of function module CALL-CUTOMER .Each CALL-CUSTOMER refers to an enahancement component in a  user exit. When transaction is running it goes into each of this CALL-CUSTOMER function module. Check whether your required functionality can be achieved in that exit. After finding correct user exit, create project for that and proceed.
    Aswarth

Maybe you are looking for

  • Accidentally put documents in Applications folder, can't get them out

    In Finder I accidentally moved a folder with two Word documents from the Desktop to the Applications folder. I can't move them back out. When I try, I get pointers to the documents in the Applications folder. I can delete the folder, but then the doc

  • Imbedding text in a pdf

    How do you imbed text in a pdf created in Aperture 3 for a photo book?

  • Preparing audio for CD burning

    I think that the information here applies to all versions of Audition, including CS5.5, because it relates to using an external burner. There may be small variations between different versions, but I will check this out and modify the document later,

  • ExportPDF won't convert my PDF

    "export wegen Sicherheitseinstellungen nicht möglich" was muss ich wo ändern?

  • Cant get into app world

    Since I got my new phone, i have never been able to get into app world do any downloads.   IIt keeps on coming up with: "An error has occurred.  Pls try again later" PLs help.