How to update vbak,vbap in MV45AFZZ

DATA:  lw_WZEIT TYPE marc-WZEIT,
            lw_date  type sy-datum.
LOOP at XVBAP where PSTYV = 'ZRET'.
SELECT single WZEIT
         into lw_WZEIT
         from marc
        where matnr = xvbap-matnr.
IF sy-subrc = 0.
    lw_date = lw_WZEIT + sy-datum.
   if vbak-VDATU < lw_date.
     move 'Z1' to xvbak-LIFSK.
      move 'A' to xvbap-ABGRU .
   endif.
ENDIF.
ENDLOOP.
    how to update vbak vbap table in MV45AFZZ ( while saving va01).
Thanks
Suresh

Hi Suresh,
It is not recommended to code custom update to table VBAK and VBAP directly in MV45AFZZ ( i don't think that would work either since the lock is taking place ).
Use the appropriate procedure instead ( that is USEREXIT_SAVE_DOCUMENT and USEREXIT_SAVE_DOCUMENT_PREPARE depend on requirement ) , and
perform modifications you need to internal table vbak and xvbap. Standard SAP program will then update the database tables for you.
XVBAK is available through all part of MV45AFZZ since this is defined globally to include non vbak header information.
Rettung von VBAK Feldern nach AG-Änderung.
DATA:    BEGIN OF XVBAK.
        INCLUDE STRUCTURE VBAK.
DATA: AGUPDA LIKE RV02P-AGUPD,
          WEUPDA LIKE RV02P-WEUPD,
          AUARTUPDA,
          END OF XVBAK.
Rgds,
Tuwuh Sih Winedya

Similar Messages

  • How to join VBAK, VBAP with MARC materials flaged for deletion

    Hi,
    Iam have to extract only sales orders with materials which are not flagged for deletion.
    In MARC table, I have to use LVORM field to restrict materials which are not flagged for deletion. Can anybosy explain in this regard and combine with VBAP and VBAK tables.
    Thanks.

    Hi Raju,
    Check below code,
    SELECT f1 f2... INTO TABLE i_mara
    FROM mara
    WHERE ur conditions from selection screen if any
    AND lvorm EQ space.
    CHECK NOT i_mara[] IS INITIAL.
    SORT i_mara BY matnr.
    SELECT avbeln a.... bposnr b...
    INTO TABLE i_salesdata
    FROM vbak AS a INNER JOIN vbap AS b
    ON avbeln EQ bvbeln
    FOR ALL ENTRIES IN i_mara
    WHERE ur conditions from selection screen if any
    AND b~matnr EQ i_mara-matnr.
    CHECK NOT i_salesdata IS INITIAL.
    SORT i_salesdata BY vben.
    Hope u got the sulution for ur problem.
    Thanks,
    Vinod.

  • How to update pick up date (VBAK-ABHOD) field in sales order

    I am creating sales orders using BAPI_SALESORDER_CREATEFROMDAT2 but it is not updating VBAK-ABHOD field i .e pick up date. Is there any FM which updates the pick up date VBAK-ABHOD also.
    I need to update pick up date for a special type of sales orders (Delivery orders) which are created in reference to schedule agreement.
    Is there any other way we can update pick up date. My last option is BDC but donot want to use it.
    Thanks in Advance.
    Rajesh.

    Hi Rajesh,
    You can not find any field in BAPI Change Or Create for sales order even header change BADI is for SAP Modification only. The best way to code in form USEREXIT_MOVE_FIELD_TO_VBAP  in MV45AFZZ, orelse you can use CALL TRANSACTION Method.
    Please let me know if you have any issues.
    Thanks and regards,

  • How to update VBAP-KBMENG using BAPI_QUOTATION_CREATEFROMDATA?

    Hello All,
    Using BAPI_QUOTATION_CREATEFROMDATA I can easily create quotation with quantity VBAP-KWMENG(Cumulative order quantity).
    But how to update VBAP-KBMENG(Cumulative confirmed quantity in sales unit)?

    Dear megha,
                  Check the  BAPIITEMEX-REQ_QTY in ORDER_ITEMS_OUT from BAPI_QUOTATION_CREATEFROMDATA ,directly pass the value to this field.I hope,it will help you.
    <=<< Sharing Knowledge is a way to Innovative >=>>
    By,
      Yoga

  • Sales Document from VBAK ,VBAP and VEDA

    Hi ,
    I need to fetch the Sales Document from VBAK and VBAP and VEDA with the contract sign date for sales document line item .
    Contract sign date is in selection screen as select options.
    Please let me know how to fetch the sales Document per line item from these 3 tables considering that A sales document could have many line items and each can have a different sign date.
    Thanks
    Sachin

    Hi,
    The link between all the tables VBAK, VBAP and VEDA is VBELN i.e sales document number.
    However, while fetching from VBAP and VEDA you would need to consider POSNR as well.
    As your ABAPer to code the logic using 'for all entries' method.
    Regards,
    Amit
    Edited by: Amit Iyer on Jun 23, 2011 12:28 PM

  • BAPI Extension - Sales Order(VBAK, VBAP)

    Hi all,
              Please help me in the issue .  I have added user custom fields for sales order va01 in header and item . i am using bapi for creating sales order . I need do use Extensionin struture for updating table vbak and vbap. Can anyone brief the procedure for acheiving the same.
    Thanks in advance,

    Hi Eric,
    Extensions for VBAK, VBAP can be filled like this:
    CLEAR e_extension.
    e_extension-structure     = 'BAPE_VBAK'.   ---> For VBAK
    e_extension-valuepart1+10 = VAL1
    e_extension-valuepart1+46 = VAL2.
    e_extension-valuepart1+56 = VAL3.
    e_extension-valuepart1+59 = VAL4
    APPEND e_extension TO t_extension.
    The same for VBAP
    CLEAR e_extension.
    e_extension-structure     = 'BAPE_VBAP'.   ---> For VBAP
    e_extension-valuepart1+10 = VAL1
    e_extension-valuepart1+46 = VAL2.
    e_extension-valuepart1+56 = VAL3.
    e_extension-valuepart1+59 = VAL4
    APPEND e_extension TO t_extension.
    CALL FUNCTION 'BAPI_SALESORDER...."
        TABLES
          extensionin        = t_extension.
    Hope this helps.
    Ernesto
    Edited by: Ernesto Caballero on Feb 24, 2010 3:03 PM

  • How to update link and import data of relocated incx file into inca file?

    Subject : <br />how to update link and import data of relocated incx file into inca file.?<br />The incx file was originally part of the inca file and it has been relocated.<br />-------------------<br /><br />Hello All,<br /><br />I am working on InDesignCS2 and InCopyCS2.<br />From indesign I am creating an assignment file as well as incopy files.(.inca and .incx file created through exporing).<br />Now indesign hardcodes the path of the incx files in inca file.So if I put the incx files in different folder then after opening the inca file in InCopy , I am getting the alert stating that " The document doesn't consists of any incopy story" and all the linked story will flag a red question mark icon.<br />So I tried to recreate and update the links.<br />Below is my code for that<br /><br />//code start*****************************<br />//creating kDataLinkHelperBoss<br />InterfacePtr<IDataLinkHelper> dataLinkHelper(static_cast<IDataLinkHelper*><br />(CreateObject2<IDataLinkHelper>(kDataLinkHelperBoss)));<br /><br />/**<br />The newFileToBeLinkedPath is the path of the incx file which is relocated.<br />And it was previously part of the inca file.<br />eg. earlier it was c:\\test.incx now it is d:\\test.incx<br />*/<br />IDFile newIDFileToBeLinked(newFileToBeLinkedPath);<br /><br />//create the datelink<br />IDataLink * dlk = dataLinkHelper->CreateDataLink(newIDFileToBeLinked);<br /><br />NameInfo name;<br />PMString type;<br />uint32 fileType;<br /><br />dlk->GetNameInfo(&name,&type,&fileType);<br /><br />//relink the story     <br />InterfacePtr<ICommand> relinkCmd(CmdUtils::CreateCommand(kRestoreLinkCmdBoss)); <br /><br />InterfacePtr<IRestoreLinkCmdData> relinkCmdData(relinkCmd, IID_IRESTORELINKCMDDATA);<br /><br />relinkCmdData->Set(database, dataLinkUID, &name, &type, fileType, IDataLink::kLinkNormal); <br /><br />ErrorCode err = CmdUtils::ProcessCommand(relinkCmd); <br /><br />//Update the link now                         <br />InterfacePtr<IUpdateLink> updateLink(dataLinkHelper, UseDefaultIID()); <br />UID newLinkUID; <br />err = updateLink->DoUpdateLink(dl, &newLinkUID, kFullUI); <br />//code end*********************<br /><br />I am able to create the proper link.But the data which is there in the incx file is not getting imported in the linked story.But if I modify the newlinked story from the inca file,the incx file will be getting update.(all its previous content will be deleted.)<br />I tried using <br />Utils<IInCopyWorkflow>()->ImportStory()<br /> ,But its import the incx file in xml format.<br /><br />What is the solution of this then?<br />Kindly help me as I am terribly stuck since last few days.<br /><br />Thanks and Regards,<br />Yopangjo

    >
    I can say that anybody with
    no experience could easily do an export/import in
    MSSQLServer 2000.
    Anybody with no experience should not mess up my Oracle Databases !

  • How to update ADF VO object to refresh the data in ADF Pivot table

    I need to know how to update the View object so that the date in pivot table is refreshed/updated/filtered.
    here are the steps I performed to create ADF pivot table application using VO at design time.
    1) created a collection in a Data Control (ViewObject in an ApplicationModule) that provides the values I wanted to use for row and column labels as well the cell values (Used the SQL query)
    2) Dragged this collection to the page in which wanted to create the pivot table
    3) In the pivot table data binding editor specified the characteristics of the rows (which attribute(s) should be displayed in header), the columns (likewise) and the cells.
    Now, I have a requirement to update/filter the data in pivot table on click of check box and my question is how to I update the View object so that the date in pivot table is refreshed/updated/filtered.
    I have got this solution from one of the contact in which a WHERE clause on an underlying VO is updated based upon input from a Slider control. In essence, the value of the control is sent to a backing bean, and then the backing bean uses this input to call the "filterVO" method on the corresponding AppModule:
    but, I'm getting "operationBinding" object as NULL in following code. Please let me know what's wrong.
    here is the code
    Our slider component will look like
    <af:selectBooleanCheckbox label="Unit" value="#{PivotTableBean.dataValue}"
    autoSubmit="true" />
    The setDataValue() method in the backing bean will get a handle to AM and will execute the "filterVO" method in that, which takes the NumberRange as the input parameter.
    public void setDataValue(boolean value) {
    DataValue = value;
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding = (OperationBinding)bindings.getOperationBinding("filterVO");
    Object result = operationBinding.execute();
    The filterVO method in the AMImpl.java will get the true or false and set the where Clause for the VO query to show values.
    public void filterVO(boolean value) {
    if (value != null) {
    ViewObjectImpl ibVO = getVO1();
    ibVO.setWhereClause("PRODUCT_TOTAL_REVENUE(+) where rownum < 10");
    ibVO.executeQuery();
    }

    Did you define a filterVO action in your pagedef.xml file?
    You might want to read on how to access service method from a JSF Web Application in the ADF Developer Guide for 10.1.3 chapter 8.5

  • I have downloaded the latest pages  update on my iPad, but my iMac still has version 4.3 and I cannot find out how to update it only desktop. When I try to send something from my iPad pages to via email to be opened on my desktop in Pages, it won't open P

    I have downloaded the latest pages update on my iPad, but my iMac still has Pages version 4.3, and I cannot find out how to update it on my desktop. When I try to send something from my iPad pages via email to be opened on my desktop in Pages, it won't open in Pages. I get a message that it can't be opened because the version is too old. I sent the document as a PDF and it worked. But I want to be able to use Pages back and forth. HOw do I update the Pages version on my desktop iMac?

    The file format used by the iOS versions of the iWork apps can only be read by the new iWork apps on your Mac - i.e. Keynote 6, Pages 5 & Numbers 3. Those versions for the Mac require Mavericks, OS X 10.9. The "too old" error on a Mac comes if you are trying to open an iWork '08 or earlier file in the newest apps. If you do have the newest apps you can open the files from your iPad.
    If you can't or don't want to upgrade to Mavericks & the newest iWork apps your best option would be to export/share the files from the iPad to a type an older version of iWork can read such as Word, text, Excel, etc.
    Or contact AppleCare. They made this mess, let them fix it.

  • How to update an existing item in a sharepoint list using the WSS adapter for Biztalk

    Is there a way that a record in SP list be updated using WSS adapter in biztalk ?
    BizTalk 2013 and SP 2013 ..
    Regards
    Ritu Raj
    When you see answers and helpful posts,
    please click Vote As Helpful, Propose As Answer, and/or Mark As Answer

    A ListItem has its own unique row id so in all likelihood, an insert with the same data will result in a new list entry. The Lists Web Service however, has an UpdateListItem method which will take an update request. [refer
    http://msdn.microsoft.com/en-us/library/office/websvclists.lists.updatelistitems(v=office.15).aspx ]
    There is another note in the conference (marked answered) to your List Item Update problem. Probably worth a try too. [refer
    http://social.msdn.microsoft.com/Forums/en-US/bee8f6c6-3259-4764-bafa-6689f5fd6ec9/how-to-update-an-existing-item-in-a-sharepoint-list-using-the-wss-adapter-for-biztalk?forum=biztalkgeneral ]
    Regards.

  • How to update the table available in BADI method

    Hi Friends,
    I have to implement one badi ME_REQ_POSTED for purchase requistion, in this badi  I have to read first line item and do
    some check...if that check is true i need to update subsequent line item (line 20, 30, 40 or so) with purchase group and MRP controller.
    In this BADI i have method POSTED, in this method parameter IM_EBAN is a table which i need to modify with my different
    values for purchase group and MRP controller.
    Kindly let me know how to update this table, so the changes can be reflected in purchase requistion.
    Since when I tried to directly modify the table in a loop, system throw one error stating IM_EBAN can not be modified.
    kindly help.
    pradeep

    hi
    I have implemented this exit but it does not stop at it while saving Purchase requistion. But my previous BADI stops at it when saving.
    Kindly guide.

  • How to update the table value in the valuechange event?

    I have an input field in the datatable with the valueChangeListener
    <rich:dataTable id="cart" value="#{cart.cartList}" var="item">
    <h:inputText value="#{item.cost}" id="qty" valueChangeListener="#{items.updateCost}" onchange="submit()">
    <h:outputText value="#{item.errorMsg}"> </h:outputText>
    in the backing bean
         Item item = (Item) model.getRowData();
    // do some update, if the cost too larger, change to max_cost
         item.setCost(max_cost);
         item.setErrorMsg("Error Msg");
    After calling the valuechange method, the screen output doesn't update the cost.
    How to update the table value in the valuechange event?

    As you're misusing the valueChangeListener to set another input field, you need to skip the update model values phase. Otherwise the value set in the valueChangeListener will be overridden by the submitted value. You can do this by calling the FacesContext#renderResponse() inside the valueChangeListener method. This will shift the current phase immediately to the render response phase, hereby skipping the update model values and invoke application phases.

  • Has anyone been able to contact Adobe to learn why their Flash Player does not work on Mac OS 10.6.8, no matter how many updates you install?  This seems like a big error by Adobe.

    I have thee Mac computers with Mac OS 10.6.8, one of which is a Mac Pro.  No matter how many updates I install from Adobe, their Flash Player does not work on any of these 3 computers.  I don't know how to contact Adobe Systems about this problem, but I think it is their responsibility to make sure that their so-called "universal" software works proplerly on a relatively recent operating system like OS 10.6.8 that is still in widespread use.  When you install the updates, nothing happens -- not even an error message.  What is the point of a universal player that is not universal?  It works fine on my MacBook Pro with OS 9 Mavericks, but it does not work at all -- indeed, has never worked -- on my 3 Macs with OS 10.6.8.  Has anyone contacted Adobe Systems to find out why the Flash Player does not work with OS 10.6.8 and what they plan to do about it?

    Where are you getting Flash from?
    Get the appropriate dmg installer here and then run it.
    http://www.adobe.com/products/flashplayer/distribution3.html
    If it still won't install, do these two things: First uninstall any Flash by going into the second level Hard Drive Library>Internet Plug-ins, and trash the Flash Player.plugin and flashplayer.xpt. Then boot into Safe Boot, Shift at the startup chime (give it much longer than a usual boot) and run the installer while booted in Safe Boot.

  • How to update attributes from OIM to AD in case of LDAPSync

    Hi All,
    In our scenario, we have LDAPSync configured for OIM AD Integration. OIM version is OIM 11gR2 PS1 (11.1.2.1.0.0)
    It is working fine and On user creation in OIM ,RealTime user creation under specified container in AD is happening.It is SSL enabled,so password is also getting updated from OIM to AD.
    But we have following conflicting scenario --
    -   As per our requirement we have to generate random password for User in OIM. For that we have PostProcess event handler implemented in OIM.
    - We have tested LDAPSync by creating user manually through OIM console. While creating user manually, we have provided value for password attribute along with other attributes.
        So, password attribute in AD will get updated for User along with all other attributes values mapped for AD from OIM.
    - But, in our scenario random password is generated for User through OIM post process event handler and it will be updated again in user profile of user created manually in OIM. This password is sent to User through mail.
      As this password event handler will get triggered after LDAPSnyc only, this password will not be update in AD for manually created user in OIM. So he can log into OIM with this new password but not to AD system.
      He will be able to login to AD system with same User ID but with password which was set at time of manual User Creation in OIM and not with the password updated in OIM user profile by PostProcess event handler.
    Is it possible to set password for user through PreProcess even handler implementation for Random Password generation. In this case also , the default OIM post process
    password generator will override the PreProcess event handler.How to resolve this issue.
    Also,when AD connector is in place in OIM environment we would be having change/update tasks for any attribute update to be send from OIM to AD.
    How this update scenario will be implemented from OIM to AD in case of LDAPSync ?
    Please provide any helpful pointer on this.
    Thanks,
    RPB

    Password :
    Increase order of calling for custom password event handler than OOTB handler.
    Update:
    you wanted to update custom fields?
    Did you check default update tasks comes with connector?

  • How to update my mac book pro??

    how to update my mac ???

    Software Update under the Apple menu (upper left corner).
    If you are at 10.6.8 then the only way to update would be purchasing Mountain Lion via the App Store application.

Maybe you are looking for