How to not select an invoice if a certain line item type is present?

Hi,
I've created a report that lists all invoices that have a particular line item type on it.  For example, I wanted to produce a revenue report by item type, "P-Tank". So, the invoice table links to the invoice line items table. Each line item record has a "resource id" on it. The resource id links to the resource type table. So, if invoice #8 has, say, three line items and one of them has a resource type of "P-Tank" then I report on it.  Basically, I'm making a report grouped by Resource ID and the Resource ID must by of Resource Type 1, 2 or 3.  So, this report I've solved.
Now, I want to report on those invoices that do not have either a resource type 1, 2 or 3 item on it.  If I use a formula:
"Not ({resource_type.resource_type_id} in [1, 2, 3]) that doesn't work because it just omits the line item that is of resource type 1, 2 or 3....but still leaves the invoice on the report with the other line item types. * I want to identify any and all invoices that do not have either a line item resource type 1, 2, or 3 on it.*
Any help is much appreciated!
thx,
Mark

Hi Abhilash,
That didn't seem towork.  I'll simplify the example to see if we can find the answer easier this way.
I'm using two tables: invoice; and invoice_items
An invoice can have many items on it.
I don't want my query to select any invoices that have a Tank item on it (Tank has a resource id = 8).
So, I'll join the invoice table to the invoice_items table:
invoice.invoice_id = invoice_items.invoice_id.
The result set looks like the following:
Invoice #        Invoice Item #     Invoice Resource ID
22                              1                               8
22                              2                               9
23                              1                               5
So, because Invoice #22 has a line item with resource id = 8 on it I do not want Invoice #22 to appear on the report at all, regardless of what other items and resource id's are on it.
I have tried joining the two tables in every manner (e.g. inner, outer, not enforced, enforced, etc) and even when I put the condition, invoice_items.resource_id <> 8, it still brings up Invoice #22 but just omits the one line item and leaves the record with resource id 9 (in the example above).  I don't want Invoice #22 to appear at all in the report.
Does that help clarify the problem?
thx,
Mark

Similar Messages

  • How to create a separate invoice for each delivery line?

    Hello,
    Our customer is requesting a separate invoice for each delivery line. Is there a way to configure this? Or a customization?
    Thanks,
    Joy

    Hello,
    You need to do this through copy controls. in the transaction code VTFL, you need to develop a new routine and attach it in the area "Data VBRK/VBRP"
    attach your custom designed routine and it will split the invoice according to each line item.
    check the standard routines available for hints to develop the routine with your abap. there are several  standard rotuines available
    Hope this helps
    Thanks
    akasha

  • Need to prevent invoices with 0 price line items to accounting .

    Hi All,
    I have a requirement where in  I need to prevent the invoices with 0 price line items to accounting if item category is relevant for pricing.The invoices which have 0 price line items and item category has specific 0 price need not to be prevented  for accounting.
    Please provide your input to meet the requirement.
    Thanks In Advance.

    Hi,
    Please go through the below link !!! follow this and it will resolve ur issue
    Re: How to prevent invoices with 0 prices to be sent to accounting,
    Regards,
    Krishna O

  • How to highlight the whole row of a particular line item of sale

    How to highlight the whole row of a particular line item of sales order depending on condition?
    Please help its urgent..
    Looking forward your reply.
    Moderator message: please do more research before asking, show what you have done yourself when asking, do not flag posts as "urgent".
    [Rules of engagement|http://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement]
    [Asking Good Questions in the Forums to get Good Answers|/people/rob.burbank/blog/2010/05/12/asking-good-questions-in-the-forums-to-get-good-answers]
    Edited by: Thomas Zloch on Aug 9, 2011 9:30 AM

    Any ideas on what would cause this NOT to work? I added this row right after the table is created and populated and it is still not highlighted when I enter the form. The snippet of code that does this is:
    MyTableModel modelS = (MyTableModel)dataModel.get("S");
    jTable1 = new JTable(modelS);
    jTable1.setRowSelectionInterval(0,0);MyTableModel is this:
    class MyTableModel extends DefaultTableModel {
      public MyTableModel(Object[] columnNames, int numRows) {
        super(columnNames, numRows);
      public boolean isCellEditable(int row, int column) {
        if (TableKey == 'S') {
          if (column == 6) {
            return false;
        if (TableKey == 'O') {
          if (column == 0 || column == 4 || column == 5) {
            return false;
        if (TableKey == 'P') {
          return false;
      return true;
    }Can anyone help? Thanks.
    Allyson

  • Customer Invoicing Printing First page line items blank

    Hi Everybody,
    Customer Invoicing Printing First page line items blank and it is printing it from the second page.  Please help me on this.
    Regards,
    Md Ziauddin.

    item No    Material No   Descripition  Putaway Bin   SUT  Vendor Batch  LE QTY  COA   Base UOM
    this how my line item should like, i am able to print only single line item for each item no.
    if i have 5 pallets for single line item, i want the same line item to be printed 5 times and this is what i am looking at

  • VPRS Condition is missing in invoice for bacth determine line item

    Hi Gurus,
    I have an Concern, My user has created Sales order with three line items.
    He did delivery and Invoice individually for each line item.
    For 2 line items he entered batch manually and did invoice there we didn't find any issue.
    For third line item he did auto batch determination there for that item VPRS condition is missing in invoice.
    I have checked the note ( 70038 ) and I have applied the note also, But still I am facing same problem.
    Please provide me solution if any modification need to be done,
    Thanks and Regards
    Subbu

    Hi Subbu
    As VPRS condition type is coming for the first 2 line items and not for 3rd line item , so kindly check the Material Master Record->Accounting tab.What is the difference between the 3rd material and another 1st and 2nd materials.Also check in the Analysis what it is showing for the third line item billing document
    Regards
    Srinath

  • Tax Code does not appear in services PO at Services line item

    Dear Experts,
    I am trying to create a services PO with tax code. The tax code should be entered at Services Line item level not the PO line item level. But I can not see Tax Code field in the line item level. Although I have activated the the option for Tax Code at Services line item in t-code ML100. I have also checked the field reference settings for PO and External services to see if the field is suppressed.. but it is an option field in the setting...
    Can you please help what other setting needs to be done to see the tax code field at service line item level?
    Regards,

    Hi Kathrine,
    Go to SPRO-> Material management ->External services Management-> Define Screen layout
    In Field selection 5 double click field selection string 2.
    Check in additional data if your tax code is required field. refer the screen shot.
    Regards
    Subbu.

  • Get PO Confirmation and Invoice Number fron SC line item deial like GUID

    Hi All,
    I want to create ZReport where i have to find  Purchase Order , Confirmation and Invoice Number fron SC line item .
    I am looking for that tables or FM by using which i can give SC line item Guid and i can get the corrosponding PO , Confirmation and Invoice if any.
    Please suggest solution.
    Thanks in Adavnce,
    Snehal

    Hello Snehal,
    You can use following FMs to get the required deatils:
    FM: BBP_PD_SC_GETDETAIL
          E_ITMLIM_REL
          Select the second entry
          Shift+F5
          Take the HDR_GUID_A for PO
          and HDR_GUID_B for Conf
          and HDR_GUID_C for Inv
    FM: BBP_PD_PO_GETDETAIL
          enter the HDR_GUID_A
          Goto E_HEADER           select the OBJECT_ID
    FM: BBP_PD_CONF_GETDETAIL
          Goto E_HEADER           select the OBJECT_ID
    FM: BBP_PD_INV_GETDETAIL
           Goto E_HEADER           select the OBJECT_ID
    This could help you.
    Regards,
    Suneel Kumar

  • Urgent : Confirmation and invoice number of a line item of a Shopping cart

    I have developed an end to end report in SRM which gives us an end to end report of a shopping cart .
    I have got the Shopping Cart details using FM : BBP_PD_SC_GETDETAIL 
    for each item of the shopping cart in the table E_ITEM  , getting the Po number for it from  E_ITEM- BE_OBJECT_ID
    I called FM BBP_BE_PO_GETHISTORY to get the  Confirmation and Invoice number from  E_HEADER_REL of  BBP_BE_PO_GETHISTORY.
    But this function  module  gives me the confirmation and invoice number  of a particular purchase order and
    I am stuck here as I need to find out the confirmation and invoice number of  a line item and I am not finding a link  between them .
    I  tried using  FM BBP_PD_PO_GETDETAIL ,
                             BBP_PD_PO_GETLIST 
    BBP_PD_PO_DOC_FLOW  and other function modules also , however they give me the confirmation and invoices o a particular PO but I am not    able further drill down to find  confirmation and invoivce of a particular line item of a shopping cart …..
    Please let me know if there is a way to find this out ????
    Useful answers would be rewarded .
    Regards,
    Prabhu

    Hi All ,
    I was able to get a link using the function module  BBP_PD_SC_GETDETAIL . in the tables E_item  has fields BE_OBJ_ITEM  and the BE_OBJ_ITEM which give the po number and po line item number of each line item .
    then i used BBP_BE_PO_GETHISTORY Fm to get the history of the po and read the line item history based on the BE_OBJ_ITEM  no .
    Thanks to all .
    Prabhu

  • Overwrite Tax Code in Invoice tab of PO line item

    Hi all.
    Is there any user exit through which I can Overwrite Tax Code in Invoice tab of PO line item.
    I dont think a field exit will help since I have decide the tax code value based on the line item details like plant and a/c assignment cat. and header Purchase org.
    Any help will be very much appreciated.
    Thanks in anticipation.
    Regards,
    Aditya

    Hi Aditya,
    there are three different possibilities to influence tax codes in PO - user-exit is not one of them.
    If you can assign a company code to your purchase organization, then it's possible to determinate tax code based on purchase view.
    Some say, it's possible to maintain on company codes, too.
    It's possible to assign MM-tax class to sites and account assignments. Then via tax condition a tax code can be determined.
    And you can make a condition determination based on sales tax classes, but then in a pricing user exit corresponding tax class has to be read.
    Most times I use tax code determination via tax conditions - then users don't have to maintain anything in addition.
    Regards,
    Christian

  • How can I un-receive an good receipt in SAP, FOR A CERTAIN LINE ITEM

    hi experts,
    can any one please help me to solve this issue.
    "How can I un-receive an good receipt in SAP, FOR A CERTAIN LINE ITEM"
    thanks in advance,
    mohammad.

    Hi,
    In T-code MIGO, you select the line item you want and enter all the details of this line in Item details. Tick Item Ok indicator for this line item.
    Untill and unless you tick the item ok indicator for certain line item you couldnot receive the material.
    If you already received the material then Go to MBST and cancel the material document for the same.
    Hope this will help you.
    Regards,
    Goraksh.
    Edited by: goraksh dhikale on Sep 22, 2008 11:30 AM

  • How Can I Create One Entry Sheet For Multiple Line Items of A PO

    Please Tell Me How Can I Create One Entry Sheet For Multiple Line Items of A PO

    hi,
    It is not possible to create single Service Entry sheet for multiple PO line items. It is 1 to 1 relation.
    you have to make different service entry sheets for different item of service master.
    regards
    Manish Joshi

  • How can we assign different colours to different records(line items) in alv

    how can we assign different colours to different records(line items) in alv reporting?

    Hi Friend,
    Please see this SDN Wiki  for setting the color in ALV :[http://wiki.sdn.sap.com/wiki/display/ABAP/ABAP-DevelopingInteractiveALVReportusing+OOABAP]
    There are so many SDN Wiki's on this  just try with search  Alv Color display in SDN,
    Regards,

  • How to get the change mode option for the line items in SC

    Hi Everybody,
    1. when the SC has 2 line items and in that if both the line item are rejected by the approver and the requester is receiving it for accept changes and when he click on the change button and wants to change the line items of both the rejected one, the change is enable and the requester can do the changes in the line items of the shopping cart which is working fine. but in the other case
    2. when the SC has 2 line items and in that if any one of the line item is rejected and other one is approved by the approver and the requester is receiving it for accept changes and when he click on the change button and wants to change the line item of the rejected one, the change is getting disabled but for the approved line item the requester can able to do the changes.
    so can anyone help me out how to solve this issue that if any one line item is rejected in the shopping cart also it should get the editable mode when the requester wants to do any changes.
    thanks in advance.

    Hi Everybody,
    1. when the SC has 2 line items and in that if both the line item are rejected by the approver and the requester is receiving it for accept changes and when he click on the change button and wants to change the line items of both the rejected one, the change is enable and the requester can do the changes in the line items of the shopping cart which is working fine. but in the other case
    2. when the SC has 2 line items and in that if any one of the line item is rejected and other one is approved by the approver and the requester is receiving it for accept changes and when he click on the change button and wants to change the line item of the rejected one, the change is getting disabled but for the approved line item the requester can able to do the changes.
    so can anyone help me out how to solve this issue that if any one line item is rejected in the shopping cart also it should get the editable mode when the requester wants to do any changes.
    thanks in advance.

  • How can I activate drill down report for planned line items please urgent?

    Hi Everyone,
    Please suggest me how can i activate drill down report for planned line items in internal orders. S_ALR_87012993. Please suggest me, I'll award full points. I am unable to do it in client system, which has already line items. I tried in my sys with new config it is working.
    Kind regards
    Arvey.

    Hi
    It is based on the reports attached in the Report Group - TCODE: GR53
    In the Report Group screen
    Press CONFIGURE – This is to attach any Drill Down reports.
    Press the “Insert Line” icon
    As is the screen may be used to insert a Report Writer report group. To add an ABAP, press “other report type”
    Double click on “ABAP Reports”
    Enter the name of the ABAP and ENTER
    <b>RCOPCA08                       Profit Center: Plan Line Items</b>
    VVR

Maybe you are looking for

  • Profit Center Accounting Extraction

    Hi guys,    I need to extract <b>Account Group</b> in my SAP R/3 to SAP BW <b>Profit Center Accounting > Account Group</b>     Please advice if I can use any of the Standard Extractors to extract the Account Groups to SAP BW ?     Your advice is very

  • Org Level Roles / Authorization Object Roles

    Hi board, I have heard of the concept to use roles with "Organizational Values" only and no other authorization values contained. Similar the idea to exclude special authorization objects from common roles and combine them in dedicated special ones t

  • Re: Disconnected Number

    HI, I have been havinf the same problem. The number worked the evening I set it up but since then it has a recorded message from OPTUS saying the number is disconneted. I raised this with Skype already and the person couldnt fix it so they gave me a

  • CS6 photoshop message 'could not load the fast core routines module because the file was not found'

    my CS6 photoshop is giving me the message 'could not load the fast core routines module because the file was not found'. this started happening after i used a trial of photoshop CC and decided not to stay with it.  my photoshop is part of my CS6 suit

  • Itunes for mac won't recognize ipod but iTunes on parallels will

    Just upgraded itunes to 10.5 and purchased a new ipod classic (160gb). All my music is on my old macbook, but itunes won't recognize that the ipod is attached. Finder will, but iTunes won't. However, when I run iTunes in parallels desktop on the same