MM-material class field name req??

Hi
I had to develop a reprot to generate the vendor list,based on the selection-screen i/p:mat no,mat type,mat grp,mat class.
except Material Class I had found the filed name & all req data to do the report.I had found the fileds frm mm03,class type(KLART),class name(CLASS) ,but i am unable to a make a link with the matnr,also whcih table will be the most approp fo all this senerio of vendor list.
So its a kind request,if any one can tell me the resp fildname & table for
mat class,so that i can do the reprot.
Tables : mara,m_kredm. i am using in this reprot.
rgds
vipin.

hi vipin...try this method....
use the table KSSK , KLAH and SWOR;
first of all get the int class no ( CLINT ) for that material  from kssk;
here object is the material with all leading zeros from the table KSSK(OBJEK).
then use the int.class no as the key field for the other two tables.
you will find the description in SWOR table.
kesav

Similar Messages

  • How to print Field name with value of a Class object?

    hi, In C#, I need to print a class field or property name with value without using reflection or string.join method.
    For eg.
    protected void Button1_Click(object sender, EventArgs e)
    List<EmployeeInfo> obj = new List<EmployeeInfo>();
    obj.Add(new EmployeeInfo { eid = 123 });
    obj.Add(new EmployeeInfo { ename = "abc" });
    Response.Write(obj.ToString()); // output must be => ename ="abc" , eid = 123
    public class EmployeeInfo
    public string ename;
    public int eid;
    It need to be resulted as follows automatically with property name and value :
    ename ="abc" , eid = 123
    It need to be resulted with good performance and simple way.

    You could override ToString method in EmployeeInfo class:
    public class EmployeeInfo
    public string ename;
    public int eid;
    public override string ToString()
    return string.Format("ename =\"{0}\" , eid = \"{1}\"", ename, eid);
    protected void Button1_Click(object sender, EventArgs e)
    EmployeeInfo obj = new EmployeeInfo() { eid = 111, ename = "aaa" };
    Response.Write(obj.ToString());

  • Table name and field name for accounting and material document in MM

    Hi
    Table name and field name for accounting and material document in MM
    how can we diffreentiate the accounting document in MIGO and MIRO ?

    Hi,
    For Goods reciept documents you can search from the tables  MKPF-Header: Material Document and MSEG-Document Segment: Material,
    and for Invoice documents you can search in  tables   BKPF-Accounting Document Header and BSEG-Accounting Document Segment.
    For differentiating the Accounting documents in MIRO and MIGO based on posting key and document types for GRN -document key is -WE and for MIRO document is -RE.......
    Hope this may help you.....................

  • Customs reference number( field name # GTS_CUSREF_NO) in material document

    Hi Friends,
    While doing GR am geting document number and can see that in MB03. Now in MKPF table there is field called Customs reference number( field name # GTS_CUSREF_NO) , and after putting material document number in MKPF am getting all the detail including Customs reference number.
    Now my question is where can I see the detail of Customs Reference number in material document in t code (MB03).
    Any pointers
    Regards

    no reply closing the thrd.

  • How to get the class name and field name dynamically

    Hi
    I have a class (ex: Contract) the fields (ex : a,b,c) .i need to get the class name and field name dynamically
    ex
    if( validation file for the field Contract.a){
    return contract.a;
    }else if(validation file for the field Contract.b){
    return contract.b;
    how to pass the field name and object dynamically
    Please help me .............
    Thanks in Advance..
    Edited by: 849614 on Aug 11, 2011 6:49 AM

    YoungWinston wrote:
    maheshguruswamy wrote:
    Agreed, but IMO, i still feel its best if there is no tie in between consumer class level details and the database it talks to. A service layer is needed in between them.Sounds like you've done a bit of this before. Me, I've either been a modeller/DBA, doling out data, or a nuts and bolts programmer (and actually more toolmaker than apps, but did a bit of that too).
    Do you know of a good book about the "middle ground" (ie, these service layers)? I understand it empirically, but haven't had a lot of exposure to it.
    Winston
    Edited by: YoungWinston on Aug 11, 2011 10:34 PM
    PS: Apologies. Edited my previous post, presumably while you were composing your reply, when I finally realized what '.filed' meant.Most of my work is in web development, never been a DBA :) . The biggest 'concern' in my shop is 'separation of concerns'. The UI group reports up to a different IT head, the DB group reports up to a different IT head and so on. The looser the coupling between these systems, the lesser the project costs (Integration, QA etc) are. Martin Fowler's books contain good information about separation of concerns in an enterprise environment. The two books which i recommend are
    [url http://www.amazon.com/Patterns-Enterprise-Application-Architecture-Martin/dp/0321127420]Enterprise Application Architecture and
    [url http://www.amazon.com/Enterprise-Integration-Patterns-Designing-Deploying/dp/0321200683/ref=pd_sim_b_1]Enterprise Integration Patterns

  • Field Name of Material Stock

    HI,
    I am preparing a report for which I need to know material stock at the end of any particular day. I tried to use field from T.Code MB5B, but I was unable to get technical name of that field in MB5B. So, can anyway tell me from which field I can get material stock on any particular day.
    Thanks and regards,
    An Engineer

    Hi Ranga,
    Yaa one can get stock from MD04,MMBE but what I want to know is stock on any particular date in past. I am preparing one customer specific result, for which I need to know stock of amy material on some specific date. This stock data will be processed in internal table to get the final require data. I tried MB5B but the field, which shows closing stock on any particular date, has no documentation.
    So, in nutshell what I want to know the field name from which I can use to get material stock on any particular date in past.
    Thanks.

  • Want know a table name in which material movement field exits

    hi,
    if any know the table name which contains "material movement" field and  ("vendor number" or any vendor related field)

    Material movements are in tables MSEG and MKPF.
    Regards,
    Rich Heilman

  • FM to Find segment name based on material class type

    Hi Experts,
    is there any function module availble to find out the segment name based on material class or material class type?
    Please use a more informative subject line in the future.
    Edited by: Rob Burbank on Feb 17, 2009 10:33 AM

    HI,
    Try with transcation Code WE41
    Thanks
    Kalyan

  • Material Document field to be added  in the Quality Notification F3 type

    Hello Experts,
    i have to add Material Document field in the Quality Notification (F3 type --Material rel. defect ) through
    T-code QM01.
    Please help me out.
    thanks

    Hi
    IMG-->QM>Quality notifications->Notification Creation->Define Screen Templates--> Define Initial Screens--> select F3 here and enter QM03_CREATE_QMEL_WITH_WINDOW in the column Name of the function module and enter 0100 in the  initial screen column., save it.
    If you wish to make material document field mandatory, then go to
    IMG-->QM>Quality notifications->Notification Creation->Define Screen Templates--> Field Selection: Initial Screens--> select the radio button as REQ for the field RQM01-MBLNR that is for material doc.
    Similarly for in the above menu you can make mandatory for reference object screen also
    IMG-->QM>Quality notifications->Notification Creation->Define Screen Templates--> Field Selection: Reference Object Screens--> select the radio button as REQ for the field RQM01-MBLNR that is for material doc.
    Now, once you finish this , go and try QM01 you will find the POP for Material document entry coming immediately if you pres the Notification button for F3 Notification type.
    Best Regards
    SAM

  • Required ATP Table field name

    Hello Gurus,
    As per my client requirement, durig the time of internet sales, The customer (user) while ordering for a material there should be a field where in customer can view the available quantity for that particular material.
    I ve checked in MD04 and i got the structure MDEZ [field MNG04]. But i want to know whether i can fetch data from this field or is there any other table/field where i can get the GATP quantities for the particular material. Anybody please provide the exact Table and field name.......
    Thanks in advance....
    Edited by: Praveen on Jan 7, 2009 5:59 AM
    Edited by: Praveen on Jan 7, 2009 9:35 AM
    Edited by: Praveen on Jan 7, 2009 9:52 AM

    Dear Praveen
    In Table MDTB,  you can see fields like
    -  MNG01:::Recd / Req.quantity
    -  MNG02:::Scrap
    -  MNG03:::Shortage Quantity
    You can make use of these fields according to your requirement.
    thanks
    G. Lakshmipathi

  • How to restrict Material Class in Sales Contract Doc

    Hi,
    I need to restrict Material Class in Sales order based on Item catagory, Material group4 and Sales contract Document type.
    If the above 3 fields having a particular value then the system should restrict all the other classes of that material and display only a particular class and it's related characteristics.
    If any one come across such a senario then pklease let me know.
    Regards
    Ajay

    Hi,
    You have to make few configuration settings before you actually restrict at the object level. The solution is clearly discussed in the below thread:
    how to restrict material master by material type  t-code MM01
    Hope this helps!!
    Regards,
    Raghu

  • What are the field names for below mentioned

    Hello Friends
    What are the fields names for below tables
    in EKKO
    Purchase Document Date
    Net Value of the purchase document.
    In EKPO
    Item Description
    From which place We bought it. (It means in Sales Items there we can know from which plant we sold the goods, like in EKPO, there is any field like this)
    Please let we are defining the report to find out the stock availability for perticular storage location using select Options plant, company code, material no.
    How many tables involve her to build this report. and also field names, they come under which table.
    Please send me this information ASAP. PLz Plz Plz..........
    Regards
    Praveen

    You can check the fields of these tables via SE11
    Purchase Document Date  -  EKKO-BEDAT
    Item Description  -  EKPO-TXZ01
    Net price per item - EKPO-NETPR.
    Regards,
    Rich Heilman

  • Can field names not start with a single letter camel case?

    I am using Hibernate 3.6, JPA 2.0, and Spring 3.0.6. I have fields in my objects like the following:
    class PersonContact {
    Long eAddressCpId;
    ElectronicAddress eAddress;
    I use field access (in my orm files) and queries/inserts/etc work without an issue. The fields are both in the class as well as in the orm files. But on startup of the application, the JPA configuration load spits out warnings:
    2011-02-22 15:38:10,785 [[STANDBY] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'] WARN org.hibernate.cfg.annotations.reflection.JPAOverridenAnnotationReader - Property com.foo.model.contactpoint.ElectronicAddress.eAddress not found in class but described in <mapping-file/> (possible typo error)
    2011-02-22 15:38:10,801 [[STANDBY] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'] WARN org.hibernate.cfg.annotations.reflection.JPAOverridenAnnotationReader - Property com.foo.model.person.PersonContact.eAddressCpId not found in class but described in <mapping-file/> (possible typo error)
    2011-02-22 15:38:10,801 [[STANDBY] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'] WARN org.hibernate.cfg.annotations.reflection.JPAOverridenAnnotationReader - Property com.foo.model.person.PersonContact.eAddress not found in class but described in <mapping-file/> (possible typo error)
    2011-02-22 15:38:10,817 [[STANDBY] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'] WARN org.hibernate.cfg.annotations.reflection.JPAOverridenAnnotationReader - Property com.foo.model.person.PartyContact.eAddressCpId not found in class but described in <mapping-file/> (possible typo error)
    2011-02-22 15:38:10,817 [[STANDBY] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'] WARN org.hibernate.cfg.annotations.reflection.JPAOverridenAnnotationReader - Property com.foo.model.person.PartyContact.eAddress not found in class but described in <mapping-file/> (possible typo error)
    If I change my field names to be from eAddress to electronicAddress and eAddressCpId to electronicAddressCpId , then I don't get these warnings.
    Is there requirements around the field names?
    Thanks..jay

    Hi,
    If you have this PersonContact.eAddress in your mapping file, Hibernate will look in PersonContact for
    1 a public field called eAddress
    2 a public member method called getEAddress (Or geteAddress).
    3 a public member method called isEAddress(Or isAddress)
    Your fields aren't public, so my guess is that getEAddress is found. From this "get" is stripped away and the rest is "decapitalized".
    This decapitalize method has these lines:
    if (name.length() > 1 && Character.isUpperCase(name.charAt(1)) &&
          Character.isUpperCase(name.charAt(0))){
                 return name;
    }So yes, I think there is a requirement with fields names. (Or rather getter names, since fields aren't decapitalized)
    You could try and change your mapping file into PersonContact.EAddress to see if I'm right.
    Btw, I am not a Java programmer, so this is what I could manage from a poor mans view at this (Open) source of Hibernate's.
    Regards
    Peter

  • Getting an object's field name

    In the snippet of code shown below, 'parent' represents a UI dialog, and 'child' represents one of the components of the dialog. What I would like to know is the field name of 'child'. The variable 'fieldName' would contain the name I am seeking, if I knew how to determine the value of 'ii' that corresponds to the object 'child'.
    I hope you can help.
    Thanks,
    Miguel
    String getFieldName(Object parent,Component child) {
    Class cl = parent.getClass();
    Field [] fields = cl.getDeclaredFields();
    String fieldName = fields[ii].getName();
    // problem: how to get 'ii' that corresponds to 'child'?
    return fieldName;
    }

    Is there a way to get the
    corresponding array of component objects? It depends on the way the "parent" class is defined.
    For example (a BAD example, but an example):
    I could have the parent keep it's components in a HashMap, with a key of the component type and a value of an ArrayList that contains each component matching the component type.
    This would be very annoying to deal with, and hard to find any given component (whether reflectively or with normal code).
    If I can get
    the value of a field (Object val =
    field.get(parent);), there must be a way to get the
    reference to the object that correspond to the pair
    'field','parent'.
    Thanks.Huh?
    What do you think field[1].get(parent) returned?
    It's the value that the field is referring to (e.g. the actual object refered to by the field).
    I think dubwai's questions about "what are you trying to do" are very relevant. Using reflection like this usually means the design is lacking some important functionality

  • Table name and field name

    hi frds
    Give me table name and field name of OPEN PO QUANTITY ..
    thanks
    Pari Vendhan.R

    See the sample code for the open PO's based on Vendor
    and do accordingly
    *& Report ZMM_PO_REPORT
    REPORT ZMM_PO_REPORT message-Id yb
    NO STANDARD PAGE HEADING
    LINE-COUNT 60(1)
    LINE-SIZE 230.
    D A T A B A S E T A B L E S D E C L A R A T I O N
    TABLES: lfa1, " Vendor Master
    t161, " PO Doc Types
    t024, " Purchase Groups
    ekko. " PO Header
    T Y P E S D E C L A R A T I O N S
    Purchase Orders Main Structure
    TYPES: BEGIN OF s_po,
    ebeln TYPE ebeln, " PO No.
    ebelp TYPE ebelp, " PO Item
    bstyp TYPE bstyp, " PO Category
    bukrs TYPE bukrs, " Company Code
    bsart TYPE bbsrt, " PO Type
    lifnr TYPE lifnr, " Vendor No
    ekgrp TYPE bkgrp, " Purchase Group
    waers TYPE waers, " Currency
    bedat TYPE etbdt, " PO Date
    txz01 TYPE txz01, " Material Text
    werks TYPE ewerk, " Plant
    lgort TYPE lgort_d, " Storage Location
    matkl TYPE matkl, " Material Group
    menge TYPE bamng, " PR Quantity
    meins TYPE bamei, " UOM
    bprme TYPE bbprm, " Price Unit
    netpr TYPE netpr, " Net price
    peinh TYPE peinh, " Price Unit UOM
    pstyp TYPE pstyp, " Item Category
    knttp TYPE knttp, " Account Assignment Category
    END OF s_po.
    Purchase Orders History Structure
    TYPES: BEGIN OF s_account,
    ebeln TYPE ebeln, " PO No.
    ebelp TYPE ebelp, " PO Item
    gjahr TYPE mjahr, " Fiscal Year
    belnr TYPE mblnr, " PO Invoice No
    menge TYPE menge_d, " PR Quantity
    wrbtr TYPE wrbtr, " Price in Local Currency
    dmbtr TYPE dmbtr, " Price in Foreign Currency
    waers TYPE waers, " Currency
    shkzg TYPE shkzg, " Dr/Cr Indicator
    END OF s_account.
    Purchase Orders History Structure(Item Sum)
    TYPES: BEGIN OF s_inv_sum,
    ebeln TYPE ebeln, " PO No.
    ebelp TYPE ebelp, " PO Item
    menge TYPE menge_d, " PR Quantity
    wrbtr TYPE wrbtr, " Price in Foreign Currency
    waers TYPE waers, " Currency
    END OF s_inv_sum.
    Purchase Orders Main Structure
    TYPES: BEGIN OF s_rep,
    lifnr TYPE lifnr, " Vendor No
    ebeln TYPE ebeln, " PO No.
    ebelp TYPE ebelp, " PO Item
    bstyp TYPE bstyp, " PO Category
    bsart TYPE bbsrt, " PO Type
    ekgrp TYPE bkgrp, " Purchase Group
    waers TYPE waers, " Currency
    bedat TYPE etbdt, " PO Date
    txz01 TYPE txz01, " Material Text
    werks TYPE ewerk, " Plant
    lgort TYPE lgort_d, " Storage Location
    matkl TYPE matkl, " Material Group
    menge TYPE bamng, " PR Quantity
    meins TYPE bamei, " UOM
    bprme TYPE bbprm, " Price Unit
    netpr TYPE netpr, " Net price
    peinh TYPE peinh, " Price Unit UOM
    pstyp TYPE pstyp, " Item Category
    knttp TYPE knttp, " Account Assignment Category
    name1 TYPE name1, " Plant
    orewr TYPE netpr, " To be Invoiced Price
    curr TYPE waers, " Inv Doc Currency
    END OF s_rep.
    D A T A D E C L A R A T I O N S
    DATA: gv_title1 TYPE sylisel, " Report title
    gv_dial. " Color flag
    C O N S T A N T S D E C L A R A T I O N S
    CONSTANTS: c_x VALUE 'X', " Flag X
    c_h VALUE 'H', " Debit
    c_vgabe TYPE vgabe VALUE '2'. " Transaction Type
    I N T E R N A L T A B L E S D E C L A R A T I O N S
    DATA: i_po TYPE STANDARD TABLE OF s_po WITH HEADER LINE,
    " Purchase Order
    i_inv TYPE STANDARD TABLE OF s_inv_sum WITH HEADER LINE,
    " PO Invoice Values
    i_rep TYPE STANDARD TABLE OF s_rep WITH HEADER LINE,
    " PO Invoice Values
    i_ekbe TYPE STANDARD TABLE OF s_account WITH HEADER LINE.
    " PO Invoice Values
    S E L E C T I O N S C R E E N *
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS: s_lifnr FOR lfa1-lifnr MATCHCODE OBJECT kred,
    s_ebeln FOR ekko-ebeln MATCHCODE OBJECT mekk,
    s_bsart FOR t161-bsart,
    s_ekgrp FOR t024-ekgrp,
    s_bedat FOR ekko-bedat.
    SELECTION-SCREEN END OF BLOCK b1.
    I N I T I A L I Z A T I O N *
    INITIALIZATION.
    A T S E L E C T I O N - S C R E E N *
    AT SELECTION-SCREEN.
    Validate the screen fields
    PERFORM validate_screen.
    S T A R T - O F - S E L E C T I O N *
    START-OF-SELECTION.
    Fetch main data
    PERFORM fetch_data.
    T O P - O F - P A G E *
    TOP-OF-PAGE.
    Header of the List
    PERFORM header.
    E N D - O F - P A G E *
    Footer
    END-OF-PAGE.
    ULINE.
    E N D - O F - S E L E C T I O N *
    END-OF-SELECTION.
    Display the Report Output data
    PERFORM display_data.
    At Line-Selection
    AT LINE-SELECTION.
    When double clicked on EBELN display the details of Purchase Doc
    PERFORM line_sel.
    *& Form validate_screen
    Validation of Selection Screen fields
    FORM validate_screen .
    Validation of Vendor Number
    CLEAR lfa1-lifnr.
    IF NOT s_lifnr[] IS INITIAL.
    SELECT lifnr UP TO 1 ROWS
    INTO lfa1-lifnr
    FROM lfa1
    WHERE lifnr IN s_lifnr.
    ENDSELECT.
    IF sy-subrc 0.
    MESSAGE e000 WITH 'Invalid Vendor'(002).
    ENDIF.
    ENDIF.
    Validation of PO Number
    CLEAR ekko-ebeln.
    IF NOT s_ebeln[] IS INITIAL.
    SELECT ebeln UP TO 1 ROWS
    INTO ekko-ebeln
    FROM ekko
    WHERE ebeln IN s_ebeln.
    ENDSELECT.
    IF sy-subrc 0.
    MESSAGE e000 WITH 'Invalid Document Number'(003).
    ENDIF.
    ENDIF.
    Validation of PO Document Type
    CLEAR t161-bsart.
    IF NOT s_bsart[] IS INITIAL.
    SELECT bsart UP TO 1 ROWS
    INTO t161-bsart
    FROM t161
    WHERE bsart IN s_bsart.
    ENDSELECT.
    IF sy-subrc 0.
    MESSAGE e000 WITH 'Invalid Purchase Document Type'(004).
    ENDIF.
    ENDIF.
    Validation of Purchasing Group
    CLEAR t024-ekgrp.
    IF NOT s_ekgrp[] IS INITIAL.
    SELECT ekgrp UP TO 1 ROWS
    INTO t024-ekgrp
    FROM t024
    WHERE ekgrp IN s_ekgrp.
    ENDSELECT.
    IF sy-subrc 0.
    MESSAGE e000 WITH 'Invalid Purchasing Group'(005).
    ENDIF.
    ENDIF.
    ENDFORM. " validate_screen
    *& Form fetch_data
    Fetching the PO related data from Database Tables
    FORM fetch_data .
    CLEAR i_po.
    REFRESH i_po.
    SELECT a~ebeln " PO No.
    b~ebelp " PO Item
    a~bstyp " PO Category
    a~bukrs " Company Code
    a~bsart " PO Type
    a~lifnr " Vendor No
    a~ekgrp " Purchase Group
    a~waers " Currency
    a~bedat " PO Date
    b~txz01 " Material Text
    b~werks " Plant
    b~lgort " Storage Location
    b~matkl " Material Group
    b~menge " PR Quantity
    b~meins " UOM
    b~bprme " Price Unit
    b~netpr " Net price
    b~peinh " Price Unit UOM
    b~pstyp " Item Category
    b~knttp " Account Assignment Category
    INTO TABLE i_po
    FROM ekko AS a JOIN ekpo AS b
    ON a~ebeln = b~ebeln
    WHERE a~ebeln IN s_ebeln AND
    a~lifnr IN s_lifnr AND
    a~ekgrp IN s_ekgrp AND
    a~bsart IN s_bsart AND
    a~bedat IN s_bedat.
    SORT i_po BY ebeln ebelp.
    break-point.
    IF NOT i_po[] IS INITIAL.
    Fetch the PO History/Invoice Details from EKBE Table
    CLEAR i_ekbe.
    REFRESH i_ekbe.
    SELECT ebeln " PO No.
    ebelp " PO Item
    gjahr " Fiscal Year
    belnr " PO Invoice No
    menge " PR Quantity
    wrbtr " Price in Local Currency
    dmbtr " Price in Foreign Currency
    waers " Currency
    shkzg " Dr/Cr Indicator
    INTO TABLE i_ekbe
    FROM ekbe
    FOR ALL ENTRIES IN i_po
    WHERE ebeln = i_po-ebeln AND
    ebelp = i_po-ebelp AND
    vgabe = c_vgabe.
    IF sy-subrc = 0.
    SORT i_ekbe BY ebeln ebelp.
    LOOP AT i_ekbe.
    IF i_ekbe-shkzg = c_h.
    i_ekbe-wrbtr = i_ekbe-wrbtr * -1.
    ENDIF.
    MODIFY i_ekbe.
    ENDLOOP.
    break-point.
    Sum up the Item wise Invoice totals
    LOOP AT i_ekbe.
    AT END OF ebelp.
    READ TABLE i_ekbe INDEX sy-tabix.
    SUM.
    MOVE-CORRESPONDING i_ekbe TO i_inv.
    APPEND i_inv.
    ENDAT.
    CLEAR i_inv.
    ENDLOOP.
    SORT i_inv BY ebeln ebelp.
    break-point.
    ENDIF.
    ENDIF.
    Move the Vendor Name and Invoice Values to I_rep Internal Table
    LOOP AT i_po.
    MOVE-CORRESPONDING i_po TO i_rep.
    CLEAR i_inv.
    READ TABLE i_inv WITH KEY ebeln = i_po-ebeln
    ebelp = i_po-ebelp.
    IF sy-subrc = 0.
    i_rep-orewr = ( i_po-menge - i_inv-menge ) * i_po-netpr.
    i_rep-curr = i_inv-waers.
    ELSE.
    i_rep-orewr = i_po-menge * i_po-netpr.
    i_rep-curr = i_po-waers.
    ENDIF.
    break-point.
    Get the Vendor Name
    CLEAR lfa1-name1.
    SELECT SINGLE name1 FROM lfa1 INTO lfa1-name1
    WHERE lifnr = i_po-lifnr.
    IF sy-subrc = 0.
    i_rep-name1 = lfa1-name1.
    ENDIF.
    APPEND i_rep.
    CLEAR i_rep.
    break-point.
    ENDLOOP.
    SORT i_rep BY lifnr ebeln ebelp.
    DELETE i_rep WHERE orewr LE 0.
    break-point.
    ENDFORM. " fetch_data
    *& Form display_data
    Display the Report Output data
    FORM display_data .
    DATA: lv_flag, " New Flag
    lv_rec TYPE i. " No of Records
    CLEAR lv_rec.
    IF i_rep[] IS INITIAL.
    MESSAGE e000 WITH 'No Data found'(022).
    ELSE.
    LOOP AT i_rep.
    Toggle Color
    PERFORM toggle_color.
    IF lv_flag space.
    NEW-LINE.
    ENDIF.
    At New Purchase Document
    AT NEW ebeln.
    WRITE:/1 sy-vline, 2(10) i_rep-ebeln INTENSIFIED OFF.
    lv_flag = c_x.
    lv_rec = lv_rec + 1.
    ENDAT.
    WRITE: 1 sy-vline,
    12 sy-vline,13(4) i_rep-bsart,
    17 sy-vline,18(10) i_rep-lifnr,
    28 sy-vline,29(35) i_rep-name1,
    64 sy-vline,65(4) i_rep-ekgrp,
    69 sy-vline,70(10) i_rep-bedat,
    80 sy-vline,81(5) i_rep-ebelp,
    86 sy-vline,87(40) i_rep-txz01,
    127 sy-vline,128(9) i_rep-matkl,
    137 sy-vline,138(1) i_rep-pstyp,
    139 sy-vline,140(1) i_rep-knttp,
    141 sy-vline,142(4) i_rep-werks,
    146 sy-vline,147(4) i_rep-lgort,
    151 sy-vline,152(13) i_rep-menge UNIT i_rep-meins,
    165 sy-vline,166(3) i_rep-meins,
    169 sy-vline,170(15) i_rep-netpr CURRENCY i_rep-waers,
    185 sy-vline,186(4) i_rep-waers,
    190 sy-vline,191(5) i_rep-peinh,
    196 sy-vline,197(4) i_rep-bprme,
    201 sy-vline,202(15) i_rep-orewr CURRENCY i_rep-curr,
    217 sy-vline,218(4) i_rep-curr,
    222 sy-vline,223(7) i_rep-bstyp centered,
    230 sy-vline.
    NEW-LINE.
    hide: i_rep-ebeln.
    ENDLOOP.
    ULINE.
    FORMAT COLOR OFF.
    WRITE : /2 'Total Number of Purchasing Documents:'(025) COLOR 3,
    lv_rec COLOR 3.
    ENDIF.
    ENDFORM. " display_data
    *& Form header
    Write the Report Header
    FORM header .
    FORMAT RESET.
    header
    WRITE:/1(230) 'LIST OF PURCHASE DOCUMENTS PER VENDOR'(006) CENTERED.
    SKIP.
    FORMAT COLOR COL_HEADING.
    ULINE.
    WRITE:/1 sy-vline,2(10) 'Pur.Doc.No'(006) CENTERED,
    12 sy-vline,13(4) 'Type'(007),
    17 sy-vline,18(10) 'Vendor'(008) CENTERED,
    28 sy-vline,29(35) 'Name'(009) CENTERED,
    64 sy-vline,65(4) 'PGrp'(010) CENTERED,
    69 sy-vline,70(10) 'Doc.Date'(012) CENTERED,
    80 sy-vline,81(5) 'Item'(011),
    86 sy-vline,87(40) 'Material Short Text'(024) CENTERED,
    127 sy-vline,128(9) 'Mat.Group'(013),
    137 sy-vline,138(1) 'I',
    139 sy-vline,140(1) 'A',
    141 sy-vline,142(4) 'Plnt'(014),
    146 sy-vline,147(4) 'SLoc'(015),
    151 sy-vline,152(13) 'Quantity'(016) CENTERED,
    165 sy-vline,166(3) 'UoM'(017),
    169 sy-vline,170(15) 'Net Value'(018) CENTERED,
    185 sy-vline,186(4) 'Curr'(019),
    190 sy-vline,191(5) 'Per'(020),
    196 sy-vline,197(4) 'Unit'(021),
    201 sy-vline,202(15) 'To be Invoiced'(023) CENTERED,
    217 sy-vline,218(4) 'Curr'(019),
    222 sy-vline,223(7) 'Doc.Cat'(026),
    230 sy-vline.
    ULINE.
    ENDFORM. " header
    *& Form toggle_color
    This routine alters the color of the records in the list FORM toggle_color.
    IF gv_dial = space.
    FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
    gv_dial = c_x.
    ELSE.
    FORMAT COLOR 1 INTENSIFIED OFF.
    CLEAR gv_dial.
    ENDIF.
    ENDFORM. " toggle_color
    *& Form LINE_SEL
    *When double clicked on EBELN field display the details of Purchase Doc
    FORM line_sel.
    CASE sy-lsind.
    WHEN '1'.
    DATA: lv_field(20),
    lv_value(10),
    lv_bstyp like i_rep-bstyp.
    clear: lv_bstyp,lv_value, lv_field.
    GET CURSOR FIELD lv_field VALUE lv_value.
    IF lv_field = 'I_REP-EBELN'.
    IF NOT lv_value IS INITIAL.
    READ LINE sy-index FIELD VALUE i_rep-bstyp
    INTO lv_bstyp.
    READ CURRENT LINE FIELD VALUE i_rep-bstyp INTO lv_bstyp.
    if lv_bstyp = 'F'.
    SET PARAMETER ID 'BES' FIELD lv_value.
    CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
    elseif ( lv_bstyp = 'K' or lv_bstyp = 'L' ).
    SET PARAMETER ID 'VRT' FIELD lv_value.
    CALL TRANSACTION 'ME33' AND SKIP FIRST SCREEN.
    elseif lv_bstyp = 'A'.
    SET PARAMETER ID 'ANF' FIELD lv_value.
    CALL TRANSACTION 'ME43' AND SKIP FIRST SCREEN.
    endif.
    ENDIF.
    ENDIF.
    ENDCASE.
    ENDFORM. " line_sel{code]
    <REMOVED BY MODERATOR>
    kushagra
    Edited by: Alvaro Tejada Galindo on Feb 18, 2008 2:03 PM

Maybe you are looking for

  • Update ztable is taking long time

    Hi All, i have run the 5 jobs with the same program at a time but when we check the db trace zs01 is taking long time as shown below.here zs01 is having small amount of data. in the below dbtrace for updating zs01 is taking 2,315,485 seconds .how to

  • Throws Run time error at runtime.

    Hi freinds, I've downloaded special jar file and placed in "C:\j2sdk1.4.2_11\jre\lib\ext". I've used one of the IO class from this jar file in my Candies.java class. When i going to compile it from command prompt it compiles dine but at run time whil

  • Logical dimension table

    Hi All, I am creating logical columns using two logical dimensions in a separate logical table. Do I need create complex joins for the new logical table, two source logical dimension tables have complex joins created already. Could you anyone provide

  • How do I turn a document into a JPEG form

    I have to download a document in JPEG form to a web site. How do I get document into JPEG form>

  • Avoid multiple paths rpd part II

    Hi, after resolved "Multiple paths" problem, i explain you subsequent error message that Administration tool gives me. I have following mapping: I have following tables: Entity (DIMENSION) - Entity_Relationship (DIMENSION) - HFM_Inventory (FACT TABLE