Regarding Vendor wise ALV  Display

Dear All,
               I am working on a report which has different fields like vendor , Doc No., Date, Amount.  I am able to display all these fields  for all the  vendors in single alv grid. I want the report to display  all these fields vendor wise in diffent Alv grid. Foe e.g.,
  Vendor Code:  111111
  Vendor Name : xyz ltd.
  Doc no .       Date                    Amount        
     11           01.05.2010            50000        
     12           02.05.2010            10000
  Vendor Code:  222222
  Vendor Name : pqr  ltd.
  Doc no .       Date                    Amount        
     13           03.05.2010              5000        
     14           04.05.2010              1000
  Pls, suggest any good Solutions.
Thanks & Regards,
Sandip Sonar

Thank U sandeep,
But I want the list for all the vendors  entered in selection-screen.
Thanks again,
Sandip Sonar

Similar Messages

  • Regarding Filter in ALV display

    Hi Experts,
    I have a problem wih the filter option of the ALV. if choose the date field for filtering it shows the message "Correct the distance (2) between "." and "." or "." and ","" when given for docu number it shows as "Entry is too long: Only 8 digits are allowed in the whole number part" can you help me????
    please provide any solution for this issue

    Hi,
       Declare the date field as sy-datum in the internal table.
    In field catalog give it is DATS.
    This will solve your problem.
    Reward if helpful.

  • Vendor open items wise ALV Grid Display (FBL1N) report to Excel Sheet

    Hi All,
    I need vendor wise open items and cleared items in ALV Grid format in excel sheet.
    I'm Trying that in T Code FBL1N, After the execution. I had select ALV Grid format like this From the menu bar->Settings-> Switch list.
    After that i get ALV  Grid format, Then i'm doing export the data to excel sheet. like this From the Menu bar->List->Export->Spread sheet.
    That time i'm getting Error Message no. 0K064, Filter criteria, sorting, totals and subtotals are not taken into account.
    I want vendor wise sorting totals and subtotals,
    How can i over come this Error please let me now.
    Thanks,
    Amar

    Hi Amar,
    Please check the KBA 2083705.
    https://websmp230.sap-ag.de/sap(bD1odSZjPTAwMQ==)/bc/bsp/sno/ui_entry/entry.htm?param=69765F6D6F64653D3030312669765F7361706E6F7465735F6E756D6265723D3230383337303526
    Regards,
    Monika

  • Regarding Freight accordingly Vendor wise

    HI
    i want to give freight at sales order level but it has to be accordingly Vendor wise.
    so i did partner determination for vendor at sales order level & create condition record accordingly Vendor and incoterm combination.
    And mantained the condition record.
    But when i m doing sales order the condition is not automatic triggered due to Vendor missing at condition record.
    Plz guide me how to give freight accordingly Vendor wise.
    Regards
    SAHOO

    Thank U sandeep,
    But I want the list for all the vendors  entered in selection-screen.
    Thanks again,
    Sandip Sonar

  • ALV display column and row wise

    hi experts,
    Is it possible to display in ALV display as 6 fields in column and some ranges in row display so how to display that using alv grid any sample report please do send me.
    e.g.display format.
                   PO Type          Shipping Date          Invoice Num          PCS  #        Po No.          Cust Name          Terms          Open Balance
    Current                                                                           
    Total Current                                                                           
    1 - 15                                                                           
    Total 1 - 15                                                                           
    16-30                                                                           
    Total 16-30                                                                           
    31 - 60                                                                           
    Total 31 - 60                                                                           
    61 - 90                                                                           
    Total 61 - 90                                                                           
    > 90                                                                           
    Total > 90                                                                           
    TOTAL

    hi Lakshman,
    i want report for customer open invoices that is aging report,
    so depens on due days as per ranges shown in my question like 1--15 days,
    15-16 days these are due days ranges , and i have display these related ranges records horizontally , just understand my display format u will get what i mean to say,
    please send me any proper solution.
    Thanks and Regards,
    Yogesh

  • Report to see the g/l balance vendor wise

    hi experts,
    i need to check the balance of  one g/l "tds on contractor" vendor wise.
    but i am unable to get the information vendor wise.can anyone give me some idea by which t code i can see the report?
    Thanks
    Regards
    Konishko

    Try this...
    Using FBL1N (Vendor Line item Display) you can click on "dynamic selections" at the top and add the GL account to the search criteria. That way you can display only the open item information for any vendor for one particular GL account.

  • AP REPORT AGE WISE, VENDOR WISE REQUIRED

    Hi,
    Please give me if there is any T-code to get the AGE wise VENDOR wise AP report at on go as we know the report code ( S_ALR_87012078 ) only for the same, in which, unless otherwise,  we go for drill down this report further, the report is being displayed for one vendor only and next we have to scroll to get the another vendor. This will not be helped to analysis in one paper.
    In view of the above, we need all your help to get the AP report with my above requirement in SAP Standard T-Code - if any,  ( or ) please confirm whether we need to go for development thro ABAP for the same.
    Please guide us immediately - if possible.
    Thanks
    G. Janarthanan

    Hi,
    Check this below reports for aging purpose for vendors
    S_ALR_87012084 Open Items - Vendor Due Date Forecast
    S_ALR_87012085 Vendor Payment History with OI Sorted List
    S_ALR_87012104 List of Cleared Vendor Items for Printing
    S_ALR_87012105 List of Down Payments Open On Key Date - Vendors
    Hope this helps. Do not forget to assign points if helpful
    regards,
    radhika
    Message was edited by:
            kolipara radhika

  • ALV Display - sub totals

    hi gurus,
    In my report program i have a monthly report displaying the data for that month.
    1. Now in my ALV grid i want The SUB-TOTALS for the work center wise data for a field of the alv.  there are many workcenters data in my report.  So after the end of each work center , i want the subtotal of a calculated TAT field.
    2. At the end of the report, I want the average TAT(field calculated by my report program) for that month.
    So how can i make the coding for the above.
    Iam a fresher to this field, so give me in detail.
    regards,
    chaitanya

    Hi
    i am giving a sample example for subtotals of alv.
    REPORT z_alv_subtotal.
    *& Table declaration
    TABLES: EKKO.
    *& Type pool declaration
    TYPE-POOLS: SLIS. " Type pool for ALV
    *& Selection screen
    SELECT-OPTIONS: S_EBELN FOR EKKO-EBELN.
    *& Type declaration
    Type declaration for internal table to store EKPO data
    TYPES: BEGIN OF X_DATA,
    EBELN TYPE CHAR30, " Document no.
    EBELP TYPE EBELP, " Item no
    MATNR TYPE MATNR, " Material no
    MATNR1 TYPE MATNR, " Material no
    WERKS TYPE WERKS_D, " Plant
    WERKS1 TYPE WERKS_D, " Plant
    NTGEW TYPE ENTGE, " Net weight
    GEWE TYPE EGEWE, " Unit of weight
    END OF X_DATA.
    *& Internal table declaration
    DATA:
    Internal table to store EKPO data
    I_EKPO TYPE STANDARD TABLE OF X_DATA INITIAL SIZE 0,
    Internal table for storing field catalog information
    I_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
    Internal table for Top of Page info. in ALV Display
    I_ALV_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER,
    Internal table for ALV Display events
    I_EVENTS TYPE SLIS_T_EVENT,
    Internal table for storing ALV sort information
    I_SORT TYPE SLIS_T_SORTINFO_ALV,
    I_EVENT TYPE SLIS_T_EVENT.
    *& Work area declaration
    DATA:
    WA_EKKO TYPE X_DATA,
    WA_LAYOUT TYPE SLIS_LAYOUT_ALV,
    WA_EVENTS TYPE SLIS_ALV_EVENT,
    WA_SORT TYPE SLIS_SORTINFO_ALV.
    *& Constant declaration
    CONSTANTS:
    C_HEADER TYPE CHAR1
    VALUE 'H', "Header in ALV
    C_ITEM TYPE CHAR1
    VALUE 'S'.
    *& Start-of-selection event
    START-OF-SELECTION.
    Select data from ekpo
    SELECT EBELN " Doc no
    EBELP " Item
    MATNR " Material
    MATNR " Material
    WERKS " Plant
    WERKS " Plant
    NTGEW " Quantity
    GEWEI " Unit
    FROM EKPO
    INTO TABLE I_EKPO
    WHERE EBELN IN S_EBELN
    AND NTGEW NE '0.00'.
    IF SY-SUBRC = 0.
    SORT I_EKPO BY EBELN EBELP MATNR .
    ENDIF.
    To build the Page header
    PERFORM SUB_BUILD_HEADER.
    To prepare field catalog
    PERFORM SUB_FIELD_CATALOG.
    Perform to populate the layout structure
    PERFORM SUB_POPULATE_LAYOUT.
    Perform to populate the sort table.
    PERFORM SUB_POPULATE_SORT.
    Perform to populate ALV event
    PERFORM SUB_GET_EVENT.
    END-OF-SELECTION.
    Perform to display ALV report
    PERFORM SUB_ALV_REPORT_DISPLAY.
    *& Form sub_build_header
    To build the header
    No Parameter
    FORM SUB_BUILD_HEADER .
    Local data declaration
    DATA: L_SYSTEM TYPE CHAR10 , "System id
    L_R_LINE TYPE SLIS_LISTHEADER, "Hold list header
    L_DATE TYPE CHAR10, "Date
    L_TIME TYPE CHAR10, "Time
    L_SUCCESS_RECORDS TYPE I, "No of success records
    L_TITLE(300) TYPE C. " Title
    Title Display
    L_R_LINE-TYP = C_HEADER. " header
    L_TITLE = 'Test report'(001).
    L_R_LINE-INFO = L_TITLE.
    APPEND L_R_LINE TO I_ALV_TOP_OF_PAGE.
    CLEAR L_R_LINE.
    Run date Display
    CLEAR L_DATE.
    L_R_LINE-TYP = C_ITEM. " Item
    WRITE: SY-DATUM TO L_DATE MM/DD/YYYY.
    L_R_LINE-KEY = 'Run Date :'(002).
    L_R_LINE-INFO = L_DATE.
    APPEND L_R_LINE TO I_ALV_TOP_OF_PAGE.
    CLEAR: L_R_LINE,
    L_DATE.ENDFORM. " sub_build_header
    *& Form sub_field_catalog
    Build Field Catalog
    No Parameter
    FORM SUB_FIELD_CATALOG .
    Build Field Catalog
    PERFORM SUB_FILL_ALV_FIELD_CATALOG USING:
    '01' '01' 'EBELN' 'I_EKPO' 'L' 'Doc No'(003) ' ' ' ' ' ' ' ',
    '01' '02' 'EBELP' 'I_EKPO' 'L' 'Item No'(004) 'X' 'X' ' ' ' ',
    '01' '03' 'MATNR' 'I_EKPO' 'L' 'Material No'(005) 'X' 'X' ' ' ' ',
    '01' '03' 'MATNR1' 'I_EKPO' 'L' 'Material No'(005) ' ' ' ' ' ' ' ',
    '01' '04' 'WERKS' 'I_EKPO' 'L' 'Plant'(006) 'X' 'X' ' ' ' ',
    '01' '04' 'WERKS1' 'I_EKPO' 'L' 'Plant'(006) ' ' ' ' ' ' ' ',
    '01' '05' 'NTGEW' 'I_EKPO' 'R' 'Net Weight'(007) ' ' ' ' 'GEWE' 'I_EKPO'
    ENDFORM. " sub_field_catalog
    *& Form sub_fill_alv_field_catalog
    *& For building Field Catalog
    *& p_rowpos Row position
    *& p_colpos Col position
    *& p_fldnam Fldname
    *& p_tabnam Tabname
    *& p_justif Justification
    *& p_seltext Seltext
    *& p_out no out
    *& p_tech Technical field
    *& p_qfield Quantity field
    *& p_qtab Quantity table
    FORM SUB_FILL_ALV_FIELD_CATALOG USING P_ROWPOS TYPE SYCUROW
    P_COLPOS TYPE SYCUCOL
    P_FLDNAM TYPE FIELDNAME
    P_TABNAM TYPE TABNAME
    P_JUSTIF TYPE CHAR1
    P_SELTEXT TYPE DD03P-SCRTEXT_L
    P_OUT TYPE CHAR1
    P_TECH TYPE CHAR1
    P_QFIELD TYPE SLIS_FIELDNAME
    P_QTAB TYPE SLIS_TABNAME.
    Local declaration for field catalog
    DATA: WA_LFL_FCAT TYPE SLIS_FIELDCAT_ALV.
    WA_LFL_FCAT-ROW_POS = P_ROWPOS. "Row
    WA_LFL_FCAT-COL_POS = P_COLPOS. "Column
    WA_LFL_FCAT-FIELDNAME = P_FLDNAM. "Field Name
    WA_LFL_FCAT-TABNAME = P_TABNAM. "Internal Table Name
    WA_LFL_FCAT-JUST = P_JUSTIF. "Screen Justified
    WA_LFL_FCAT-SELTEXT_L = P_SELTEXT. "Field Text
    WA_LFL_FCAT-NO_OUT = P_OUT. "No output
    WA_LFL_FCAT-TECH = P_TECH. "Technical field
    WA_LFL_FCAT-QFIELDNAME = P_QFIELD. "Quantity unit
    WA_LFL_FCAT-QTABNAME = P_QTAB . "Quantity table
    IF P_FLDNAM = 'NTGEW'.
    WA_LFL_FCAT-DO_SUM = 'X'.
    ENDIF.
    APPEND WA_LFL_FCAT TO I_FIELDCAT.
    CLEAR WA_LFL_FCAT.
    ENDFORM. " sub_fill_alv_field_catalog
    *& Form sub_populate_layout
    Populate ALV layout
    No Parameter
    FORM SUB_POPULATE_LAYOUT . CLEAR WA_LAYOUT.
    WA_LAYOUT-COLWIDTH_OPTIMIZE = 'X'." Optimization of Col width
    ENDFORM. " sub_populate_layout
    *& Form sub_populate_sort
    Populate ALV sort table
    No Parameter
    FORM SUB_POPULATE_SORT .
    Sort on material
    WA_SORT-SPOS = '01' .
    WA_SORT-FIELDNAME = 'MATNR'.
    WA_SORT-TABNAME = 'I_EKPO'.
    WA_SORT-UP = 'X'.
    WA_SORT-SUBTOT = 'X'.
    APPEND WA_SORT TO I_SORT .
    CLEAR WA_SORT.
    Sort on plant
    WA_SORT-SPOS = '02'.
    WA_SORT-FIELDNAME = 'WERKS'.
    WA_SORT-TABNAME = 'I_EKPO'.
    WA_SORT-UP = 'X'.
    WA_SORT-SUBTOT = 'X'.
    APPEND WA_SORT TO I_SORT .
    CLEAR WA_SORT.
    ENDFORM. " sub_populate_sort
    *& Form sub_get_event
    Get ALV grid event and pass the form name to subtotal_text
    event
    No Parameter
    FORM SUB_GET_EVENT .
    CONSTANTS : C_FORMNAME_SUBTOTAL_TEXT TYPE SLIS_FORMNAME VALUE
    'SUBTOTAL_TEXT'.
    DATA: L_S_EVENT TYPE SLIS_ALV_EVENT.
    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
    EXPORTING
    I_LIST_TYPE = 4
    IMPORTING
    ET_EVENTS = I_EVENT
    EXCEPTIONS
    LIST_TYPE_WRONG = 0
    OTHERS = 0.
    Subtotal
    READ TABLE I_EVENT INTO L_S_EVENT
    WITH KEY NAME = SLIS_EV_SUBTOTAL_TEXT.
    IF SY-SUBRC = 0.
    MOVE C_FORMNAME_SUBTOTAL_TEXT TO L_S_EVENT-FORM.
    MODIFY I_EVENT FROM L_S_EVENT INDEX SY-TABIX.
    ENDIF.
    ENDFORM. " sub_get_event
    *& Form sub_alv_report_display
    For ALV Report Display
    No Parameter
    FORM SUB_ALV_REPORT_DISPLAY .
    DATA: L_REPID TYPE SYREPID .
    L_REPID = SY-REPID .
    This function module for displaying the ALV report
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = L_REPID
    I_CALLBACK_TOP_OF_PAGE = 'SUB_ALV_TOP_OF_PAGE'
    IS_LAYOUT = WA_LAYOUT
    IT_FIELDCAT = I_FIELDCAT
    IT_SORT = I_SORT
    IT_EVENTS = I_EVENT
    I_DEFAULT = 'X'
    I_SAVE = 'A'
    TABLES
    T_OUTTAB = I_EKPO
    EXCEPTIONS
    PROGRAM_ERROR = 1
    OTHERS = 2.
    IF SY-SUBRC <> 0.
    MESSAGE i000 WITH 'Error in ALV report display'(055).
    ENDIF.ENDFORM. " sub_alv_report_display
    FORM sub_alv_top_of_page
    Call ALV top of page
    No parameter
    FORM SUB_ALV_TOP_OF_PAGE. "#EC CALLED
    To write header for the ALV
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    IT_LIST_COMMENTARY = I_ALV_TOP_OF_PAGE.
    ENDFORM. "alv_top_of_page
    *& Form subtotal_text
    Build subtotal text
    P_total Total
    p_subtot_text Subtotal text info
    FORM SUBTOTAL_TEXT CHANGING
    P_TOTAL TYPE ANY
    P_SUBTOT_TEXT TYPE SLIS_SUBTOT_TEXT.
    Material level sub total
    IF P_SUBTOT_TEXT-CRITERIA = 'MATNR'.
    P_SUBTOT_TEXT-DISPLAY_TEXT_FOR_SUBTOTAL
    = 'Material level total'(009).
    ENDIF.
    Plant level sub total
    IF P_SUBTOT_TEXT-CRITERIA = 'WERKS'.
    P_SUBTOT_TEXT-DISPLAY_TEXT_FOR_SUBTOTAL = 'Plant level total'(010).
    ENDIF.

  • ALV DISPLAY WIDTH PROBLEM

    Hi
    my internal table is
    DATA: BEGIN OF IT_LFA1 OCCURS 0,
          LIFNR LIKE LFA1-LIFNR,
          NAME1 LIKE LFA1-NAME1,
          END OF IT_LFA1.
    i am displaying this table with REUSE_ALV_LIST_DISPLAY.
    field catelog is like
    F_WA_LFA1-FIELDNAME = 'LIFNR'.
    F_WA_LFA1-TABNAME = 'IT_LFA1'.
    F_WA_LFA1-SELTEXT_L = 'VENDOR NO'.
    APPEND F_WA_LFA1 TO F_LFA1.
    F_WA_LFA1-FIELDNAME = 'NAME1'.
    F_WA_LFA1-TABNAME = 'IT_LFA1'.
    F_WA_LFA1-SELTEXT_L = 'VENDOR NAME'.
    APPEND F_WA_LFA1 TO F_LFA1.
    Here only 10 characters of vendor name are displayed.
    How to display the complete name lfa1-name1
    I dont want take static lenth like
    F_WA_LFA1-outputlen = <b>some fixed number</b>
    rather;
      F_WA_LFA1-outputlen = <b>length of it_lfa1-lifnr</b>
    Regards,
    MB
    Message was edited by:
            M B

    DATA: BEGIN OF IT_LFA1 OCCURS 0,
    LIFNR LIKE LFA1-LIFNR,
    NAME1 LIKE LFA1-NAME1,
    END OF IT_LFA1.
    F_WA_LFA1-FIELDNAME = 'LIFNR'.
    F_WA_LFA1-TABNAME = 'IT_LFA1'.
    F_WA_LFA1-SELTEXT_L = 'VENDOR NO'.
    APPEND F_WA_LFA1 TO F_LFA1.
    F_WA_LFA1-FIELDNAME = 'NAME1'.
    F_WA_LFA1-TABNAME = 'IT_LFA1'.
    F_WA_LFA1-SELTEXT_L = 'VENDOR NAME'.
    F_WA_LFA1-SELTEXT_M = 'VENDOR NAME'.
    F_WA_LFA1-OUTPUTLEN = specify teh length of name1.
    APPEND F_WA_LFA1 TO F_LFA1.
    Refer http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_basic.htm
    Hope this helps.

  • Alv display - colors

    hi gurus,
    I have a ALV Display report with Sub totals at two levels.
    plant wise and category wise
    plant1
          category1
      subtot
          category2
       subtot
    subtot
    plant2
          category1
    subtot
          category2
      subtot
    subtot
    Now the subtotals are being displayed for both the plant wise and category wise, but they are displayed with the same row color.
    so, now i want these two subtotal rows with different ROW COLORS.
    so where should i change for acheving the above.
    thanks in advance.
    chaitanya

    Hi,
    Check this coding it will help you alot and also check the TCode LIBS & BIBS u can find more examples here
    code&----
    *& Report ZALVCOLOR *
    REPORT ZALVCOLOR .
    DATA : mara TYPE mara. " General Material Data
    TYPE-POOLS: slis. " ALV Global types
    FIELD-SYMBOLS :
    <data> TYPE table. " Data to display
    SELECT-OPTIONS :
    s_matnr FOR mara-matnr. " Material number
    SELECTION-SCREEN :
    SKIP, BEGIN OF LINE,COMMENT 5(27) v_1 FOR FIELD p_max. "#EC NEEDED
    PARAMETERS p_max(2) TYPE n DEFAULT '50' OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    INITIALIZATION.
    v_1 = 'Maximum of lines to display'.
    START-OF-SELECTION.
    PERFORM f_read_data.
    PERFORM f_display_data.
    Form f_read_data
    FORM f_read_data.
    FIELD-SYMBOLS :
    <field> TYPE ANY,
    <field2> TYPE ANY,
    <header> TYPE ANY,
    <header2> TYPE ANY,
    <lt_data> TYPE table. " Data read from DB
    DATA:
    lp_struct TYPE REF TO data,
    lp_struct2 TYPE REF TO data,
    lp_table TYPE REF TO data, " Pointer to dynamic table
    lp_table2 TYPE REF TO data, " Pointer to dynamic table
    ls_lvc_cat TYPE lvc_s_fcat,
    lt_lvc_cat TYPE lvc_t_fcat. " Field catalog
    First column
    CLEAR ls_lvc_cat.
    ls_lvc_cat-fieldname = 'MATNR'.
    ls_lvc_cat-ref_table = 'MARA'.
    APPEND ls_lvc_cat TO lt_lvc_cat.
    2nd column
    CLEAR ls_lvc_cat.
    ls_lvc_cat-fieldname = 'MAKTX'.
    ls_lvc_cat-ref_table = 'MAKT'.
    APPEND ls_lvc_cat TO lt_lvc_cat.
    3rd column
    CLEAR ls_lvc_cat.
    ls_lvc_cat-fieldname = 'MATKL'.
    ls_lvc_cat-ref_table = 'MARA'.
    APPEND ls_lvc_cat TO lt_lvc_cat.
    Create 1st internal table
    CALL METHOD cl_alv_table_create=>create_dynamic_table
    EXPORTING it_fieldcatalog = lt_lvc_cat
    IMPORTING ep_table = lp_table.
    ASSIGN lp_table->* TO <lt_data>.
    Read data into 1st internal table
    SELECT matnr maktx matkl
    INTO TABLE <lt_data>
    FROM v_matnr
    UP TO p_max ROWS
    WHERE matnr IN s_matnr.
    Create 2nd internal table
    Checkbox
    CLEAR ls_lvc_cat.
    ls_lvc_cat-fieldname = 'CHECKBOX'.
    APPEND ls_lvc_cat TO lt_lvc_cat.
    Table color
    CLEAR ls_lvc_cat.
    ls_lvc_cat-fieldname = 'TABCOLOR'.
    ls_lvc_cat-ref_table = 'CALENDAR_TYPE'.
    ls_lvc_cat-ref_field = 'COLTAB'.
    APPEND ls_lvc_cat TO lt_lvc_cat.
    Create 2nd internal table
    CALL METHOD cl_alv_table_create=>create_dynamic_table
    EXPORTING it_fieldcatalog = lt_lvc_cat
    IMPORTING ep_table = lp_table2.
    ASSIGN lp_table2->* TO <data>.
    Create structure = structure of the 1st internal table
    CREATE DATA lp_struct LIKE LINE OF <lt_data>.
    ASSIGN lp_struct->* TO <header>.
    Create structure = structure of the 2nd internal table
    CREATE DATA lp_struct2 LIKE LINE OF <data>.
    ASSIGN lp_struct2->* TO <header2>.
    Move data from 1st internal table --> 2nd internal table
    LOOP AT <lt_data> ASSIGNING <header>.
    DESCRIBE TABLE lt_lvc_cat.
    CLEAR <header2>.
    Fill the internal to display <data>
    DO sy-tfill TIMES.
    READ TABLE lt_lvc_cat INTO ls_lvc_cat INDEX sy-index.
    For each field of lt_lvc_cat.
    ASSIGN COMPONENT ls_lvc_cat-fieldname OF STRUCTURE <header>
    TO <field>.
    IF sy-subrc NE 0. EXIT .ENDIF.
    ASSIGN COMPONENT ls_lvc_cat-fieldname OF STRUCTURE <header2>
    TO <field2>.
    IF sy-subrc NE 0. EXIT .ENDIF.
    <field2> = <field>.
    ENDDO.
    Modify color
    ASSIGN COMPONENT 'TABCOLOR' OF STRUCTURE <header2>
    TO <field2>.
    IF sy-subrc EQ 0.
    PERFORM f_modify_color USING 'MAKTX' <field2>.
    PERFORM f_modify_color USING 'MATKL' <field2>.
    ENDIF.
    APPEND <header2> TO <data> .
    ENDLOOP.
    ENDFORM. " f_read_data
    Form F_DISPLAY_DATA
    FORM f_display_data.
    Macro definition
    DEFINE m_sort.
    add 1 to ls_sort-spos.
    ls_sort-fieldname = &1.
    ls_sort-down = 'X'.
    append ls_sort to lt_sort.
    END-OF-DEFINITION.
    DATA:
    ls_layout TYPE slis_layout_alv,
    lt_sort TYPE slis_t_sortinfo_alv,
    ls_sort TYPE slis_sortinfo_alv,
    ls_fieldcat TYPE slis_fieldcat_alv,
    lt_fieldcat TYPE slis_t_fieldcat_alv. " Field catalog
    Build Fieldcatalog - First column
    CLEAR ls_fieldcat.
    ls_fieldcat-fieldname = 'MATNR'.
    ls_fieldcat-ref_tabname = 'MARA'.
    ls_fieldcat-key = 'X'.
    APPEND ls_fieldcat TO lt_fieldcat.
    Build Fieldcatalog - 2nd column
    CLEAR ls_fieldcat.
    ls_fieldcat-fieldname = 'MAKTX'.
    ls_fieldcat-ref_tabname = 'MAKT'.
    APPEND ls_fieldcat TO lt_fieldcat.
    Build Fieldcatalog - 3rd column
    CLEAR ls_fieldcat.
    ls_fieldcat-fieldname = 'MATKL'.
    ls_fieldcat-ref_tabname = 'MARA'.
    APPEND ls_fieldcat TO lt_fieldcat.
    Layout
    ls_layout-zebra = 'X'.
    ls_layout-colwidth_optimize = 'X'.
    ls_layout-box_fieldname = 'CHECKBOX'.
    ls_layout-coltab_fieldname = 'TABCOLOR'.
    m_sort 'MATNR'. " Sort by creation date
    Display data
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    is_layout = ls_layout
    it_fieldcat = lt_fieldcat
    it_sort = lt_sort
    TABLES
    t_outtab = <data>.
    ENDFORM. " F_DISPLAY_DATA
    Form F_modify_color
    FORM f_modify_color USING u_fieldname TYPE lvc_fname
    ut_tabcolor TYPE table.
    DATA:
    l_rnd_value TYPE datatype-integer2,
    ls_tabcolor TYPE lvc_s_scol.
    Random value
    CALL FUNCTION 'RANDOM_I2'
    EXPORTING
    rnd_min = 0
    rnd_max = 3
    IMPORTING
    rnd_value = l_rnd_value.
    CLEAR ls_tabcolor.
    ls_tabcolor-fname = u_fieldname.
    CASE l_rnd_value.
    WHEN 0.
    ls_tabcolor-color-col = 1. " Blue.
    ls_tabcolor-color-int = 0.
    ls_tabcolor-color-inv = 0.
    WHEN 1.
    ls_tabcolor-color-col = 3. " Yellow.
    ls_tabcolor-color-int = 0.
    ls_tabcolor-color-inv = 0.
    WHEN 2.
    ls_tabcolor-color-col = 5. " Green.
    ls_tabcolor-color-int = 0.
    ls_tabcolor-color-inv = 0.
    WHEN 3.
    ls_tabcolor-color-col = 6. " Red.
    ls_tabcolor-color-int = 0.
    ls_tabcolor-color-inv = 0.
    ENDCASE.
    INSERT ls_tabcolor INTO TABLE ut_tabcolor.
    ENDFORM. " F_MODIFY_COLOR[/code]
    Regards,
    Raj.

  • Vendor wise print on separate page

    Dear all,
                  I have an ALV Report which display vendor account statement for all the vendors entered in selection screen.
    I want to take a print for all vendors but each  vendor statement should display on separate page. For new Vendor print should be taken on new page.
    e.g.
    start page1
             Vendor1.
             Accno.             Amount             
             123                     50000
             234                     40000
    end page1
    start page2
             Vendor2.
             Accno.             Amount             
             123                     50000
             234                     40000
    end page2
    Pls, Suggest any good solution.
    Thanks & regards,
    Sandip Sonar

    For getting the vendor number page break you need to fill up the IT_SORT
    like
    PERFORM F_SORT USING 'LIFNR' 'T_OUTPUT' '' '*'.
    FORM F_SORT USING l_FIELD l_TABLE l_UP l_group.
      ADD 1 TO L_POS.
      w_SORT-SPOS = l_POS.
      w_SORT-FIELDNAME = l_FIELD.
      w_SORT-TABNAME = l_TABLE.
      w_SORT-UP = l_UP.
      w_sort-group = l_group.
    APPEND w_sort to IT_SORT.
    ENDFORM.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      i_callback_program = sy-repid
      i_callback_top_of_page = 'TOP_OF_PAGE'
      I_CALLBACK_HTML_TOP_OF_PAGE = 'HTML_TOP_OF_PAGE'
      IS_LAYOUT = ws_layout
      it_fieldcat = t_fieldcat
      IT_SORT = it_sort
      it_events = it_events
    TABLES
      t_outtab = T_OUTPUT.

  • ALV Display Requirement

    hi experts,
    well i am having a problem regarding ALV display...the requirement is :
    ALV DISPLAY SHOULD BE LIKE THIS
                                                                                    Open Balance      12345
       SY-DATUM            POSTING DATE          DOC. NUMBER         LOCAL CURRENCY AMOUNT
    now the sum of the amount is displayed in front of open balance field, which is displayed in a first row of ALV display. And below are the columns with heading are having a details of the GL-ACCOUNT.
    Is this possible using a same ALV grid display or i have to use 2 ALV grid display? In both cases plz let me know to get this sort of output?
    regards,
    Yahya Shoaib.

    In the heading part you can display the total..
    *& Report  ZTRN_ALV1
    REPORT  ZTRN_ALV1.
    TYPE-POOLS: SLIS.
    DATA: REPID LIKE SY-REPID,
          FCAT TYPE SLIS_T_FIELDCAT_ALV,
          GCAT TYPE SLIS_FIELDCAT_ALV,
          FCAT1 TYPE SLIS_T_FIELDCAT_ALV,
          GCAT1 TYPE SLIS_FIELDCAT_ALV,
          LAYOUT TYPE SLIS_LAYOUT_ALV,
          T_EVENTS TYPE SLIS_T_EVENT,
          EVENTS TYPE SLIS_ALV_EVENT,
          HEADING TYPE SLIS_T_LISTHEADER,
          HEADER TYPE SLIS_LISTHEADER.
    PARAMETERS: CCODE LIKE LFB1-BUKRS.
    DATA: BEGIN OF ITAB OCCURS 0,
          lifnr LIKE LFA1-LIFNR,
          BUKRS LIKE LFB1-BUKRS,
          NAME1 LIKE LFA1-NAME1,
      END OF ITAB.
      DATA: BEGIN OF JTAB OCCURS 0,
          EBELN LIKE EKKO-EBELN,
          lifnr LIKE LFA1-LIFNR,
          AEDAT LIKE EKKO-AEDAT,
      END OF JTAB.
    *DATA: JTAB LIKE STANDARD TABLE OF EKKO WITH HEADER LINE INITIAL SIZE 0.
    START-OF-SELECTION.
    REPID = SY-REPID.
    PERFORM FETCH.
    PERFORM FIELDCAT.
    PERFORM LAYOUT.
    PERFORM GET_EVENTS.
    PERFORM EVENTS.
    PERFORM OUTPUT.
    *&      Form  FETCH
          text
    -->  p1        text
    <--  p2        text
    FORM FETCH .
    SELECT ALIFNR ANAME1 BBUKRS INTO CORRESPONDING FIELDS OF TABLE ITAB FROM LFA1 AS A JOIN LFB1 AS B ON ALIFNR EQ B~LIFNR WHERE
      B~BUKRS EQ CCODE.
    ENDFORM.                    " FETCH
    *&      Form  FIELDCAT
          text
    -->  p1        text
    <--  p2        text
    FORM FIELDCAT .
    GCAT-COL_POS = '1'.
    GCAT-FIELDNAME = 'BUKRS'.
    GCAT-TABNAME = ITAB.
    GCAT-SELTEXT_M = 'COMPANY CODE'.
    APPEND GCAT TO FCAT.
    GCAT-COL_POS = '2'.
    GCAT-FIELDNAME = 'LIFNR'.
    GCAT-TABNAME = ITAB.
    GCAT-SELTEXT_M = 'VENDOR NUMBER'.
    APPEND GCAT TO FCAT.
    GCAT-COL_POS = '3'.
    GCAT-FIELDNAME = 'NAME1'.
    GCAT-TABNAME = ITAB.
    GCAT-SELTEXT_M = 'VENDOR NAME'.
    APPEND GCAT TO FCAT.
    ENDFORM.                    " FIELDCAT
    *&      Form  LAYOUT
          text
    -->  p1        text
    <--  p2        text
    FORM LAYOUT .
    LAYOUT-ZEBRA = 'X'.
    ENDFORM.                    " LAYOUT
    *&      Form  GET_EVENTS
          text
    -->  p1        text
    <--  p2        text
    FORM GET_EVENTS .
    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
    EXPORTING
      I_LIST_TYPE           = 0
    IMPORTING
       ET_EVENTS             = T_EVENTS
    EXCEPTIONS
      LIST_TYPE_WRONG       = 1
      OTHERS                = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM.                    " GET_EVENTS
    *&      Form  EVENTS
          text
    -->  p1        text
    <--  p2        text
    FORM EVENTS .
    READ TABLE T_EVENTS INTO EVENTS WITH KEY NAME = 'TOP_OF_PAGE'.
    EVENTS-FORM = 'TOP_OF_PAGE'.
    MODIFY TABLE T_EVENTS FROM EVENTS TRANSPORTING FORM.
    READ TABLE T_EVENTS INTO EVENTS WITH KEY NAME = 'USER_COMMAND'.
    EVENTS-FORM = 'USER_COMMAND'.
    MODIFY TABLE T_EVENTS FROM EVENTS TRANSPORTING FORM.
    ENDFORM.                    " EVENTS
    *&      Form  OUTPUT
          text
    -->  p1        text
    <--  p2        text
    FORM OUTPUT .
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
       I_CALLBACK_PROGRAM                = REPID
      I_CALLBACK_PF_STATUS_SET          = ' '
       I_CALLBACK_TOP_OF_PAGE            = 'TOP_OF_PAGE'
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
       IS_LAYOUT                         = LAYOUT
       IT_FIELDCAT                       = FCAT[]
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
       IT_EVENTS                         = T_EVENTS
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      IR_SALV_FULLSCREEN_ADAPTER        =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
      TABLES
        T_OUTTAB                          = ITAB
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
      OTHERS                            = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM.                    " OUTPUT
    *&      Form  TOP_OF_PAGE
          text
    -->  p1        text
    <--  p2        text
    FORM TOP_OF_PAGE .
    CLEAR HEADING[].    <----IN THIS INTERNAL TABLE YOU EASILY DISPLAY TOTAL...
    HEADER-TYP = 'H'.
    HEADER-INFO = 'WIPRO TECHNOLOGIES'.
    APPEND HEADER TO HEADING.
    HEADER-TYP = 'S'.
    HEADER-INFO = 'ADVANCED ABAP TRAINING'.
    APPEND HEADER TO HEADING.
    HEADER-TYP = 'A'.
    HEADER-INFO = 'LIST OF VENDORS'.
    APPEND HEADER TO HEADING.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
      EXPORTING
        IT_LIST_COMMENTARY       = HEADING[]
      I_LOGO                   =
      I_END_OF_LIST_GRID       =
      I_ALV_FORM               =
    ENDFORM.

  • Material reconciliation should be done vendor wise or  project wise

    Hi all,
    how to do material reconciliation should be done vendor wise or  project wise?? any help....MIRCMR is not working

    You could use MB51/MB5B report in ALV grid and have look ups the way you wish with either Vendor or WBS/Network. However, it will not give you correct picture as Vendor is only associated with receipts (and subcontracting issues) and hence you will find lot many issues without vendor - all clubbed together.
    For projects, it will only show you transactions groups per project where your inventory is assigned to project, but for rest it will again be grouped together.
    Your requirement to see stock as per project is relevant if all your inventory is sub-divided into project stock only.
    Regards,
    Dakshesh

  • B.area wise,vendor wise,reconciliation account wise balances

    Dear seniors,
    My client has 5 b.areas, 6 Vendor groups, 6 recon accounts.
    some vendors are common to all business areas, that's why from all business areas postings happen to some vendors.
    that's y my client wants to see business area wise ,vendor wise,and recon account wise balances.
    as i checked there is no standard report for the above requirement.
    please guide me how can i guide Abaper.
    with regards,
    Bhuvan

    You can change the layout in standard report FBL1N for vendor line item display and subtotal by business area,GL account,account (vendor). Also you can collapse each of the above subtotal criteria so that you dont have a huge list of all items.
    Thanks and regards
    Kedar

  • Vendor wise MIC Limit

    Dear Gurs,
    Pls help me for the scenario as mentioned followed.
    I have a one material. for that there is a 3 differenet vendors. for that material Length is a one MIC.but as per vendor limit is different. I don't want to use a 3 different MIC for vendor wise. Requirment is One Material, One MIC but Limit should be come in Inspection plan as per vendor.
    MIC u2013 length
    Vendors u2013 A,B and C
    Vendor Spec for length for the SAME material u2013 10-12cm,10-18cm,10-20cm (A,B and C vendors)
    For GR if vendor is B then for that Inspcection lot limit of the MIC legnth should be reflected as a 10-18 cm.
    Thanks in advance for help.

    Hi Mihir,
    There are two ways to incorporate the requirement.
    1. Create that much number of task list counters for the inspection plans, same as the Vendors you have. I means One Task list group counter 01 will be assigned to Material 'M' Vendor 'A', counter 02 for  Material 'M' Vendor 'B', & counter 03 for  Material 'M' Vendor 'C'.
    2.  Refer the [wiki document|https://wiki.sdn.sap.com/wiki/display/PLM/SameParameters-DifferentSpecifications]
    Regards,
    Shyamal

Maybe you are looking for

  • Error execute report in R12

    Hi all, I think I better change this question into a sharing because I'd solved my problem :p. Below is my first post in this thread before I found the solution : I hoped I put this in the right forum. Before I ask the question, here are my environme

  • How do I overlay text or a logo in VLC on a mac?

    I want to add text to a video file. I've been trying, but I can't figure it out. i mess around with the filters, but it won't show up in my extended controls. If there's a better way to do it (besides converting the files and using iMovie or paying f

  • Linux: Preferred method to link / locate libclnt(sh)?

    I am working with a lot of cross-platform software (Linux + Windows). Part of the software uses OCI, but up to now only on Windows. Now I complied for Linux, and after not much work, it is operating. But I am not sure whether I am on the right trail

  • EDI to customized (.csv) flatfile conversion

    Hi! I've tried to test my scenario of EDI to customized (.csv) flatfile conversion. I've encountered discrepancies on my output. Instead of one .csv file, i've produced many files, in which, one file consists of one line. PERIO;EAN;ILN;SALES;TURNO;PE

  • Ipod with Bose system

    I must buy an apple iPod Universal Dock Adapter to connect my iPod nano to the bose system ? or this adapter is in the box with the bose system ?