Logic for FIFO in ALV o/p

Hi
I have o/p like this, which I want to display in FIFO method
Material - Total Qty - Qty in store - Qty in Elctronics - Qty in Mechanical - Delivered Qty
SPDEW - 5 - 1 - 2 - 2 - 0
like this -  (here Sr. no. is manually entered not from sap table fields)
Material - Serial no. - Total Qty - Qty in store - Qty in Elctronics - Qty in Mechanical-Delivered Qty
SPDEW - 123 - 5 - 0 - 0 - 1 - 0
SPDEW - 234 - 5 - 0 - 0 - 1 - 0
SPDEW - 456 - 5 - 0 - 1 - 0 - 0
SPDEW - 567 - 5 - 0 - 1 - 0 - 0
SPDEW - 789 - 5 - 1 - 0 - 0 - 0
Hw can I segregate Qty like this ?

Hi
I have o/p like this, which I want to display in FIFO method
Material - Total Qty - Qty in store - Qty in Elctronics - Qty in Mechanical - Delivered Qty
SPDEW - 5 - 1 - 2 - 2 - 0
like this -  (here Sr. no. is manually entered not from sap table fields)
Material - Serial no. - Total Qty - Qty in store - Qty in Elctronics - Qty in Mechanical-Delivered Qty
SPDEW - 123 - 5 - 0 - 0 - 1 - 0
SPDEW - 234 - 5 - 0 - 0 - 1 - 0
SPDEW - 456 - 5 - 0 - 1 - 0 - 0
SPDEW - 567 - 5 - 0 - 1 - 0 - 0
SPDEW - 789 - 5 - 1 - 0 - 0 - 0
Hw can I segregate Qty like this ?

Similar Messages

  • Logic for Refreshing the ALV Report (Very Urgent)

    Hi Experts,
    My <b>ALV report</b> needs a <b>refresh button</b> on the output.
    The <b>Refresh button</b> should be available to allow user to keep this report on screen and <b>refresh regularly</b> rather than <b>going back</b> and <b>running it again.</b>
    I am using <b>Function modules</b> and not <b>OOPS Concept</b> here.............As i am<b> unaware</b> of OOPS Please provide me solution in <b>FM's Only</b>.
    Kindly send me <b>sample logic</b> for this, <b>Very urgent</b> if ur reply is helpfull.... u will be <b>rewarded heavily</b>.......................
    THanks in advance.
    Rajesh Kumar

    Hi,
    This mean to say that if you have a 'refresh' push button in your gui status, every time you press the button, the list should get refreshed.
    In ALV, to refresh the table you have to call the method "refresh_table_display". 
    It has the syntax very similar to creating the table. 
    It has two parameters. In the first one, you can mention if you want to refresh only the data (the icons are not refreshed) 
    or 
    if you want to refresh only the icons around the grid (the data is not refreshed - this option is mostly not used in day to day applications).
    the synatx is :-
    call method grid (name of grid )->refresh_table_display
    exporting
    IS_STABLE = <STRUCT OF TYPE LVC_S_STBL> (THIS IS FOR DATA REFRESHING)
    I_SOFT_REFRESH = <VARIABLE OF CHAR 01>  (THIS IS FOR ICON REFRESHING).
    Regards,
    Bhaskar

  • Logic required  for Sort in ALV

    Hi All,
    I am dowloding the ALV report layout in excel sheet thorough mailing functionality.
    I want to implenemnt the dynamic sort. Here I am writing this.but i want the logic for below code.
          CALL FUNCTION 'LT_DBDATA_READ_FROM_LTDX'
            EXPORTING
      I_TOOL             = 'LT'
              IS_VARKEY          = W_VARKEY_EU
            TABLES
              T_DBFIELDCAT       = IT_DBFIELDCAT_EU
            T_DBSORTINFO       =  IT_DBSORTINFO
             T_DBFILTER         = IT_FILTER_LAYOUT
             T_DBLAYOUT         = IT_DB_LAYOUT.
    LIT_DBSORTINFO[] = IT_DBSORTINFO[].
        SORT LIT_DBSORTINFO[] BY KEY1.
        DELETE ADJACENT DUPLICATES FROM LIT_DBSORTINFO[] COMPARING KEY1.
        LOOP AT LIT_DBSORTINFO[].
          CLEAR: LW_SPOS,
                 LW_UP,
                 LW_DOWN,
                 LW_SUBTOT,
                 LW_COMP,
                 LW_EXPA,
                 LW_GROUP.
          CLEAR IT_DBSORTINFO[].
          READ TABLE IT_DBSORTINFO WITH KEY
                                    KEY1  = LIT_DBSORTINFO-KEY1
                                    PARAM = 'SPOS'.
          IF SY-SUBRC = 0.
            LW_SPOS = IT_DBSORTINFO-VALUE.
          ENDIF.
          CLEAR IT_DBSORTINFO.
          READ TABLE IT_DBSORTINFO WITH KEY
                                    KEY1  = LIT_DBSORTINFO-KEY1
                                    PARAM = 'UP'.
          IF SY-SUBRC = 0.
            LW_UP = IT_DBSORTINFO-VALUE.
          ENDIF.
          CLEAR IT_DBSORTINFO.
          READ TABLE IT_DBSORTINFO WITH KEY
                                    KEY1  = LIT_DBSORTINFO-KEY1
                                    PARAM = 'DOWN'.
          IF SY-SUBRC = 0.
            LW_DOWN = IT_DBSORTINFO-VALUE.
          ENDIF.
          CLEAR IT_DBSORTINFO.
          READ TABLE IT_DBSORTINFO WITH KEY
                                    KEY1  = LIT_DBSORTINFO-KEY1
                                    PARAM = 'SUBTOT'.
          IF SY-SUBRC = 0.
            LW_SUBTOT = IT_DBSORTINFO-VALUE.
          ENDIF.
          CLEAR IT_DBSORTINFO.
          READ TABLE IT_DBSORTINFO WITH KEY
                                    KEY1  = LIT_DBSORTINFO-KEY1
                                    PARAM = 'COMP'.
          IF SY-SUBRC = 0.
            LW_COMP = IT_DBSORTINFO-VALUE.
          ENDIF.
          CLEAR IT_DBSORTINFO.
          READ TABLE IT_DBSORTINFO WITH KEY
                                    KEY1  = LIT_DBSORTINFO-KEY1
                                    PARAM = 'EXPA'.
          IF SY-SUBRC = 0.
            LW_EXPA = IT_DBSORTINFO-VALUE.
          ENDIF.
          CLEAR IT_DBSORTINFO.
          READ TABLE IT_DBSORTINFO WITH KEY
                                    KEY1  = LIT_DBSORTINFO-KEY1
                                    PARAM = 'GROUP'.
          IF SY-SUBRC = 0.
            LW_GROUP = IT_DBSORTINFO-VALUE.
          ENDIF.
          LOOP AT IT_ALV_DATA FROM W_LOOP_FROM_EU TO W_LOOP_TO_EU.
            LW_TABIX = SY-TABIX.
            READ TABLE IT_FIELDCAT INTO LW_FIELDCAT WITH KEY
                               FIELDNAME = LIT_DBSORTINFO-KEY1.
            IF SY-SUBRC = 0.
              ASSIGN COMPONENT SY-TABIX OF
                         STRUCTURE IT_ALV_DATA TO <LFS>.
              IF SY-SUBRC = 0.
                CLEAR LW_CHAR.
                LW_CHAR = <LFS>.
                  IF LW_SPOS= 'SPOS'.
                  LOGIC Required
                    ENDIF.
                  ELSEIF LW_OPTION = 'DOWN'.
                 LOgic required
                    ENDIF.
                        ENDIF.
          ENDLOOP.
        ENDLOOP.
    regards,
    Ajay reddy

    Hai,
    Let
    1)general data
    2)all customers
    3)company code data
    4)sales organization data
    are the check box names,Then
    Just use the piece  of code below:
    <b>IF general data = 'X'.
       COUNT = COUNT + 1.
    ENDIF.
    IF all_customers = 'X'.
       COUNT = COUNT + 1.
    ENDIF.
    IF company_code_data = 'X'.
       COUNT = COUNT + 1.
    ENDIF.
    IF sales_organization_data = 'X'.
       COUNT = COUNT + 1.
    ENDIF.</b>
    Now check whether more than one Check Boxes are selected or not
    <b>IF COUNT GT 1.
    "* Do the oprations  what ever you want here  
    ENDIF.</b>
    <b>Reward points if it helps you.</b>
    Regds,
    Rama chary.Pammi

  • Logic for carry forward of previous stock to current period stock.

    Hi Experts,
    Client is using already MC.9 for see the stock analysis report, however as per there requirement we are exploring BOM as well as fetching quantity from table level as well. in my report I am experiencing  difficulty to carry forward previous period closing stock quantity to current period stock quantiy, if there is no received for current period, however the same is happens in MC.9
    Could any one tell me what is the logic behind MC.9 which is do carry forward previous period closing  stock to current period stock quantity in report.
    As per the requirement I am using S031, S032,S033, however unable to get logic for carry forward the previous month stock quantity to current month.
    have a requirement of creating a report of showing material stock period wise for each plant in below mention format.
    Header 1
    Header 2
    Header 3
    Header 4
    LFGJA/LFMON
    ROH (MT)
    HALB (MT)
    FERT (MT)
    11.2013
    100.000
    121.000
    121.00
    12.2013
    50.000
    12.000
    123.00
    01.2014
    23.231
    .23.234
    45.342
    02.2014
    23.231
    34.094
    45.098
    03.2014
    34.098
    98.983
    00.000
    04.2014
    00.000
    69.093
    98.098
    05.2014
    00.000
    89.098
    00.000
    For Example Break up of ROH material plant wise in below mention format.
    LFGJA/LFMON
    WERKS
    MENGE (MT)
    11.2013
    P001
    30.000
    11.2013
    P002
    50.000
    11.2013
    P003
    20.00
    Thanks in advance,
    SKN

    Hi,
       The last period closing stock = current period opening stock. You may get the details from MBEWH and S032 tables. Refer the doc: Material Stock and Valuation History tables - how to read them
    Regards,
    AKPT

  • Is there any functionality for AVERAGE in ALV, like do_sum, subtot?

    Hi Experts,
    In my_alv report, am doing sub/totals for prices, by using do_sum, subtot functions.........fine. But, I need to do/display the AVERAGE value for Discount % column?
    Is there any functionality for AVERAGE in ALV, like do_sum, subtot?
    thanq

    hi
    check these links out
    http://www.sapfans.com/forums/viewtopic.php?t=20386
    http://www.sapfans.com/forums/viewtopic.php?t=85191
    http://www.sapfans.com/forums/viewtopic.php?t=88401
    http://www.sapfans.com/forums/viewtopic.php?t=17335
    regards
    vijay
    reward points if helpful

  • In MVC, do i need a View or Page with flow logic for POPUP window

    Hi All,
    I have the below scenario using the MVC pattern.
    I have a main view with 3 trays, each tray has two buttons, for example first tray has Create Order button. When I click on this button, I need a popup window to come with a tableview and a button(Create), where I select some rows and click on the button Create  to create order.
    But as per the MVC pattern I canu2019t call the view (popup) from another view(main view).  So should I create a VIEW or PAGE WITH FLOW LOGIC for the popup? .
    I need 6 popup to be called from the main view and once the function is done close the popup.
    Please suggest me the flow for this scenario.
    Cheers,
    Srini.

    Srini,
    1. You can call the view in pop-up because you will be calling the controller using open.window.
    Here is the sample code:
    method DO_REQUEST .
      data:
            li_vw           type ref to   if_bsp_page,
            lv_form_field   type          string,
            li_md           type ref to   zcl_model01.
      dispatch_input( ).
      li_md ?= get_model( 'm01' ).
      lv_form_field = request->get_form_field( 'invoice_create' ).
      if lv_form_field is initial.
    *------ Request to display main page
        li_vw = create_view( view_name = 'main.htm' ).
        li_vw->set_attribute( name = 'model' value = li_md ).
        call_view( li_vw ).
      elseif lv_form_field eq 'true'.
    *------ Request to display Invoice page in pop-up
        li_vw = create_view( view_name = 'invoice.htm' ).
        li_vw->set_attribute( name = 'model' value = li_md ).
        call_view( li_vw ).
      endif.
    endmethod.
    Layout:
          function do_Invoice()
          { var s=0; r=1; w=300; h=300; x=screen.width/2;
            x=x-w/2;
            var y=screen.height/4;
            y=y-h/2;
            popUp=window.open('main.do?invoice_create=true','win','width='+ w
            +',height='+ h +', left=' + x +',top='+ y +');
    Option2:
    Ofcourse you can't bind the model in page becos those are 2 different things. But all you need to do is access the model to get some value. To know how to access the model from Page w/flow logic look at [this link|Passing model reference to a page in a Popup].
    Raja
    Edited by: Raja Thangamani on Apr 14, 2009 11:22 AM

  • What is the logic for 2LIS_17_I3HDR to pick a order as completed on time?

    Hi, Experts:
    I am working on PM using 2LIS_17_I3HDR to load data. In 2LIS_17_I3HDR, there is a field called "orders completed on-time". I am wondering what is the logic for 2LIS_17_I3HDR to identify if an order was completed on time. I would assume it compares some kind of completion/finish date with a planed/schduled comletion/finish date. Would someone please tell me what fields in what table or in transaction IW39 DOES does 2LIS_17_I3HDR  use for this?
    Many thanks!
    Jenny

    Hi, Ram:
    Thank you for the reply!
    The key figure is ZHLAFIH_TGERL (Number of On-time Closed Orders). I saw some SAP programs refering to its component type "DZHLAFIH_TE" too.
    Thanks,
    Jenny
    Edited by: Jenny Chen on Dec 2, 2009 7:53 PM
    Edited by: Jenny Chen on Dec 2, 2009 7:55 PM

  • I am considering buying a new MAC laptop to run LOGIC for composition and band live/recording, but which one is best as I do not want to spend too much money? Does it have a line in and how do you monitor sound? Will I need adaptors and a interface?

    Can anybody help?
    I am considering buying a new MAC laptop to run LOGIC for composition and band live/recording, but which one is best as I do not want to spend too much money?
    Does it have a line in and how do you monitor sound?
    Will I need adaptors and an interface?
    Also, I am guessing as Logic only runs on MAC surely then they would not the best spec to recommend to run it?
    I see all the upgrades as additional memory or a faster process?
    Is a retina screen necessary, and why flash based storage against a 1TB hard drive, and a i5 instead of an i7
    The main reason for this purchase is to play live and use backing tracks and record found sounds and make creative songs.
    I hope you can provide some valuable feedback, as I am a longtime MAC user and see upgrades and changes happen regularly but the most important thing is the songs not the equipment.
    I have £500 already and willing to add another 500 to 700 pounds, then software extra.

    Can anybody help?
    I am considering buying a new MAC laptop to run LOGIC for composition and band live/recording, but which one is best as I do not want to spend too much money?
    Does it have a line in and how do you monitor sound?
    Will I need adaptors and an interface?
    Also, I am guessing as Logic only runs on MAC surely then they would not the best spec to recommend to run it?
    I see all the upgrades as additional memory or a faster process?
    Is a retina screen necessary, and why flash based storage against a 1TB hard drive, and a i5 instead of an i7
    The main reason for this purchase is to play live and use backing tracks and record found sounds and make creative songs.
    I hope you can provide some valuable feedback, as I am a longtime MAC user and see upgrades and changes happen regularly but the most important thing is the songs not the equipment.
    I have £500 already and willing to add another 500 to 700 pounds, then software extra.

  • Need a sample program for hierarchial oops ALV report

    Hello experts,
                     I Need a sample program for hierarchial oops ALV report.

    Hi,
       Check the following sample code...
    T A B L E S
    tables : ekko.
      data definition
    types : begin of ty_ekko,
              ebeln type ekko-ebeln,
              lifnr type ekko-lifnr,
              bsart type ekko-bsart,
              aedat type ekko-aedat,
              ernam type ekko-ernam,
            end of ty_ekko.
    types : begin of ty_eket,
               ebeln type ekpo-ebeln,
               ebelp type ekpo-ebelp,
               werks type ekpo-werks,
               matnr type ekpo-matnr,
               menge type eket-menge,
               wamng type eket-wamng,
               netpr type ekpo-netpr,
            end of ty_eket.
    data : it_ekko type table of ty_ekko,
           it_eket type table of ty_eket.
    data: ob_hieralv type ref to cl_salv_hierseq_table.
    data: it_binding type salv_t_hierseq_binding,
          is_binding type salv_s_hierseq_binding.
    S E L C T O P T I O N S
    select-options : s_ebeln for ekko-ebeln.
    S T A R T O F S E L E C T I O N
    start-of-selection.
    select ebeln
           lifnr
           bsart
           aedat
           ernam from ekko
    into corresponding fields of table it_ekko
    where ebeln in s_ebeln.
    if sy-subrc eq 0.
    select aebeln aebelp
           awerks amatnr
           bmenge bwamng
           a~netpr from ekpo as a join eket as b
                     on  amandt = bmandt
                     and aebeln = bebeln
                     and aebelp = bebelp
                   into corresponding fields of table it_eket
                  where a~ebeln in s_ebeln.
    endif.
    is_binding-master = 'EBELN'.
    is_binding-slave = 'EBELN'.
    append is_binding to it_binding.
    *TRY.
    call method cl_salv_hierseq_table=>factory
    exporting
    t_binding_level1_level2 = it_binding
    importing
    r_hierseq = ob_hieralv
    changing
    t_table_level1 = it_ekko
    t_table_level2 = it_eket .
    *CATCH cx_salv_data_error .
    *CATCH cx_salv_not_found .
    *ENDTRY.
    call method ob_hieralv->display( ).
    Cheers,
    Ram

  • User command for checkbox in alv grid output

    Hi,
    Does anyone knows the user command for checkbox in alv grid display. My requirement is to have a column for checkbox in alv output. When the user checks the checkbox, a pop-up dialog box will appear. This dialog box was created in screen painter. I can't find the user command for this. Please help.
    Thanks in advance.

    Hi,
    there r two ways for creating checkbox col on the ALV grid.
    1.)  take an extra field in your internal table i.e 
    data:
       checkbox type c.
    loop at internal_table into wa.
    checkbox.
    endloop.
    or
    the fieldcatalog attribute
    2.) wa_fcat-checkbox = 'X'.
    append wa_fcat to t_fcat.
    clear wa_fcat.
    if itab-checkbox = 'X'.
    call screen <dialogbox screen number>.
    endif.
    regards
    ravi

  • Logic for making ASN as an attachment to a email?

    hi all,
    can anyone help me trying to write a logic for making the Advanced Shipment Notification as an email attachment after having converted it into pdf format?
    I need logic for:
    1) Initially converting it into pdf
    2) Making the pdf as an attachment and not as a general email content.
    Thanks & Regard/Aryan

    Dear Aryan,
    This conversion to pdf can be done by using program RSTXPDFT4, and for the pdf to be sent as attachment you need to contact your technical team as they will write a script for that, scheduling of the same can also be done.
    Reward Points if it helps,
    Regards,
    N

  • Where to see the logic for 0FYEAR (SAP Exit)

    There is already an SAP exit 0FYEAR. There is a requirement to make ZFYEAR1 just like 0FYEAR. So, i want to see where the code (logic) for 0FYEAR is present so that i can write the the same for my custom variable(ZFYEAR1) in CMOD. Can anyone help me with the name of the program?

    Include ZXRSRU01 --> Function Module EXIT_SAPLRRSO_001
    or
    Search for Function Module RSVAREXIT_ [variable name]
    Variable Name = 0FYear

  • GL A/c numbering logic for chart of accounts BAIN

    Hi,
    Will any expert pl let mek now What is the GL A/c numbering logic for chart of accounts BAIN (BAIN is standard ch of A/c for India apart from CAIN)?
    Regards
    Anand

    Your question is not clear about numbering logicu2026
    First of all the GL Account # are always externally assigned (it can be either numeric and alphanumeric)
    The length of GL account is 10 digits. But if you give it as 6 in TC OB13 then
    u2022     Numerical account numbers
    The system includes zeros to the left of the number
    0000001234
    u2022     Alpha-numeric account numbers
    The system includes zeros to the right of the number
    1131DB0000

  • Logic for Expand/compress icons

    Hi all,
    iam creating a custom transaction in which if you click on partner row in Partner tab an address dialog box pops up...
    (similar to sales order/header/partner tab)
    now, i want my window have the same func as the SAp window has but iam having problems in trying to understand what SAP is doing..
    My question:
    logic for expand/compress icons in the dialog box..
    how can i implement the logic for expand/cmpress icons..
    if i click on expand, i should see all the fields and if i compress ,all initial fields should compress and if all fields are filled and then u click on compress the icon should disappear(similar to SAP)..
    my present logic is not able to switch the expand/compress properly..iam using screen-names for these...i see that SAP is using icons but iam not sure how to do this..
    can anyone input..
    gretaly appreciate....

    Hi Karunya,
    I have done something similar on the selection-screen of a Custom Report using text symbols & icons. You can probably try it out.
    parameters:
      p_cstopn type c no-display. 
    selection-screen:
      pushbutton 1(33) p_pcust user-command cus.
    at selection-screen.
    Check whether the additional selections screen is open or closed
      if p_cstopn = space. 
        p_pcust = text-opn. 
      Make all fields invisible
        loop at screen.
          if screen-group1 = c_customize.
            screen-input = 0.
            screen-invisible = 1.
            modify screen.
          endif.
        endloop.
      else.
        p_pcust = text-clo.
      endif.
    In the text symbols :
    use @3S@ Open Additional Selections forTEXT-OPN &
        @3T@ Close Additional Selections for TEXT-CLO
    Good Luck,
    Suresh Datti

  • Which are the standard classes for events in ALV and explain each class pls

    which are the standard classes for events in ALV and explain each class pls
    POINTS WILL BE AWARDED,
    REGARDS,
    jagrut bharatkumar Shukla

    hi,
    some links.
    www.sapgenie.com
    www.abap4u.com
    http://help.sap.com/saphelp_nw2004s/helpdata/en/5e/88d440e14f8431e10000000a1550b0/frameset.htm
    download the PDF from following link.
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVALV/BCSRVALV.pdf
    The ALV object Grid methods allow the same functionality as ALV grid report function modules but are displayed within
    a screen (dialog program). SAP has provided a suit of programs which demonstrate how to For examples see standard SAP
    programs as detailed below:
    BCALV_EDIT_01 This report illustrates the simplest case of using an editable/noneditable ALV Grid Control.
    BCALV_EDIT_02 This report illustrates how to set chosen cells of an ALV Grid Control editable.
    BCALV_EDIT_03 In this example the user may change values of fields SEATSOCC (occupied seats) and/or PLANETYPE.
    The report checks the input value(s) semantically and provides protocol messages in case of error
    BCALV_EDIT_04 This report illustrates how to add and remove lines to a table using the ALV Grid Control and how to
    implement the saving of the new data.
    BCALV_EDIT_05 This example shows how to use checkboxes within an ALV Grid Control. You learn:
         (1) how to define a column for editable checkboxes for an attribute of your list
         (2) how to evaluate the checked checkboxes
         (3) how to switch between editable and non-editable checkboxes
    BCALV_EDIT_06 This example shows how to define a dropdown listbox for all cells of one column in an editable ALV
    Grid Control.
    BCALV_EDIT_07 This example shows how to define dropdown listboxes for particular cells of your output table.
    BCALV_EDIT_08 This report implements an ALV Grid Control with an application specific F4 help. The following aspects
    are dealt with:
         (1) how to replace the standard f4 help
         (2) how to pass the selected value to the ALV Grid Control
         (3) how to build an f4 help, whose value range depend on a value of another cell.
    Rgds
    Anversha

Maybe you are looking for

  • Sort results on app or database side?

    I'd like to think that this is a bit trickier than it might first appear. We have some queries that use ORDER BY, and our database guy is telling us to take them out and do them on the web app side to cut down on Oracle 10g's use of the TEMP table. H

  • How to connect to oracle in vpn in linux?

    Dear all, I have to connect to oracle database between two linux server in VPN. Plz help.

  • How can I use Internet explorer in my iMac

    I have some applications that require internet explorer which I cannot use in my iMac. Is it possible to do this ??

  • Problem with newly installation of Bridge

    I can not get a newly installed Bridge program to connect to the internet, update or display thumbnails.  CS6 runs fine as does Camera Raw.  This is a new computer running Windows 8.1

  • REP-1241 Circular column dependency originating with column

    Dear, I receive the error, REP-1241 Circular column dependency originating with column 'cenvat_opening' I have the following return statement for a column total_credit; function total_creditFormula return Number is begin Return (return nvl(:cf_cenvat