How to get previous month data from current month values

Hi Experts,
I have made one universe from BW Query in which Fiscal year period is entered in interval.
I have made a universe from that and want to develop webI reports on top of that.
In my webI reports, i have used one cross tab. In Rows section i have added Company Code and in Column section i have used Fiscal Year/Period and in Value section i have added Sales Value. I want this value of previous month.
Requirement:
Ex.
                        Feb'09          Mar'09     and so on...
Comp_code1   Sales of Jan'09         Sales of Feb'0f         and so on....
I am getting this.
Ex.
                        Feb'09          Mar'09     and so on...
Comp_code1   Sales of Feb'09         Sales of Mar'09         and so on....
I hope i have clear my requirements.
Please help as soon as possible.
Thanks in Advance,
Rishit

Hi Rishit,
Follow the below steps to get the desired result.
Step1: Convert your fiscal year period from char to a date in your database or in your designer however its feasible.
to_date('substr('009.2009',2)','mm.yyyy')
you will get the result 01 sep 2009
Step2: Convert this format to 01/09/2009 by using date functions.
Step3: Create a Detail associated to the 'date' field (typically your fiscal period).
Step4: Create a cross tab Like : Rows section should have Company Code and in Column section should have 'date'(created detail) and in Value section should be Sales Value.
you should get the following result.
01/02/2009 01/03/2009 and so on...
Comp_code1 Sales of Feb'09 Sales of Mar'09 and so on....
Step5: Use the following formula in your Column (date) formula bar.
=(<date>-1)-DayNumberOfMonth(<date>-1)+1
You will get the following result:
01/01/2009 01/02/2009 and so on...
Comp_code1 Sales of Feb'09 Sales of Mar'09 and so on....
Format the cell according to your reruirement.
Let me know if you will get any break in the above steps.
Regards,
Swati.

Similar Messages

  • Last/latest 10 months data ( including current month)

    Hi,  
    I need to find the last/latest 10 months data ( including current month)
    Year
    1/1/2014
    1/2/2014
    1/3/2014
    1/4/2014
    1/5/2014
    1/6/2014
    1/7/2014
    1/8/2014
    1/9/2014
    1/10/2014
    1/11/2014
    1/12/2014
    1/1/2013
    1/2/2013
    1/3/2012
    1/4/2012

    Hi,
    this is my data 
    Year column with Nvarchar datatype. 
    Year
    1/1/2014
    1/2/2014
    1/3/2014
    1/4/2014
    1/5/2014
    1/6/2014
    1/7/2014
    1/8/2014
    1/9/2014
    1/10/2014
    1/11/2014
    1/12/2014
    1/1/2013
    1/2/2013
    1/3/2012
    1/4/2012
    now form this yea) column i need to fetch the latest/last 10 months data only .
    OutpUt for the Query to be:
    Year
    1/3/2014
    1/4/2014
    1/5/2014
    1/6/2014
    1/7/2014
    1/8/2014
    1/9/2014
    1/10/2014
    1/11/2014
    1/12/2014
    Hope this will give you clear picture

  • How to get previous day data if i dont have current day data.

    Hello Gurus,
    I have a stock levels data in ODS. when there is no movements, we are not getting any stocks into ODS. So we have to get previous day data as it is for current day data into another ODS.
    Could you please help me in this regard.
    Thanks in advance,
    Rama

    Rama -    
            0CALDAY can't help us in this scenario .
    Step 1 :
        To do this - You have to add one ZDATE (InfoObject ) to 1st ODS. ZDATE is updated by itself from current date of system  when ever you are loading data to 1st ODS.
    Step 2:
       You have to do full update to 2nd ods.At the selection screen of InfoPackage  (from 1st ODS to 2nd ODS ) you have to write following code for ZDATE.
    pseudo Code:
    1) Select fields "Rec_INSERT","Time stamp","Request Status" and "Request ID"  where ICUBE = ODS1 from table "RSMONICDP"
    2) Populate above selected fields data in INTERNAL TABLE
    3) Sort INTERNAL TABLE by Time stamp .
    4)
         If (Record Count = ' 0 ' for current date in internal table )
         update records from  ODS1 to ODS2 where ZDATE = "yesterday date"
         else
         update records from ODS1 to ODS2 where ZDATE= "today date"
         endif.
    Make sure this is full update not delta update from ODS1 to ODS2
    I am sorry, I m not good in Coding but I am sure if  u use this logic,You can meet your requirement.
    I hope you can understand my logic. Let me know if you have any questions,
    Anesh B .

  • How to get the first day of current month

    hi guys,
    i am trying to get the first day of current month which get from the date i input at the selection screen. my method is not so good, so i was wondering if there is better way to get the this,
    thanks.

    Try this .
    data : DAYNR LIKE  HRVSCHED-DAYNR,
         DAYTXT LIKE  HRVSCHED-DAYTXT.
    data langu like sy-langu value 'EN'.
    Parameters PDATE LIKE SY-DATUM.
    PDATE+6(02) = '01'.
    CALL FUNCTION 'RH_GET_DATE_DAYNAME'
      EXPORTING
        LANGU                     = LANGU
        DATE                      = PDATE
      CALID                     =
    IMPORTING
       DAYNR                     = DAYNR
       DAYTXT                    = DAYTXT
      DAYFREE                   =
    EXCEPTIONS
      NO_LANGU                  = 1
      NO_DATE                   = 2
      NO_DAYTXT_FOR_LANGU       = 3
      INVALID_DATE              = 4
      OTHERS                    = 5
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    WRITE :/ PDATE, DAYNR, DAYTXT.
    Cheers

  • How to get the complete data from Webdynpro using a RFC

    hi guys,
    A form is created in the webdynpro, when that pdf form is called the user have to provide the key field ie the employee number in the form and then when he press the 'go' button a rfc is called and it gives all the details of the employee in the form. Then the user have to input some fields in the form and he have press the submit button. My problem is here, when the user is going to press the submit button that form will be converted to a stream (binary) of data and it is sent to one of the import parameter used in the RFC.
    I have created a RFC and created a import parameter of data type XSTRING, since i want to see what exactly R3 is receiving from web dynpro i am writing this contant in the sever as a text file. When i saw that text file i cant see the complete data.
    And when i searched in R3 the capacity of xstring is 1024 CHAR, so i dont know how to capture the entire data from webdynpro into my R3.
    I give the code what i worte please tell me am i missing anything in my code, or is there any data type which can hold more than 500kb of data which is coming from webdynpro.
    FUNCTION ZSEND_MAIL_ATTACHMENT.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(OUT_PLACE_LEVEL) TYPE  XSTRING OPTIONAL
    *"     VALUE(BIN_DATA) TYPE  INDX_CLUST OPTIONAL
    *"  TABLES
    *"      IT_MESSAGE STRUCTURE  SOLISTI1
    Data Declaration
      DATA: gd_cnt TYPE i,
          gd_sent_all(1) TYPE c,
          gd_error TYPE sy-subrc,
          tab_lines LIKE sy-tabix.
    Structure Declaration
      DATA : BEGIN OF it_file OCCURS 0,
              row(255),
             END OF it_file.
      DATA : BEGIN OF i_split OCCURS 0,
      row(50),
      END OF i_split.
    Internal Table Declaration
      data : it_receivers like table of SOMLRECI1 with header line."occurs 0.
      DATA : objbin LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE. "sOLIX
      DATA : it_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE.
      data : wa_receiver like table of SOMLRECI1 with header line.
      data : it_receiver like table of SOMLRECI1 with header line.
      data : v_bin_data like SOLISTI1 occurs 0 with header line.
      DATA : gd_doc_data LIKE sodocchgi1 OCCURS 0 WITH HEADER LINE.
    *data bin_data1 like table of solix with header line.
      REFRESH : objbin, it_packing_list, it_receivers, wa_receiver.
      CLEAR   : objbin, it_packing_list, wa_receiver, it_receivers.
      DATA V_SUBJECT(255) VALUE 'HI'.
      gd_doc_data-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( it_message ).
      gd_doc_data-obj_langu = sy-langu.
      gd_doc_data-obj_name = 'SENDFILE'.
      gd_doc_data-obj_descr = v_subject.
      gd_doc_data-sensitivty = 'O'.
      APPEND GD_DOC_DATA.
    Appending The Internal Table it_packing_list
      it_packing_list-head_start = 1.
      it_packing_list-head_num = 0.
      it_packing_list-body_start = 1.
      it_packing_list-doc_type = 'RAW'.
      it_packing_list-body_num = tab_lines.
      APPEND it_packing_list.
    *CALL FUNCTION 'GUI_UPLOAD'
    *EXPORTING
    *filename = V_FILE_PATH
    *filetype = 'BIN'
    *TABLES
    *data_tab = BIN_DATA.
      move bin_data to v_bin_data.
      append v_bin_data.
    *move soli to bin_data.
      LOOP AT V_BIN_DATA into objbin.
    MOVE v_bin_data TO objbin-line.
        APPEND objbin.
      ENDLOOP.
      CLEAR it_packing_list.
      DESCRIBE TABLE objbin LINES tab_lines.
      it_packing_list-transf_bin = 'X'.
      it_packing_list-head_start = 1.
      it_packing_list-head_num = 1.
      it_packing_list-body_start = 1.
      it_packing_list-doc_type = 'PDF'.
      it_packing_list-body_num = tab_lines.
      it_packing_list-doc_size = tab_lines * 255.
      APPEND it_packing_list.
    data file(255) value '/tmp/bali.txt'.
    *Appending The Internal Table it_receivers
    close dataset '/tmp/bali.txt'.
    open dataset '/tmp/bali.txt' for output in text mode encoding default.
    if sy-subrc = 0.
    loop at objbin.
    transfer objbin to '/tmp/bali.txt'.
    endloop.
    else.
    write 'hi'.
    close dataset '/tmp/bali.txt'.
    endif.
      it_receiver-receiver = '[email protected]'.
      it_receiver-rec_type = 'U'.
      it_receiver-com_type = 'INT'.
    APPEND wa_receiver.
    move wa_receiver[] to it_receiver[].
      append it_receiver.
    *Move wa_receiver[] to it_receivers[].
    Clear it_receivers.
    if i_OUT_PLACE_LEVEL NE 0.
    loop at it_receivers into wa_receiver.
       loop at it_receivers into wa_receiver.
    **Function Module To Post The Message To Externa Mail
         CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
           EXPORTING
             document_data              = gd_doc_data
             put_in_outbox              = 'X'
             commit_work                = 'X'
           TABLES
             packing_list               = it_packing_list
             CONTENTS_TXT               = objbin
             receivers                  = it_receivers
           EXCEPTIONS
             too_many_receivers         = 1
             document_not_sent          = 2
             document_type_not_exist    = 3
             operation_no_authorization = 4
             parameter_error            = 5
             x_error                    = 6
             enqueue_error              = 7
             OTHERS                     = 8.
         clear wa_receiver.
    ENDFUNCTION.

    You have to convert your long string to a table of shorter strings.
    There may be other ways, but one possibility is to use a loop to process you string.
    while (there is something left)
       put the next e.g. 1024 characters in a new row of your table
    endwhile
    If you need to reconstruct your string from the table, don't use simple concatenation since it will remove blanks at the end of lines. Believe me (from experience) sooner or later this will happen.
    Instead you need to either set the subsections of your long string, or insert from the end of your table and keep shifting the contents (probably less efficient) right

  • How to delete all previous icloud data from current icloud after sighning in with the current icloud account

    so i sighned into someone elses device with the current icloud account and i sighned out. Some of the icloud data from the other device is now on mine. All i want to know is how to delete all the icloud data in my current icloud account from the other icloud account

    Hello ,
    I had the same problem and i have done everything manually.
    It's a shame that Apple doesn't put a "Reset to factory Settings" button or simply "Delete all data from iCloud.com". That way, it would be much simpler for everyone including myself.
    Winston Churchill is right unfortunately . Happy deleting !
    Kind Regards,
    Moonburn

  • How to get back the data from 'AddressBook.data.previous' ?

    Hi! First of all: After using iSync all my address book data were duplicated, and I deleted all duplicated data manually. Then, I resetted the iSync data under 'Advanced' in '.Mac Sync Preferences'. Unfortunately, iSync deleted all my AddressBook data. I found a file named 'AddressBook.data.previous' and another file named 'AddressBook.data.beforesave' in my 'home folder/Library/Application Support/AddressBook'. Looking carefully into that file, I saw all the data I lost before in it! - Thus, how can I restore that data back into my AddressBook now? Does anyone knows some help for me? Thank you for answering! - Greetings, Gisela

    Welcome to Apple Discussions.
    You only have a very limited opportunity to recover your data this way. You should make sure that the Address Book application is not running, then drag the AddressBook.data file to your desktop or to the trash. Duplicate the AddressBook.data .previous file, and rename it AddressBook.data by removing the trailing <.previous> string. Then, launch the Address Book.
    The application will read the contents of this renamed file, and display your contact records. You should regularly back up your contact records using the built-in Back up Address Book… option under its File menu. A similar option is available in iCal.

  • How to calulate previous fiscal year from current year and periods as input

    hi all,
    i have a report where i have 2 select options as year and period.
    my period can be a range  like( Ex: 1 to 6).
    i like to know previous fiscal year from the following inputs.
    Tel me a suitable conversion routine to calculate
    depending on periods and fiscal year.
    regards
    sivaram.

    Hi
    U need to check the lower period, if it's 1 the previous fyscal year will be the year before:
    IF PERIOD = '1'.
      PREV_YEAR = YEAR - 1.
    ENDIF.
    U can also use the fm FI_PERIOD_DETERMINE, in this case you need a date, u can get it from lower current period:
    Get the first day of the period
    BUDAT(4)   = YEAR.
    BUDAT+4(2) = PERIDO_LOW.
    BUDAT+6(2) = '01'.
    Now get the last day of the previous month:
    BUDAT = BUDAT - 1.
    Use this date to get its period by fm FI_PERIOD_DETERMINE
    Max

  • How to take last months date to current month date

    Hi,
    I am designing a report wherein the data should range from 12:01am on the 28th day of the previous month to 11:59 pm on the 27th of the current month..  Also this report would be scheduled accordingly and I should  not be able to modify the report every month.  What is the formula that should go into it.
    Any help will be greatly appreciated!
    Thanks & Regards
    Cauvery

    Hi Cauvery,
    try to use the following formula :
    Local DateTimeVar A;
    Local DateTimeVar From_;
    Local DateTimeVar To__;
    A:=today;
    if Month(A)=1
    then From_:=Datetime(year(A),12,28,0,1,0)
    else From_:=Datetime(year(A),Month(A)-1,28,0,1,0);
    To__:=Datetime(year(A),Month(A),27,23,59,0);
    Regards
    Edited by: jeecech on Apr 17, 2009 9:37 AM

  • Want to show data from current month & prev month in single record on forms?

    Hello experts,
    i have this requirement:
    Table structure:
    MOnth       Division         totalAmount
    01-apr-2013      1               10000
    01-May-2013    1               20000
    01-apr-2013      2               30000
    01-May-2013    2               50000
    i want to display in forms like
    Form:
    Month  : 01-May-2013
    Month               Division               total               prev_Month          division               total                         dIFFERENCE
    01-May-2013               1              10000                01-Apr-2013               1               20000                        10000
    01-May-2013               2              30000                01-Apr-2013               2               50000                        20000
    I am using two procedure for fetching records for current month and previous month.
    but it will cause problem, if for some division previous month data not present.
    please suggest me some query with which i can fetch current and pre month data in single record.
    Please help me out.
    Thanks
    yash

    I'M NOT SURE BUT TRY IT ............
    select x.mn mnth, x.division, x.totalAmount total, y.mn prev_month,  y.division, y.totalAmount total, (y.totalAmount - nvl(y.totalAmount,0)) difference
    from
      (select month mn, division, totalAmount
      from table_name
      where month = (select max(month)
      from table_name
      ) x,
      (select month mn, division, totalAmount
      from table_name
      where month = (select add_months(max(month),-1)
      from table_name
      ) y
    where x.division = y.division(+)
    MOSTAFIZ MITUL
    DHAKA BANGLADESH

  • How to get the refreshed data from Input schedule while using evsnd

    Hi Experts,
                     I am using EvSnd function for sending the data from a Input schedule.
    Acc                Value                                            
    xx----
        xy------        10
        xz-------       20
    these above cell value 10,20 are getting sent by evsnd function which is written in different cell.
    Now after successfully sending, how I can see these are also getting refreshed, like in Evdre
    Acc                Value                                            
    xx----
            30
        xy------        10
        xz-------       20
    Thanks
    Anupam

    Thanks my friend.
    But the point is I need to show the updated data for all the cells (for xx, xy,xz). The point is if I use the evsnd then after the data has been sent, those two cells xy & xz will be blank once again. And so if the user will not be able to check what the data they have sent for these member from that sheet.
                  They have to get a report which will show the figures.
    And we can't even use the evgts in the xy/xz cell as the formula is going to be erased as soon as the user enter the data in that.
    so how we can do the sheet similar to evdre ip schedule..where after every data send the cell range shows latest data.

  • How to get/process the Data from XMLSocket?

    Hello All,
    I'm using Adobe Professional CS6, and Actionscript 3.0.
    To start with I have a C# program that basically just feeds data out from a Server in the form of XML data. I then have a Flash program that should receive the data and then I'll do some stuff with it. We had this working in Actionscript 1.0 but we need to upgrade the code to Actionscript 3.0, but instead of just trying to convert stuff over to the new  Actionscript version, I'm going to re-write the program.
    So far I've basically just defined some EventListeners most of which I found examples of online for using XMLSockets. As of now the Flash program will connect an XMLSocket to the Server that is feeding out the data, and the server feeding the data resends new data every 5-10 seconds or so.
    So when a grouping of XML Data comes in on the port I defined, the following Function gets executed for handling the incoming data. For my EventListener's Function for "socket.addEventListener(DataEvent.DATA, dataHandler);"  ("socket" is defined as --> var socket = new XMLSocket(); ). So when the new data comes in it executes the above function.
    The trouble I'm having is declaring a new variable of type "XML" and then using that variable to pull out individual "nodes/children" from the incoming XML Data. I found an example online that was very close to what I want to do except instead of using an XMLSocket to get data constantly streaming in they use the "URLLoader" function to get the XML data. I know I'm receiving the XML data onto the server because if I set the (e: DataEvent) variable defined in the function "head" to a string and then run a trace on that I can see ALL of the XML data in the "Output Window".
    But I can't seem to be able to set (e: DataEvent) to a XML variable so I can access individual elements of the XML data. The example I found (which uses the URLLoader instead) uses this line (myXML = new XML(e.target.data);)  to set the XML Variable, which won't work for mine, and if I try to do the same thing in my code it simply prints this for as many lines as there is XML data --> "[object XMLSocket]"
    MY CODE:
    *I left out the other Functions that are in my code for the EventListeners you'll see defined below, except for the one in question:
                             ---> "function dataHandler(e: DataEvent):void"
    import flash.events.IOErrorEvent;
    import flash.events.ProgressEvent;
    import flash.events.SecurityErrorEvent;
    import flash.events.DataEvent;
    var socket = new XMLSocket();
    socket.addEventListener(Event.CONNECT, connectHandler);
    socket.addEventListener(Event.CLOSE, closeHandler);
    socket.addEventListener(DataEvent.DATA, dataHandler);
    socket.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
    socket.addEventListener(ProgressEvent.PROGRESS, progressHandler);
    socket.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
    var success = socket.connect('server.domain.name.local',3004);
    The code in this function was used from an example I found online as described above in the post: 
              LINK --> http://www.republicofcode.com/tutorials/flash/as3xml/
    // The Commented out code (*in blue) will show ALL the xml data inside the "Output Window":
    function dataHandler(e: DataEvent):void {
              // var myStr:String = e.data;
              var xml:XML;
              xml = new XML(e.target.data);  //<--- THIS DOESN"T WORK (I DONT THINK 'target' IS CORRECT HERE)??
              if (socket.connected)
                        // trace(myStr)
                        trace(xml);
    The Output from the line "trace(xml)" will show this data below in the "Output Window" (*FYI There should be 6 lines of XML Data on each 'update'):
    [object XMLSocket]
    [object XMLSocket]
    [object XMLSocket]
    [object XMLSocket]
    [object XMLSocket]
    [object XMLSocket]
    Could someone show or point me in the right direction on this. I want to be able to access specific parts of the incoming XML Data.
    Here's some sample XML Data:
    <MESSAGE VAR="screen2Display" TEXT="CSQ_1" />
    <MESSAGE VAR="F1_agentsReady" TEXT="111" />
    <MESSAGE VAR="F1_unavailableAgents" TEXT="222" />
    <MESSAGE VAR="F1_talkingAgents" TEXT="333" />
    <MESSAGE VAR="F1_callsHandled" TEXT="444" />
    <MESSAGE VAR="F1_ABDRate" TEXT="555" />
    Any thoughts or suggestions would be greatly appreciated..!
    FYI:
    I'm VERY new to Actionscript/Flash Developing (*about a week now), so go easy on me haha...
    Thanks in Advance,
    Matt

    Hey Guys, thanks ALOT for the replies!!
    Andrei1 and Sinious,
    The code I show above is actually just what I found in an example online, and its what i was trying to show you what "they" used
    in the URLLoader example. I wasn't trying to use URLLoader, but it was the closest example I found online to  what I was trying to
    do in terms of processing the XML Data, and not how I read it in. So XMLSocket IS definetly what I'm trying to use because the Server
    I'm receiving the XML Data from "pushes" it out every 10 seconds or so. So yea I definatly want to use XMLSocket and not URLLoader...
    Sorry for the confusion...
    The example you show:
         var xml:XML = new XML(e.data)
    Is actually what I had in my original code but I couldn't get it to show anything in the "Output Window" using the trace() method on
    it, so I assumed I wasn't doing it correctly...
    What my original code was in the "dataHandler()" Function was this:
    function dataHandler(e: DataEvent): void
        var xml: XML = XML(e.data);
        if (socket.connected)
            trace(xml);
            msgArea.htmlText += "*socket.connected = TRUE\n"
        } else {
            msgArea.htmlText += "*socket.connected = FALSE\n"
    OUTPUT:
    And what I get when I run a Debug on it is, in the "msgArea", which is just a simple Text Box w/ Dynamic Text on the main frame it prints:
        "socket.connected = TRUE
         socket.connected = TRUE
         socket.connected = TRUE
         socket.connected = TRUE
         socket.connected = TRUE
         socket.connected = TRUE"
    It prints that message 6 times in the msgArea for each XML Message that comes in (*which I think 6 times because there
    are 6 "sections/nodes" in the XML Data). But then NOTHING prints in the "Output Window" for the "trace(xml)" command.
    Not sure why nothing is showing in the "Output Window", maybe the XML is not complete? But I could see data in the "Output
    Window" when I set "e.data" to a string variable, so I know the Data is reaching the program. Since I could see the XML Data in
    a string variable, does that mean I can rule out that the XML Data coming in is considered a "complete" XML Document?
    Because I wasn't sure if to be considered a complete XML Document it would need to have this included in the message..?
                        "<?xml version="1.0"?>"
    For the tests I'm running, one single XML message which is being pushed out from the server looks like this:
    <MESSAGE VAR="screen2Display" TEXT="Call_Queue_1" />
    <MESSAGE VAR="F1_agentsReady" TEXT="111" />
    <MESSAGE VAR="F1_unavailableAgents" TEXT="222" />
    <MESSAGE VAR="F1_talkingAgents" TEXT="333" />
    <MESSAGE VAR="F1_callsHandled" TEXT="444" />
    <MESSAGE VAR="F1_ABDRate" TEXT="555" />
    Would I need to include that "Header" in the XML message above?
                   i.e. "<?xml version="1.0"?>"
    Or do I need to be more specific in the trace command instead of just using "trace(xml)"?
    Also yes, I already have a Flash Policy file setup and working correctly.
    Anyway, thanks again guys for the replies, very much appreciated!!
    Thanks Again,
    Matt

  • How to get previous tag name from a xml in java

    Hai
          I need to get the previous tag name from a xml in java.
         I got the current tagname , i need to get the previous tagname
        NodeList parentactionList = lParentRule.getElementsByTagName(
    "parentactiondetails");
    i use this way of getting the the current tag name, i need to get the previous tag name ie.. before "parentactiondetails"
    for sample
    </parentruledetails>
    </Parentrule>
    </SingleParentRule>
    <parentactiondetails ACTION_FLAG="RulePass" PARENT_RULE_CODE="PR626"/>
    <ParentCompliance>
    i have xml like this i am getting the "parentactiondetails " ...  now i need to get the previous tag name </SingleParentRule> in java
    Can any one help me,

    still i am not able to get the correct value...
    i used the way wat u said it is not even going inside the if condition
    below is my actual xml as before i asked i need the before tag name of <parentactiondetails>
    ie  the closing tag of </Singleparentrule>
    i have attached the xml also
    pl reply me as soon as possible
    <?xml version="1.0" encoding="UTF-8"?>
    <GRC>
    <ParentInventory>
    <Vendor comment="" createdBy="root" vendorCode="1001" vendorName="Cisco">
    <DeviceType createdBy="root" devTypeCode="1001" devTypeName="Router" vendorCode="1001">
    <Series createdBy="root" devTypeCode="1002" seriesCode="1110" seriesName="2800" vendorCode="1001">
    <Model createdBy="root" devTypeCode="1002" modelCode="1459" modelName="4506" seriesCode="1110" vendorCode="1001">
    <Sub createdBy="root" devTypeCode="1002" modelCode="1459" seriesCode="1110" subCode="1695" subName="CAT4500-SUP4" vendorCode="1001">
    <CodeVersion createdBy="root" devTypeCode="1002" modelCode="1459" seriesCode="1110" startCode="2207" startName="12.2(25)EWA2" subCode="1695" vendorCode="1001">
    <ImageName createdBy="root" devTypeCode="1002" endCode="5508" endName="Standard" modelCode="1459" seriesCode="1110" startCode="2207" subCode="1695" vendorCode="1001"/>
    </CodeVersion>
    <CodeVersion createdBy="root" devTypeCode="1002" modelCode="1459" seriesCode="1110" startCode="2225" startName="12.2(5)T" subCode="1695" vendorCode="1001"/>
    </Sub>
    </Model>
    </Series>
    </DeviceType>
    </Vendor>
    </ParentInventory>
    <Parentrule>
    <parentruledetails COMMENTS="1PARENT_RULEFILT_AUDITPASS" CREATED_BY="root" DEVICE_LEVEL_FLAG="Configuration" PARENT_RULE_CODE="PR626" PARENT_RULE_TYPE="SPR_AP" RULE_NAME="1PARENT_RULEFILT_AUDITPASS">
    <parentscope DEVICE_TYPE_NAME="Switch" END_CODE_VERNAME="Standard" MODEL_NAME="3750-24PS" PARENT_RULE_CODE="PR626" SERIES_NAME="3750" ST_CODE_VERNAME="12.2(25)SEE2" SUP_CPU_NAME="3750" VENDOR_NAME="Cisco"/>
    <parentmultiscope COLUMN_INDEX="0" DEVICE_TYPE_NAME="Switch" END_CODE_VERNAME="Standard" MODEL_NAME="3750-24PS" MULTI_SCOPE_CODE="{1=1001~1002~ 1010~ 1131~ 1190~ 2041~E~5255}" MULTI_SCOPE_NAME="{1=Cisco~Switch~3750~3750-24PS~3750~12.2(25)SEE2~E~Standard}" OPERATOR="E" PARENT_RULE_CODE="PR626" SERIES_NAME="3750" ST_CODE_VERNAME="12.2(25)SEE2" SUP_CPU_NAME="3750" VENDOR_NAME="Cisco"/>
    <SingleParentRule CHILD_TYPE="ALL" COLUMN_INDEX="0" FILT_CONDN="PA" PARENT_RULE_CODE="PR626" RULE_CODE="PR625[AND]," RULE_TYPE_FLAG="singleparentrule">
    <Parentrule>
    <parentruledetails COMMENTS="1CUSTRULE_PARENT_CROSSREF_FAIL" CREATED_BY="root" DEVICE_LEVEL_FLAG="Configuration" PARENT_RULE_CODE="PR625" PARENT_RULE_TYPE="PCR_CR" RULE_NAME="1CUSTRULE_PARENT_CROSSREF_FAIL">
    <parentscope DEVICE_TYPE_NAME="Switch" END_CODE_VERNAME="Standard" MODEL_NAME="3750-24PS" PARENT_RULE_CODE="PR625" SERIES_NAME="3750" ST_CODE_VERNAME="12.2(25)SEE2" SUP_CPU_NAME="3750" VENDOR_NAME="Cisco"/>
    <parentmultiscope COLUMN_INDEX="0" DEVICE_TYPE_NAME="Switch" END_CODE_VERNAME="Standard" MODEL_NAME="3750-24PS" MULTI_SCOPE_CODE="{1=1001~1002~ 1010~ 1131~ 1190~ 2041~E~5255}" MULTI_SCOPE_NAME="{1=Cisco~Switch~3750~3750-24PS~3750~12.2(25)SEE2~E~Standard}" OPERATOR="E" PARENT_RULE_CODE="PR625" SERIES_NAME="3750" ST_CODE_VERNAME="12.2(25)SEE2" SUP_CPU_NAME="3750" VENDOR_NAME="Cisco"/>
    <ParentCommand>
    <Command ChildType="Console" cmdCode="37135" cmdName="login authentication &lt;string&gt;"/>
    </ParentCommand>
    <parentcustomdetails CHILD_TYPE="Console" CMD_CODE="37135" CMD_NAME="login authentication [string]" CMD_OPTION="login authentication " COLUMN_INDEX="0" CONDN_OPER="exists" CONDN_VALUE="True" PARENT_RULE_CODE="PR625" RULE_TYPE_FLAG="Customrule"/>
    <parentcustomdetails CHILD_TYPE="Console" CMD_CODE="37135" CMD_NAME="login authentication [string]" CMD_OPTION="string" COLUMN_INDEX="1" CONDN_OPER="equalsto" CONDN_VALUE="cisco" PARENT_RULE_CODE="PR625" RULE_TYPE_FLAG="Customrule"/>
    <parentcustomconsole CHILD_TYPE="Console" CONSOLE_NUM="Any" PARENT_RULE_CODE="PR625"/>
    <parentactiondetails ACTION_FLAG="CrossRef" PARENT_RULE_CODE="PR625"/>
    <parentcrossrefdetails ACTION_FLAG="CrossRef" CHILD_TYPE="Console" CMD_CODE="37135" CMD_NAME="login authentication [string]" CMD_OPTION="login authentication " COLUMN_INDEX="0" CONDN_OPER="exists" CONDN_VALUE="True" PARENT_RULE_CODE="PR625"/>
    <parentcrossrefdetails ACTION_FLAG="CrossRef" CHILD_TYPE="Console" CMD_CODE="37135" CMD_NAME="login authentication [string]" CMD_OPTION="string" COLUMN_INDEX="1" CONDN_OPER="equalsto" CONDN_VALUE="AAAAAA" PARENT_RULE_CODE="PR625"/>
    <parentcrossrefconsole ACTION_FLAG="CrossRef" CHILD_TYPE="Console" CONSOLE_NUM="Any" PARENT_RULE_CODE="PR625"/>
    <ParentCompliance>
    <PRComp comments="Group Policy is an important and useful addition to your Active Directory deployment. Managing your internal network and ensuring compliance .Group Policies are a set of &quot;rules&quot; that are applied to different parts of a Windows-based network" compCode="1006" compName="INTERNAL GROUP POLICY" createdBy="root" url="http://www.INTERNAL GROUP POLICY.com"/>
    <PRComp comments="This is the compliance for the department of Security agency" compCode="1012" compName="DISA" createdBy="root" url="http://iase.disa.mil/stigs/checklist/"/>
    <PRComp comments="This is the compliance from the National Security Agency" compCode="1013" compName="NSA" createdBy="root" url="http://checklists.nist.gov/chklst_detail.cfm?confi"/>
    <PRComp comments="he Center for Internet Security (CIS) is a not-for-profit organization that helps enterprises reduce the risk of business and e-commerce disruptions resulting from inadequate technical security controls, and provides enterprises with resources for measuring information security status and making rational security investment decisions" compCode="1020" compName="CIS" createdBy="root" url="http://www.cisecurity.org/"/>
    <PRComp comments="This is a Cisco document. It outlines the key security elements identified for Network Security Baseline, along with implementation guidelines to assist in their design, integration, and deployment in production networks. " compCode="1022" compName="Cisco Secuirty Baseline" createdBy="root" url="http://www.cisco.com/en/US/docs/solutions/Enterpri"/>
    <PRComp comments="This is the best practices from industry experts to help make audit recommendations in a customers environment. " compCode="1023" compName="360 GRC Best Practice" createdBy="root" url="http://www.360grc.com"/>
    </ParentCompliance>
    <parentriskrecommendationdetails ACTION_FLAG="CrossRef" AUDIT_RESULTS="Both_pass_fail_result" CHILD_TYPE="ALL" CMD_CODE="fdg" COMMAND_REF="dfs" DEFINITION="dfgd" DEVICE_RECOM_CATEGORY_CODE="IP - Addressing Services" DEVICE_RISK_CATEGORY_CODE="IP - Addressing Services" DISP_LEVEL="Parent and child result" PARENT_RULE_CODE="PR625" RATING1="2" RATING1_NAME="DISA" RATING2="2" RATING2_NAME="NSA" RATING3="2" RATING3_NAME="Cisco Secuirty Baseline" RATING4="2" RATING4_NAME="CIS" RATING5="2" RATING5_NAME="360 GRC Best Practice" RATING6="2" RATING6_NAME="INTERNAL GROUP POLICY" RATING_IMPACT="Low" RATING_PRIORITY="Low" RATING_URGENCY="Low" RECOMENDATION="ss" WEB_REF="sfs" WEIGHTING1="10" WEIGHTING1_NAME="DISA" WEIGHTING2="10" WEIGHTING2_NAME="NSA" WEIGHTING3="10" WEIGHTING3_NAME="Cisco Secuirty Baseline" WEIGHTING4="10" WEIGHTING4_NAME="CIS" WEIGHTING5="10" WEIGHTING5_NAME="360 GRC Best Practice" WEIGHTING6="10" WEIGHTING6_NAME="INTERNAL GROUP POLICY"/>
    </parentruledetails>
    </Parentrule>
    </SingleParentRule>
    <parentactiondetails ACTION_FLAG="RulePass" PARENT_RULE_CODE="PR626"/>
    <ParentCompliance>
    <PRComp comments="Group Policy is an important and useful addition to your Active Directory deployment. Managing your internal network and ensuring compliance .Group Policies are a set of &quot;rules&quot; that are applied to different parts of a Windows-based network" compCode="1006" compName="INTERNAL GROUP POLICY" createdBy="root" url="http://www.INTERNAL GROUP POLICY.com"/>
    <PRComp comments="This is the compliance for the department of Security agency" compCode="1012" compName="DISA" createdBy="root" url="http://iase.disa.mil/stigs/checklist/"/>
    <PRComp comments="This is the compliance from the National Security Agency" compCode="1013" compName="NSA" createdBy="root" url="http://checklists.nist.gov/chklst_detail.cfm?confi"/>
    <PRComp comments="he Center for Internet Security (CIS) is a not-for-profit organization that helps enterprises reduce the risk of business and e-commerce disruptions resulting from inadequate technical security controls, and provides enterprises with resources for measuring information security status and making rational security investment decisions" compCode="1020" compName="CIS" createdBy="root" url="http://www.cisecurity.org/"/>
    <PRComp comments="This is a Cisco document. It outlines the key security elements identified for Network Security Baseline, along with implementation guidelines to assist in their design, integration, and deployment in production networks. " compCode="1022" compName="Cisco Secuirty Baseline" createdBy="root" url="http://www.cisco.com/en/US/docs/solutions/Enterpri"/>
    <PRComp comments="This is the best practices from industry experts to help make audit recommendations in a customers environment. " compCode="1023" compName="360 GRC Best Practice" createdBy="root" url="http://www.360grc.com"/>
    </ParentCompliance>
    <parentriskrecommendationdetails ACTION_FLAG="RulePass" AUDIT_RESULTS="Both_pass_fail_result" CHILD_TYPE="ALL" CMD_CODE="dfg" COMMAND_REF="dfgdf" DEFINITION="dfgdf" DEVICE_RECOM_CATEGORY_CODE="IP - Addressing Services" DEVICE_RISK_CATEGORY_CODE="IP - Addressing Services" DISP_LEVEL="Parent and child result" PARENT_RULE_CODE="PR626" RATING1="3" RATING1_NAME="DISA" RATING2="3" RATING2_NAME="NSA" RATING3="3" RATING3_NAME="Cisco Secuirty Baseline" RATING4="3" RATING4_NAME="CIS" RATING5="3" RATING5_NAME="360 GRC Best Practice" RATING6="3" RATING6_NAME="INTERNAL GROUP POLICY" RATING_IMPACT="Low" RATING_PRIORITY="Low" RATING_URGENCY="Low" RECOMENDATION="dfgdf" WEB_REF="dfgdf" WEIGHTING1="10" WEIGHTING1_NAME="DISA" WEIGHTING2="10" WEIGHTING2_NAME="NSA" WEIGHTING3="10" WEIGHTING3_NAME="Cisco Secuirty Baseline" WEIGHTING4="10" WEIGHTING4_NAME="CIS" WEIGHTING5="10" WEIGHTING5_NAME="360 GRC Best Practice" WEIGHTING6="10" WEIGHTING6_NAME="INTERNAL GROUP POLICY"/>
    </parentruledetails>
    </Parentrule>
    </GRC>

  • How to get the raw data from particular document's schedule ?

    Hello,
    I am now able to get the data from a document usign RESTful Web Services SDK and what I need is to
    get the data not from the current version of the document but from the schedule that were executed some time ago
    with the older data than the current data.
    Any hints ?

    Hey Jacek,
    Please, look at the /schedules into Raylight API.
    Regards,
    Anthony

  • How to get the history data from r3?

    Hi Experts,
    I have loaded stock data for jan through the flat file load.
    The stock consists for 2,9,16,23,30 th dates of Jan.
    Remaining dates stock came from R3.
    so problem is stock seems double(Not exactly) for one site(Plant).
    i checked in BI and i dont see any stock data for 31st Jan but it is there in R3.
    So how to get the data for 31st jan from R3 it is using the 2LIS_03_BX Extractor (Tables - MSEG,BSEG).
    i am really stuck up here please help me out..
    Thanks in advance,
    Regards,
    <BMP>

    You can get it from LBWE transaction in R/3 side:
    for example see below:
    Sales and Distribution (SD)          :  application 11, 13, 08 (in LBWE T-code)
    Materials Management (MM)        :  application 03, 02
    Logistics Execution (LE)               :  application 12
    Quality Management                  :  application 05
    Plant Maintenance (PM)              :  application 04, 17
    Customer Service (CS)               :  application 18
    Project System (PS)                   :  application 20
    SAP Retail                                    :  application 40,43,44,45

Maybe you are looking for

  • [Solved]Unable to boot /sbin/init does not exist.

    When I boot, I get this message: ERROR: Root device mounted successfully, but /shin/init does not exist. This is an installation that was working fine for me before. I went into Windows to free up disk space, and when I booted Arch later, this is wha

  • A/R down payment invoice not allowing tax

    Hi Experts, We use SAP Business One 2007A PL-08. While posting A/R down payment with percentage on DPM (For example 50%), the system is not calculating GST on it though we put the GST tax code in the invoice. Any idea how this can be resolved? Is the

  • Apps will not load on normal boot but work in Safe Boot?

    I recently moved and my machine was working perfectly in my old place, but after setting it up in my new place I've run into this strange issue. This may be related to Security Update 2015-003 which was installed right before the move. Specifically S

  • Connecting wirelessly to a office copier/ printer

    I am trying to connect wirelessly to the multifunction copier/ printer at work. I would like to be able to send files to my mailbox that is stored on the printer side of the machine. I am connected to my job's staff wireless internet. However, I have

  • Apple's DRM

    when you download a tv show from iTunes you, you can't burn a disc. i have a client who would like to encode their video podcast the same way. any thoughts on how to do this?