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.

Similar Messages

  • 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

  • How to join navegational attributes with infoset

    Hi Experts,
    How to join navegational attributes with infoset? the infoset based on ODS and both having navigational attributes,
    my requirment is to join Vendor account group navigational attributes with infoset,
    or else plz
    povid stps to crete...
    In the infoset how to  join Info Object CHAR1 to the CHAR1 in the ODS object which makes all the attributes of CHAR1 accessible in the Infoset..
    plz suggest with steps,
    regards,
    Edited by: Sap-10564461 on Apr 20, 2010 11:34 AM

    Hi,
      Consider that you have a cube/ODS which has 0MATERIAL. Say you have switched on the nav attribute Material group in the cube.
    Now since an infoset acts on a table level, it cannot read nav. attributes directly. Hence you will not be able to find 0MATERIAL__MATGROUP in the infoset.
    Now if you want to get able to obtain MATGROUP, you need to add 0MATERIAL to your infoset. One you have added 0MATERIAL, you will be see the attributes of this infoobject as fields.
    Map 0MATERIAL from the cube to 0MATERIAL from the info object. Join type is inner join. Now check the MATGROUP field under the infoobject table indicating that this field needs to be fetched by the infoset.
    Now when you run a query on the infoset, you will be able to use MATGROUP from 0MATERIAL.
    Hope this helps.
    Regards.

  • How many 'seats' are included with Adobe Creative Cloud for teams?

    How many 'seats' are included with Adobe Creative Cloud for teams?

    Hi Mrfrodo,
    There isn't a set number, you purchase the number you would need based on the size of your organization.
    This section of the FAQ might also be helpful for you to learn more about team too.
    http://www.adobe.com/products/creativecloud/faq.html#ccm-teams
    -Dave

  • How to setup the portal with the uniform style for SRM + Esourcing?

    how to setup the portal with the uniform style for SRM + Esourcing? We will setup SRM 7 + esoourcing + portal, but as we know esourcing screen style is not same with SRM, so how to uniform the style between this 2 diffirent software?  any body have idea?

    Hi,
    SAP E-Sourcing 6.0 is the solution. It is same look&feel.
    Regards,
    Masa

  • HT1343 how to use the options with F10, F11, F11 for turning the sound up or down or mute?

    Hi, I'm Hannah. I'm using a Mac. Can you show me how to use the options with F10, F11, F12 for turning the sound up, or down or mute? Thank you very much

    Normally simply pressing them should do what you want, F10 to mute; F11 to decrease volume; F12 to increase volume. However, it's possible that you have a box ticked in Keyboard preferences which modifies the behaviour of the keys, requiring you to also hold down the Fn key (bottom left key on the keyboard) to enable the function.
    Check System Preferences>Keyboard to makes sure the box indicated in the image isn't ticked.

  • How to see materials marked for deletion

    Which is the T-Code to see  materials marked for deletion . if yes where

    Hi RM,
    You can check material marked for deletion by using transaction code MM06.
    On this screen you can check whether material is marked for deletion at Client level, plant level, storage location level, valuation type level, Sales org level, Warehouse number level or storage type level.
    Hope this resolves your issue, reward if helpful.
    Regards,
    Avinash.

  • Materials marked for deletion

    Hello Gurus,
    Is it possible to eliminate materials marked for deletion?
    If so, is there any program or batch job to eliminate materials marked for deletion?
    Thanks in advance.

    Hi sap fan
    you neeed to use T-Code = SARA  and choose object MM_MATNR, then click on WRITE and create a immediate job or a background batch job and start date and spool parameters , which is used for archiving the data in SAP R/3 but you this is a very critical business decision and you need to make sure that the business manager is aware and get the consent before executing this and need to do this with help of BASIS consultant
    and you need to make sure any open purchasing related documents and inventory stocks and other whcih are dependant on this material are ALL CLOSED and first archived before this activity and settled by the accounts also because once it is archived you cannot recover it and do posting of goods
    also before you go to SARA you need to go the MM71 and enter a variant and maintain it and save the variant
    if useful please REward YOur Points
    thanks and if u have any further doubts please let us know if we can help more
    Chakri

  • How to join 1 datablock with 2 same datablocks??

    Dear Guys,,
    My Q. is how to create 2 relations between one data block (block1) with other 2 same data blocks (block2,block3)
    (2 same data blocks : reference to same physical tables) ??
    any thoughts?

    thx sara for quick reply :)
    I know how to join between datablocks,, the problem occurs when i want to join 1 details data block with two master data blocks that refer to the same table !!
    one relation breaks the other one !!
    thx

  • How to join two tables with no similar columns

    Hi all,
    I have two tables as follows:
    Table T1 have Attributes as follows:
    GLCODE,
    BRANCH,
    ITEM_NUMBER,
    DEMAND_DATE,
    QUANTITY,
    SOURCE
    Table T2 have Attributes as follows:
    FORECAST_DATE
    Now in SQL if run the following stattement iam getting out put.
    SELECT GLCODE,BRANCH,ITEM_NUMBER,DEMAND_DATE,QUANTITY, SOURCE,(SELECT DISTINCT FORECAST_DATE FROM T2) FROM T1
    The above SQL Statement giving correct results for me.
    The same SQL Statement how can we implement in mapping level?
    Regards,
    Ava

    Jaap van,
    >
    You have to specify an outer join, but how do you do that if there is no join to begin with? I would do the following (which I didn't test yet):
    add an extra column (say C_JOIN) to the T2-ingroup of the join operator and fill it with from a constant operator with say value 1. Then use T2.C_JOIN (+) = 1 as the join condition.
    If every record in T2 is guaranteed to have the same value, instead of using a deduplicator, which will read all records, sort them and deduplicate them, you can use a filter with filter condition ROWNUM < 2, which only will read one record.
    I am facing almost the same problem but not entirely thou and I was wondering if you have an idea how to even start.
    Problem:
    I got this table:SQL> desc ita.tpis32_job_status
    Name Null? Type
    JOBID NOT NULL NUMBER
    T1_ID NUMBER
    QID NUMBER
    REQ_TYPE VARCHAR2(10)
    SUBMIT_TIME DATE
    OWNERID VARCHAR2(30)
    DESCRIPTION VARCHAR2(150)
    STARTTIME DATE
    ENDTIME DATE
    STATUS VARCHAR2(50)
    ERROR_ID NUMBER
    TABLE_NAME VARCHAR2(30)
    SERVER_ID VARCHAR2(10)
    DATABASE VARCHAR2(20)
    PRIORITY NUMBER
    NUM_LINES NUMBER
    PROCESS_ID NUMBER
    QUE_TIME NUMBER
    STATUS_CODE NUMBER
    ERROR_MSG VARCHAR2(500)
    NUM_LINES_TS NUMBER
    REMOTE_STATUS NUMBER
    This the above table, i am looking for JOBID (a five digit number) like 25875.
    What I want to do is add or append this five digit number to a string to find the corresponding table in dba_tables or all_tables. The only way I have try to do this is by writing PLSQL as you see from here:
    Re: Use PLSQL to delete tables dynamically
    When the select is writing properly, the result of the five digit number from JOBID and the string should look like the below result (job_(five digit_%).
    My problem is there is no relationship between ALL_TABLES and the my own table (ita.tpis32_job_status). Any help will be appreciated.
    TABLE_NAME
    JOB_58871_OUTDATA
    JOB_58868_TS
    JOB_58868_OUTDATA
    JOB_58867_TS
    JOB_58867_CMDLBL_2
    JOB_58867_OUTDATA
    JOB_58866_TS

  • How to join each row with other in the same table without repeating, please help

    Hi,
    I have a table say Adjustment having following data
    Emp_Id                  
    Adjustment_id                      
    Date
    1000101               
    1000300                               
    2014-02-12 00:00:00.000
    1000101               
    1000301                               
    2014-02-12 00:00:00.000
    1000101               
    1000302                               
    2014-02-12 00:00:00.000
    1000101               
    1000303                               
    2014-02-12 00:00:00.000
    1000102               
    1000302                               
    2014-02-12 00:00:00.000
    1000102               
    1000303                               
    2014-02-12 00:00:00.000
    1000102               
    1000304                               
    2014-02-12 00:00:00.000
    And I want following records:
    Emp_Id                  
    Adjustment_id      Adjustment_id1              
          Date
    1000101               
    1000300                1000301                               
    2014-02-12 00:00:00.000
    1000101               
    1000300                1000302                               
    2014-02-12 00:00:00.000
    1000101               
    1000300               
    1000303                               
    2014-02-12 00:00:00.000
    1000101               
    1000301                1000302                               
    2014-02-12 00:00:00.000
    1000101               
    1000301                1000303                               
    2014-02-12 00:00:00.000
    1000101               
    1000302                1000303                               
    2014-02-12 00:00:00.000
    1000102               
    1000302                1000303                               
    2014-02-12 00:00:00.000
    1000102               
    1000302                1000304                               
    2014-02-12 00:00:00.000
    1000102                    
    1000303               
         1000304                                       
    2014-02-12 00:00:00.000

    Hi Uri,
    I am using SQL Server 2008, and I am trying join each adjustment_id with all other adjustment_id having same Date and Emp_id.
    so for following table records:
    Emp_Id                 
    Adjustment_id                
    Date
    1000102               
    1000302                         
    2014-02-12 00:00:00
    1000102               
    1000303                         
    2014-02-12 00:00:00
     1000102                   
    1000304                               
    2014-02-12 00:00:00
    Output should be:
    Emp_Id        
    Adjustment_id      Adjustment_id     
    Date
    1000102      
    1000302               1000303              
    2014-02-12 00:00:00 (first row with 2nd)
    1000102      
    1000302               1000304              
    2014-02-12 00:00:00 (first row with 3rd)
    1000102      
    1000303               1000304              
    2014-02-12 00:00:00 (2nd row with 3rd)

  • HT1727 how to share my itunes with my android phone for free?

    How to share my itunes with my android htc and samsung gallaxy phones.At one time paid for but will not sync anymore song.

    Read the directions for your phones to learn how to put music on them.

  • How to create new user, with same personal files, for troubleshooting?

    I cannot find this answer in "Finder Help", nor in the Community discussions thus far. What I must do to troubleshoot the spinnign beach ball: My next step: I must troubleshoot my friend's iMac running Mac O.S 10.6.8 by setting up a new user, called "Test". This I can do easily. However, what I am unsure of is this: as this "new user", actually just me as a tester, I must be able to access the same email, Word files, Desktop, photos, etc. that I used to access. How, then? Copy all into a shared folder or what? There must be a less cumbersome way. I do NOT wish to delete anything. Of course, I have justmade a perfect backup of everything on my hard drive. Please advise re my next step: sharing the "User" little house files, with myself, as the new, possilbly temporary, user. Thank you so much, anyone and everyone!

    You shouldn't do any of that for troubleshooting. The test user account should be pristine. If you copy stuff from the old account, then you also copy whatever is causing a problem.
    Just use the Accounts/Users & Groups preferences to create a second user called, "test." Make this user an admin user. Then log out of the old account and log into the new one. That's it. You can still access and use applications in the Applications folder if you need to test third-party applications.
    We could be more helpful if you explain just what you need to troubleshoot. If just the spinning beachball is your issue, then visit The XLab FAQs and read the FAQ on resolving the SBOD problem.
    If the computer is simply running slowly then read the following:
    Things You Can Do To Resolve Slow Downs
    If your computer seems to be running slower here are some things you can do:
    Start with visits to:     OS X Maintenance - MacAttorney;
                                      The X Lab: The X-FAQs;
                                      The Safe Mac » Mac Performance Guide;
                                      The Safe Mac » The myth of the dirty Mac;
                                      Mac maintenance Quick Assist.
    Boot into Safe Mode then repair your hard drive and permissions:
    Repair the Hard Drive and Permissions Pre-Lion
    Boot from your OS X Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Utilities menu. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the installer.
    Repair the Hard Drive - Lion/Mountain Lion/Mavericks
    Boot to the Recovery HD:
    Restart the computer and after the chime press and hold down the COMMAND and R keys until the Utilites Menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD disk icon and click on the arrow button below.
    When the recovery menu appears select Disk Utility. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported, then click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the main menu. Select Restart from the Apple menu.
    Restart your computer normally and see if this has helped any. Next do some maintenance:
    For situations Disk Utility cannot handle the best third-party utility is Disk Warrior;  DW only fixes problems with the disk directory, but most disk problems are caused by directory corruption; Disk Warrior 4.x is now Intel Mac compatible.
    Note: Alsoft ships DW on a bootable DVD that will startup Macs running Snow Leopard or earlier. It cannot start Macs that came with Lion or later pre-installed, however, DW will work on those models.
    Suggestions for OS X Maintenance
    OS X performs certain maintenance functions that are scheduled to occur on a daily, weekly, or monthly period. The maintenance scripts run in the early AM only if the computer is turned on 24/7 (no sleep.) If this isn't the case, then an excellent solution is to download and install a shareware utility such as Macaroni, JAW PseudoAnacron, or Anacron that will automate the maintenance activity regardless of whether the computer is turned off or asleep.  Dependence upon third-party utilities to run the periodic maintenance scripts was significantly reduced since Tiger.  These utilities have limited or no functionality with Snow Leopard or later and should not be installed.
    OS X automatically defragments files less than 20 MBs in size, so unless you have a disk full of very large files there's little need for defragmenting the hard drive.
    Helpful Links Regarding Malware Protection
    An excellent link to read is Tom Reed's Mac Malware Guide.
    Also, visit The XLab FAQs and read Detecting and avoiding malware and spyware.
    See these Apple articles:
              Mac OS X Snow Leopard and malware detection
              OS X Lion- Protect your Mac from malware
              OS X Mountain Lion- Protect your Mac from malware
              About file quarantine in OS X
    If you require anti-virus protection I recommend using VirusBarrier Express 1.1.6 or Dr.Web Light both from the App Store. They're both free, and since they're from the App Store, they won't destabilize the system. (Thank you to Thomas Reed for these recommendations.)
    Troubleshooting Applications
    I recommend downloading a utility such as TinkerTool System, OnyX, Mavericks Cache Cleaner, or Cocktail that you can use for removing old log files and archives, clearing caches, etc. Corrupted cache, log, or temporary files can cause application or OS X crashes as well as kernel panics.
    If you have Snow Leopard or Leopard, then for similar repairs install the freeware utility Applejack.  If you cannot start up in OS X, you may be able to start in single-user mode from which you can run Applejack to do a whole set of repair and maintenance routines from the command line.  Note that AppleJack 1.5 is required for Leopard. AppleJack 1.6 is compatible with Snow Leopard. Applejack does not work with Lion and later.
    Basic Backup
    For some people Time Machine will be more than adequate. Time Machine is part of OS X. There are two components:
    1. A Time Machine preferences panel as part of System Preferences;
    2. A Time Machine application located in the Applications folder. It is
        used to manage backups and to restore backups. Time Machine
        requires a backup drive that is at least twice the capacity of the
        drive being backed up.
    Alternatively, get an external drive at least equal in size to the internal hard drive and make (and maintain) a bootable clone/backup. You can make a bootable clone using the Restore option of Disk Utility. You can also make and maintain clones with good backup software. My personal recommendations are (order is not significant):
      1. Carbon Copy Cloner
      2. Get Backup
      3. Deja Vu
      4. SuperDuper!
      5. Synk Pro
      6. Tri-Backup
    Visit The XLab FAQs and read the FAQ on backup and restore.  Also read How to Back Up and Restore Your Files. For help with using Time Machine visit Pondini's Time Machine FAQ for help with all things Time Machine.
    Referenced software can be found at MacUpdate.
    Additional Hints
    Be sure you have an adequate amount of RAM installed for the number of applications you run concurrently. Be sure you leave a minimum of 10% of the hard drive's capacity as free space.
    Add more RAM. If your computer has less than 2 GBs of RAM and you are using OS X Leopard or later, then you can do with more RAM. Snow Leopard and Lion work much better with 4 GBs of RAM than their system minimums. The more concurrent applications you tend to use the more RAM you should have.
    Always maintain at least 15 GBs or 10% of your hard drive's capacity as free space, whichever is greater. OS X is frequently accessing your hard drive, so providing adequate free space will keep things from slowing down.
    Check for applications that may be hogging the CPU:
    Pre-Mavericks
    Open Activity Monitor in the Utilities folder.  Select All Processes from the Processes dropdown menu.  Click twice on the CPU% column header to display in descending order.  If you find a process using a large amount of CPU time (>=70,) then select the process and click on the Quit icon in the toolbar.  Click on the Force Quit button to kill the process.  See if that helps.  Be sure to note the name of the runaway process so you can track down the cause of the problem.
    Mavericks and later
    Open Activity Monitor in the Utilities folder.  Select All Processes from the View menu.  Click on the CPU tab in the toolbar. Click twice on the CPU% column header to display in descending order.  If you find a process using a large amount of CPU time (>=70,) then select the process and click on the Quit icon in the toolbar.  Click on the Force Quit button to kill the process.  See if that helps.  Be sure to note the name of the runaway process so you can track down the cause of the problem.
    Often this problem occurs because of a corrupted cache or preferences file or an attempt to write to a corrupted log file.

  • Receipting materials marked for deletion?

    We have a situation whereby a vendor has been taken over by another.
    As such all materials for the first vendor have been flagged for deletion. However there are still some open PO's. Messy I know though will the open PO's get receipted without removing the flags?
    Please advise, thanks

    Dear Dominic,
    As per my knowledge once you flag vendor for deletion you cannot carry any purchasing transaction with that vendor.
    It would have only possible if you have blocked vendor from accounting point of view ( FK 05) then you could have brought material against open PO but you cannot make payment transaction unless flag for deletion is removed.
    Reward if useful,
    Vivek Maitra

  • Materials flag for deletion upon creation of sale order

    hi experts
    When I use a material that is flag for deletion the system issues the following messge : "Material xxxx is marked for deletion"
    message no V1406 - application area: V1, message number 406
    This message is displayed only as "Information" only however I need to change to "Error" where the user will not be able to proceed.
    Any suggestion as how I can change this message to "Error"
    thanks

    Hello cyrus,
    You need to setup material status message and assign it to material master instead of changing the message (I think it is defined as warning message in program itself , experts pl. confirm)
    The following thread will helps you.
    http://www.sapfans.com/forums/viewtopic.php?p=515309&sid=d48b8c16cd95dbf811cfb970512c6cf6
    Regards
    Arif Mansuri

Maybe you are looking for

  • Creation of Custom Change Object

    Hi all, I tried to create a custom change object from tcode- SCDO,but its asking for name space, and even i dont know to create it like the tables it asking for. I have successfully triggered a WF using standard change Object,but am not able to creat

  • BDC- problem in uploading more line items

    Hello friends, I am using BDC to upload data for TXN ME31L. At item level I am able to upload only 15 records. After that it gives error. While doing recording i have entered items only for two material  So can anyone help me? What i think is after 1

  • Applescript say app names during Cmd + Tab

    I'm writing a script for a speakable item that will let me switch applications without having to touch the computer, by invoking the Cmd+Tab functionality.  So far, I have the following: tell application "System Events"      key down command      key

  • Journée technique Toulouse du 15 nov 2011

    Bonjour Je ne sais pas comment faire autrement mais je cherche a contacter la personne de chez Assytem qui a fait une presentation ce mardi 15 novembre. Cdt Tinnitus CLAD / Labview 2011, Win Xp Mission d'une semaine- à plusieurs mois laissez moi un M

  • Cisco Unity - Greeting settings

    Hello, I have the following situation, a manager will forward his phone to his assistent. His assistent has her phone "Forward All" to Voicemail. But when they do this they hear the standard unity greeting and not the personal greeting. I've checked