USEREXIT_SAVE_DOCUMENT for the include MV50AFZ1

Hello Experts,
I have query in which i have maintained one ztable , Now i have to select the fields vbeln, werks, matnr , lfimg from lips and lifnr, parvw, kunnr from vbpa table such that which ever partner function is found in VBPA from the below entries LIFNR = VBPA-LIFNR , for partner function u201CVBPA-PARVWu201D as u201CFAu201D or u201CVNu201D or KUNNR= VBPA-KUNNR for partner function u201CVBPA-PARVWu201D as u201CSP.
Based on it we have to Pass in the Z-Table and compare the table data for
u2022 DATE with SY-DATUM
u2022 WERKS with LIPS-WERKS
u2022 MATNR with LIPS- MATNR
u2022 LIFNR or KUNNR with VBPA-LIFNR or VBPA-KUNNR
u2022 LFIMG should not be greater than ZQUNTY u2013 ZCUQNTY, if this is the case then system give error u201CQuantity exceeds u2013Dispatch Planu201D
On saving or at the time of PGI, ZCUQNTY should be updated with the delivered quantity (LEIMG).
If an entry does not match with the Z-Table key parameter, then system should allow saving the delivery.
I am a fresher abaper and dotn know much about enhancements, i have made tmg also for this ztable in which events has been declared.
The code which i have developed is this
TABLES: ZSD_DLY_DSPLAN , LIPS, VBPA.
DATA : T_LIPS like LIPS.
    DATA : BEGIN OF T_LIPS,
          VBELN LIKE LIPS-VBELN,
          WERKS LIKE LIPS-WERKS,
          MATNR LIKE LIPS-MATNR,
          LFIMG LIKE LIPS-LFIMG.
    DATA :END OF T_LIPS.
    DATA : T_VBPA LIKE VBPA.
    DATA : BEGIN OF T_VBPA,
            LIFNR LIKE VBPA-LIFNR,
            PARVW LIKE VBPA-PARVW,
            KUNNR LIKE VBPA-KUNNR.
     DATA : END OF T_VBPA.
     DATA : IT_LIPS TYPE STANDARD TABLE OF LIPS.
     DATA : IT_VBPA TYPE STANDARD TABLE OF VBPA.
    DATA : WA_LIPS LIKE LINE OF IT_LIPS.
    DATA : WA_VBPA LIKE LINE OF IT_VBPA.
    SELECT VBELN  WERKS  MATNR LFIMG FROM T_LIPS INTO IT_LIPS.
    SELECT LIFNR KUNNR PARVW FROM T_VBPA INTO IT_VBPA WHERE (PARVW= 'FA' OR PARVW= 'VN') AND (PARVW = 'SP').
        IF IT_VBPA IS NOT INITIAL OR IT_IVBPA IS NOT INITIAL.
            ZSD_DLY_DSPLAN-ZDATE = SY-DATUM.
            ZSD_DLY_DSPLAN-WERKS = LIPS-WERKS.
            ZSD_DLY_DSPLAN-MATNR = LIPS-MATNR.
            ZSD_DLY_DSPLAN-LIFNR = VBPA-LIFNR.
            ZSD_DLY_DSPLAN-KUNNR = VBPA-LIFNR.
            IF LFIMG GT ZSD_DLY_DSPLAN-ZCUQNTY.
                MESSAGE "Quantity exceeds u2013Dispatch Plan", "E".
            ENDIF.
        ENDIF.
Can anyome help me out what code to write.
Thanks!!
Moderator message : Duplicate post locked. Continue with original thread.
Edited by: Vinod Kumar on Sep 12, 2011 5:09 PM

Check note 117104
thanks
G. Lakshmipathi

Similar Messages

  • SYNTAX FOR THE INCLUDE

    Hi,
    I created standard text using so10. How can I call this text to my SMARTFORM?
    pLEASE GIVE THE SYNTAX FOR THE INCLUDE .
    rEGARDS
    kUMAR

    Hi Praneeth,
    There is noi need to write include command in smartforms.
    Please define your text element as Include text and define TeXT ID, OBJECT and Language.
    Path > text element> Text type --> I --Include text.
    Please select the Check box --> No error if text doen't exits.
    Regards,
    Lanka

  • Is it possible to have the synthesizer interfaces for the included LOGIC PRO synths in MainsStage as a standalone?

    I recently purchased MainStage as they included the instruments from Logic Pro and In the help files it shows the LOGIC synths with the nice GUIs for each included synth; but it seems you have to recreate all of the parameter controls for each synth if using only MainStage as I can not find how to view the synthesizer interfaces.  Does anyone know if this is the case or is there a way to tweak the synths using the nice already layed-out interfaces that are in Logic?

    Hi
    Locate the Instrument plugin in the Instrument Channel Strip and double click to open the plugin GUI
    CCT

  • How to find the tcode for the include's in user exit

    Hi
    I wanted to find the tcode for the given include name in the user exit.
    Can you pls help in this regard
    Regards
    Madhan Doraikannan

    Hello Madhan,
    Usually the include in the user exit is part of a function group which directly may not fetch u tcode. So the best option is..
    1. Get the FM name and check the table modsap. This will give u the enhancement name and related information which can help u with the tcode.
    2. to use the where used option which will lead you though multiple program till u reach the main program where u can search for transaction.
    e.g say u r trying to search include ZXM06U41  which exists in the FM EXIT_SAPMM06E_016. Now if u do a where used for this FM it will show program name MM06EF0C_CUSTSCR1_ITEM_SET_D03 if u again go for where used it will show u MM06EF0C. now if u click of the Display object list in the toolbar u will get the list of tcodes also.

  • In Air iOS, what is the path for the included folder which is above .fla file folder?

    I have "assets" folder above "src" folder where .fla file is. The assets folder is included via Air iOS publish setting in Adobe Flash CS6 Professional but I'm having trouble accessing it.
    the directory structure looks like this. Main.as is the document class for my project.
    c:
      /project
        /assets
        /bin
        /lib
        /src
          /Main.as
          /Main.fla
    Now if the project was an action script project, I can normally access the assets folder by using a path like "../assets". But in Air for iOS project, it says the folder isn't there.
    In the Air iOS publish setting window, it says the included folder path is "c:\project\assets" whereas when I move the assets folder under src folder it just says "assets" and then it can be accessed simply by using a path like "\assets".
    Does anyone have an idea where the included folder is placed?

    Thanks for the reply. I've tried these with nativePath property but it doesn't seem to work. I've also tried passing different path like "project/assets", "../project/assets", etc.
    Normally, I'd just move "assets" folder to "src" folder but the problem is the assets folder contains like 10k files and it would slow down the Flash compiler. as it seems like Flash is scanning every file under its directory.

  • How to use the variables of Function exit in the include program

    i have a problem of using the variables of a function exit in the include program..
    If i use those variables there will be an error indicating 'Field FEBVW_IN is unknown. It is neither in one of the specified tables nor defined by a DATA statement'. Please help... Below is the code of the function exit:
    FUNCTION EXIT_SAPLIEDP_202.
    ""Lokale Schnittstelle:
    *"  IMPORTING
    *"     VALUE(IDOC_CONTROL_INDEX)
    *"     VALUE(IDOC_DATA_INDEX)
    *"     VALUE(FEBVW_IN) LIKE  FEBVW STRUCTURE  FEBVW
    *"     VALUE(FEBKO_IN) LIKE  FEBKO STRUCTURE  FEBKO
    *"     VALUE(FEBEP_IN) LIKE  FEBEP STRUCTURE  FEBEP
    *"     VALUE(FEBRE_IN) LIKE  FEBRE STRUCTURE  FEBRE
    *"     VALUE(FEBPI_IN) LIKE  FEBPI STRUCTURE  FEBPI
    *"  EXPORTING
    *"     VALUE(I_FIMSG) LIKE  FIMSG STRUCTURE  FIMSG
    *"     VALUE(FEBVW_OUT) LIKE  FEBVW STRUCTURE  FEBVW
    *"     VALUE(FEBKO_OUT) LIKE  FEBKO STRUCTURE  FEBKO
    *"     VALUE(FEBEP_OUT) LIKE  FEBEP STRUCTURE  FEBEP
    *"     VALUE(FEBRE_OUT) LIKE  FEBRE STRUCTURE  FEBRE
    *"     VALUE(FEBPI_OUT) LIKE  FEBPI STRUCTURE  FEBPI
    *"  TABLES
    *"      IDOC_CONTROL STRUCTURE  EDIDC
    *"      IDOC_DATA STRUCTURE  EDIDD
    *"      IDOC_AVIP STRUCTURE  AVIP OPTIONAL
    *"      IDOC_AVIR STRUCTURE  AVIR OPTIONAL
    *"      IDOC_AVIT STRUCTURE  AVIT OPTIONAL
    *"  CHANGING
    *"     REFERENCE(IDOC_AVIK) TYPE  AVIK OPTIONAL
    *"  EXCEPTIONS
    *"      PROC_ERROR
      INCLUDE ZXF08U10.
    Here is the code for the include program.
      INCLUDE ZXF08U10
    MOVE febvw_in TO febvw_out.

    Sometimes you will get this error message when checking include code in exits even though there is really no error - it happens because the include does not realise it is in the function due to the navigation index being out of date.
    Try activating the code - it may work even though the check said there were errors.
    You can also get this issue when trying to drill down on the field in the include to view its structure.
    Andrew

  • How do I find out the base dir for the current workspace ? Change?

    Assume I took over a colleagues JDeveloper installation.
    How can I find out the base dir for his JDevelopers workspace?
    Can I change this workspace base dir afterwards/later (without
    problems for the included sources and projects) ?
    Where can I change it ?
    I did not found an option in the settings?

    If you hover your mouse over the workspace you'll see the directory where the jws file is stored.
    For each project in the workspace you can go to the project properties and look up information in the content node of the preference - there you can also change the location preferences for where code is created.

  • Where are the includes located in UCM

    Trying to edit "workflow_docs_list.htm" and now I'm trying to find where the include "workflow_docs_table" is located in UCM. Anyone have a idea where I can find the include at?
    Answered my own question so close this topic if possible.
    Edited by: JTyson on Nov 27, 2012 3:13 PM

    Sorry about that I asked because I have to request the needed file and need to know beforehand, for the answer what I did was I found the .htm file that built the page (for my problem it is "workflow_docs_list.html"), and found the include that is being called (the include was "workflow_docs_table"). Next I went to the workflow page I wanted to work on (workflow "XyZ" under Active Workflow) and added &IsPageDebug=1 to the end of the url (gotta make sure the URL is for that active workflow or it won't work).
    Once the page loads there is a gray tab, click it and it will expand showing some options, click "iDocTrace" and expand the popup window and search for the include you want ("workflow_docs_table" for my case) and it will show the file location if it is being used.
    I do have a new question if anyone whats to take a shot at it. I have a table of data that has a metadata tied to it, but if I try to access the metadata through iDoc I just get the id number tied to it, I wanna grab the name I gave it in the table. The reason is if someone was to remove/add a new item in the table we would have to make a lot of changes to difference areas with the idoc and was hoping to avoid using the current method of converting the number into it's name.
    example
    table x:
    id=1; name=test
    I get the id number instead of the name if I called the metadata tied to it via iDoc and was hoping to get name instead is this possible?
    Solved: the function getViewValue was just what I needed, getViewValue("view", xTest, "viewColum")
    Edited by: JTyson on Nov 28, 2012 10:24 AM
    Edited by: JTyson on Nov 28, 2012 10:44 AM
    Edited by: JTyson on Nov 28, 2012 11:11 AM

  • Smartforms -  displaying the include text restricting to spras.?

    In Smartforms i have used include text to display Header text of an invoice .
    I provided all the relevant details for the include text such as,
    1:text name:wa_vbdkr-vbeln
    2:text object-vbbk
    3: text -id-0001
    4:language-nast-spras.
    The problem is in the output it always displays english text eventhough nast-spras is Slovakian .Output should be blank if not maintained.(Header can be maintained in any language).
    Is there any possibility of displaying the text restricting to spras.
    Thanks in advance

    Hi Anji,
    Thanks for your reply .
    We use the so10 only when we have fixed data such as address then we go for it.
    But that's not my case .Header text can be changed any time for given Invoice.
    If maintained it should appear for that language if not it should be blank.

  • How to find function module exit name when i know the Include

    As per my requirement i should change the existing exit. I know the include name but i want to
    know exit name. How to find out exit name based on include name. I tried Where-used list but it
    is not giving the exit and function module name.Please let me know.
    Regards
    Rajitha

    Hello Rajitha,
    1. You can do a "where-used" for the include & get the corresponding name of the exit function module.
    2. Goto table MODSAP & in the field MEMBER pass the name of the function module & you will get the Exit Name in the NAME.
    Hope this helps.
    BR,
    Suhas
    Edited by: Suhas Saha on Mar 16, 2009 3:08 PM

  • Change pointers for the ZSEGMENT of IDOC Extension.

    Hello Experts,
    We are working on the SAP version ECC 5.0.
    Our requirement is creating the ZZField and use this field to interface with legacy systems in the trnx FD02 and table KNB1.
    We have created the ZZField in table KNB1 and also ZSEGMENT for the IDOC DEBMAS06.
    We want to add the IDOC change pointers proramme for this ZSEGMENT that is being created.
    I know there are two methods of doing this:
    OLD METHOD:USER EXIT....
    NEW METHOD:CALL CUSTOMER FUNCTION'...'
    I tried the old method with the user EXIT_SAPLVV01_0001 for the Cutomer master.
    But I am getting the error as
    PROGRAMME NAMES zx....ARE PRESERVED FOR THE INCLUDES OF EXIT FUNCTION GROUPS.
    Can any one tell me how do i need to write the programme for the IDOC CHANGE POINTERS for the ZSEGMENT?
    Thank you.

    Our requirement is creating the ZZField and use this field to interface with legacy systems in the trnx FD02 and table KNB1.
    We have created the ZZField in table KNB1 and also ZSEGMENT for the IDOC DEBMAS06.
    in the above question watr the fields ur going to populate in KNB1 TABLE or in ZSEGMENT FOR DEBMAS06.
    CAN U PL GUIDE ME..
    thanking u...
    ajay

  • The Include Directive (at Page Translation Time)

    Version: 5.1
              Service Pack: 6
              I am generating the following error when I attempt to manually compile a JSP
              file:
              [jspc] parsing /vobs/projects/public_html//test.jsp:
              WARNING: Failed to include file 'test.inc' in include directive of page
              /test.jsp
              I've attempted practically every permutation of full and relative path
              locations, and cannot get it to work. Weblogic's JSP documentation did not
              have much to say about this either.
              Is anyone aware of a bug in the jsp compiler that would cause such a
              problem?
              

    Really strange, I used absolute path and put it under docroot, and I didn't
              put that folder into my any of my classpaths, the wls can find it without
              any problem. I used wls5.1 and sp6, do I miss sth?
              Thanks.
              mreiche <[email protected]> wrote in message
              news:[email protected]...
              >
              > No, it's not useless to add the include directory to the classpath - due
              to a bug in WLS 5.1,
              > it looks in the classpath for include files that begin with '/'.
              >
              > He is using the absolute path. That's why WL does not find it.
              >
              > Mike.
              >
              > "Tao Zhang" <[email protected]> wrote:
              > >
              > >Anchal Jain <[email protected]> wrote in message
              > >news:[email protected]...
              > >>
              > >> I added the directory that contains the included files to the
              > >> classpath but I still get the error below.
              > >It's useless to add such directory to the classpath. Please remove it.
              > >In order to recompile it dynamically you have to set it up in
              > >weblogic.properties file.
              > >
              > >>
              > >> WARNING: Failed to include file 'authenticate.jsp' in include
              > >> directive of page /analyze.jsp
              > >>
              > >You should inlcude all these jsps under your docroot.
              > >
              > >Make sure the relative path of include directive is right. Or you can use
              > >the absolute path and try.
              > >
              > >> Do I have to compile the included files
              > >> individually and then compile the main jsp?
              > >>
              > >> Any suggestion will be greatly appreciated.
              > >>
              > >> Anchal
              > >>
              > >>
              > >> "Greg Panzer" <[email protected]> wrote:
              > >> >The Weblogic JSP compiler is looking in the classpath for the include
              > >files.
              > >> >
              > >> >When manually compiling the JSPs, put the docroot in the CLASSPATH.
              > >> >
              > >> >Greg Panzer <[email protected]> wrote in message
              > >> >news:[email protected]...
              > >> >> Version: 5.1
              > >> >> Service Pack: 6
              > >> >>
              > >> >> I am generating the following error when I attempt to manually
              compile
              > >a
              > >> >JSP
              > >> >> file:
              > >> >>
              > >> >> [jspc] parsing /vobs/projects/public_html//test.jsp:
              > >> >> WARNING: Failed to include file 'test.inc' in include directive
              of
              > >> >page
              > >> >> /test.jsp
              > >> >>
              > >> >> I've attempted practically every permutation of full and relative
              path
              > >> >> locations, and cannot get it to work. Weblogic's JSP documentation
              did
              > >> >not
              > >> >> have much to say about this either.
              > >> >>
              > >> >> Is anyone aware of a bug in the jsp compiler that would cause such a
              > >> >> problem?
              > >> >>
              > >> >>
              > >> >>
              > >> >>
              > >> >
              > >> >
              > >>
              > >
              > >
              >
              

  • Problems with include where the include is a jsp

    Hi ,
    I have a typical problem. The iplanet server doesn't interpret the code
    from a jsp which is included in another jsp. For eg.
    code for main jsp
    request.getParameter("username");
    <%@ include file="/jsp/ui/left_nav.jsp" %>
    processing code.
    Now when I start the server and the first time I load this page I get a
    dearranged page which has the code of the left_nav.jsp present in the html
    output.
    On opening this page to edit, when a small modification is made and the file
    is saved, a reload of the same page gives the proper output with all the
    jsp's interpreted.
    Thanks to one and all,
    Regards,
    Gurjit

    You definitely want to use a jsp include action, not a directive. The directive
    happens at translation time and does not process the requested page. An action
    happens at request time and treats the requested page as a new request, thus
    including the results of the invoked jsp.
    BTW, the include action is the tags that looks line <jsp:inculde
    page="included_page.jsp" flush="true"/> or something similar (parameters can
    also be specified).
    The JSP 1.1 spec has more details. See sections 2.7.5 & 2.7.6 (for the include
    directive and a quick comparison of the directive vs the action) and 2.13.4 (for
    the include action).
    Matt
    Gurjit wrote:
    Hi ,
    I have a typical problem. The iplanet server doesn't interpret the code
    from a jsp which is included in another jsp. For eg.
    code for main jsp
    request.getParameter("username");
    <%@ include file="/jsp/ui/left_nav.jsp" %>
    processing code.
    Now when I start the server and the first time I load this page I get a
    dearranged page which has the code of the left_nav.jsp present in the html
    output.
    On opening this page to edit, when a small modification is made and the file
    is saved, a reload of the same page gives the proper output with all the
    jsp's interpreted.
    Thanks to one and all,
    Regards,
    Gurjit

  • Licence   is not included for the material - J1IH

    Hi All
    We are working on ECC 6.0.
    While doing J1IH ( Additional Excise) with Subtransaction Type 01, we are getting a warning message as -
    Licence   is not included for the material
    Message no. 8I993
    However if we process without any Subtransaction Type, no warning is flashed.
    Please let me know the reason for the same and what could be done so that system doesnt prompt it?
    Regards
    Kapil

    Hi
    Check SAP note 1223591
    Regards
    Antony

  • I have been using a Lightroom 5 including recent upgrades on my Mac Pro laptop for the past 1 year. This was purchased as an upgrade from Lightroom 4 for which I have a serial number. Today I purchased a new Macbook pro and loaded my Lightroom 5 however i

    I have been using a Lightroom 5 including recent upgrades on my Mac Pro laptop for the past 1 year. This was purchased as an upgrade from Lightroom 4 for which I have a serial number. Today I purchased a new Macbook pro and loaded my Lightroom 5 however it is asking for my serial number which I have misplaced. I am unable to trace my serial number anywhere. I have even checked my adobe membership to locate my serial number but it does not seem to have any record which is strange as I have been using this software for over a year now and the previous versions since 2009. Could someone help me in my predicament.

    Contavct Adobe support thru chat:
    Serial number and activation chat support (non-CC)
    http://helpx.adobe.com/x-productkb/global/service1.html ( http://adobe.ly/1aYjbSC )

Maybe you are looking for

  • Problem in Creating a jar file using java.util.jar and deploying in jboss 4

    Dear Techies, I am facing this peculiar problem. I am creating a jar file programmatically using java.util.jar api. The jar file is created but Jboss AS is unable to deploy this jar file. I have also tested that my created jar file contains the same

  • Missing return statement error

    public class Member          public int Member(String memberid, String memberpw)      String cs = "jdbc:oracle:thin:@255.255.255.255:1000:a123stud";          String user = "123456";          String pass = "123456";           String member = "member_i

  • Acrobat X form problem

    Why doesn't it work whe I create a form in acrobat for me to upload it to my website, and then have people open the form, fill it out, then submit it?

  • Is running multiple instances of a class ok?

    hi guys, is it ok to have more than one instance of a class running? I have a console app that processes requests which have been saved in a db. this app does not need multithreading - but sometimes i may need to have multiple instances of the app ru

  • Document types per transaction

    Hi Experts, How to know which document types are determined per transaction? Ex: what document type can be defaulted for the transactions like FB60 / FB65 etc. Please indicate the config area. warm regards marias