Doubt in include MV45AFZZ

Hi,
Can I use a subroutine(perform) with in the USEREXIT_MOVE_FIELD_TO_VBKD .
I have repeated lengthy code, which needs to call atleast 2 times. So wanted include the code in Perform.
Can I include form, endform with in the include MV45AFZZ.
Pls suggest.
Rgs,
Priya

Hi,
1. you can write the subroutine in  side this include
2.   you can  also write a separate program and right the required logic in side this in the preform function.
      and then call this perform in the  USEREXIT_MOVE_FIELD_TO_VBKD.
     PERFORM subroutine name IN PROGRAM Program name using required table using and changing parameters.

Similar Messages

  • Doubt in Include MV45AFZZ - form userexit_move_field_to_vbap

    Hello ,
    When user enters material at line item in VA01 , to throw a pop-up mentioning texts .
    I have added a include in form userexit_move_field_to_vbap in which i declared a internal table containing material number and item number .
    First i import this table from memory so nothing was there and it throws a popup after checks .
    And then export the same table .
    Now suppose the user enters again the same material and line item no popup will come .
    Problem : Suppose the user doesnt save the order and come out , the record remains in the exported table and doesnt display popup .
    Please help .

    When the user exits an external session (/i in the command field), the corresponding ABAP memory is automatically initialized or released.
    IMPORT/EXPORT to memory id uses ABAP memory.So, when user comes out of the transaction screen without saving, the data in the internal table will wipe out.
    Problem : Suppose the user doesnt save the order and come out , the record remains in the exported table and doesnt display popup .
    I think u won't have this problem.
    [email protected]

  • Help needed in Form userexit_save_document_prepare include MV45AFZZ

    Hi Experts,
    I need to check the values entered in table control under sales tab in VA01.
    If the item category for a material is 'TANN' it should save if not it should not save and display an error message and then it should alow the user to edit the table control values. 
    how do i achieve it in Form userexit_save_document_prepare include MV45AFZZ.
    this is what I have done. kindly check the logic and help me further.
    case sy-ucomm.
    when 'SICH'.          " On Save action
    if vbak-vtweg eq 'HA'.  " Check Distribution channel
      flg_dh = 'X'.         " Sets if DC is 'HA'.
    endif.
    if flg_dh eq 'X'.
      if vbap-pstyv eq 'TANN'.    " Check item category
        flg_itmc = 'X'.            " Set if item cat is 'TANN'.
      else.
      message 'SO could not be created Please enter brokerage material' type 'E'.
      endif.

    Hi,
    Please use the following:
    when 'SICH'.          " On Save action
    if vbak-vtweg eq 'HA'.  " Check Distribution channel
      flg_dh = 'X'.         " Sets if DC is 'HA'.
    endif.
    if flg_dh eq 'X'.
      if vbap-pstyv eq 'TANN'.    " Check item category
        flg_itmc = 'X'.            " Set if item cat is 'TANN'.
      else.
      message 'SO could not be created Please enter brokerage material' type 'E' display like 'E'.
      endif.
    endif.

  • ABAP calculating in Include MV45AFZZ

    Hej.
    I am experiencing strange things with this bit of code.  This code is taking place in FORM userexit_save_document_prepare in include MV45AFZZ.
    And the result of the calculation is wrong, when I take the code and try it out in a new program, then i get a different results.
    Here is the example.
    xkomv-KWERT = 3.5
    xkomv-KUMNE = 1000.
    xkomv-KUMZA = 1000.
    The result in the l_pris_pr_kg is : 1.8272945598830532E+01 But should be : 1.8272945598830531E-01
      DATA: BEGIN OF xpreis OCCURS 20,
              posnr TYPE kposn,
              preis TYPE bapre,
      DATA: END OF xpreis.
      DATA: l_pris_pr_kg TYPE f.
      LOOP AT xkomv WHERE kschl = 'ZMKP'.   "
        xpreis-posnr = xkomv-kposn.
        l_pris_pr_kg = ( xkomv-KWERT * xkomv-KUMNE ) / xkomv-KUMZA.
         xpreis-preis = l_pris_pr_kg.
        APPEND xpreis.
      ENDLOOP.
    I have also tryed to put this into a STRING where in the Include MV45AFZZ I get the result
    String = 18,
    but in my test program i get the result
    String = 0.18272945598831  (Which is correct).
    So it seems that in this include I cannot get this to work correctly.
    Is there anyone that has experienced something similiar, all help would be appreciated.
    Thanks Gisli

    Hi Ankur,
    The problem lokks similar But, MV45AFZZ is a Standard include,
    No Fixed point Arthematic Available,,,
    Hi Gisli,
    Try to divide i_pris_pr_kg by 100... Hope this could solve your problem...
    Thanks & regards,
    Dileep .C

  • Include MV45AFZZ

    I am new in ABAP.
    And I'll want to move some fields of a contract (vbak tcode va41) to a repair order (vbap tcode va01).
    I think that I founded a User Exit (include mv45afzz) to

    May This would be Handy in your case.I found few BADi for VA01,but they are yet not released for customer.
    Anyways you can also find BADi with the help of below Blog.
    How to search for BAdIs? (Trace it)

  • Unable to add code in USEREXIT_SAVE_DOCUMENT_PREPARE in include MV45AFZZ

    Hi Experts,
    I need to add some custom codes in USEREXIT_SAVE_DOCUMENT_PREPARE
    -> I opened the include program MV45AFZZ in display mode
    -> Edit -> Enhancement operations -> Show implicit enhancement operations.
    On the status bar it displays an information "Creating of enhancement supported only for line length > 72" 
    inside form USEREXIT_SAVE_DOCUMENT_PREPARE I right clicked -> selected enhancement implementations -> create.
    and now I get the same message On the status bar "Creating of enhancement supported only for line length > 72"  .
    how do I add a piece of code here.
    I can't type in under USEREXIT_SAVE_DOCUMENT_PREPARE.
    Give a solutions experts.
    Regards,
    Ranjith N

    Hi ,
    I believe we need not use the enhancement framework in MV45AFZZ
    Go to SE38 -> MV45AFZZ -> change mode
    Keep the mouse on the user exit USEREXIT_SAVE_DOCUMENT_PREPARE
    On the tool bar click on "Insert" icon ->icon description: Insert Line Area
    ControlShiftF8....
    An editable area will be displayed with a
    *{   INSERT         &$&$&$&$                                          1
    *---> Write code here
    *}   INSERT
    Save and activate the code
    Hope it helps
    Regards
    Byju

  • Added code for VA01 transaction ----in the include MV45AFZZ

    Hi All,
    I have added the code for pop-up
    if the quantity is greter than 20000 then we need to give the confirm pop-up.
    for that i have added code like this.
    When we clik on YES it will save the order.
    suppose if i clik on NO then i need to change the quantiy value.
    Whats needs to be doing for this.
    Please help me on this.
    IF ( vbak-vkorg = 'CA01' OR vbak-vkorg = 'CA02' OR
           vbak-vkorg = 'CA03' ).
        IF vbak-netwr > '50000.00'.  "Comparing quatity value
          w_txt = 'Order Quantity exceeded 50000 CAD. Please confirm'.
          w_txt1 = 'Order Quantity Check'.
           MESSAGE w901(zmsg1) WITH '50,000.00 CAD'.
          CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
               EXPORTING
                   defaultoption  = 'Y'
                    textline1      = w_txt
                    TEXTLINE2      = ' '
                    titel          = w_txt1
                    START_COLUMN   = 25
                    START_ROW      = 6
                   cancel_display = ' '
              IMPORTING
                   answer         = w_ans.
          CASE w_ans.
            WHEN 'J'.  "<b>This is for COnfirm means Yes</b>
               CONTINUE.
            WHEN 'N'.  "<b>This is for NO</b>
                SET SCREEN 4008.
               CALL SCREEN  4008.
                LEAVE TO SCREEN 4008.
    Thanks
    Sriman.

    Hi,
    I assume that you are writing this code in "<b>USEREXIT_SAVE_DOCUMENT_PREPARE</b>". If not that first thing you do is move your code here.
    The next thing is modify your code like this
    IF ( vbak-vkorg = 'CA01' OR vbak-vkorg = 'CA02' OR
         vbak-vkorg = 'CA03' ).
      DATA: lv_screenno TYPE syst-dynnr.
      IF vbak-netwr > '50000.00'.
        w_txt  = 'Order Quantity exceeded 50000 CAD. Please confirm'.
        w_txt1 = 'Order Quantity Check'.
        CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
             EXPORTING
                  defaultoption  = 'Y'
                  textline1      = w_txt
                  titel          = w_txt1
                  cancel_display = ' '
             IMPORTING
                  answer         = w_ans.
        CASE w_ans.
          WHEN 'J'. "This is for COnfirm means Yes
          WHEN 'N'. "This is for NO
    *        SET SCREEN 4008.        "Remove this line
    *        LEAVE TO SCREEN 4008.   "Remove this line
    *" No need to define variable FCODE again,
    *" it is alreay define in MV45ACOM
            fcode = 'ENT1'.   "sy-ucomm.  Add this line
            lv_screenno = sy-dynnr.       "Add this line
            LEAVE TO SCREEN lv_screenno.  "Add this line
        ENDCASE.
      ENDIF.
    ENDIF.
    Let me know if you have any question.
    Regards,
    RS

  • How to add include in MV45AFZZ ??

    Hi,
    In ECC 6.0, I need to add code in the user exit
    FORM USEREXIT_SAVE_DOCUMENT
    ENDFORM.
    How do I do that ? Should I have to implement the implicit enhancement point present at this spot in the include MV45AFZZ ? Or any other way ?
    I just need to add an INCLUDE statement inside this FORM. Can anyone give the exact steps ?
    thks

    Hello,
    If this form is not already active, you need to create a project and add the enhancement to the project and activate. Please note that unless you assign the enhancement and activate the project, the code will not take effect.
    You can add the include statement within this enhancement.
    Double click on the include statement and the system will take you to the editor where you can put your code for the include.
    Whenever the user clicks the save button, your code will hit, you can also check by having a break point in the code you put in the include.
    cheers,
    Sushil Joshi

  • I have include file doubt

    Hi Everybody,
    I have a doubt for include file.
    Here is the doubt,
    <!-#include file="test.html"->
    What is the working functionality the above code.
    Please tell me, if any one know the answer

    what include you are talking about
    [Include Directive|http://java.sun.com/products/jsp/tags/11/syntaxref11.fm6.html]
    or
    [<jsp:include>|http://java.sun.com/products/jsp/tags/11/syntaxref1112.html]

  • To Find Include for Enhancement for Particular Transaction

    Hi Friends,
    Could You Plz assist me...
    How to find out the User Exit for Particular Transaction.
    Like for ME23N, we have a Include RV64A701     OR       for VA01, we have the include MV45AFZZ and so on for every Transaction, which we believe as the User Exits.
    Plz let me know, How to find out these Includes apart knowing from Configuration Part.
    Thanks Alot

    Hi,
    1. In the transaction go to : system->status-> <PROG. NAME>
    2. after getting the program name go to SE37 , type EXIT<PROG NAME> and press F4 to get the list of function exits available.
    once you get the exit you should also be able to find the include name using the where used list, just select the exit and click where used list.
    rgds,
    venu.

  • Where is INCLUDE KOMKZ for adding field to Free Goods Determination ?

    http://help.sap.com/saphelp_46c/helpdata/en/0e/9e466f0e18d311ae620060b03c9bbe/content.htm
    This page is the info in SPRO for adding a field for Free Goods Determination.
    New fields for free goods determination are added in the following INCLUDES:
    Header data in KOMKZ (INCLUDE in KOMK, KOMG)
    Item data in KOMPZ (INCLUDE in KOMP, KOMG)
    I checked and the struture KOMKZ doesnt exist, only a data element exists. So... I was wondering if it´s a error in SAP Documentation.
    When u add the field in that include it will be in KOMK, I allready added a field for Pricing determination...in INCLUDE KOMKAZ, so I add also the field for Free Good in that structure...but it doesnt work, I know that in the end is just a field in KOMK, but perhaps there is some kind of validation... because Pricing determination works, but Free Goods doesn´t and I think that is because the field is in the wrong Include Structure.
    Some1 could give me a hand with this ?
    Thx

    Hi Rodrigo..
    As mentioned the include is KOMKAZ and not KOMKZ.. Just wanted to check if code has been written in the user exits to populate that fields..
    Ex:
    FORM USEREXIT_PRICING_PREPARE_TKOMK in include MV45AFZZ .
    It worked for me.
    Best Regards,
    Pradeep.

  • INCLUDE - Statement is not accessible.  URGENT.

    II am making change to user exit in INCLUDE MV45AFZZ.
    I just put an if condition in the INCLUDE ztest_so.
    It is giving following ERROR (RED) when I check the syntax.
    Include ZTEST_SO
    Statement is not accessible.
    FORM userexit_move_field_to_vbak.
    Include ztest_so
    Endform.
    *&  Include           ZTEST_SO
    if sy-uname eq 'TRAIN014'             
    endif.
    Please help.

    You created the include alright. But there is no call to the include (Perform statement) from any program, hence include cannot be accessed.
    MV45AFZZ is standard SAP User Exit where all Forms are being called at specified points in standard SAP code.
    Iam not sure/not tried but if you create your new Form you will have to modify SAP code to make a call to this FORM, which is not recommended.
    The best solution is to use the available Forms and put your code in the one that is being called at the right place for you to be able to use it.

  • How to distinguish the ABAP Code in include program into different TRs

    Hello Friends,
      In our current project, two teams are working on the developments.  One team is for LES related developements and another team is for billing related developments.  As part of developments, same programs are sharing by two teams, example -
    Include - MV45AFZZ, the userexits in include are using by both the teams for their developments
    Now the issue was, since the same program is using by both the teams, and during program activation , system automatically includes the code in both the team TRs.  This was causing issue while testing and transport to other testing systems, since billing project is going live in next year and LES in coming november
    Hence, we need to understand how we can differentiate the code which should not impact with other TRs.
    Many thanks for your inputs
    Best Regards,
    Goutham

    Thanks all for the quick reply..
    I would like to brief more clear...
    In current project, Team 1 is working for Logistics developments, Team 2 is for Billing developments.  As part of project plan, Logistics is going live this november
    When two teams are working on the same include, Team 1 is activated the changes then the task is updated in their TR, later when Team 2 has made changes in the same inlcude then the task was includeded in their TR.    Now the problem facing was, Team 2 has developed statements like COMMIT  WAIT WORK  and also BAPI call etc... and these statements are causing performance issues and some other problems......
    Recently Logistics related TRs are moved to testing system for testing, in that all the development TRs are moved into testing system and also code related to Billing project (Team2)  as well.... when we cross check the reason then it was identified that the same include is using by both the teams for the development.    Now we need distinguish the code specific to team whcih should not impact other...
    Hope my explanation clear the criticality of the problem
    Thanks
    Best Regards,
    Goutham

  • How to work on the user PBO Include MV45AOZZ.

    Hello Experts,
    The user PBO Include MV45AOZZ.
    Will this Include MV45AOZZ trigger on VA01. If yes when is this triggered.
    I need to read the values from the table control on sales tab in VA01.
    eg item, material, ord quan, item cat etc.
    after I click on button save.
    Will this include MV45AOZZ help me to do this ?
    Please help.
    Regards,
    Ranjith N

    Hi
    you can use include MV45AFZZ  for the same purpose. you  can use below form
    FORM USEREXIT_SAVE_DOCUMENT_PREPARE.
    ENDFORM.
    this form triggers before saving of Sales Document. Here also you can read sales order item data
    in table from internal table XVBAP.
    Hope This Will Help you.
    Regards,
    Shyam.
    *eject

  • MV45AFZZ Enhancement Not Working after Transport

    Hi Experts
    As part of a business requirement for additional checks when saving a sales order I have implemented an enhancement in the form USEREXIT_SAVE_DOCUMENT_PREPARE of the include MV45AFZZ of SAPMV45A.  This was done via SE38 and switching to enhancement mode and then creating an implicit enhancement.  I added my code in this enhancement, activated and tested in our development system without any issues.
    Subsequently these changes were transported to our QA system for further testing however, the enhancement is not being executed.  Looking in SE38 at the include I can see the enhancement and the code I have added, the include is active but if I try and put an external break-point in the code it does not allow me to, which suggests to me that it is not actually active. 
    When looking at this include in the debugger, the code does not show, again suggesting that it is not active, but I have checked everything I can think of and it looks like it should be active.
    Has anyone seen this before, or have any advice on how to resolve this issue?
    Thanks
    Andrew Beavan

    I resolved the problem by regenerating the program SAPMV45A. (I award myself full points - but deduct 10 for being obtuse!)
    Kind regards
    Andrew Beavan

Maybe you are looking for

  • Can't open E-5 ORF files in PSE 8

    Hello, Is there any way to open ORF files of the new Olympus E-5 in elements 8? The new Camera Raw 6.3 supports these files, but the CR 6.3 is not compatible with Elements 8! Does that mean, I have to upgrade AGAIN to the newest version of Elements (

  • Out of memory error?  Are we serious?

    When using AIM on Mac OS 9, if I talk enough (litterally, it's related to how much I IM), I'll eventually get an "Out of memory, please close some open apps" or something like that. I have 1GB of RAM! And from what I see in About This Mac, I have lik

  • Is there any use for Class.getTypeParameters()?

    This is a quote from another Thread in this forum: How does erasure destroy reflection-related information? Methods getGenericInterfaces, getGenericSuperclass and getTypeParameters on java.lang.Class allow you to retrieve a lot of information on gene

  • Working with array variables defined in the BPM process

    Hello, I have created an array variable in my process. This array was created based on a custom type that contains 2 strings variables. How can I set/get and add new items to this array variable using java code? The only thing I know is that, if this

  • How can I get the number request's (count) for One interface

    Hi Guru's, I have a requirement,One interface say Hello world._How can I get the number request's (count) for this interface_.I thing with BAM it's possible. But I have no idea about BAM.If is there any alternative please give directions and instruct