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.
G@urav.

Similar Messages

  • 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.

  • 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

  • Userexists (MV45AFZZ - FORM USEREXIT_MOVE_FIELD_TO_VBKD.)

    Hi Gurus,
    The requirements is as like below and plead guide me where i am doing mistake in below coiding.
    If sales order required delivery date (VBAK-VDATU) is LT Document create date7days(SY-DATUM7) and next condition is
    item required delivery date (VBEP-EDATU) is LT the Document create date 7days(SY-DATUM7)
    then we need to move '0001' TO VBKD-ZTERM(Payment terms)
    ELSE move the payments terms as in the customer master (kurgv-zterm).
    now i am getting the error as :
    Header business data does not apply ti item 000020.
    Please find the code below and guide me where i am doing mistake.
    Ihad coded in program : MV45AFZZ ---> FORM USEREXIT_MOVE_FIELD_TO_VBKD.
    DATA: chk_date  TYPE vbep-edatu.
          CLEAR chk_date.
          chk_date = sy-datum + 7.
          CHECK : NOT vbak-vdatu IS INITIAL.
        IF vbak-vdatu < chk_date.
           CHECK : NOT vbap-posnr IS INITIAL.
           CHECK : NOT vbep-edatu IS INITIAL.
           IF vbep-edatu < chk_date.
              vbkd-zterm = '0001'.
           ELSE.
              vbkd-zterm = kurgv-zterm.
           ENDIF.
        ENDIF.
    Please let me know if my questin is not clear ...
    please reply me and i will give full points.
    Thanks in advance
    Srinivas....
    Edited by: Srinivas on Aug 22, 2008 12:39 AM

    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.
    G@urav.

  • 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)

  • How to get names of INCLUDE or FORM within included forms

    Hello,
    I want to get names of Include program and included form within included forms.
    I tried SY-REPID or SY-CPROG but these two SYST variables return the name of report program that performs the form, not the name of Include or form.
    Please give me any advice about how to get names of include / included form.
    thanks and regards,
    Hozy

    You can use the statement
    READ REPORT <Report name> into itab
    to read the source code into an internal table.
    Later you can use the "Contains Pattern" operator to get the statements that you need.

  • 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

  • Javascript function is not working for jsp:include.. form elements

    HI,
    I have two jsp's and i will include one jsp in the another jsp, when i do this
    i am not able to access child form elements value using javascript. the javascript
    function is defined in the main jsp. but i could able to get the main form elements
    through javascript
    here is the code.
    main.jsp
    <!--Generated by WebLogic Workshop-->
    <%@ page language="java" contentType="text/html;charset=UTF-8"%>
    <%@ taglib uri="netui-tags-databinding.tld" prefix="netui-data"%>
    <%@ taglib uri="netui-tags-html.tld" prefix="netui"%>
    <%@ taglib uri="netui-tags-template.tld" prefix="netui-template"%>
    <netui:html>
    <head>
    <title>
    Web Application Page
    </title>
    <script language="JavaScript">
    function isValidAge() {
    alert ("hage " +document[getNetuiTagName("MyForm")][getNetuiTagName("age")].value)
    alert ("swage " +document[getNetuiTagName("MyForm")][getNetuiTagName("swage")].value)
    alert ("wage "+document[getNetuiTagName("MyForm")][getNetuiTagName("wage")].value)
    </script>
    </head>
    <body>
    <p>
    <netui:form action="myaction" tagId="MyForm">
    <netui:textBox tagId="age" dataSource="{actionForm.age}"/>
    <netui:textBox tagId="swage" dataSource="{actionForm.swage}"/>
    here i am adding
    <jsp:include page="NewPage.jsp" />
    <netui:button onClick="isValidAge();" />
    </netui:form>
    </p>
    </body>
    </netui:html>
    child.jsp :
    <!--Generated by WebLogic Workshop-->
    <%@ taglib uri="netui-tags-html.tld" prefix="netui"%>
    <table class="tablebody">
    <tr class="tablebody">
    <td> wife age
    <netui:textBox tagId="wage" dataSource="{actionForm.wage}"/>
    </td>
    </tr>
    </table>
    can you tell me is this is bug in hte weblogic portal SP1.
    I am using weblogic portal SP1.
    thanks in advance
    shashi

    in this part:
    if(document.LForm.uname.value==null || document.LForm.upassword.value==null)should be:
    if(document.LForm.uname.value=="" || document.LForm.upassword.value=="")or
    if(document.LForm.uname.value.length==0 || document.LForm.upassword.value.length==0)

  • Hey guys is there any way to include my form in a word doc.

    I am doing a project and i need to include a copy of the questionnaire in the Apendix but i haven't figured out quite how to do it yet. Is there something i am missing!?
    Thanks in advance for the feedback!

    There isn't a way to save out the form to Word or other format. The best you could do is save the HTML form that people fill as an image or something.
    Sorry we couldn't help you out with this.
    Randy

  • Including jsp form in multiple jsps

    Hi
    I have a requirement to include a common jsp form in several other jsps that live in different web applications. For e.g. there is test_form.jsp taht I can access via http://www.test.com/common/test_form.jsp. There are several other jsps /app1/call_test1.jsp , /app2/call_test1.jsp taht need to include the /common/test_form.jsp. These jsps just provide different look with specific images etc.. We also need the pages to be accessed via those specific urls.
    The form is showing fine. But when I submit the included form, I am submitting to the wrapper jsp(say /app1/call_test1.jsp which I am passing as aparam to teh include), if any validation errors its supposed to show on /app1/call_test1.jsp. But its not showing them. If I call the include jsp separately in the browser, its working fine. How can I get the form errors dispalyed on the wrppaer.jsp??
    Any help is appreciated
    Thanks

    <select size="8" name="fruit" multiple>
    <option value="apple">apple</option>
    <option value="orange">orange</option>
    <option value="mango">mango</option>
    <option value="cherry">cherry</option>
    <option value="pineapple">pineapple</option>
    <option value="grapes">grapes</option>
    </select>
    if i select apple, orange,mango and cherry and submit it to the database field 'fruit', only 'apple' gets inserted. none others.
    this is the the line where it is processing the value.
    String fruit=request.getParameter("fruit");
    by the way I have only one database table
    I hope this example helps

  • OC4J Instance included in Forms 10g R2 NOT Stable

    I am able to deploy a form for testing on WIndows 2003 Server.
    C:\Documents and Settings\Administrator>C:\oracle\product\Ora10gDSR2\jdk\bin\java -Doracle.security.jazn.config=C:\oracle\product\Ora10gDSR2\j2ee\DevSuite\config\jazn.xml -Doracle.home=C:\oracle\product\Ora10gDSR2 -DORACLE_HOME=C:\oracle\product\Ora10gDSR2 -jar C:\oracle\product\Ora10gDSR2\j2ee\home\oc4j.jar -userThreads -config C:\oracle\product\Ora10gDSR2\j2ee\DevSuite\config\server.xml
    06/10/25 00:00:06 Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)
    initialized
    06/10/25 00:03:54 FormsServlet init():
    configFileName: C:\oracle\product\Ora10gDSR2/forms/server/formsweb.cfg
    testMode: false
    06/10/25 00:04:04 ListenerServlet init()
    06/10/25 07:56:50 Forms session <3> aborted: unable to communicate with runtime process.
    I can run the Form initially but not after it has been deployed for about 8 hours. Is it true that OC4J supplied in Forms 10g R2 is only for testing purpose. How could I deploy the form in a more stable environment?

    Yes it is true.
    OC4J included in your iDS 10g is only for test or develop envrionment.
    Its basic function is to make your builder tool ready to test your forms and module as well as your reports.
    Just because iDS 10g its a web tool and it needs a web server to execute. So OC4J emulate the iAS (Internet Application Server) and give you the opportunity to TEST your modules without having a iAS.
    Abdel Miranda
    Panama.

  • Including a form on a dynamic page (ORA-01036)

    I created a form based on a proceedure. I also created a dynamic page which consists of:
    DECLARE
    BEGIN
    PORTAL.wwa_app_module.new_instance('1235532770');
    END;
    When this dynamic page is run in development using the "Run" buttons, it works. When I include it on a portal page as a portlet, it errors with this error:
    ORA-01036: illegal variable name/number
    Does anyone have an idea as to why? I am sure it has something to do with context and/or the URL parameters, but don't know where to start.

    Using javascript, you could wrap the included page within a DIV tag or SPAN tag that is initially not visible. Then when the user clicks the button you would make the hidden DIV or SPAN visible.
    The visibility attribute can be set to visible (to see it) or hidden (to not see it). Here's a page that might shed some light:
    http://www.csctce.com/demos/dom_tutorial/
    HTH

  • Smart forms include texts form me23n to smart forms

    Hi,
    I have built a smart forms and included standard texts from me23n into my smart forms using include text.
    my problem is that if my text is not maintain for that particular header the heading should not get displayed for ease i'm writing my code:-
    item text: include text ( itemno+ebelp)                              "this item text is built up using create ->text.
                                     ( ekpo)
                                     ( f 01)
                                     (lanuage)
    item po text: include text ( itemno+ebelp)                          "this item po text is built up using create ->text.
                                     ( ekpo)
                                     ( f 01)
                                     (lanuage)
    materail po text: include text ( itemno+ebelp)   
                                     ( ekpo)
                                     ( f 01)
                                     (lanuage)
    if the text is not maintained for item text then it's heading that is "ITEM TEXT OR ITEM PO TEXT OR MATERIAL PO TEXT " should also be not diplayed in smart forms.
    my code is able to get the data from me23n but i just want to put a condition for not displaying it's text heading also if it's data is not maintained

    You can write a Select on STXH and check whether the text is available or not.
    SELECT SINGLE * from STXH
      INTO wa
    WHERE  TDNAME = ( itemno+ebelp)  
       AND TDOBJECT = 'EKPO'
       AND TDID = 'F01'
       AND TDSPRAS = LANG.
    IF sy-subrc = 0.
      gv_text = 'X'.
    ENDIF.
    Then in Output conditions you check for this flag and display the text.
    Thanks,
    Shambu

  • Can we include adobe Form in 4.7E?

    Hi,
    Can we include/incoprate the Adobe Form in SAP 4.7E or not?
    Is this for only Ecc 6.0?
    Regards
    Ricky

    Ricky,
    The answer is provided [here|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/2a8a0a37-0301-0010-f794-aecd1bb426e0#q-8]
    Chintan

Maybe you are looking for

  • Message Interfaces in ABAP Dictionary?

    Hi, I have imported an IDOC from R/3 into my XI System. Does anybody know where the structure of my imported IDOC is saved? Will this Idoc be mapped to some Dictionary structures? Where is the structure of the IDOC saved in XI? rg, markus

  • Progressive video no worko :(

    I've been absolutely struggling with this- and it's becoming annoying. I just want to capture progressive scan video from a DV input. I've been putting up with Interlaced video for a while but that's no longer an option now that I use Shake to key ma

  • Information to call Clearinghouse

    I'm struggling to get the information I need to call the Clearinghouse and get them to provide me with what I want/need.  I've inherited these 2 requirements, and I don't seem to have anyone in my organization that I can turn to for help/clarificatio

  • Snow Leopard Upgrade and ICal / CalDav access

    I've upgraded half of the computers in the office to Snow Leopard only to find that now upgraded users cannot change the calendars. (problem.) Getting "Only calendar admin and delegates with permission can make changes"... so no problem right? Just s

  • Slow Form Responce in XI

    i am having a problem with acrobat reader and forms.  There are a few forms that respond very slowly on the computer. In fact they are so slow in response to typing it takes several seconds for the text to appear. One thing I have noticed is that the