Output needed

Hi,
I need following output.
I give two parameter value like year = 2009 and period = 3 in my query
Out put:
2009 2009 2009 2008 2008 2008 .......2008
3 2 1 12 11 10 ....... 4
Thanks in advance

Using anonymous PL/SQL block you can achieve this by executing following code:
DECLARE
vDateC VARCHAR2(500) := '01/'||&month||'/'||&year;
vDate DATE := TO_DATE(vDateC,'DD/MM/YYYY');
vYear VARCHAR2(10);
vMonth VARCHAR2(3);
vYrCt VARCHAR2(100);
vMnCt VARCHAR2(100);
BEGIN
FOR i IN 1..12
LOOP
vYear := TO_CHAR(vDate,'YYYY');
vMonth := TO_CHAR(vDate,'MM');
vYrCt := vYrCt||vYear||chr(9);
vMnCt := vMnCt||vMonth||chr(9);
vDate := ADD_MONTHS(vDate,-1);
END LOOP;
DBMS_OUTPUT.put_line(vYrCt);
DBMS_OUTPUT.put_line(vMnCt);
END;
Regards.

Similar Messages

  • Output needs to attach automatically after saving invoice

    Dear Friends.
    for my invoices output needs to be assigned automatically after saving invoice. as of now it not like that even though i created condition record. manually we can able to enter.
    this process has to be applied for both manually and batch creation innvoices.
    Please let me know your suggessions on the same soon.
    Thanks
    Raju.

    Hi Raju,
                   check whether you have maintained print parameters in T code VP01 by selecting your output conditin type and also check whether the condition records are maintained correctly in VV31.
    Regards
    sankar

  • Our etext output needs a combination of XML tags from multiple levels

    Our etext output needs a combination of XML tags from multiple levels. Each unique combination of <OutboundPayment>/<Payee>/<SupplierNumber> and <OutboundPayment>/<DocumentPayable>/<ReferenceNumber> needs to be on a unique line. That means we need to combine information from different levels into a single e-text line before there is an end of record.
    Right now, it pulls the supplier number for the first invoice and matches it up to the proper line, but each line after that just repeats the supplier number it pulled the first time and uses that on each line matched to the different invoices instead of looping back and picking up the correct supplier associated with each invoice in the Format Payments Instructions.
    I have Oracle Support trying to resolve this in an SR, but so far they have made no progress. Has anyone else done this before? What command do I need to use to combine these two levels into one line of output.
    If I create a header line just above the detail line just for the supplier number it gives me exactly what I need, but on two lines in the etext output. I need it all on a single line.
    Thanks.

    If anyone needs the solution, I finally have it:
    I created a level for grouping criteria as PaymentReferenceNumber/Payee/Address/AddressName, DocumentInternalIDSegment2, called InvoiceDetailLevel. The base level is OutboundPayment.
    I then added a level (InvoiceDetailLevel) between OutboundPaymentInstruction and the DocumentPayable level.
    Then in the syntax for the supplier number and the address I entered this in the Data column:
    ../../ OutboundPayment/Payee/SupplierNumber
    and
    ../../ OutboundPayment/Payee/Address/AddressName
    That did the trick and now it is working correctly on every line, looping back to get the proper information.

  • Looking to replace my Mac Pro 2.1 graphics card with one that is silent with at least 2 DVI outputs (needed for audio production), any recommendations?

    Looking to replace my Mac Pro 2.1 graphics card with one that is silent with at least 2 DVI outputs (needed for audio production), any recommendations?
    Thanks

    Thanks, but are these are silent?
    Why do they cost over 10 x what seems available for PC?
    Is it not possible to flash the cards for mac?
    Something similar to a ASUS Geforce 8400GS PCI-E 2.0 512 MB DDR2 Graphics Card EN8400GS Silent/P/512M?

  • ALV Output need to send to Printer

    Hi Folks,
    I need to send the ALV output to the printer. I built the ALV in OOps. The printer button is enabled in the scrren and when I give print it is goint to dump
    Below I have pasted the dump.
    Help me to solve this.
    Points will be rewarded.
    Regards,
    Raj.
    Short text
        Field symbol has not yet been assigned.
    What happened?
        Error in the ABAP Application Program
        The current ABAP program "SAPLKKBL" had to be terminated because it has
        come across a statement that unfortunately cannot be executed.
    Error analysis
        You attempted to access an unassigned field symbol
        (data segment 81).
        This error may occur if
        - You address a typed field symbol before it has been set with
          ASSIGN
        - You address a field symbol that pointed to the line of an
          internal table that was deleted
        - You address a field symbol that was previously reset using
          UNASSIGN or that pointed to a local field that no
          longer exists
        - You address a global function interface, although the
          respective function module is not active - that is, is
          not in the list of active calls. The list of active calls
          can be taken from this short dump.
    rigger Location of Runtime Error
       Program                                 SAPLKKBL
       Include                                 LKKBLF01
       Row                                     1,315
       Module type                             (FORM)
       Module Name                             CHECKBOX_OUT
    ource Code Extract
    ine  SourceCde
    1285     "<<Unicode/Doublebyte 1
    1286   else.
    1287     write at (rs_fieldcat-outputlen) <hf> as icon no-gap quickinfo
    1288                                                  rs_fieldcat-tooltip.
    1289   endif.
    1290
    1291   g_tabname = l_tabname.
    1292
    1293   format hotspot off.
    1294 *End of Orginalcoding 4.6c
    1295
    1296 endform.                               " HEADER_FIELD_OUT
    1297 &----
    1298 *&      Form  CHECKBOX_OUT
    1299 &----
    1300 *       text                                                           *
    1301 ----
    1302 form checkbox_out using rs_layout type kkblo_layout
    1303                         r_tabname type stack-i_tabname
    1304                         r_sum     type c.
    1305
    1306   data: l_mark(1) type c.
    1307
    1308   if not rs_layout-box_tabname is initial and
    1309          rs_layout-box_tabname ne r_tabname.
    1310     format color off.
    1311     write at (2) space no-gap.
    1312     exit.
    1313   endif.
    1314
    >>>>>   if not r_sum is initial or <box> = '-'.
    1316     format color off.
    1317     write at (2) space no-gap.
    1318   else.
    1319     format color off.
    1320     if <box> = ' ' or <box> = 'X'.
    1321       g_mark = <box>.
    1322       if rs_layout-no_input = 'X'.
    1323         write g_mark as checkbox no-gap input off.
    1324       else.

    check these parts in ur method:
                I_SAVE                = <var. of type CHAR01 >
                I_DEFAULT             = <var. of type CHAR01 >
                IS_LAYOUT             = <structure of type LVC_S_LAYO >
                IS_PRINT              = <structure of type LVC_S_PRNT >

  • New output needed for posted invoice

    Hi all,
    The company I am working for posted an invoice via MIRO but there was no output determination configured. This invoice was posted for last year however they now need to print an output for their records.
    Is it possible to do this?
    Thanks for the help.
    Ryan

    Hi Ryan
    Welcome to SDN Forum
    Post the thread in SAP MM Forum.You will get correct solution as the issue is related to MIRO  So Close the thread here and post a new thread in MM Forum.
    Regards
    Srinath

  • Please help! XML output needed for OBIEE report.

    Hi,
    I need an xml output of the OBIEE report. I have tried extrating the xml result using GO url but the xml format is not satisfactory. The default output assigns C0,C1..column names to each column data while on the other hand I need the name of the column and not C0 or C1.
    Hence, can anyone please suggest as to how can I format the OBIEE xml output internally i.e. without doing it manually.
    Please let me know if more explanation is required.
    Thanks in advance!!

    Hi,
    Thanks for the response but unfortunately Bi Publisher is even not giving the required output.
    The output of Bi Publisher is like
    <_170627_>170627</_170627_>
    <_TRADES_._TRADE_ID_>2996</_TRADES_._TRADE_ID_>
    <_FALSE_>FALSE</_FALSE_>
    <_N_>N</_N_>
    <_170627_>170627</_170627_>
    <_R_>R</_R_>
    and the output of OBIEE is
    <C0>170627</C0>
    <C1>2996</C1>
    <C2>FALSE</C2>
    <C3>N</C3>
    <C4>170627</C4>
    <C5>R</C5>
    <C8>B</C8>
    In both the cases I get leading and trailing tags which are not required. Ideally according to the requirement C0 should have been Trade ID, C2 - Cancellation option and so on.
    The BI Publisher does give the output to some ectent but lans up capturing the table name also as u see it is Trades.Trades Id. I even reuire few extra tags which caary report information and this data is not being pulled from database.
    Hence please help!! I am really very much confused!!
    Thanks!!!

  • Need Recomendat​ions - Car Audio - Outputs needed Front LR, Rear LR, Subwoofer

    I am replacing an old Alpine system in my Motorhome.  I have to have separate outputs for
    Front 4 speakers Left/Right
    Rear 2 speakers Left/Right
    and a separate subwoofer.
    also Bluetooth and USB support (IPod)
    Recomendations appreciated.

    jkevlin wrote:
    I am replacing an old Alpine system in my Motorhome.  I have to have separate outputs for
    Front 4 speakers Left/Right
    Rear 2 speakers Left/Right
    and a separate subwoofer.
    also Bluetooth and USB support (IPod)
    Recomendations appreciated.
    4 channel amp
    Deck for the rear 2 speakers (unless you want them amplifed further)
    Mono channel amplifier for the subwoofer
    the deck will be your own thing to look at just make sure you find one that has BT "built in" not "ready" all BT models will have a front or back usb so you are good there.  alpine still makes solid units.  make sure your head-unit has 3 preouts for yourself, and you will lose a fader and balance if you are splitting any kind of signal.  good luck
    I am a CAR Geek Squad installer tech lead, but my views that i post are my own and not that of best buy. if you like my posts give me some kudos, if you need further help contact your local Geek Squad installation bay!
    Please read my posts with a smile, cause thats how I write them.Although i have a cool avatar by my name, I am just a member of the community that works for Best Buy.
    ***KNOW THAT I CANNOT ISSUE OFFICIAL RESPONSES AND THAT MY POSTS ARE ONLY HERE TO HELP BEFORE A OFFICAL RESPONSE IS MADE BY A MODERATOR.***

  • MSI 8606 Version 1 card - spdif output needed

    Hi
    I have a MSI 8606 version 1.0 Tv Tuner card which does not have a line out pin.
    The internal audio cable is connected to Aux of the motherboard.
    The PC is MSI Mega PC (Acer Cubic PC bought from Acer India)
    I play all other applications like media player etc and an using a Amplifierto play
    5.1 Dolby stero. I have connectd a fibre optic SPDIF cable from
    spdif out to the Amplifier spdif in. I can hear the 5.1 sound if i play DVD etc.
    Now when I watch TV alone I need to switch the Amplifier to analog mode and
    have connected the line out of PC to the Analog In of the amplifier.
    Now how can I get the TV tuner's audio output also to be available
    through the spdif out of the PC (tough I know that i can't 5.1
    all I need is the sound to player through front speakers)
    In thoery will this work irrespective of what application i use to
    watch TV?
    Thanks for your reply on this.
    Kavivrao

    Lotsa luck!
    You are asking for on-the-fly analog to digital conversion, which you (and most others) do not have. (It was an optional feature of the nForce2 chipset, aka "Soundstorm".)
    If you are fanatic, try to find a soundcard with the feature that is capable of being stuffed into your box. (More lotsa luck.)
    Or, if you are both fanatic and adept in electronics, try here.

  • XML Publisher pdf output need each page wise start and end number

    Hi ,
    I have xml publisher out put in PDF. Now i need on each page header and detail part.
    In header for each page it should repeat and should be print the min and maximam number of the columns.
    I mean in the header start and end number of the column value for that particular page.
    I did many ways but there is no luck.
    Can you please suggest me how to do.
    Thanks
    Sampath

    pls give me reply on this if any body have the answer

  • Customer statement output needs to take Bill to from partner functions

    Hi,
    when we create a standard customer statement - the form is taking the wrong "bill to" address.
    It is taking it from customer master data, but instead it has to take it from "bill to" partner of that customer.
    I need to write a spec for ABAPer on how to get the fix done, but i dont know how to explain it in SAP technical terminology.
    Can anyone help?

    Hello,
    "The form which is assigned to correspondence program in OB96, picking up the address from KNA1 (customer master data - general segment), instead of picking up the same from "Bill to" Partner of that customer. The form is required to be modified and the address should not be picked up table KNA1, but should be taken from "Bill to" Partner."
    Please ask the ABAPer to debug the same.
    Regards,
    Ravi

  • In output need bold text

    Hi all,
    in list output i want to display bold text .Here the the text is going to fetch from database.
    thank you
    sunny

    hi,
    check this sample code.
    TYPE-POOLS: abap.
    TYPES : BEGIN OF ty_outtab,
            celltab TYPE lvc_t_styl.
            INCLUDE STRUCTURE qals.
    TYPES   END   OF ty_outtab.
    DATA  : gt_outtab  TYPE TABLE OF ty_outtab WITH HEADER LINE,
            gs_layout  TYPE lvc_s_layo,
            ls_celltab TYPE lvc_s_styl,
            lt_celltab TYPE lvc_t_styl.
    SELECT * FROM qals INTO CORRESPONDING FIELDS OF TABLE gt_outtab UP TO 20
    ROWS.
    ls_celltab-style = '00000121'.
    INSERT ls_celltab INTO lt_celltab INDEX 1.
    READ TABLE gt_outtab INDEX 1.
    gt_outtab-celltab = lt_celltab.
    INSERT gt_outtab INDEX 1.
    gs_layout-stylefname = 'CELLTAB'.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
      EXPORTING
        i_structure_name = 'QALS'
        is_layout_lvc    = gs_layout
      TABLES
        t_outtab         = gt_outtab
      EXCEPTIONS
        program_error    = 1
        OTHERS           = 2.

  • Billing document output needs to tigger for multiple emails.

    Hi Experts,
    We have a scenario wherein a single billing document output gets triggered for multiple emails. The requirement is to send the invoice layout copy to multiple emails where we maintain customer mail ids in customer master record.
    When tried ,we found option in customer master record and maintained multiple email ids to send the billing output.The system has considered first email id from customer master record and did not consider next mail ids from CMR. Could you please suggest how can we suffice this requirement .
    Thanks in advance.
    KV.

    Hi,
    Email Address is maintained in Table ADR6 against the address number of table BUT000 for a particaluar BP.
    If the custom code is used, following logic can be used:
    For multiple email address multiple entry will be there in ADR6 for the same address number. To send the correspondence to all email address, select all entries and concatenate them separated with semi-colon ( and pass the same to the email address field.
    This is working in our case where we are using a third party for creating and sending the PDF.
    Regards,
    Pranavjeet.

  • Conditional outputs needed in interactive reports

    APEX version = 4
    - DB version and edition = 10g
    - Web server architecture = OHS
    - Browser(s) used = I.E. 8
    - Theme = #5 opal
    - Templates
    - Region/Process type
    Hello
    I have a system where records have statuses and depending on who is logged in when they access the report I need to alter the query, example if it is the system administrator they see all records, but if it is a regular user they only see records with certain statuses. I tried to put a begin and end with an if statement in the region source, but it did not work.
    Any suggestions would be appreciated.
    Thank you

    Hi UserXY,
    a possible solution is to extend your SELECT to return some HTML-Tags which take care of coloring or whatever you want to do.
    e.g.
    SELECT OID
         , LAST_NAME
         , CASE WHEN IS_URGENT=1 THEN '<span style="color:red;">'||IS_URGENT||'</span>' ELSE TO_CHAR(IS_URGENT) END AS IS_URGENT
      FROM MY_TABLE
    WHERE ...Peter

  • ADDM output - needs suggestion

    Following is the portion of ADDM output for a one hour period:
    FINDING 1: 36% impact (4571 seconds)
    Waits on event "log file sync" while performing COMMIT and ROLLBACK operations
    were consuming significant database time.
       RECOMMENDATION 1: Host Configuration, 36% benefit (4571 seconds)
          ACTION: Investigate the possibility of improving the performance of I/O
             to the online redo log files.
          RATIONALE: The average size of writes to the online redo log files was
             35 K and the average time per write was 33 milliseconds.
       SYMPTOMS THAT LED TO THE FINDING:
          SYMPTOM: Wait class "Commit" was consuming significant database time.
                   (36% impact [4571 seconds])Can anyone suggest is it a hardware or OS issue? If not what could be done to alleviate this.
    Thanks

    PLease have a read from the following link to know more about this wait event.
    http://download.oracle.com/docs/cd/E11882_01/server.112/e16638/instance_tune.htm#PFGRF94534
    Aman....

Maybe you are looking for

  • IMac 10.6.8 will not recognize iPhone v.4.12.09 with iOS 7.1.1

    I cannot get photos from my iPhone version 4.12.09 with iOS 7.1.1 to appear on the desktop of my iMac running 10.6.8. It will not open iPhoto nor will preview recognize the iPhone as being connected. No way to get newly taken photos to iPhoto.

  • Norton Personal Firewall messages at startup won't go away

    I used to have Norton Personal Firewall (NPF) installed on my G5 iMac. For some time now, whenever I start up, I get two messages related to NPF. The first one says that I have installed new system software and need to restart my computer. The second

  • Why won't my ipad charge properly?

    So I'm trying to figure out something strange with my ipad (ipad 4). Whenever I charge it at home via the regular wall charger its fine and charges away as per normal, however whenever I charge it at uni it just barely charges. On 3 separate occassio

  • Hello,  How to deactivate automatic Purchase Order Output det,

    Hello, will anyone guide me the steps to deactivate automatic output determination in a Purchase Order. Full points for the answer.

  • Locked/protected gallery albums viewed on Touch's Safari

    I have a number of albums published on my MobileMe gallery. Some of these are protected. When I try to view them on my Touch, it prompts me to login with the name/password. I type that in and press "login". The login screen flashes off for about 1/2