How to display current day(13-nov-06) in selection screen-its very urgent

hi all,
iam sending code to change the date from mm/dd/yyyy to dd-mon-yy(10-nov-06).my requirement is i have to keep a parameter and when iam executing thid report say p_text1 is a parameter when iam executing this report in selection screen it has to show 12-nov-06 say current date.any body can suggest me how to do and please send me the sample code.
iam sending the code to change the date format as below.
data: begin of itab occurs 0,
SPRAS type SPRAS,
MNR LIKE T247-MNR,
KTX LIKE T247-KTX,
LTX LIKE T247-LTX,
end of itab.
DATA : month LIKE T247-MNR.
DATA: YEAR(4).
DATA: FINAL(18).
DATA: DAY(2).
DAY = sy-datum+6(2).
MONTH = sy-datum+4(2).
YEAR = sy-datum+0(4).
DAY = sy-datum+6(2).
YEAR = sy-datum+0(4).
select SINGLE * from t247 into itab where mnr = month
AND SPRAS = 'E'.
APPEND ITAB.
CONCATENATE DAY ITAB-KTX YEAR+2(2)
INTO FINAL SEPARATED BY '-'.
WRITE: FINAL.
thanks,
maheedhar.T

keep this entire code in INITIALIZATION EVENT.
data: begin of itab occurs 0,
SPRAS type SPRAS,
MNR LIKE T247-MNR,
KTX LIKE T247-KTX,
LTX LIKE T247-LTX,
end of itab.
DATA : month LIKE T247-MNR.
DATA: YEAR(4).
DATA: FINAL(18).
DATA: DAY(2).
parameters: p_date type char15.
initialization.
DAY = sy-datum+6(2).
MONTH = sy-datum+4(2).
YEAR = sy-datum+0(4).
DAY = sy-datum+6(2).
YEAR = sy-datum+0(4).
select SINGLE * from t247 into itab where mnr = month
AND SPRAS = 'E'.
APPEND ITAB.
CONCATENATE DAY ITAB-KTX YEAR+2(2)
INTO P_DATE SEPARATED BY '-'.

Similar Messages

  • How to dispaly day 10-nov-06 in selection screen

    data: begin of itab occurs 0,
    SPRAS type SPRAS,
    MNR LIKE T247-MNR,
    KTX LIKE T247-KTX,
    LTX LIKE T247-LTX,
    end of itab.
    DATA : month LIKE T247-MNR.
    DATA: YEAR(4).
    DATA: FINAL(18).
    DATA: DAY(2).
    DAY = sy-datum+6(2).
    MONTH = sy-datum+4(2).
    YEAR = sy-datum+0(4).
    data : p_text(80) type c.
    *parameter : p_text like rlgrap-filename.
    select SINGLE * from t247 into itab where mnr = month
    AND SPRAS = 'E'.
    APPEND ITAB.
    CONCATENATE DAY ITAB-KTX YEAR+2(2)
    INTO FINAL SEPARATED BY '-'.
    here final having date in format of 10-nov-06.
    now my requirement is say iam having one field in selection screen v_text when iam executing the report it has to show this date (10-nov-06) tomorrow iam executing this report it has to show tomorrows date like vice versa.so how to write this field in INITIALIZATION.
    thanks,
    maheedhar.t

    Hi maheerdhar123,
    1. simple
    2. just copy paste
    3.
    Report abc.
    parameters : mydate(11) type c.
    INITIALIZATION.
    CALL FUNCTION 'CONVERSION_EXIT_SDATE_OUTPUT'
      EXPORTING
        INPUT         = SY-DATUM
    IMPORTING
       OUTPUT        = MYDATE.
    regards,
    amit m.

  • How to display data from internal table in the SELECTION-SCREEN

    Hello Experts,
    My requirement is to display the data's from an internal table in the selection screen. I tried using selection-screen comment. But it is working only for a single record. Can anyone please tell me how to do this?

    Hi Ritika,
    we cant use write statement inside selection-screen.
    see my coding.
    SELECTION-SCREEN BEGIN OF SCREEN 123 AS WINDOW TITLE TEXT-456.
      SELECTION-SCREEN BEGIN OF BLOCK BL1 WITH FRAME TITLE TEXT-BL1
                                          NO INTERVALS.
        SELECT-OPTIONS SEL1 FOR SY-DATUM.
        PARAMETERS     PAR1(10).
    <b>** I WANT ALL RECORDS FROM AN INTERNAL TABLE HERE ONLY</b>
        SELECTION-SCREEN END OF BLOCK BL1.
      SELECTION-SCREEN PUSHBUTTON 2(10)  but1 USER-COMMAND cli1.
      SELECTION-SCREEN PUSHBUTTON 20(10)  but2 USER-COMMAND cli2.
    SELECTION-SCREEN END OF SCREEN 123.

  • How to display Current Year and Month in Drop Down list

    Hi Dear friends,
    I am devloping a report. It has got 2 pages--input and output(Report) page.
    IN input page, user will select Month and Year from drop down list as one of the input parameters. (seperate drop down list 4 month and year)
    Now, my problem is:
    HOw to display current month and year by default in the dropdown list...........
    I hope my question is clear.
    Please help.
    Regards,
    ASh

    NO da,
    it is not working.
    First i tired with for-loop. I initialized variable "i" to -2 (i=-2) I would get the year drop down list from 2003 but, by default 2003 would come.
    So, i posted the question.
    I tried your code. It is giving following error.
    A Servlet Exception Has Occurred
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occured between lines: 122 and 127 in the jsp file: /test/inpt.jsp
    Generated servlet error:
    C:\Program Files\Apache Tomcat 4.0\work\localhost\general\test\inpt$jsp.java:182: Invalid type expression.
    first.set(Calendar.YEAR, 2003)
    ^
    An error occured between lines: 127 and 131 in the jsp file: /test/inpt.jsp
    Generated servlet error:
    C:\Program Files\Apache Tomcat 4.0\work\localhost\general\test\inpt$jsp.java:186: Invalid declaration.
    out.write("\r\n \r\nYear : \r\n \r\n"); ^ An error occured between lines: 198 and 203 in the jsp file: /test/inpt.jsp Generated servlet error: C:\Program Files\Apache Tomcat 4.0\work\localhost\general\test\inpt$jsp.java:282: Invalid type expression. first1.set(Calendar.YEAR, 2003) ^ An error occured between lines: 203 and 207 in the jsp file: /test/inpt.jsp Generated servlet error: C:\Program Files\Apache Tomcat 4.0\work\localhost\general\test\inpt$jsp.java:286: Invalid declaration. out.write("\r\n \r\nYear :\r\n \r\n");
    ^
    4 errors
    Pls. Help.
    Regards,
    Ashu

  • How to display current date in query header?

    Hi,
    How to display current date in query header?
    I use Query Designer for development.
    Thanks,
    Arun KK

    Hi Arun,
    You can define fixed header lines and footer lines so that when you generate the query list, they can receive current values of certain fields. When you define a header line or a footer line, you must specify a character string of the type &field, where field is the short name of a field.
    This function allows you (for example) to place a sort criterion in the header line.
    You can include the following fields as variables in the headers directly:
    %NAME
    Name of the user processing the query
    %DATE
    Current date
    %TIME
    Current time
    %PAGE
    Current page number (6 characters)
    %P
    Current page number (3 characters)
    These fields can be used in the short forms N,D,T and P. If you want to use these letters as short names for query fields, the field values from the query are used.
    You can also see the link
    [http://help.sap.com/saphelp_nw70/helpdata/EN/6e/dd68721faf11d6b1d500508b6b8b11/frameset.htm]
    Regards,
    NR

  • How to display 6 days, 29 months, today, etc

    Hi experts,
    Been trying to figure out how to display 6 days, 29months, 1 month in result but couldnt figure out how. I searched in the internet and it gives me the idea of using add_months().
    However, im not sure how am i gonna use it on my end.
    For example,
    Last login date was September 5, 2012. Then it should display 2 months. im not sure how to implement it on a query.
    oracle version:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    "CORE     11.2.0.1.0     Production"
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - ProductionLet me know if you need more info.
    regards,
    j

    hi,
    thanks for your response.
    This is my query
    select us.n_unitid
        ,  u.c_externalid
        ,  us.c_unitname
        ,  (select to_char(sysdate,'MM') - to_char((to_date(max(d_date),'dd/mm/yyyy')),'MM') from dual) -- your query
        ,  (select (to_char(max(d_date), 'dd.mm.yyyy'))
            from userstats
            where n_unitid = us.n_unitid) "Letzter Login Date"
        ,  (select count(*)
            from userstats
            where n_unitid = us.n_unitid) "Logins"
    from userstats us, unit u
    where us.n_unitid = u.ip_unitid
    and u.nf_statusid = 1
    and us.n_groupid = 97
    group by us.n_unitid, u.c_externalid, c_unitname;how would I add your query to my query? sorry if im asking so many questions.. you are using dual here. How would i get the d_date value from userstats table?
    Thanks.

  • How to enable RFC and how to use it in Report..please tell its very urgent

    Dear Techie's,
    Please tell its very urgent..
    How to enable RFC and how to use it in Report. ??
    Virendra

    hi,
    pls chk any of these links.
    http://help.sap.com/saphelp_46c/helpdata/en/9b/417f07ee2211d1ad14080009b0fb56/frameset.htm
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
    Checkout !!
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
    http://techrepublic.com.com/5100-6329-1051160.html#
    http://www.sap-img.com/bapi.htm
    http://www.sap-img.com/abap/bapi-conventions.htm
    http://www.sappoint.com/abap/bapiintro.pdf
    http://www.sapgenie.com/abap/bapi/example.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCFESDE8/BCFESDE8.pdf
    rgds
    Anver

  • How to implement drop down list in WDP Abap....very urgent...please help me

    Hi Gurus,
    I wanted to implement the drop down list button in the WDP Abap interactive form. Once the users clicks on the drop down button, an RFC should be called and display the details under the drop down button. Please give me the logic with code. Its very urgent...please help me. Please note that it is in WDP Abap interactive forms. We are using NW2004S, ECC6.0.

    Hello,
    you have to use ZCI form to use DDLB in WD-ABA. The content of the DDLB has to be present at rendering time, there is no dinamic call when you click the "dropdown".
    The attribut you map to the DDLB has to be an element with a value-set, and the value set has to contain the text / value pairs.
    >> this will be displayed when you click the dropdown.
    Best regards,
    Dezso

  • Its very urgent:How to insert data one table to another table

    Hi all,
    i am very new to oaf.
    i have employee_number(per_all_people_f) lov is there.once select the employee number and click on the submit button
    what ever select the employee number it ll move to new_operation_manager in custom table.
    plz help me how to move.
    its very urgent.
    Thanks
    Latha.
    Edited by: Latha on Dec 21, 2011 9:33 PM

    Hi Gyan,
    Sorry, i will not repate.how to close the thread.
    Gyan i have no knowledge on this issue.
    plz help me.and where to mention,data is which table to insert.
    plz send one sample code.
    its very urgent gyan.
    i wrote the am,co codes
    in am:
    public void NewoperationManagerLogic()
    ManagerCustomTableVOImpl vo1=getManagerCustomTableVO1();----> here which vo take
    OADBTransaction oadbt=getOADBTransaction();
    if(!vo1.isPreparedForExecution())
    vo1.executeQuery();
    Row row=vo1.createRow();
    vo1.insertRow(row);
    in Co processrequest:
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    ManagerInformationAMImpl am=(ManagerInformationAMImpl)pageContext.getApplicationModule(webBean);
    am.invokeMethod("NewoperationManagerLogic");
    in co processform request:
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    if(pageContext.getParameter("Submit")!=null)
    ManagerInformationAMImpl am=(ManagerInformationAMImpl)pageContext.getApplicationModule(webBean);
    am.getOADBTransaction().commit();
    throw new OAException("Records Saved Sucessfully",OAException.INFORMATION);
    thanks
    latha
    Edited by: Latha on Dec 22, 2011 1:26 AM

  • Pls its very urgent - i dropped by iphone 3G and the display became very dim soon after and it still remains the same - pls advise what should be done to bring the display back to normal

    Pls its very urgent - i dropped by iphone 3G and the display became very dim soon after and it still remains the same - pls advise what should be done to bring the display back to normal

    sounds like you broke the display when you dropped it.  There's nothing we users here can do for you.
    Since the iPhone warranty does not cover accidental damage, you will have to pay to have your phone repaired or replaced.  You can bring it into Apple for an out of warranty exchange in the country of purchase, or you can find a 3rd party iPhone repair store in your area.

  • Its very urgent:how to insert data into database tables

    Hi All,
    I am very new to oaf.
    I have one requirement data insert into database tables.
    here createPG having data that data insert into one custom table.
    but i dont know how to insert data into database tables.
    i wrote the code in am,co as follows.
    in am i wrote the code:
    public void NewoperationManagerLogic()
    ManagerCustomTableVOImpl vo1=getManagerCustomTableVO1();
    OADBTransaction oadbt=getOADBTransaction();
    if(!vo1.isPreparedForExecution())
    vo1.executeQuery();
    Row row=vo1.createRow();
    vo1.insertRow(row);
    in createPG processrequest co:
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    ManagerInformationAMImpl am=(ManagerInformationAMImpl)pageContext.getApplicationModule(webBean);
    am.NewoperationManagerLogic();
    process form request:
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    if(pageContext.getParameter("Submit")!=null)
    ManagerInformationAMImpl am=(ManagerInformationAMImpl)pageContext.getApplicationModule(webBean);
    am.getOADBTransaction().commit();
    please help with an example(sample code).
    its very urgent.
    thanks in advance
    Seshu
    Edited by: its urgent on Dec 25, 2011 9:31 PM

    Hi ,
    1.)You must have to create a EO based on custom table and then VO based on this EO eventually to save the values in DB
    2.) the row.setNewRowState(Row.STATUS_INITIALIZED); is used to set the the status of row as inialized ,this is must required.
    3.) When u will create the VO based on EO the viewattributes will be created in VO which will be assigned to the fields to take care the db handling .
    You must go thtough the lab excercise shipped with you Jdeveloper ,there is a example of Create Employee page ,that will solve your number of doubts.
    Thanks
    Pratap

  • Messed up again! Help to display current day and date ...

    Sorry guys and gals, I messed up again due to my noobidity, but you know the two most abundant things in the universe, are hydrogen ..... and noobidity!.
    I have this page http://www.poffertjes.ch/index.html that nicely states the current day and date and it also works on all subsequent pages.
    I needed a new page and figured I could just copy the code to the same position on this page: http://ppbm5.com/submission.html but behold, it just is not displayed at all.
    I have been going over the code many times, but I can't figure out why the current date is not displayed at all. Can someone please show me what I did wrong?

    Harm,
    I gain 5 pounds each time I look at your site. 
    Maybe this link will help you:
    http://www.mediacollege.com/internet/javascript/date-time/
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb

  • How to display current navigation on "Body only" page layout

    I create a new page and applied "Body only" page layout which is basically PageFromDocLayout.aspx
    But it doesn't show current navigation. How do I show current navigation on left side of the page? I have the code which will display current navigation but I don't know where to paste it inside page layout because there doesn't seem to be any space for that.
    Or is it something that I can enable disable from somewhere?

    There is no QuickLaunch snippet. There is one by the name of "Vertical Navigation" which I think is QuickLaunch snippet so I copied its code in PlaceHolderMain section inside page layout but getting error:
    ContentPlaceHolder can only be used in .master files.
    EDIT
    Ok I managed to do it by adding Vertical Navigation inside a separate <td> in my master page and then I only display it when page is not home page. So the is something like:
    HTML CODE IN MASTER PAGE
    <td id = "leftmenu" style="display:none">Vertical Navigation code here</td>
    <td>ContentPlaceHolderMain here</td>
    JAVASCRIPT CODE
    if(page is not home page then)
              document.getElementById("leftmenu").style.display = "block";

  • How to display particular day of a week?

    Hi experts,
    I need to display a report date wise in query designer and i have to display only wednesday data. For eg:
    Date                       Volume         Sales
    06.08.2014                   25             234
    13.08.2014                   16             121
    20.08.2014                   45             987
    Can anyone please help me out, how to achieve this.
    The selection screen contains date period. Generally user provide one month interval. From this range i need to display only wednesday data.

    Hi,,
    Can you try this:-
    -> Create a customer exit and user input type variable for the your calday.
    -> In Istep 2: modify this exit variable values
    you need to restrict only the dates those are needed. you can find teh relevant date using
    FM  CALL FUNCTION 'DATE_COMPUTE_DAY' to find your day and the date
    hope this will help.
    regards,
    Sakthi

  • HOW TO DISPLAY CURRENT DATE TIME IN MASTHEAD IN BRANDING IMAGE AREA

    Hi experts,
    I need to display current date time in masthead also and also i should change the welcome area to my own text there how it is possible.....
    and plz tell detail coding also as i dont have idea to change the coding plz help in this............
    where to chan ge and how to change.............
    waiting for u r responses......................
    Regards,
    Shilpa.

    Shilpa,
    go to system administratioon-system configuration-support-support desk-browse deployment-check for com.sap.porta.navigation.masthead.par and download it to nwds.
    when you import it to NWDS jar file will be missing so you need to manually add that to PORTAL-INF/private/lib.
    once you do this go to HeaderiView.jsp in PORTAL-INF/jsp folder.
    write
    <%= new java.util.Date()%> after <hbj:form id="HeaderForm">.for that matter u can write this at any line after this statement
    once you do that select qucik par upload from the tool bar and deploy it.
    go to system administration-system configuration-support-support desk-administration console and upload the par file
    before following these steps take a backup of par file
    reward points if helpful

Maybe you are looking for

  • Windows 8.1 Drive letter issue

    Hello All, I have a Windows 8.1 TS and it contains format and partition step to partition it to 2 drives. When I create USB media of this image and deploy it, it detects OS partition as C:, the other drive in HDD as E: and USB as D:. But I want the o

  • MSI K7N2 Delta ISLR help :(

    Ive had my current setup for about 5 months now, everything up untill now has run smooth. Yesterday when i woke up i heard my computer makeing this loud noise. when i finaly made it over to the computer i found out that one of my hard drives was spin

  • IWeb 08 UPGRADE and now receive a "Publish Error"

    I am receiving a "An unknown Error occurred" Publish Error after I upgraded to iWeb 08. I cleaned out my iDrive directory, modified my website, etc, and still receive the same error. PLEASE HELP!

  • Does Lion interfere with Excel 2011 language support for Korean, Chinese?

    I was able to use Excel 2011 for several languages including Korean and Chinese when I was on Snow Leopard. Now, after upgrading to Lion, I can't figure out how to get that functionality. I have used the Microsoft Language Register to get the Japanes

  • Can't get tv show that I once used to get

    I used to download Monk tv show and now I can't...where did it go? Now it says it is in another countries store. Did they move it?