Need a function to calcultate value using collections

Hi
I have a main table ab ( sno,empid,joindate,sal_mth, sal_yr ,run_date)
a stage table cd (sno,empid,joindate,sal_mth).
Now the catch is for every run( every day run), I need to get all data from ab and roll fwd them to the run date ( only change would be run_date)
Also If in stage table cd we receive data for the combination sno,empid,joindate,sal_mth which is present in ab, we would
change the sal_yr in ab - criteria would be sal_yr:=sal_yr + cd.sal_mth
I have done it but in primitive way using union etc. Would prefer a function to do this using collection.
Any suggestions?
Regards
SHUBH

Something like below ? (to be turned into function as you didn't mention what to return)
procedure roll_fwd(p_run_date in date) is
begin
  insert into ab
  select a.sno,a.empid,a.joindate,a.sal_mth,a.sal_yr + nvl(c.sal_mth,0) sal_yr,p_run_date
    from ab a,cd c
   where a.run_date = p_run_date - 1
     and a.sno = c.sno(+)
     and a.empid = c.empid(+)
     and a.joindate = c.joindate(+)
     and a.sal_mth = c.sal_mth(+);
end;Regards
Etbin
Edited by: Etbin on 20.2.2011 17:14
No action taken on cd data - if they're lucky, they may get another increase next day ;)

Similar Messages

  • Can't we use function to derive value for NEXT clause in MV ?

    Hi Friends,
    I have a requirement like below
    I need to derive the schedule (Value for NEXT clause in the create MV command) for a MV to run it
    e.g., Value from a date column : 03-JUL-2012 10:00 AM, VALUE for NEXT clause in CREATE MV statement should be 03-JUL-2012 04:45 AM (It is -5.45 hrs from the above date column value )
    So I wrote a function (GET_DATE) to derive schedule for NEXT clause and tried to call it from NEXT caluse, but it is giving error message as mentioned below
    ORA-04044: procedure, function, package, or type is not allowed here
    CREATE MATERIALIZED VIEW child_mv
    PARALLEL 16
    INITRANS 16
    STORAGE (
    FREELISTS 16
    FREELIST GROUPS 4
    BUILD IMMEDIATE
    REFRESH COMPLETE
    NEXT GET_DATE('PARENT_MV')
    AS
    SELECT * from xxmdme_party_stage where rownum<101;
    Could you please help to give some light on how this can be done ?

    942661 wrote:
    Hi Friends,
    I have a requirement like below
    I need to derive the schedule (Value for NEXT clause in the create MV command) for a MV to run it
    e.g., Value from a date column : 03-JUL-2012 10:00 AM, VALUE for NEXT clause in CREATE MV statement should be 03-JUL-2012 04:45 AM (It is -5.45 hrs from the above date column value )
    So I wrote a function (GET_DATE) to derive schedule for NEXT clause and tried to call it from NEXT caluse, but it is giving error message as mentioned below
    ORA-04044: procedure, function, package, or type is not allowed here
    CREATE MATERIALIZED VIEW child_mv
    PARALLEL 16
    INITRANS 16
    STORAGE (
    FREELISTS 16
    FREELIST GROUPS 4
    BUILD IMMEDIATE
    REFRESH COMPLETE
    NEXT GET_DATE('PARENT_MV')
    AS
    SELECT * from xxmdme_party_stage where rownum<101;
    Could you please help to give some light on how this can be done ?you must (ab)use EXECUTE IMMEDIATE

  • To coerce passed values, use the In Range and Coerce function.

    -" Device Number for Card 1 uses data range coercion, which now only applies to data entry; values will not be coerced when passed to subVIs. To coerce passed values, use the In Range and Coerce function."
    Hi,
    I had program runnning fine in labview version 5.0, Recently i updated to labview version 6.0, but when i opened file i will see many warnings like above.
    I saved the file as 6.0, all the warnings are gone and program compiles as well but i am not sure saving as 6.0 eliminate those problems like..."value will not be coereced when passed to subvis"

    It means that some of your controls use coercion to alter data if it is not within a range. In LV 5.0 this worked for either typing the data into the control or passing it through the connector as a sub-vi. In 6.0 the data won't be coerced if it has been passed through the connector as a sub-vi, only if it is entered on the front panel. If your sub-vis relied on this coercion to operate properly then you will need to add the "In Range and Coerce" function to your block diagram to manipulate these values. If the coercion wasn't important then disregard the warning.
    Hope this helps
    Brian

  • I tried to upload the Pxisys.ini file and MAX is showing the slot ID ...but i need a function to return those slot numbers..such that i can use in my DLL

    hi hamilton,
    thanks for your reply .
    I already tried the option or pxisys.ini file
    The MAX is showing the slot number ..but My requiremet is to use the slot ID in a DLL
    so I need a function type of statemen to return or get the slot number of the NI devices on the PXI.
    I think I clearly explained.
    I would like to get the slot numbers through a software fucntion such that i can use the slot numbers values for some other purpose ,,like configuration ,,

    jayamurugan,
    This functionality currently is not built into National Instruments software. You can get the device number, but not the slot numbers programmatically.
    Trey Hamilton
    Applications Engineer
    National Instruments
    http://www.ni.com/support

  • I have Ps CS4.  I run Apple OS X 10.9.5  on a new MacPro 3GHz 8-core Intel Xeon E5 - 64 GB.    I hardly ever use CS4 ( preferring Elements for my low level needs), but I now want to use it's function for stitching together a landscape.  I fire it up and g

    I have Ps CS4.  I run Apple OS X 10.9.5  on a new MacPro 3GHz 8-core Intel Xeon E5 - 64 GB.    I hardly ever use CS4 ( preferring Elements for my low level needs), but I now want to use it's function for stitching together a landscape.  I fire it up and get Error 150:30 with the suggestion to contact you  - hence this message

    I have Ps CS4.  I run Apple OS X 10.9.5  on a new MacPro 3GHz 8-core Intel Xeon E5 - 64 GB.    I hardly ever use CS4 ( preferring Elements for my low level needs), but I now want to use it's function for stitching together a landscape.  I fire it up and get Error 150:30 with the suggestion to contact you  - hence this message

  • Is there any function module to get vc characteristics and its value using material number?

    Hi Experts,
    I am using BAPI_CLASS_GET_CHARACTERISTICS, BAPI_OBJCL_GETCLASSES to get characteristics description and its values.
    Is there any other Function module to pull this values using material number?
    Thanks in Advance.
    Ramkumar

    Have you tried this BAPI_OBJCL_GETDETAIL
    Import parameters
    MATNR value in the OBJECTKEY
    MARA in OBJECTTABLE
    Class name in CLASSNUM
    '001' in CLASSTYPE
    You will get the Class Characteristics data into these tables:
    ALLOCVALUESNUM
    ALLOCVALUESCHAR
    Jogeswara Rao K

  • Workflows use function to update value.

    As part of a workflow I'm trying to update an object value using Function Evaluator.
    However when I set the Workflow parameter to "Target" and look through the list of attributes (Parameter attribute), I don't see the attribute I'm after. This attribute is created in the FIM portal and when I look at the extended properties of
    an object in the portal I can see this property.
    Thanks for ur help.

    Hi,
    This attribute is binded to a custom object? There is an old issue that attributes are not listed in Function evaluator if they are not binded to Person or group object..
    But you can simply write it in the field, like [//Target/MyAtt]
    Regards,
    Sylvain

  • Retrieving Variables and Values using EPM Functions

    Hi Experts
    Does anybody know how this fuctions works with and example?
    32.26 EPMVariableList
    Applies to: SAP BW (INA Provider) connections.
    This function retrieves the list of variables for the query for the specified connection. You can display the
    variables:
    ● in the current cell, where a specified character separates the variable names.
    ● in one or more dropdown lists
    32.27 EPMVariableValue
    Applies to: SAP BW (INA Provider) connections.
    This function retrieves the value(s) currently selected for the specified variable. The value(s) is (are) retrieved in
    the cell in which you enter the function.
    I already checked the EPM Add-in for Microsoft Office User Guide but is didn't say anything helpfull
    Regards
    Ariel

    Hi Ariel,
    It's clearly stated in help: "Applies to: SAP BW (INA Provider) connections."
    And if look on connection types:
    4.4.2 SAP BW (INA Provider) Connections
    Using the SAP BW (INA Provider) connection, you can do the following:
    • Work with BW queries (with or without variables).
    • Retrieve data, using reports.
    • Enter and save data, using input forms.
    • Execute planning function for BW Integrated Planning, using what are called in the EPM add-in "data processes".
    And some info about 10.1
    Unfortunately I don't have 10.1...
    Vadim

  • Searching a Table field with multiple values using a shuttle item

    Hello All,
    I have a shuttle item whhich of course users can select multiple values:
    eg: Orange:Pear:Banana
    Now I have a table where I want to get the Crate Numbers where these fruit items reside.
    The Fruit field has multiple stored values
    eg:
    Crate Fruits
    === ====
    12487 Apple:Orange:Pear:Banana
    17653 Orange:Pear:Grapes
    12874 Apple:Banana
    13655 Grapes:Watermelon:Pineapple
    87643 Pear:Banana
    53626 Strawberries:Apple
    I would like to see a final report similiar to this
    Crate Fruit
    === ===
    12487 Orange
    12487 Pear
    12487 Banana
    17653 Orange
    17653 Pear
    12874 Banana
    87643 Pear
    87643 Banana
    I thought maybe this needs to be done using collections but I am not familiar with this function, if their is another way I would appreciate it
    Hope u can help
    Frank

    Hi Frank,
    I find that in this sort of case, it is easier to create a link table containing the individual values rather than lumping them into one column.
    so the data is stored in the 'Crate, Fruit' format, rather then the 'Crate Fruits' format.
    It is a bit more work maintaining the link table when the values are amended and populating the shuttle, but it is a 'proper' relational table then.
    Regards
    Michael

  • How to use collect?

    hi all ,
    i want to add net value of all the line items which are in the same group
    am using collect but am unable to do that.
    plz suggest me what to do?
    DATA: BEGIN OF del_grp_data occurs 0,
            vbeln like vbap-vbeln,  " Sales document
            grkor like vbap-grkor,  " Delivery group
            netwr like vbap-netwr, "net value
            posnr like vbap-posnr,  " Sales document item
             End OF del_grp_data.
    SELECT vbeln grkor pstyv netwr
        posnr
       FROM   vbap
        INTO corresponding fields of  TABLE del_grp_data
        FOR ALL ENTRIES IN orders_vbeln
        WHERE vbeln eq orders_vbeln-vbeln.
    loop at del_grp_data.
    collect ord_grp_data .
    endloop.
    Regards,
    Amit.

    Basic form
    COLLECT [wa INTO] itab.
    Addition:
    ... SORTED BY f
    Cannot Use Short Forms in Line Operations.
    Effect
    COLLECT allows you to create unique or summarized datasets. The system first tries to find a table entry corresponding to the table key. (See also Defining Keys for Internal Tables). The key values are taken either from the header line of the internal table itab, or from the explicitly-specified work area wa. The line type of itab must be flat - that is, it cannot itself contain any internal tables. All the components that do not belong to the key must be numeric types ( ABAP Numeric Types).
    If the system finds an entry, the numeric fields that are not part of the table key (see ABAPNumeric Types) are added to the sum total of the existing entries. If it does not find an entry, the system creates a new entry instead.
    The way in which the system finds the entries depends on the type of the internal table:
    STANDARD TABLE:
    The system creates a temporary hash administration for the table to find the entries. This means that the runtime required to find them does not depend on the number of table entries. The administration is temporary, since it is invalidated by operations like DELETE, INSERT, MODIFY, SORT, ...). A subsequent COLLECT is then no longer independent of the table size, because the system has to use a linear search to find entries. For this reason, you should only use COLLECT to fill standard tables. U
    SORTED TABLE:
    The system uses a binary search to find the entries. There is a logarithmic relationship between the number of table entries and the search time.
    HASHED TABLE:
    The system uses the internal hash administration of the table to find records. Since (unlike standard tables), this remains intact even after table modification operations, the search time is always dependent on the number of table entries.
    For standard tables and SORTED TABLEs, the system field SY-TABIX contains the number of the existing or newly-added table entry after the APPEND. With HASHED TABLEs, SY-TABIX is set to 0.
    Notes
    COLLECT allows you to create a unique or summarized dataset, and you should only use it when this is necessary. If neither of these characteristics are required, or where the nature of the table in the application means that it is impossible for duplicate entries to occur, you should use INSERT [wa INTO] TABLE itab instead of COLLECT. If you do need the table to be unique or summarized, COLLECT is the most efficient way to achieve it.
    If you use COLLECT with a work area, the work area must be compatible with the line type of the internal table.
    If you edit a standard table using COLLECT, you should only use the COLLECT or MODIFY ... TRANSPORTING f1 f2 ... statements (where none of f1, f2, ... may be in the key) enthalten sein). Only then can you be sure that:
    -The internal table actually is unique or summarized
    -COLLECT runs efficiently. The check whether the dataset
    already contains an entry with the same key has a constant
    search time (hash procedure).
    If you use any other table modification statements, the check for entries in the dataset with the same key can only run using a linear search (and will accordingly take longer). You can use the function module ABL_TABLE_HASH_STATE to test whether the COLLECT has a constant or linear search time for a given standard table.
    Example
    Summarized sales figures by company:
    TYPES: BEGIN OF COMPANY,
            NAME(20) TYPE C,
            SALES    TYPE I,
          END OF COMPANY.
    DATA: COMP    TYPE COMPANY,
          COMPTAB TYPE HASHED TABLE OF COMPANY
                                    WITH UNIQUE KEY NAME.
    COMP-NAME = 'Duck'.  COMP-SALES = 10. COLLECT COMP INTO COMPTAB.
    COMP-NAME = 'Tiger'. COMP-SALES = 20. COLLECT COMP INTO COMPTAB.
    COMP-NAME = 'Duck'.  COMP-SALES = 30. COLLECT COMP INTO COMPTAB.
    Table COMPTAB now has the following contents:
               NAME    | SALES
              Duck    |   40
              Tiger   |   20
    Addition
    ... SORTED BY f
    Effect
    COLLECT ... SORTED BY f is obsolete, and should no longer be used. It only applies to standard tables, and has the same function as APPEND ... SORTED BY f, which you should use instead. (See also Obsolete Language Elements).
    Note
    Performance:
    Avoid unnecessary assignments to the header line when using internal tables with a header line. Whenever possible, use statements that have an explicit work area.
    For example, " APPEND wa TO itab." is approximately twice as fast as " itab = wa. APPEND itab.". The same applies to COLLECT and INSERT.
    The runtime of a COLLECT increases with the width of the table key and the number of numeric fields whose contents are summated.
    Note
    Non-Catchable Exceptions:
    COLLECT_OVERFLOW: Overflow in an integer field during addition
    COLLECT_OVERFLOW_TYPE_P: Overflow in a type P field during addition.
    TABLE_COLLECT_CHAR_IN_FUNCTION: COLLECT on a non-numeric field.
    Related
    APPEND, WRITE ... TO, MODIFY, INSERT
    Additional help
    Inserting SummarizedTable Lines

  • How to retrieve workbook's "Last Refreshed" value using VBA?

    Does anyone know how to retrieve a BEx workbook's "Last Refreshed" value using VBA?
    What I've done is expand upon a colleague's existing Excel VBA solution to automatically log into SAP BEx and batch process (and also schedule) the running of multiple BEx reports. As each BEx report in the queue is processed, the results of the run are written to a "Results" worksheet -- indicating whether that BEx report was processed successfully or not. I'm pretty much done, and everything works like a charm.
    Except I have one little problem remaining: during the processing of each BEx report, the SAP BEx status dialog appears, giving the user the ability to cancel the processing of that particular report, if they so desire. If the user cancels, I want my "Results" worksheet to indicate that for that report.
    At first, I thought, okay, I'll just test the return value when calling the SAPBEX.XLA's SAPBEXrefresh function. That function's return value is supposed to return the number of errors that occurred after each time SAPBEXrefresh is fired -- normally it's 0 if everything runs okay. So surely, if the user cancels, there's got to be some sort of error and the return value of SAPBEXrefresh would be > 0, right? Nope, no such luck!
    Which brings me back to my question in this post -- I found out through my company's SAP consultant that, if the user hits cancel in the SAP BEx dialog, the "Last Refreshed" value will not change. Therefore, he told me, simply test the value of the "Last Refreshed" value before and after each BEx reports' run. If the "Last Refreshed" value doesn't change, then presto, you know the user canceled.
    This is where I'm stuck. How do you programmatically get the "Last Refreshed" value? Obviously, you could write VBA code to find the first cell in the BEx report with the text "Last Refreshed" and then get the value in the adjoining cell. The problem with that is, what if, for some stupid reason, there's another cell somewhere in the BEx report with the text, "Last Refreshed". There's no way I can be sure that I've really found the "Last Refreshed" value plugged in by BEx.
    I've been looking extensively in this forum for an answer, but haven't found any. It seems like there are a lot of SAP BEx experts here, and if anyone can help me out here, I would greatly appreciate it.
    Thank you.

    Well, it was a little circuitous, but I figured out the solution to my own question.
    I recalled I had read about the sapbexDebugPrint macro in sapbex.xla in one of Peter Knoer's posts in this forum. So I thought, maybe I can use that to get the before and after refresh values of "Last Refreshed" in the workbook. Well, I was half-right: I could only use sapbexDebugPrint to get the workbook's after-refresh values of "Last Refreshed".
    But it didn't matter!
    As long as the after-refresh value of the workbook's "Last Refreshed" value was later than the after-refresh value of the previous workbook in the processing queue, I knew the refresh was successful and the user didn't cancel. There were some other logic permutations I had to factor in, but basically that was the answer.
    Here are snippets of my code from the main procedure, for anyone's who interested:
                '   **** Refresh query ************************************
                ' Get the previous "Last Refreshed" value
                ' We're going to need to compare this to the "Last Refreshed" value
                ' after running SAPBEXrefresh function to trap the possibility of
                ' the user canceling via the SAPBEx status dialog box
                PrevLastRefr = GetLastRefreshed()
                ' Reactivate the source workbook, just in case
                SourceWorkbook.Activate
                 RefreshRetVal% = Application.Run("SAPBEX.XLA!SAPBEXrefresh", True, , False)
                If RefreshRetVal% <> 0 Then
                    blnProcessingErr = True
                End If
                ' Get the current "Last Refreshed" value and compare it to the previous value
                CurrLastRefr = GetLastRefreshed()
                If CurrLastRefr = "NOT FOUND" Then
                    ' Refresh canceled
                    blnProcessingCanceled = True
                Else    ' We found a valid current "Last Refreshed" value
                    If PrevLastRefr = "NOT FOUND" Then
                        ' Refresh okay
                        blnProcessingCanceled = False
                    Else
                        If CDate(CurrLastRefr) > CDate(PrevLastRefr) Then
                            ' Current "Last Refreshed" value is later than previous value,
                            ' so refresh okay
                            blnProcessingCanceled = False
                        Else
                            ' Refresh canceled
                            blnProcessingCanceled = True
                        End If
                    End If
                End If
                ' Reactivate the source workbook, just in case
                SourceWorkbook.Activate
    And here's my function which retrieves the "Last Refreshed" value by calling sapbexDebugPrint macro in sapbex.xla:
    Function GetLastRefreshed() As Variant
    ' Get the SAP BEx "Last Refreshed" value by calling
    ' SAPBEx.xla's sapbexDebugPrint procedure and creating
    ' the special diagnostic workbook.
    On Error GoTo GetLastRefreshed_Error
        Dim TextCell As Range
        Dim TextCellAddr$
        Dim TextCellRow%, TextCellCol%
        Dim LastRefreshedVal As Variant
        Dim NumWorkbooks%
        ' Initialize
        GetLastRefreshed = "NOT FOUND"
        LastRefreshedVal = "NOT FOUND"
        ' Turn off screen updating until the end
        Application.ScreenUpdating = False
        ' Get the number of currently open workbooks
        NumWorkbooks% = Workbooks.Count
        ' Call the SAPBEx.xla's sapbexDebugPrint procedure
        ' This'll create a diagnostic workbook with all the information
        ' about the BEx query that was previously refreshed
        Application.Run "SAPBEX.XLA!sapbexDebugPrint"
        ' Let's double-check that the diagnostic workbook actually
        ' got created
        ' If there's any error at this point or if the number of workbooks
        ' isn't more than it was a moment ago, raise custom error
        If (Err.Number <> 0) Or (Not (Workbooks.Count > NumWorkbooks%)) Then
            Err.Raise vbObjectError + 513, , "sapbexDebugPrint failed to create the diagnostic workbook"
        End If
        ' We'll need to look at a worksheet named "E_T_TXT_SYMBOLS"
        ' in the diagnostic workbook
        ' If this worksheet doesn't exist, then we know that there
        ' was no previously refreshed query during this session
        ' (We could loop through the collection of worksheets in the workbook
        ' to see if that worksheet actually exists, but we'll use
        ' error handling to deal with this instead)
        ' Find the first cell in the "E_T_TXT_SYMBOLS" worksheet
        ' with the text "Last Refreshed"
        ' (If the worksheet doesn't exist, an error will be thrown...)
        Set TextCell = Sheets("E_T_TXT_SYMBOLS").Cells.Find(What:="Last Refreshed", _
                    LookIn:=xlValues)
        If TextCell Is Nothing Then
            ' Can't find the cell, so we know the user had canceled during previous refresh
            LastRefreshedVal = "NOT FOUND"
        Else
            ' Found the cell, now we're in business
            TextCellAddr$ = TextCell.Address ' $F$11
            TextCellRow% = CInt(Mid(TextCellAddr$, InStr(2, TextCellAddr$, "$") + 1))
            TextCellCol% = ColRef2ColNo(Mid(TextCellAddr$, 2, InStr(2, TextCellAddr$, "$") - 2))
            ' The cell with the "Last Refreshed" value is going to be 2 columns to the right
            LastRefreshedVal = Sheets("E_T_TXT_SYMBOLS").Cells(TextCellRow%, TextCellCol%).Offset(0, 2).Value
            ' Ensure the "Last Refreshed" value is a valid date/time
            If Not IsDate(LastRefreshedVal) Then LastRefreshedVal = "NOT FOUND"
        End If
    GetLastRefreshed_Exit:
        ' Err.Number -2147220991 is my custom raised error:
        ' "sapbexDebugPrint failed to create the diagnostic workbook"
        If Err.Number <> -2147220991 Then
            ' Close the diagnostic workbook and return Last Refreshed value
            Workbooks(ActiveWorkbook.Name).Close SaveChanges:=False
            GetLastRefreshed = LastRefreshedVal
        End If
        Application.ScreenUpdating = True   ' Turn on screen updating
        Exit Function
    GetLastRefreshed_Error:
        Select Case Err.Number
            Case 9  ' Subscript out of range (which means "E_T_TXT_SYMBOLS" worksheet doesn't exist)
                LastRefreshedVal = "NOT FOUND"
            Case Else
                MsgBox "Error encountered during getting Last Refreshed value." & vbCrLf & vbCrLf & _
               "Error: " & Err.Number & " - " & Err.Description, vbExclamation, gstrErrBoxTitle
        End Select
        Resume GetLastRefreshed_Exit
    End Function
    Like I said, the solution was a little circuitous, but it works!

  • How to use collective confirmation CO12

    can any body explain me how to use collective confirmation CO12 with screen dump.
    Plz help

    Hi Viswa,
    Prerequisites:
    You can predefine values to identify confirmations and to determine default values in Conf. parameters for collective confirmation/fast entry (Customizing for Shop Floor Control by choosing Operations ® Confirmation ® Confirmation Parameters Collective Entry/Fast Entry):
        Identifying the confirmation
    You can identify an individual confirmation either by the confirmation number or the order number/operation number.
        Suggest actual data
    You can define whether and when (after entry, during saving) quantities (see Determining a Default for Yield) or activities are suggested. The default setting is that no quantities are suggested and activities are determined during saving. Personnel data and dates are always suggested.
    Procedure:
        Choose Logistics ® Production ® Shop floor control ® Confirmation ® Enter ® For operation ® Collective entry.
        The screen for collective entry of confirmations appears.
        In this screen you can enter confirmations in a table (table control). You enter a new confirmation in each line. You can control the appearance of the table yourself.
    You can change the type of confirmation identification during input. To do so choose Other view.
    Enter all the data needed for the confirmations. Each line corresponds to a new confirmation. In this line you have all the fields that are available in single entry of a time ticket confirmation.
    On the top line of the screen you can enter default values (for example unit of measure, personnel number) that are copied to all confirmations. Enter the values and choose This graphic is explained in the accompanying text. You can save these default values for a specific user, so that they are preset the next time the user logs on. You can also delete these defaults.
    With this function, you can let the system suggest actual data (quantities, activities, dates, personnel data). To do so, select the confirmations, choose This graphic is explained in the accompanying text Propose actual data, set the indicator for the relevant actual data and choose This graphic is explained in the accompanying text. This data overwrites data that you may have already entered.
        Save your confirmations.
    Note
    To reach the Actual data screen for the selected confirmations choose This graphic is explained in the accompanying text. Here you have the complete functionality of time ticket confirmation. From this screen you can go to the detail screens and to the goods movement overview. If several confirmation have been selected, you can switch between the individual confirmations.
    Note
    You can switch to the goods movement overview from the collective entry screen (choose This graphic is explained in the accompanying text Goods movements). In this screen the goods movements for the selected confirmations are displayed.
    You can check and, if necessary, change the goods movements. When you go back to the collective entry screen, the GM indicator is set for the selected confirmations (goods movements for confirmations already determined). As soon as you save a confirmation, the goods movements are also posted.
    For more information choose the GOODS MOVEMENT OVER VIEW.
    Regards,
    Madhu.G
    Edited by: madhu333mac on Jan 11, 2012 11:34 PM

  • Help needed Displaying ALV  Secondary list without using oops concept

    Hi Experts
    Help needed Displaying ALV  Secondary list without using oops concept.
    its urgent
    regds
    rajasekhar

    hi chk this code
    ******************TABLES DECLARATION*****************
    TABLES : VBAP,MARA.
    *****************TYPE POOLS**************************
    TYPE-POOLS : SLIS.
    ****************INTERNAL TABLES**********************
    DATA : BEGIN OF IT_VBAP OCCURS 0,
    VBELN LIKE VBAP-VBELN, "SALES DOCUMENT
    POSNR LIKE VBAP-POSNR, "SALES DOCUMENT ITEM
    MATNR LIKE VBAP-MATNR, "MATERIAL NUMBER
    END OF IT_VBAP.
    ****************TEMPORARY VARIABLES******************
    DATA : V_VBELN LIKE VBAP-VBELN."SALES DOCUMENT
    DATA : V_MTART LIKE MARA-MTART. "MATERIAL TYPE
    *****************FIELD CATALOG***********************
    DATA : IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
           WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    ****************LAYOUT*******************************
    DATA : WA_LAYOUT TYPE SLIS_LAYOUT_ALV.
    ***************VARIANT*******************************
    DATA : G_VARIANT LIKE DISVARIANT.
    ****************SAVE*********************************
    DATA : G_SAVE(1) TYPE C.
    *****************EVENTS******************************
    DATA : XS_EVENTS TYPE SLIS_ALV_EVENT,
           G_EVENTS TYPE SLIS_T_EVENT.
    ******************PF STATUS**************************
    DATA : PF_STATUS TYPE SLIS_FORMNAME VALUE 'SET_PF_STATUS'.
    ******************USER COMMAND************************
    DATA : USER_COMMAND TYPE SLIS_FORMNAME VALUE 'SET_USER_COMMAND',
           R_UCOMM LIKE SY-UCOMM.
    ****************SELECTION SCREEN************************
    SELECT-OPTIONS : S_VBELN FOR VBAP-VBELN.
    ***************AT SELECTION SCREEN*********************
    AT SELECTION-SCREEN.
      PERFORM VALIDATE.
    **************START-OF-SELECTION**************************
    START-OF-SELECTION.
      PERFORM GET_DETAILS.
      PERFORM FIELDCAT.
      PERFORM LAYOUT.
      PERFORM VARIANT.
      PERFORM SAVE.
      PERFORM EVENTS.
      PERFORM ALV_DISPLAY.
    *********************FORMS*******************************************
    *&      Form  validate
          text
    -->  p1        text
    <--  p2        text
    FORM VALIDATE .
      SELECT SINGLE VBELN
                    FROM VBAP
                    INTO V_VBELN
                    WHERE VBELN IN S_VBELN.
      IF SY-SUBRC <> 0.
        MESSAGE E000 WITH 'enter valid vbeln'.
      ENDIF.
    ENDFORM.                    " validate
    *&      Form  get_details
          text
    -->  p1        text
    <--  p2        text
    FORM GET_DETAILS .
      SELECT VBELN
             POSNR
             MATNR
             FROM VBAP
             INTO TABLE IT_VBAP
             WHERE VBELN IN S_VBELN.
      IF SY-SUBRC <> 0.
        MESSAGE E000 WITH 'no details found'.
      ENDIF.
    ENDFORM.                    " get_details
    *&      Form  fieldcat
          text
    -->  p1        text
    <--  p2        text
    FORM FIELDCAT .
      WA_FIELDCAT-TABNAME = 'IT_VBAP'.
      WA_FIELDCAT-FIELDNAME = 'VBELN'.
      WA_FIELDCAT-OUTPUTLEN = 10.
      WA_FIELDCAT-SELTEXT_L = 'SALES DOC'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_VBAP'.
      WA_FIELDCAT-FIELDNAME = 'POSNR'.
      WA_FIELDCAT-OUTPUTLEN = 6.
      WA_FIELDCAT-SELTEXT_L = 'ITEM'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_VBAP'.
      WA_FIELDCAT-FIELDNAME = 'MATNR'.
      WA_FIELDCAT-OUTPUTLEN = 18.
      WA_FIELDCAT-SELTEXT_L = 'MATERIAL NO'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
    ENDFORM.                    " fieldcat
    *&      Form  LAYOUT
          text
    -->  p1        text
    <--  p2        text
    FORM LAYOUT .
      WA_LAYOUT-ZEBRA = 'X'.
    ENDFORM.                    " LAYOUT
    *&      Form  VARIANT
          text
    -->  p1        text
    <--  p2        text
    FORM VARIANT .
      CLEAR G_VARIANT.
      G_VARIANT-REPORT = SY-REPID.
    ENDFORM.                    " VARIANT
    *&      Form  SAVE
          text
    -->  p1        text
    <--  p2        text
    FORM SAVE .
      CLEAR G_SAVE.
      G_SAVE = 'A'.
    ENDFORM.                    " SAVE
    *&      Form  EVENTS
          text
    -->  p1        text
    <--  p2        text
    FORM EVENTS .
      CLEAR XS_EVENTS.
      XS_EVENTS-NAME = SLIS_EV_TOP_OF_PAGE.
      XS_EVENTS-FORM = 'TOP_OF_PAGE'.
      APPEND XS_EVENTS TO G_EVENTS.
    ENDFORM.                    " EVENTS
    *&      Form  TOP_OF_PAGE
          text
    FORM TOP_OF_PAGE.
      WRITE :/ ' INTELLI GROUP'.
    ENDFORM.                    "TOP_OF_PAGE
    *&      Form  ALV_DISPLAY
          text
    -->  p1        text
    <--  p2        text
    FORM ALV_DISPLAY .
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK              = ' '
      I_BYPASSING_BUFFER             =
      I_BUFFER_ACTIVE                = ' '
         I_CALLBACK_PROGRAM             = SY-REPID
         I_CALLBACK_PF_STATUS_SET       = PF_STATUS
         I_CALLBACK_USER_COMMAND        = USER_COMMAND
      I_STRUCTURE_NAME               =
         IS_LAYOUT                      = WA_LAYOUT
         IT_FIELDCAT                    = IT_FIELDCAT
      IT_EXCLUDING                   =
      IT_SPECIAL_GROUPS              =
      IT_SORT                        =
      IT_FILTER                      =
      IS_SEL_HIDE                    =
      I_DEFAULT                      = 'X'
         I_SAVE                         = G_SAVE
         IS_VARIANT                     = G_VARIANT
         IT_EVENTS                      = G_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
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        =
      ES_EXIT_CAUSED_BY_USER         =
        TABLES
          T_OUTTAB                       = IT_VBAP
       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.                    " ALV_DISPLAY
    *&      Form  SET_PF_STATUS
          text
    FORM SET_PF_STATUS USING EXTAB TYPE SLIS_T_EXTAB.
      SET PF-STATUS 'Z50651_PFSTATUS' EXCLUDING EXTAB.
    ENDFORM.                    "SET_PF_STATUS
    *&      Form  SET_USER_COMMAND
          text
    FORM SET_USER_COMMAND USING R_UCOMM
                                RS_SELFIELD TYPE SLIS_SELFIELD.
      CASE R_UCOMM.
        WHEN 'DC'.
          READ TABLE IT_VBAP INDEX RS_SELFIELD-TABINDEX.
          IF SY-SUBRC = 0.
            SELECT SINGLE MTART
                          FROM MARA
                          INTO V_MTART
                          WHERE MATNR = IT_VBAP-MATNR.
            IF SY-SUBRC <> 0.
       MESSAGE E000 WITH 'NO MATERIAL DESCRIPTION FOR SELECTED MATERIAL NO'.
            ELSE.
              WRITE :/ 'MATERIAL NO :',IT_VBAP-MATNR.
              WRITE :/ 'MATERIAL TYPE :' , V_MTART.
            ENDIF.
          ENDIF.
        WHEN 'BACK'.
          LEAVE TO SCREEN 0.
        WHEN 'EXIT'.
          LEAVE TO SCREEN 0.
        WHEN 'CLOSE'.
          CALL TRANSACTION 'SE38'.
      ENDCASE.
    REPORT  Z_ALV_INTERACTIVE  MESSAGE-ID ZMSG_50651
                                    LINE-SIZE 100
                                    LINE-COUNT 60
                                    NO STANDARD PAGE HEADING.
    ******************TABLES DECLARATION*****************
    TABLES : VBAP,MARA.
    *****************TYPE POOLS**************************
    TYPE-POOLS : SLIS.
    ****************INTERNAL TABLES**********************
    DATA : BEGIN OF IT_VBAP OCCURS 0,
    VBELN LIKE VBAP-VBELN, "SALES DOCUMENT
    POSNR LIKE VBAP-POSNR, "SALES DOCUMENT ITEM
    MATNR LIKE VBAP-MATNR, "MATERIAL NUMBER
    END OF IT_VBAP.
    ****************TEMPORARY VARIABLES******************
    DATA : V_VBELN LIKE VBAP-VBELN."SALES DOCUMENT
    DATA : V_MTART LIKE MARA-MTART. "MATERIAL TYPE
    *****************FIELD CATALOG***********************
    DATA : IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
           WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    ****************LAYOUT*******************************
    DATA : WA_LAYOUT TYPE SLIS_LAYOUT_ALV.
    ***************VARIANT*******************************
    DATA : G_VARIANT LIKE DISVARIANT.
    ****************SAVE*********************************
    DATA : G_SAVE(1) TYPE C.
    *****************EVENTS******************************
    DATA : XS_EVENTS TYPE SLIS_ALV_EVENT,
           G_EVENTS TYPE SLIS_T_EVENT.
    ******************PF STATUS**************************
    DATA : PF_STATUS TYPE SLIS_FORMNAME VALUE 'SET_PF_STATUS'.
    ******************USER COMMAND************************
    DATA : USER_COMMAND TYPE SLIS_FORMNAME VALUE 'SET_USER_COMMAND',
           R_UCOMM LIKE SY-UCOMM.
    ****************SELECTION SCREEN************************
    SELECT-OPTIONS : S_VBELN FOR VBAP-VBELN.
    ***************AT SELECTION SCREEN*********************
    AT SELECTION-SCREEN.
      PERFORM VALIDATE.
    **************START-OF-SELECTION**************************
    START-OF-SELECTION.
      PERFORM GET_DETAILS.
      PERFORM FIELDCAT.
      PERFORM LAYOUT.
      PERFORM VARIANT.
      PERFORM SAVE.
      PERFORM EVENTS.
      PERFORM ALV_DISPLAY.
    *********************FORMS*******************************************
    *&      Form  validate
          text
    -->  p1        text
    <--  p2        text
    FORM VALIDATE .
      SELECT SINGLE VBELN
                    FROM VBAP
                    INTO V_VBELN
                    WHERE VBELN IN S_VBELN.
      IF SY-SUBRC <> 0.
        MESSAGE E000 WITH 'enter valid vbeln'.
      ENDIF.
    ENDFORM.                    " validate
    *&      Form  get_details
          text
    -->  p1        text
    <--  p2        text
    FORM GET_DETAILS .
      SELECT VBELN
             POSNR
             MATNR
             FROM VBAP
             INTO TABLE IT_VBAP
             WHERE VBELN IN S_VBELN.
      IF SY-SUBRC <> 0.
        MESSAGE E000 WITH 'no details found'.
      ENDIF.
    ENDFORM.                    " get_details
    *&      Form  fieldcat
          text
    -->  p1        text
    <--  p2        text
    FORM FIELDCAT .
      WA_FIELDCAT-TABNAME = 'IT_VBAP'.
      WA_FIELDCAT-FIELDNAME = 'VBELN'.
      WA_FIELDCAT-OUTPUTLEN = 10.
      WA_FIELDCAT-SELTEXT_L = 'SALES DOC'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_VBAP'.
      WA_FIELDCAT-FIELDNAME = 'POSNR'.
      WA_FIELDCAT-OUTPUTLEN = 6.
      WA_FIELDCAT-SELTEXT_L = 'ITEM'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_VBAP'.
      WA_FIELDCAT-FIELDNAME = 'MATNR'.
      WA_FIELDCAT-OUTPUTLEN = 18.
      WA_FIELDCAT-SELTEXT_L = 'MATERIAL NO'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
    ENDFORM.                    " fieldcat
    *&      Form  LAYOUT
          text
    -->  p1        text
    <--  p2        text
    FORM LAYOUT .
      WA_LAYOUT-ZEBRA = 'X'.
    ENDFORM.                    " LAYOUT
    *&      Form  VARIANT
          text
    -->  p1        text
    <--  p2        text
    FORM VARIANT .
      CLEAR G_VARIANT.
      G_VARIANT-REPORT = SY-REPID.
    ENDFORM.                    " VARIANT
    *&      Form  SAVE
          text
    -->  p1        text
    <--  p2        text
    FORM SAVE .
      CLEAR G_SAVE.
      G_SAVE = 'A'.
    ENDFORM.                    " SAVE
    *&      Form  EVENTS
          text
    -->  p1        text
    <--  p2        text
    FORM EVENTS .
      CLEAR XS_EVENTS.
      XS_EVENTS-NAME = SLIS_EV_TOP_OF_PAGE.
      XS_EVENTS-FORM = 'TOP_OF_PAGE'.
      APPEND XS_EVENTS TO G_EVENTS.
    ENDFORM.                    " EVENTS
    *&      Form  TOP_OF_PAGE
          text
    FORM TOP_OF_PAGE.
      WRITE :/ ' INTELLI GROUP'.
    ENDFORM.                    "TOP_OF_PAGE
    *&      Form  ALV_DISPLAY
          text
    -->  p1        text
    <--  p2        text
    FORM ALV_DISPLAY .
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK              = ' '
      I_BYPASSING_BUFFER             =
      I_BUFFER_ACTIVE                = ' '
         I_CALLBACK_PROGRAM             = SY-REPID
       I_CALLBACK_PF_STATUS_SET         = PF_STATUS
         I_CALLBACK_USER_COMMAND        = USER_COMMAND
      I_STRUCTURE_NAME               =
         IS_LAYOUT                      = WA_LAYOUT
         IT_FIELDCAT                    = IT_FIELDCAT
      IT_EXCLUDING                   =
      IT_SPECIAL_GROUPS              =
      IT_SORT                        =
      IT_FILTER                      =
      IS_SEL_HIDE                    =
      I_DEFAULT                      = 'X'
         I_SAVE                         = G_SAVE
        IS_VARIANT                      = G_VARIANT
         IT_EVENTS                      = G_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
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        =
      ES_EXIT_CAUSED_BY_USER         =
        TABLES
          T_OUTTAB                       = IT_VBAP
       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.                    " ALV_DISPLAY
    *&      Form  SET_PF_STATUS
          text
    FORM SET_PF_STATUS USING EXTAB TYPE SLIS_T_EXTAB.
      SET PF-STATUS 'STANDARD' EXCLUDING EXTAB.
    ENDFORM.                    "SET_PF_STATUS
    *&      Form  SET_USER_COMMAND
          text
    FORM SET_USER_COMMAND USING R_UCOMM
                                RS_SELFIELD TYPE SLIS_SELFIELD.
      CASE R_UCOMM.
        WHEN 'DC'.
          READ TABLE IT_VBAP INDEX RS_SELFIELD-TABINDEX.
          IF SY-SUBRC = 0.
            SELECT SINGLE MTART
                          FROM MARA
                          INTO V_MTART
                          WHERE MATNR = IT_VBAP-MATNR.
            IF SY-SUBRC <> 0.
       MESSAGE E000 WITH 'NO MATERIAL DESCRIPTION FOR SELECTED MATERIAL NO'.
            ELSE.
              WRITE :/ 'MATERIAL NO :',IT_VBAP-MATNR.
              WRITE :/ 'MATERIAL TYPE :' , V_MTART.
      SUBMIT SLIS_DUMMY WITH P_MATNR EQ IT_VBAP-MATNR
                        WITH P_MTART EQ V_MTART.
            ENDIF.
          ENDIF.
        WHEN 'BACK'.
          LEAVE TO SCREEN 0.
        WHEN 'EXIT'.
          LEAVE TO SCREEN 0.
        WHEN 'CLOSE'.
          CALL TRANSACTION 'SE38'.
      ENDCASE.
    plz reward if useful

  • How to get multiple values using HttpSession.getAttribute(java.lang.String)

    Hey Guys
    I'm trying to find a way to get multiple values using the following method
    HttpSession.getAttribute(java.lang.String)
    Here's the scenerio. Its a already written application and now i'm trying to make some changes. earlier in the jsp page a combo box was used and value was retrieved in the servlet using the getAttribute method of Session. Now I'm using a html multiple selection list and have to retrieve all the values selected in the list in the servlet. Can anyone please suggest me how to do that. HTTPRequest class has a method getParameterValues which will let me do that but i have to do is using HTTPSession.
    Thanks for your time to read this

    I'm not sure what you are trying to do. You can only use session.getAttribute to retrieve something that has already been stored in the session with a previous setAttribute. If you need to store multiple values under one attribute name using setAttribute, you can store an array, or an ArrayList or whatever type of Collection you want. The request.getParameterValues method is the only way you can retrieve form parameters than can have multiple values. If the servlet hasn't already processed these parameters and put them into the session for you, you have to use request.getParameterValues.

  • Unable to get values within scope of the RowGroup(only got values using Previous and current scope value)

    Hi All,
    I already calculated a row(Add Total row) like  Gross profit within Group1 (a,b,c,d,e which are sub groups) using Previous and current scope column group values. ex: Gross Profit = a - b. (within group1)
    Gross Profit = Previous(Sum(Fields!Trans_amount.Value)) - Sum(Fields!Trans_amount.Value) in Group1
    Now, I want to get values for Net income like  Net income = a - b - c in Group1.  (OR)
    Net income = Gross  Profit - c in Group1 (Using Gross Profit textbox values using Reportitems!textbox.value). but, values different.  Since Expression got new calculation)
     Please help me.
    Thanks Advance.
    - Prem Kumar T D http://www.sharepointbasic.com/

    Hi Premtd,
    As per my understanding, there are group and subgroups in the report, you added total to a group with the expresson: Previous(Sum(Fields!Trans_amount.Value)) - Sum(Fields!Trans_amount.Value). You want to add a text box to the report to calculate Net income
    with the expression: Previous(Sum(Fields!Trans_amount.Value)) - Sum(Fields!Trans_amount.Value) - Sum(Fields!Trans_amount.Value). In order to improve the efficiency of troubleshooting, I need to ask several questions:
    • “I already calculated a row(Add Total row) like  Gross profit within Group1 (a,b,c,d,e which are sub groups)” What’s the meaning of Group1 and subgroup a, b, c, d, e ? Could you please mark Gross profit and the groups in the screenshot?
    • How to calculate Net income? Please provide some more detailed information of your requirements. I would be appreciated it if you could provide sample data and clear screenshot of the report.
    This may be a lot of information to ask for at one time. However, by collecting this information now, it will help us move more quickly toward a solution.
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu

Maybe you are looking for

  • HORA OPERANDO COM SISTEMA EM CONTINGÊNCIA

    Boa tarde a todos, Alguém saberia me dizer se existe uma solução ou nota de correção para corrigir o problema a seguir: No XML a DATA e HORA na TAG DHCONT estão corretas, porém no DANFE a hora está errada. Aparentemente está pegando a hora do servido

  • How to print check box from smartform

    Hi friends, Any body help me ??? How can we print a check box in a layout from smartform.....

  • FrontEndHost Error with Weblogic Integration Domain

    We have created a WLI Domain with an Admin server and two managed servers in a cluster. We have deployed lot of applications on this. We had a release of these applications which was workin on Production mode. The release name was R500. After that wh

  • QTP Flex automated test limited replays

    I have been writing QTP automated test for our company's flex application. My computer has Flex Builder 3 trial version installed and I get the message "License not present. With the trial verison only limited replays are allowed." (for the ones with

  • Ipod nano 6th gen not showing in iTunes Windows 8

    My ipod nano 6th gen is not showing up in itunes.  I run Windows 8.  Have tried all the apple.com trouble shooting advice.  Help!?!?