ABAP report - Check Po items Material group

Hi All,
I would like in my abap report to check efficiently each line item in the Purchase order and make sure each line item should have the same material group.
Any ideas appreciated.
Meghna

You can gather all the PO items from the table EKPO into a STANDARD TABLE like the the EKPO. For each line of the table LT_EKPO you will searching into the MARA (MARA-MATNR = EKPO-MATNR) and you will collect the MARA-MATKL into an internal table that will have only one field, the Material Group. At the end you will check how many lines has the internal table. Becouse you wil you the COLLECT instead of APPEND, if the PO has only one Material Group then this table should have only one line.
Check the following code (it has been written by hard)
With Regards
George
TABLES: MARA, EKPO.
TYPES: BEGIN OF TY_GROUP,
                 MATKL LIKE MARA-MATKL,
             END OF TY_GROUP.
DATA: lt_group TYPE STANDARD TABLE OF TY_GROUP,
            wa_group LIKE LINE OF lt_group.
DATA: lt_ekpo LIKE EKPO occurs 0,
            wa_ekpo LIKE LINE OF lt_ekpo,
            lines_count TYPE I.
SELECT * FROM EKPO INTO TABLE lt_ekpo
  WHERE EBELN = p_ebeln.
SORT lt_ekpo.
LOOP AT lt_ekpo INTO wa_ekpo.
    CLEAR MARA.
    SELECT SINGLE * FROM MARA
       WHERE MATNR = wa_ekpo-matnr.
    WA_GROUP-MATKL = MARA-MATKL.
   COLLECT wa_group INTO lt_group.
   CLEAR wa_group.
ENDLOOP.
DESCRIBE TABLE lt_group LINES lines_count.
IF lines_count > 1.
DO SOMETHING.
ENDIF.

Similar Messages

  • Report for spending per material group

    Hi Gurus,
    Is there a report that will show us the total spend per material group
    Thanks
    Anusha

    Try LIS reports starting with MC*. For material group purchasing values you can try MC$<.
    Thanks...

  • Standard report on 'Ext Material group'

    Is there any standard report available on 'Ext Material group' ? This field is present in Basic Data 1 view of material master.

    Try table: MARA @ SE16 & look for field: EXTWG.
    Thanks,
    Rajoo

  • Report sale by material Group

    HI, 
    Can anyone tell me if there are any standard report that I can get sales order by material Groups???

    Dear Ryan
    There is no standard report available based on material group.  But you can generate the same through query <i><b>SQVI and table join MARA</b></i> (for Material Group) and <i><b>VBAK</b></i> (for sales order number) or <i><b>VBRP</b></i> (for sales details).
    Thanks
    G. Lakshmipathi

  • Report on Material group hierarchy

    Dear All,
    As we are runnning the report for material group hierarchy, Material
    hierarchy is not appering in any of the standard reports like MB51,MB5B
    etc.We need to take the report based on material group hierarchy,
    Is there any standard report  to fetch the Material group Hierarchy,.
    How and what configuration needs to be done for mateiral group hierarchy. Any steps.please let me know.
    Kindly guide us on this.
    Regards,
    Girish
    0821-3983076

    Hi praveen,
    I know Material group in general. But my query is to get report in any standard report , Whether material group hierarchy is there?
    Levels of Hierarchy with material group is there?
    Thanks & Regards,
    Girish

  • Material Group Report

    Hi All
    SD system have material group 1 to 5 (Sales Org View in Material Master).
    I want to see report drill down to Material Group.
    Could you tell me how to show report in each Material group (quantity, value...).
    Thank and Best regards,
    Thang

    Hi,
    This can be possible by configuring SIS (Sales information system) ,t- code mcsi
    select a table with material group and active the table and run it in mcsi
    The report will with give material group
    Thanks

  • Report based on Material group

    Dear all,
    Actually our Business wants a report based on the material group and G/L account.
    For each material group what are the accounting documents generated and the G/L account triggered with amount.
    Example :
    mat.grp         G/L account(121001)  G/L account (121002)
    NUFW             3000 INR                                2000 INR
    Please can anyone suggest me
    What will be my logic to generate a report and how can i extract data
    Regards
    subhash
    Edited by: subhash karipi on Oct 24, 2008 11:49 AM

    hi,
    use ME2N-with selection para meterWE101
    if required use dynamic selection......

  • MM-SRV: Adopt Material Group from Service Master instead of default in SPRO

    At my current client we are encountering a problem when creating requisitions for services.  When the system was originally configured years ago, a default value for material group was entered in the IMG under:
    Logistics > Materials Management > External Services Management > Source Determination and Default Values > For Client
    Field is "Default material group at item level" (V_T165-MATKL)
    Up to now this singular default value was fine because they only had one material group for services.  They are now wanting to further stratify their services spend, so there are now several additional values for Material Group that can (and are) used among their service master records.  Having a single default value for Material Group is resulting in incorrect reporting of spend per Material Group.
    I removed the default value in the config node stated above, but now the problem is that when creating a requisition line for services (item category D) in ME51N, no value for Material Group comes in at all, resulting in an error because Material Group is a mandatory field.  Making the field optional on the Field Selection Groups is not a valid solution, as they need Material Group for spend reporting.
    What we really need is for the Material Group to be automatically copied over from the service master data, in the same manner that this takes place for the material group contained in a material master.
    Is this possible?
    Thanks in advance,
    Jason

    Hi,
    Hi,
    1) If service master is used in the PO item, then the system will take the                    
    material group from the service master (AC01). 
    2) If no service master is maintained then the system will take the                 
    material group from the table T023. To be able to change this material group on services level - if you want a different material group on services level, you must set the field ESLL-MATKL for visible in the table control settings, and the change of the service group must be carried out manually.
    Please be advised that it is the standard behaviour that the material               
    group on service level is not updated automatically after you have                  
    changed the material group on purchasing level. The material group on               
    service level must be adjusted manually.                         
    3) By default for service lines the system will consider the material              
    group which is entered at the Item level.                                                                               
    Services can have different material groups, therefore you can change               
    the material group at service level. The material group in service line             
    can be different and always takes higher priority from the material                 
    group at the item level.        
    Regards,
    Edit

  • Optional material group for services in purchase order

    Hello to everyone,
    does anybody know how can I put material group as optional instead of mandatory in purchase order for services?
    Regards

    Hi,
    Can be done screen layout at document level in following path
    SPRO->: MM -> Purchasing -> Purchase order -> Define screen layout at document level.
    Click ME21N and then double/ click basic data/item and select check box of material group as optional entry and save.
    Note: In t.code ML91, you can make  Material Group as default for  Service  PO.
    Regards,
    Biju K

  • How assign ABAP programs & T codes to auth groups R3 4.71, oracle 9.2.0.7

    Hi Experts,
    How to assign ABAP programs and customized transactions to authorization groups. R3 4.71, oracle 9.2.0.7, Sun Solaris.
    Can some one help me...
    Thanks in advance. . .

    Hi Jalli,
    Take a look at how SAP uses tcode S_ALR_87101286 to control the start of a report either via SE38 or via the tcode itself.
    In that transaction you can also read the documentation on protecting and restoring ABAP reports using the program authorization group concept. Click on the "information" icon or start "transaction" .HE from the first screen S_ALR_87101286 for more detailed infos, or select "Documentation" in SE38.
    Cheers,
    Julius

  • PO Line Item wise gross value for combination of WBS and Material Group

    Hello,
    Our requirement is to get report for PO Line Item wise gross value for combination of WBS and Material Group. Standard report ME2J gives net price but not gross value for Material Line items. Please let me know if any standard report( or ME2J) will suffice this requirement.
    Regards,
    Milind Dumbre

    Dear Milind
    No standard report available to get the PO Line Item wise gross value for combination of WBS and Material Group. Please go for development by taking reference ME2J.
    Warm regards
    Ramakrishna

  • Missing Item Category Group data in Material SD data in CRM

    Hi crm experts,
    Please help us. We are trying to identify what's the rootcause of the problem we experienced in CRM regarding the Item category group. We are maintaining material master in ECC and it will be replicated in CRM via middleware. The data item category group is properly maintained in ECC but when we checked in CRM, only 3 of the sales areas have it.
    Sales Area 1 - YES
    Sales Area 2 - NO
    Sales Area 3 - YES
    Sales Area 4 - YES
    So we will do a request load for the data to show also on Sales Area 2.
    Item category group were maintained in the ff tables:
    ECC table TPTM
    CRM table CRMV_ITEM_CAT_GR
    Can you please let us know how we can pin point this problem so that this will not happen again? We want to apply a permanent solution if there is. Hoping for your kind assistance. Thanks!
    Best regards,
    Mike

    hi
    General item category group
    Materials grouping that helps the system to determine item categories during sales document processing.
    *If a group is configured specific to distribution channel, it has priority if the corresponding activity is distribution channel-dependent
    Item category group from material master
    A grouping of materials that the system uses to determine item categories during the processing of sales documents.
    the difference between the two lies in the specificity to the distribution channel
    Regards
    Raja

  • Report showing vendors for particular material groups

    I am trying to perform an analysis to determine vendors which have procured items for specific material groups.  I have 64 different material groups which represent indirect materials and I want to be able to determine what vendors have been procuring these materials.  I have run transaction ME2C to examine purchasing documents, however there is way too much information and the system cannot generate the list.
    I was curious if there was some aggregate report that I could use in the Logistics Information System.  I know the Purchasing Information System has Standard Analysis for Material Groups, however I have to drill down to each Material Group and change the breakdown by Vendor to get the list and this can be somewhat time consuming considering I will have to do this 64 times.
    Any suggestions would be appreciated.
    Thanks,
    Don

    use transaction MC$<
    execute the selection
    in the report choose from menu settings > characteristics display
    and select either Key or Key and description
    then choose from menu  Material group analysis > Export > transfer to XXL

  • BW report by Material group

    Hello BW Gurus,
    I have a Quarterly report in BW, which i have to review each line and combine the sales for the same product .  The initial report has 4000 products on the report.  After I combine the products, there are 2238.  I would like a way to streamline this process.
    There are list of product that should be grouped as 1 for the purpose of this report. For Example see below
    Material group   Group Name     Material                           Description
    1          Audio                            6003707                           AMS KIT-
    1          Audio                            6500786                           AMS KIT-
    1          Audio                            6500284                           AMS W/O KIT
    1          Audio                            6003437                           AMS W/O KIT-
    Is there are any ways other can creating a hierarchy in BW? I know even if we create a hierarchy based on these material the users has to notify me when items are updated in the material master that affects the groupings..
    Is there a solution for this?
    Appreciate your time and response guys..
    Regards Renny

    Is there a reason you cannot create a navigational attribute for the product group, and use that instead of the material ? We do that in our company. In fact most aggregate material focused reporting uses it, so we've actually added it directly to our data models to avoid navigational attribute performance issues.

  • Report related to Material, Material Group, Price of Purchase, Vendor, Qty.

    Hi Gurus,
    Please suggest me a report where we can find material, material group, quantity purchased in a year, at what price, vendor.
    Please revert asap.
    Thank You

    ply design a query through tcode:SQ01. you dont need any help of abaper.
    after tcode you have entered click on "quick viewr"...table join ...downside...
    join 2 tables "ekko" and "ekpo" & "mara"
    ekko you will get vendor..po name and doc type
    as well as in ekpo you will get mat code,desc,po qty & also material group
    hope this helps you
    regards
    amey

Maybe you are looking for

  • IPad2 iOS 6.1 cannot send email - password not saved

    I recently upgraded to IOS 6.1 and it must have been around that time that I started receiving errors when trying to send emails.  I can recieve fine, but cannot send.  The error I get is "A copy has been placed in your Outbox.  No password provided.

  • How can i display the login details in the Web Ui

    Hi All,           How can i display the information regarding the person who logged into the Web Ui and where can i find the seetings regardin this.Please provide your valuable suggestions Regrads, Lakshman.P

  • How come skype on mountain lion does not load all the time?

    Hello everyone! I am about to pull my hair out re: skype not loading on mountain lion (sometimes it does). Does anyone know why sometimes when you click the skype icon it loads, but most of the time it doesn't? I click it, it doesn't load, ... Is the

  • Spry Tabs - target different tab via url?

    I have a page that uses the Spry tabs. It's set to use the first tab (default). I have another page wherein I'd like to put a link to this page but have the link display the SECOND tab. Is this possible? How is it done?

  • Oracle error message categorization

    Good morning, Do you know any document / url classifying ORACLE ERROR messages by category (for exemple connexion issue / memory issue / datafile issue etc)? The purpose is to grop log file and generate a call in case of specific Oracle error. In cas