Exit EXIT_SAPLKEII_002 in profibility Analysis to change value fields

Hello,
I want to change some of the value fields in the records which are produced in the CO-PA with
the user exit EXIT_SAPLKEII_002.
The problem is that the table interface table T_ACCCR_PA which is for the "FI/CO document: CO-PA segment" is not filled with the generated records.
How can I change the value fields in co-pa in the user-exit than? Do I have to generate these
records myself?
Thanks.
Regards, Lars.

Hi,
Welcome To SDN!!
  use enhancement COPA0001 , component EXIT_SAPLKEDRCOPA_001
Regards
Kiran Sure

Similar Messages

  • Changing Value field in COPA

    Hi,
      We have already posted a billing document. The material contains alternative unit of measurement. In the material master the alternative unit of measurement has been maintained wrongly. Due to this the report in copa shows a wrong picture in terms of units sold and the respective COGS for the material. Now we have changed the alternative unit of measurement.
    But how to change the value in the value field. Kindly help me in this regards
    Example: Material 1 Base unit : M2, Sale unit PC. Alt UOM wrongly maintained: 1 pc = 100 M2. Sold qty = 10 Pc, sold qty in Base unit : 1000 M2. Actual UOM : 10 PC = 100 M2, Actual old qty : 10 PC , 100 M2. 
    Regards

    Hi Vasantha,
    For this you can do manually cancel copa line item by using
    T CODE- KE4S00 ofter you post line item correctly (please maintain correct alternative unit of measurement )by using
    T CODE - KE21n .
    K.Satish
    With this method you will delete CO-PA line item and you will loose connection to the original billing document.
    Tapio

  • Changing value fields in COPA

    Hello,
    I want to change :
    - the text description for 2 value fields in COPA.
    - These value fields are assigned to the value field group Z002 (in the T code KEVFG), and I want to change this assignment
    by linking them to the value field group Z001.
    These 2 value fields are not any more used for 2 years. Can this change have a lot of impact in the production system?. Shall I need to generate again the operating concern after these changes?
    Thanks in advance
    Barondra BERGET

    Hi,
    If you want to change the description of a characteristic
    or value field you must change the descriptions of the related
    data element.
    Therefore you need to perform the following steps:
    1. In KEA5 / KEA6, type in the name of the characteristic/
       value field and click on the create / change button
    2. On the next screen, double click on the data element of your
       characteristic/value field
    3. On the 'Display Data Element' screen, click on the tab strip
       "Field label".  You can see the four field lables short, medium, long
       and heading.  You should change all four field labels and then
       regenerate the data element.  After having done this you may have to
       to regenerate the characteristic/value field and the operating
       concern.
       I hope this answers your query. If so please close this message by
    pressing the confirm button. Else do not hesitate to get back for more
    clarifications.
    Kind Regards,
    Abhisek Patnaik,

  • ADF create form : change value fields

    Hi all,
    I have a create form:
    first problem
    one field is an ID known by my backing bean
    <af:form>
            <af:panelFormLayout>
              <af:inputText value="#{bindings.Mpr.inputValue}"
                            label="#{bindings.Mpr.hints.label}"
                            required="#{bindings.Mpr.hints.mandatory}"
                            columns="150"
                            maximumLength="#{bindings.Mpr.hints.precision}"                       
                            shortDesc="#{bindings.Mpr.hints.tooltip}"
                            clientComponent="true">
                <f:validator binding="#{bindings.Mpr.validator}"/>
                <af:convertNumber groupingUsed="false" pattern="#{bindings.Mpr.format}"/>
                <af:clientListener method="getMpr" type="mouseOver"/>
                <af:serverListener method="#{backing_main.remplirChampMprCreerNote}" type="seekMPR"/>
              </af:inputText>I would like that when my page appears this value field *#{bindings.Mpr.inputValue}* be filled by this one *#{backing_bean.myID}* .
    second problem
    I have 3 richTextEditor who provide auto-completion (If you type ADF and then *<ctrl+space>*, ADF would be replaced by Application Developpement Framework thanks to a bean)
    It works outside a create form . Inside a create form the problem is when calling my bean I have a validator alert who say "you must enter a value" and my Component's value is reseted..
    Does someone knows these problems ?
    Thanks,
    valéry.

    Hello simply,
    I have an af:form generated by a viewObject's drag and drop, the automatically generated code use bindings, I just replace 3 af:inputText by 3 af:richTextEditors and I add the listeners for <ctrl+space> event.
    here is the JSF page :
        <f:view>
        <af:document title="une note au dossier médical">
        <af:messages/>
                            <f:verbatim>
                <![CDATA[       
                <script language="javascript" type="text/javascript">
                var comp;
                var target;
                var prevKey;
                var curKey=0;
                function wysiwygKeyPress(event) {
                    prevKey = curKey;               
                    curKey = event.keyCode;
                    var wysiwygValue="";
                    if(prevKey==17 && curKey==32)   // CTRL + espace
                        var richTextEditor = comp; //wysiwygmode
                        if (target.contentWindow.document.attachEvent){   //IE specific
                             if(target.contentWindow.document.body.firstChild.innerHTML)
                                wysiwygValue = target.contentWindow.document.body.firstChild.innerHTML;
                             else
                                 wysiwygValue = target.contentWindow.document.body.innerHTML;
                          else {     //FF specific
                             wysiwygValue = target.contentDocument.body.firstChild.textContent;
                        AdfCustomEvent.queue(comp, "customEvent",{value1:wysiwygValue}, true);
                function rteMouseOver(event) {
                    comp = event.getSource(); //helper function
                    target = event._target;
                    //IE could not find the event._target
                    var clientId = comp.getClientId()  + "::cont";
                    var iframe = document.getElementById(clientId);
                    if (iframe.contentWindow.document.attachEvent) { //IE
                       target = iframe;
                       //IE uses attachEvent
                       iframe.contentWindow.document.attachEvent('onkeydown', function() { wysiwygKeyPress(iframe.contentWindow.event); });
                    else {
                    //FF uses addEventListener
                      iframe.contentWindow.addEventListener('keydown',wysiwygKeyPress, true);
                </script>
                ]]>
            </f:verbatim>
          <af:form>
            <af:panelFormLayout>
              <af:inputText value="#{bindings.Mpr.inputValue}"
                            label="#{bindings.Mpr.hints.label}"
                            required="#{bindings.Mpr.hints.mandatory}"
                            columns="150"
                            maximumLength="#{bindings.Mpr.hints.precision}"                       
                            shortDesc="#{bindings.Mpr.hints.tooltip}"
                            clientComponent="true"
                            >
                <f:validator binding="#{bindings.Mpr.validator}"/>
                <af:convertNumber groupingUsed="false" pattern="#{bindings.Mpr.format}"/>
              </af:inputText>
              <af:inputText value="#{bindings.Commentaire.inputValue}"
                            label="#{bindings.Commentaire.hints.label}"
                            required="#{bindings.Commentaire.hints.mandatory}"
                            columns="150"
                            maximumLength="#{bindings.Commentaire.hints.precision}"
                            shortDesc="#{bindings.Commentaire.hints.tooltip}"
                            >
                <f:validator binding="#{bindings.Commentaire.validator}"/>
              </af:inputText>
              <af:spacer width="19" height="17"/>
              <af:richTextEditor value="#{bindings.Observation.inputValue}"
                                 label="#{bindings.Observation.hints.label}"
                                 required="#{bindings.Observation.hints.mandatory}"
                                 columns="150"
                                 shortDesc="#{bindings.Observation.hints.tooltip}"
                                 clientComponent="true">
                    <af:clientListener type="mouseOver" method="rteMouseOver"/>
                    <af:serverListener type="customEvent" method="#{backing_main.ctrlSpaceHandler}"/>
              </af:richTextEditor>
              <af:spacer width="15" height="22"/>
              <af:richTextEditor value="#{bindings.Traitement.inputValue}"
                                 label="#{bindings.Traitement.hints.label}"
                                 required="#{bindings.Traitement.hints.mandatory}"
                                 columns="150"
                                 shortDesc="#{bindings.Traitement.hints.tooltip}"
                                 clientComponent="true">
                    <af:clientListener type="mouseOver" method="rteMouseOver"/>
                    <af:serverListener type="customEvent" method="#{backing_main.ctrlSpaceHandler}"/>
              </af:richTextEditor>                            
              <af:spacer width="17" height="18"/>
              <af:richTextEditor value="#{bindings.Conclusion.inputValue}"
                                 label="#{bindings.Conclusion.hints.label}"
                                 required="#{bindings.Conclusion.hints.mandatory}"
                                 columns="150"
                                 shortDesc="#{bindings.Conclusion.hints.tooltip}"
                                 clientComponent="true">
                    <af:clientListener type="mouseOver" method="rteMouseOver"/>
                    <af:serverListener type="customEvent" method="#{backing_main.ctrlSpaceHandler}"/>
            </af:richTextEditor>                            
            </af:panelFormLayout>
            <af:commandButton text="Sauvegarder la note"
                              action="#{backing_main.creerNote}"/>
          </af:form>
        </af:document>
      </f:view>A pageDef file is automatically created :
    <pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel"
                    version="11.1.1.52.5" id="ajoutNote3PageDef"
                    Package="viewcontroller.pageDefs">
      <parameters/>
      <executables>
        <iterator Binds="TmpnoteView1" RangeSize="25"
                  DataControl="AppModuleDataControl" id="TmpnoteView1Iterator"/>
        <invokeAction Binds="Create" id="invokeCreate" Refresh="prepareModel"
                      RefreshCondition="${!adfFacesContext.postback and empty bindings.exceptionsList}"/>             
      </executables>
      <bindings>
        <attributeValues IterBinding="TmpnoteView1Iterator" id="Mpr">
          <AttrNames>
            <Item Value="Mpr"/>
          </AttrNames>
        </attributeValues>
        <attributeValues IterBinding="TmpnoteView1Iterator" id="Observation">
          <AttrNames>
            <Item Value="Observation"/>
          </AttrNames>
        </attributeValues>
        <attributeValues IterBinding="TmpnoteView1Iterator" id="Traitement">
          <AttrNames>
            <Item Value="Traitement"/>
          </AttrNames>
        </attributeValues>
        <attributeValues IterBinding="TmpnoteView1Iterator" id="Conclusion">
          <AttrNames>
            <Item Value="Conclusion"/>
          </AttrNames>
        </attributeValues>
        <attributeValues IterBinding="TmpnoteView1Iterator" id="Commentaire">
          <AttrNames>
            <Item Value="Commentaire"/>
          </AttrNames>
        </attributeValues>
        <action IterBinding="TmpnoteView1Iterator" id="Create"
                RequiresUpdateModel="true" Action="createRow"/>
        <action id="Commit" RequiresUpdateModel="true" Action="commitTransaction"
                DataControl="AppModuleDataControl"/>
      </bindings>
    </pageDefinition>I add to this form a create button and a commit button, you could see it in the pageDef :
    <action IterBinding="TmpnoteView1Iterator" id="Create"
                RequiresUpdateModel="true" Action="createRow"/>
    <action id="Commit" RequiresUpdateModel="true" Action="commitTransaction"
                DataControl="AppModuleDataControl"/>I call these actions in the bean creerNote called by my submit buton:
    public String creerNote() throws IOException {
            // --- modify fields to remove some html tags --- //
            // --- 1. get EL context --- //
            FacesContext facesContext = FacesContext.getCurrentInstance();
            Application app = facesContext.getApplication();
            ExpressionFactory elFactory = app.getExpressionFactory();
            ELContext elContext = facesContext.getELContext();
            // --- 2. get ExpressionValues --- //
            ValueExpression valueExpObserv = elFactory.createValueExpression(elContext, "#{bindings.Observation.inputValue}", String.class);
            ValueExpression valueExpConcl = elFactory.createValueExpression(elContext, "#{bindings.Traitement.inputValue}", String.class);
            ValueExpression valueExpTrait = elFactory.createValueExpression(elContext, "#{bindings.Conclusion.inputValue}", String.class);
            // --- 3. get String values --- //
            String texteObserv = (String)valueExpObserv.getValue(elContext);
            String texteConcl = (String)valueExpConcl.getValue(elContext);
            String texteTrait = (String)valueExpTrait.getValue(elContext);
            // --- 4. remove some html tags --- //
            texteObserv = texteObserv.replaceAll("<p>","");
            texteObserv = texteObserv.replaceAll("</p>","");
            System.out.println("[Main.java] CreerNote > observations après traitement : "+texteObserv);
            texteConcl = texteConcl.replaceAll("<p>","");
            texteConcl = texteConcl.replaceAll("</p>","");
            System.out.println("[Main.java] CreerNote > conclusions après traitement : "+texteConcl);
            texteTrait = texteTrait.replaceAll("<p>","");
            texteTrait = texteTrait.replaceAll("</p>","");
            System.out.println("[Main.java] CreerNote > traitements après traitement : "+texteTrait);
            // --- set new values --- //
            valueExpObserv.setValue(elContext, texteObserv);
            valueExpConcl.setValue(elContext, texteConcl);
            valueExpTrait.setValue(elContext, texteTrait);       
            // --- set mpr field --- //
            ValueExpression valueExpMPR = elFactory.createValueExpression(elContext, "#{bindings.Mpr.inputValue}", String.class);
            valueExpMPR.setValue(elContext, getMprSelected());
            // --- call the create pageDef's action --- //
            bindings = getBindings();
             OperationBinding operationBinding = bindings.getOperationBinding("Create");
             operationBinding.execute();    
            // --- call the commit pageDef's action --- //
            bindings = getBindings();
            operationBinding = bindings.getOperationBinding("Commit");
            operationBinding.execute();       
            return "Abrev";
    }As you know, If I type <ctrl+space> I call the method ctrlspaceHandler who change the value of the component.
    public void ctrlSpaceHandler(ClientEvent clientEvent) {
            // --- get applicationModule --- //
            if(am==null)
               setAm();
            // --- get myViewObject --- //
            ViewObjectImpl mesAbrev = am.getThesaurusVO1();
            ViewCriteria vc =  mesAbrev.createViewCriteria();
            ViewCriteriaRow vcRow = vc.createViewCriteriaRow();
            // --- get richTextEditor's last word without html tags--- //
            RichTextEditor rte = (RichTextEditor) clientEvent.getComponent();
            String texte = (String)clientEvent.getParameters().get("value1");
            System.out.println("[Main.java] ctrlSpaceHandler > valeur du rte via rte.getParameter: "+texte);
            int indiceDernierMot = texte.lastIndexOf(" ");
            indiceDernierMot++;
            String abr = texte.substring(indiceDernierMot).toUpperCase();
            abr = abr.replaceAll("<BR/>",""); abr = abr.replaceAll("<br>","");
            abr = abr.replaceAll("</P>",""); abr = abr.replaceAll("</p>","");
            abr = abr.replaceAll("</FONT>",""); abr = abr.replaceAll("</font>","");
            abr = abr.replaceAll("</SPAN>",""); abr = abr.replaceAll("</span>","");                                           
            System.out.println("[Main.java] ctrlSpaceHandler > abréviation recherchée : "+abr);
            // --- add a criteria to my viewObject --- //
            vcRow.setAttribute("Msgcourt", "like '"+abr+"'");
            vc.addElement(vcRow);
            mesAbrev.applyViewCriteria(vc);
            // --- seek the abbreviation --- //
            mesAbrev.executeQuery();
            // --- get row found --- //
            Row row = null;
            while(mesAbrev.hasNext())
                row = mesAbrev.next();
                System.out.println("[Main.java] ctrlSpaceHandler > ligne trouvée : "
                               +row.getAttribute("Spr") +" - "
                               +row.getAttribute("Msgcourt")+" - "
                               +row.getAttribute("Msglong"));
            // --- if found --- //
            if(row!=null)
                // --- get abbreviation's detail --- //
                String detail = (String)row.getAttribute("Msglong");       
                System.out.println("[Main.java] ctrlSpaceHandler > message long = "+detail);
                // --- replace abbreviation by detail in the text and update graphical component --- //
                texte = texte.replaceAll(abr.toLowerCase(), detail);
                texte = texte.replaceAll(abr.toUpperCase(), detail);
                rte.setValue(texte);
                RequestContext.getCurrentInstance().addPartialTarget(rte);
    }When debug I see all my method bean works fine.
    But as result on the form I have a message who say "first enter value", I can bypass this problem if I remove all richTextEditor's required attributes. Biggest problem is that my richText component is cleared after ctrl+space... My test with a richTextEditor bind to a bean was OK, the only difference here is my richTextComponents uses bindings with pageDef.
    Thank you,
    Valéry

  • Change value field.

    how can I change a value of a field of one form with an applet?
    have I 1 metod for to get some information of document where my applet work?
    exp:
    <applet code="Applet1" width=300 height=300 >
    </applet>
    <form>
    <input name="ps" type="password">
    </form>
    I need change with "applet1" value of "ps" , is it possible?
    tnx

    First of all you need to give the input a valid id
    <input name="ps" id='ps' type="password">
    Then call javascript to set the value for this element from your applet:
              try {
                   this.getAppletContext().showDocument(
                             new URL("javascript: document.getElementById('ps').value='shit, this works';"));
              } catch (Exception e) {
                   e.printStackTrace();
              }

  • User Exit: AFAR0002. How to change value in field: ANLC - NAFAP?

    Hi,
    At the moment I am working on custom Depreciation Key for which the depreciation for period (and subperiods) will be recounted and taken into account for depreciation posting.
    I try to use exit AFAR0002 for this purpose.
    I am able to count and change the value of depreciation for each subperiods. The problem is, that I cannot change the value of "Ordinary depreciation that is planned for the asset in the current fiscal year" for the pierod '000'. Due to this, in the last period of the current fiscal year system tries to reverse the sum of planned depreciation in previous subperiods. It simply tries to meet the "planned depreciation for fiscal year' with the sum of planned depreciation for subperiods.
    example:
    ANLC-NAFAP = 100.
    Active Asset value = 1000
    Depreciation for periods:
    001     ->     -50
    002     ->     -50
    003     ->     -50
    004     ->     -50
    005     ->     -50
    006     ->     -50
    007     ->     -50
    008     ->     -50
    009     ->     -50
    010     ->     -50
    011     ->     -50
    *012     ->     450
    planned value -> -100
    The questions are:
    1. is it possible to change value in ANLC-NAFAP in this exit
    2. How it sould be done.
    Thanks in advance for help.
    Regards,
    Wojciech

    Dear Paul,
    I had run AFAR. The report changed to '0' the value of ANLC-NAFAP  field - sth changed - thanks.
    But I still have a problem to set this value to the sum of planned depreciation for each month. At the moment, in the last period the system tries to reverse all planned "sub"depreciation to '0' in total.
    Is it any additional condition that has to be fulfilled in order to change the value of "Ordinary depreciation that is planned for the asset in the current fiscal year" for the pierod '000'?
    Regards,
    Wojciech

  • Identify when a user has change value in USEREXIT_CHECK_VBAP before saving

    I originally posted and closed this question, but I am still struggling with the code.
    The req is now to also update the value of VBAP-LPRIO, so I now have to use the Exit : USEREXIT_CHECK_VBAP.
    The issue is that my solution must take into account when a user manually overwrites a value and not replace it with a value determined in the user exit.
    My problem is that the user might do the following
    1 - Create a sales order and enter a new item line, press enter
    2 - The user exit is triggered, and I check that XVBAP-UPDKZ = I  (user add a new line)
    3 - The user-exit determines the new value and populates the field
    4- the user then click on the item line, and then manually changes the value of VBAP-LPRIO
    5- The user-exit is triggered again, and because  XVBAP-UPDKZ = I , my code is triggered and updates the field.
    What I want is to identify that a user has manually changed the value and not overwritte the value.
    1 - I have check YVBAP and it is blank, as the user has not saved the sales order.
    2- The values of VBAP and XVBAP are the same..
    3 - I cannot re-read the database (KNVV) table as the user could have populate the value with the same value.
    What I need is how to identify when a user has made a change to a field before they save the sales item, as YVBAP is never filled.
    Previous post----
    Hello,
    I am writing a bit of code that will overwrite the payment terms in a sales order item based on a number of factors. (ship-to, incoterms, document type, etc)
    I am using the following program MV45AFZB at Exit : USEREXIT_CHECK_VBAP. I am using this exit as the users need to see the payment terms after an item has been entered into the sales order and not have the value determined at sales order save.
    I am not using USEREXIT_MOVE_FIELD_TO_VBAP as it is only triggered once at the time of creation and not when I change the document. I need it in USEREXIT_CHECK_VBAP as users could change the incoterms in VA02, so the code must be redetermined.
    My code is working as expected, however, I have a problem when a user enters a sales order item line and then manually changes the payment terms, as my code then is over writes the users values.
    The flow is as follows
    As user creates a sales order
    They populate the sales order header
    They populate material number and qty
    User exit USEREXIT_CHECK_VBAP is triggered and correctly determines the payment terms
    The user then double clicks on the sales order item and decides to overwrite the payment terms.
    My user-exit is retriggered and check to see if XVBAP-UPDKZ = I (insert)
    As it is still an insert, my code triggers.
    I have tried to check YVBAP, but no entry exist as it stills is seen as in insert? What I really need to know that while it is still an insert, the user has change the field value and my code should not over write the users value.

    When do you need to update LPRIO ? When user makes the change at the Payment terms on line item?
    Regards,
    Naimesh Patel

  • PPCO0007 User Exit for  Changing Header Fields During Order  (CO40)

    .. Hi !!!!
      I need your help or suggestions,
      I need to change the standar order  before to save, i found the user exit PPCO0007,
      i assign the new value for the order, but when finish the fuction, EXIT_SAPLCOZV_001, the new values are
      lost, and finally the system set the standard order.
        Someona know how can change the order and the the batch.
         Thanks
    Noemí Huerta

    Hi Noemi
    You can use the enchancement PPCO0007 (exit when the production order is saved).
    Use the function module EXIT_SAPLCOZV_001 (User Exit for Checking or Changing Header Fields During Order Save) to update the field priority starting the information in the material-customer info record.

  • Planning function to change date field value in layout

    Hello experts,
                          I have 1 BPS layout with 2 date fields ( Start date, End date ). With a filter conditions, set of data comes in BPS layout on execution and 2 date fields also contain some value...I want to change values of these 2 dates...both the date fields are char infoobjects..in BPS layout, in planning function I got only 1 function ( Repost function ) to change the value of char infoobject based on some condition. but date field value is not the status field...i want to enter new date instead of old date..if i right exit function in that also i can change only keyfigs values..so please help me to solve this problem..
    Thanks & Regards,
    Priyanka Joshi

    Hi Priyanka,
    As of now master data planning is not so flexibly supported.
    Still u can refer the below link which is enhancement of standard Repost function,and can be used to change master data.
    [http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/10d2b273-0e12-2c10-fab3-a34bde559f92]
    As far as my knowledge goes u cannot directly input date in rows.
    regards,
    Rajendra

  • Urgent..getting default & changed values in ALV editable....have ur point.s

    Hi all,
    I m using interactive ALV grid with 1 column editable with some default values, When i m clicking on SAVE button, only the values which are changed by the user in that column are coming in the internal table, & the default values are automatically deleted by the following code....
    But my requirement is to save all the default & changed values of the ALV column....
    <b>Help me out & have ur points.</b>
    DATA ref1 TYPE REF TO cl_gui_alv_grid.
    CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
    importing
                   e_grid                           = ref1
    CALL METHOD ref1->check_changed_data
    IMPORTING
       e_valid   =
    CHANGING
       c_refresh = 'X'

    Pradeep,
    When ur doing the CHECK_CHANGED_DATA, u ll get the edited values inside this callback sub -routine only. so here u trap the values those are changed ( thats after editing).
    Once the control goes back to the original program ( calling prog ) , u ll end up with ur old data ( before editing).
    you ll have to handle that explictly in your code, or shift to OO alv grid like this -
    REPORT ZSKC_GRID.
    TABLES : EQUI.
    DATA   : BEGIN OF T_EQUI OCCURS 0,
              EQUNR TYPE EQUI-EQUNR,
              AENAM TYPE EQUI-AENAM,
             END   OF T_EQUI.
    DATA : T_FCAT  TYPE LVC_T_FCAT,
           G_FCODE TYPE SY-UCOMM.
    DATA : G_GRID TYPE REF TO CL_GUI_ALV_GRID.
    SELECT-OPTIONS: S_EQUNR FOR EQUI-EQUNR.
    START-OF-SELECTION.
    * get data.
      PERFORM SUB_GET_DATA.
    * Populate catalog.
      PERFORM SUB_BUILD_CATALOG CHANGING T_FCAT.
    * Display the grid.
      PERFORM SUB_SHOW_GRID.
      CALL SCREEN 9001.
    *&      Form  SUB_GET_DATA
    *       Get data
    FORM SUB_GET_DATA .
      SELECT EQUNR AENAM
      FROM   EQUI
      INTO   TABLE T_EQUI
      WHERE  EQUNR IN S_EQUNR.
      IF SY-SUBRC NE 0.
    *  Give some message if needed
      ENDIF.
    ENDFORM.                    " SUB_GET_DATA
    *&      Form  SUB_BUILD_CATALOG
    *       text
    *      <--P_T_FCAT  text
    FORM SUB_BUILD_CATALOG  CHANGING PT_FCAT TYPE LVC_T_FCAT.
      DATA : WA_CAT TYPE LVC_S_FCAT.
      CLEAR WA_CAT.
      WA_CAT-FIELDNAME = 'EQUNR'.
      WA_CAT-TABNAME   = 'T_EQUI'.
      WA_CAT-REF_FIELD = 'EQUNR'.
      WA_CAT-REF_TABLE = 'EQUI'.
      APPEND WA_CAT TO PT_FCAT.
      CLEAR WA_CAT.
      WA_CAT-FIELDNAME = 'AENAM'.
      WA_CAT-TABNAME   = 'T_EQUI'.
      WA_CAT-REF_FIELD = 'AENAM'.
      WA_CAT-REF_TABLE = 'EQUI'.
      WA_CAT-EDIT      = 'X'.
      APPEND WA_CAT TO PT_FCAT.
    ENDFORM.                    " SUB_BUILD_CATALOG
    *&      Form  SUB_SHOW_GRID
    *       Show grid
    FORM SUB_SHOW_GRID .
    * create the Grid Object.
      CREATE OBJECT G_GRID
        EXPORTING
           I_PARENT          = CL_GUI_CONTAINER=>SCREEN0
        EXCEPTIONS
          ERROR_CNTL_CREATE = 1
          ERROR_CNTL_INIT   = 2
          ERROR_CNTL_LINK   = 3
          ERROR_DP_CREATE   = 4
          OTHERS            = 5.
      CHECK SY-SUBRC EQ 0.
    * Display contents,
      CALL METHOD G_GRID->SET_TABLE_FOR_FIRST_DISPLAY
        CHANGING
          IT_OUTTAB                     = t_equi[]
          IT_FIELDCATALOG               = t_fcat
        EXCEPTIONS
          INVALID_PARAMETER_COMBINATION = 1
          PROGRAM_ERROR                 = 2
          TOO_MANY_LINES                = 3
          others                        = 4.
    ENDFORM.                    " SUB_SHOW_GRID
    *&      Module  STATUS_9001  OUTPUT
    *       text
    MODULE STATUS_9001 OUTPUT.
       SET PF-STATUS 'PF_9001'.
       SET TITLEBAR 'TITLE_9001'.
    ENDMODULE.                 " STATUS_9001  OUTPUT
    *&      Module  USER_COMMAND_9001  INPUT
    *       text
    MODULE USER_COMMAND_9001 INPUT.
      CASE G_FCODE.
        WHEN 'BACK' OR 'CANC' OR 'EXIT'.
          LEAVE TO SCREEN 0.
        WHEN 'HAVE'.
    *    After editing everything user presses this button.
         PERFORM SUB_GET_EDITED_DATA.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_9001  INPUT
    *&      Form  SUB_GET_EDITED_DATA
    *       Read the ALV grid and get current internal table.
    FORM SUB_GET_EDITED_DATA .
    DATA : T_OLD_DATA LIKE T_EQUI OCCURS 0.
    * hold the old values if u need them.
      t_old_data[] = t_equi[].
    * This will update the global internal table.
      CALL METHOD G_GRID->CHECK_CHANGED_DATA.
    * Now t_equi have changed here. u have the old data in the T_OLD_DATA.
      BREAK-POINT.
    ENDFORM.                    " SUB_GET_EDITED_DATA
    Create a blank screen called 9001. and Pf-staus has a buton with fcode "HAVE". ( alongwith BACK canc exit).

  • Delta Extractor Is not picking changed values

    Hi All,
    When the values or texts in a PO are changed the delta extractor is picking up the changed values as deltas  (provided the changes where done in PO <b>Header</b> or <b>Item Overview</b>) but when a PO values or text that are changed in the <b>Item Details</b> the delta mechanism is not picking up the changed values (the fields whose values are changed were initially not in the LO Cockpit Extractor they where added and the values to these fields are populated using an ABAP Program)
    Is there a reason that Delta mechanism doesn't work for fields that are not delivered by the SAP Extractor or do we need to modify the code in order to collect these changed values by Delta Mechanism (Direct Delta as the Update Mode).
    Please let me know if anybody came across the same problem .
    Thank you all in advance.
    Regards,
    Dhanam

    Hi,
    this is another story.....
    You'll have to
    - enhance the PO items table (EKPO) with your fields
    - activate the right customer exit for purchase orders (search in SMOD; or in this forum..) and populate your fields during this exit. if the field needs to be maintainable by the R3 user, you'll have find a SAP exit (again SMOD) in order customize one of the screen and populate your fields in R3.
    - use another exit to populate the new fields to LO delta queue
    - enhance your BW extract structure (done)
    - and so on...
    As you can imagine, the above get quite more complicated (an expert in MM shall support you) and it needs to be approved by the PM since you'll modify R3.
    But that's basically it!
    hope this helps...
    Olivier.

  • How to change screen field value.

    Hi Experts,
             I like to change the screen field MSAUS(check box) of program SAPLIQS0 in one of the exit.But if I use
    (SAPLIQS0)VIQMEL-MSAUS = 'X'. its showing compile error.Please tell me how can i change this field in this exit.
    Regards,
    Ajish.

    try something like this:
    create field symbol
      FIELD-SYMBOLS: <fs>.
    Assign value of variable from calling prog to field symbol
      ASSIGN ('(SAPLIQS0)VIQMEL-MSAUS' ) TO <fs>.
    <fs> = 'X'.
    Regards,
    ravi

  • ME21N-ME51N - change value of field at item level

    Hello All,
    We create a purchase requisition from a sales order and after a purchase order in reference to the purchase requisition.
    We would like to have the sales order number in the EBAN-BSTNR and/or in EKPO-BEDNR.
    We found some user-exits but it seems that we can't change value of standard fields with these.
    Could someone help us to find a solution ?
    May be with a BADI ?
    Thanks
    Véronique

    The code below should work for you, as for explanation why it will work look at SAP note 178328 over some coffee! )
    I gave some explanation below the code but the SAP note explains it in more detail
    DATA: ls_yvbap LIKE yvbap.
    * Sales doc is in creation mode
    IF t180-trtyp = charh.
      LOOP AT xvbap.
        xvbap-spart = cobl-spart.
        MODIFY xvbap.
      ENDLOOP.
    ENDIF.
    * Sales doc is in change mode
    IF t180-trtyp = charv.
      LOOP AT xvbap.
    *   Append Y-table and set update flag if necessary
        IF xvbap-updkz EQ space.
    *     Save unchanged version of XVBAP to YVBAP
          ls_yvbap = xvbap.
          APPEND ls_yvbap TO yvbap.
          <xvbap-updkz = charu.
          upd_vbap = charu.
        ENDIF.
        xvbap-spart = cobl-spart.
        MODIFY xvbap.
      ENDLOOP.
    ENDIF.
    SAP uses two internal tables XVBAP and YVBAP in sales document processing. XVBAP which contains the order items as they are currently after the user changed them on the screen, whereas YVBAP stores only changed item records the way they were before change. So YVBAP is only populated in change mode and not in creation mode. So if we are updating XVBAP when sales document is in change mode, we should ensure that YVBAP also contains the same record the way it was before our change.
    SAP will only update the records to database if we ensure the integrity of XVBAP and YVBAP internal tables.

  • Change value of a typedef in parallels to another running action

    Hello,
    Well, I have a problem with my VI.
    To summarize I use a Vi « IdsVg.vi » to achieve some measurements process.
    This one uses an action engine as a sub-vi to store data of the front panel and to precede complementary actions. The front panel is a strict typedef…
    I programmed the Vi avoiding to use sequence structures in order to be able to do other actions on the front panel in parallels. Nevertheless I’m running out of ideas for solving my problem.
    The problem:
    I would like to change values (time constant, Boolean of graph) of the front panel at any instant when the main vi is running. The actual problem is: when I start the program, using register event I can change values of the front panel, but when the program is running the while loop in which it gets the measurement, it isn’t possible to change parameter of the front panel…  
    Is there a solution or a trick??
    Thank you for help
    Attachments:
    MyProblem.lvproj ‏10 KB

    Putting in the project file does not help much, good try though. The actual files are missing though, so nothing shows up.
    I suggest you create a separate producer consumer loop in your main vi. The vi retrieving the data could pass the relevant data (producer) and the consumer loop will then process the data and update the fron tpannel. Note, only the producer consumer loop will update the front pannel.
    You would not need a sequence structure to control the update. The producer consumer loop will only execute when you provide the necessary data.

  • Getting change values from a collection

    Title says it all. I have a collection connected to a
    datagrid and have a simple form that allows me to add/modify/delete
    entries from the collection. Now I want to send the changes to the
    collection back to the server. How do I read/parse the collection
    for these changes? Examples would be helpful. Below is what I have
    so far to examine the collection (found elsewhere) how do I extract
    the name/value pairs that have changed?
    public function
    collectionEventHandler(event:CollectionEvent):void {
    switch(event.kind) {
    case CollectionEventKind.ADD:
    addLog("Item "+ event.location + " added");
    break;
    case CollectionEventKind.REMOVE:
    addLog("Item "+ event.location + " removed");
    break;
    case CollectionEventKind.REPLACE:
    addLog("Item "+ event.location + " Replaced");
    break;
    case CollectionEventKind.UPDATE:
    addLog("Item updated");
    break;
    }

    ArrayCollection supports the length property, so you can
    simply iterate over it with a for loop and use the bracket notation
    to return each item. Build the structure you want to sent, then
    away you go.
    If you are wanting to only select changed values, you will
    have to track this yourself.
    Tracy

Maybe you are looking for

  • Can a single AE receive and deliver multiple signals at the same time?

    I've looked through the forums and the AE pdf manual and have not been able to find a definitive answer so far. We have a (all Apple) cafe in a remote location with no Apple support and we presently operate wireless music and wireless internet for cu

  • Video and audio do not sync after importing media into Premiere Pro

    After I import my video which is in the .MOV format, I notice that the video is slow and out of sync with the audio.  This makes it incredibly difficult to edit.  Any and all solutions will be helpful.  Sincerely, SheIsInquisitive

  • Master/detail photo album with fade

    hi I've created a master and detail div, when I click on a thumbnail in the master div the image in the detail div switches. This works fine. But how do I get the image to fade up and down ? It doesn't need to disolve just a simple fade down to black

  • Contacts appointments not synching after upgrading to ios6

    Most of my appointments and some of my contacts aren't showing up on my iTouch after synching with my iMac since i upgraded to ios6.

  • Report write Strange in Background

    Hi all, One of the reports created using report writer (GR55 - F030) has started behaving strangly. In one of the columns,the report when generated in the background, the desciptions of the cost center has stopped appearing and instead it is repeatin