Need FM for displaying date as output  EX:april 07

Hi All,
I have a problem in displaying date for example:
If i give period as 3 and year as 2007,
the output should be displayed as april-07.
Can any one help me out in finding a solution.
Thanks in advance.

Hi,
Use the below logic.
data: it_months like t247 occurs 0 with header line.
data: v_text(20).
CALL FUNCTION 'MONTH_NAMES_GET'
EXPORTING
   LANGUAGE                    = SY-LANGU
  TABLES
    MONTH_NAMES                 = it_months
EXCEPTIONS
   MONTH_NAMES_NOT_FOUND       = 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.
read table it_months with key mnr = sy-datum+4(2).
if sy-subrc = 0.
concatenate it_months-ltx '-' sy-datum+2(2) into v_text.
endif.
write:/5 v_text.

Similar Messages

  • Need Help in finding FM for displaying date as output EX:april-07

    Hi All,
    I have a problem in displaying date for example:
    If i give period as 4 and year as 2007,
    the output should be displayed as april-07.
    Can any one help me out in finding a solution.
    Thanks in advance.

    MONTH_NAMES_GET  will give you the month name
    FUNCTION MODULES
    http://www.erpgenie.com/abap/functions.htm
    http://www.sapdevelopment.co.uk/fmodules/fmssap.htm
    http://www.erpgenie.com/abap/index.htm
    http://www.geocities.com/victorav15/sapr3/abapfun.html
    Rewards if useful...........
    Minal
    Message was edited by:
            Minal Nampalliwar

  • I need to get SSIS Data profiler output in Excel.

    Hi,
    I need to get SSIS Data profiler output in Excel. Tried importing XML generated by SSIS Profiler in Excel but data is getting lost. Can anybody please help on this.
    Thanks,
    Manoj

    Hi Manoj,
    The Data Profiling task outputs the selected profiles into XML file. We can specify the result to any extensions of file, the generated file is valid for the built-in Profile Viewer but invalid for other file viewer applications. So when we specify the output
    to Excel file, we can export the excel file and make analyzing without any problems through the Profile Viewer. But when we use Microsoft Excel open it, it says ‘The file format and extension of’’ don’t match’, then it needs us select one option to open the
    XML file. So we cannot directly export Data Profiling task outputs to Excel file.
    If we still want to export Data profiling task outputs to Excel, we can use the XML Source to extract data from the generated XML file, and then export it to Excel destination in a Data Flow Task.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Need Suggestion in displaying data in ALV.

    Hi All Experts,
    I have a scepic scenario for which I need your inputs. I am preparing a report which will display data foe entries made in time sheet. The entries in time sheet can be made for anything like a change request on an incident etc. It will have various output fields
    And also dates for which entries are made. So it can have date from 1 to 31. This all is
    to be displayed in ALV. Now the report can be displayed in two Summarised ways.
    One summary can be for a user and another for the  object type(incident, change request).
    Now if the user wants to see this report for a period more than a month  then I have to summarise it against a month too. So am not sure how to handle this. Which type of ALV function module to be used to display this?
    Regards,
    Saket

    hello,
    I would suggest to go for GRID display - for that you can use either function module or class.
    Tips:
    If it also need to be summarised by month then add an extra field in fieldcatalog as monthid / monthname.
    also it's better to have an extra field for object tyoe (Incident/ change)...
    Thanks.

  • Need substitute for INT2 data type

    Hi ,
    Currently in my program..we have used a data type INT2.
    The data type INT2 can hold only 5 characters at a time...with no commas in between and left Justified.
    Now I got a problem that..the variable which is declard with INT2 was getting populated with more than 5 charaters.
    So it gettin dump.
    Now I need to change the data type of that variable.
    I tried declaring with INT4..or Char...all these data types are nt left justified and also have commas in between.
    Please suggest a data type..which can hold morethan 5 characters..left justified n no commas in between.
    The problem..in declaring  the variable as CHAR and manipulate it as required..is the variable which Im using in my program is called from a zstructure..
    If I wanna modify it in the structure...then I need to change all the programs where the Zstructure is used..which I cant.
    So request you to help me...is there any data type..which would replace INT2 with more than 5 characters in it and also no cammas in between and should be left justified.
    Pls help.
    Regards,
    Priya

    Pure numeric fields (not c, not n, not string, etc.) DO NOT contain punctuation and decimals are implied.  The obvious replacement for INT2 is to simply declare type I.  If I needed decimals, I would convert to (15) type p decimals n.  However, your output process is what is adding the punctuation....it's absolutely not embedded in a numeric field.  You should read available helps (ABAP) on different data types.

  • BAPI for displaying data of standard tables

    Dear All,
    Could anybody tell me the name for BAPI to display data in standard tables
    i.e. import :  table name  and
                       fields
         Output  : table entries ( data in those tables )
    thanks.........

    why dont u write ur own code for tht
    in the selection screen take the name of table now use a field symbol to create an internal table of type tht table now use select query to get the data

  • Stored Procedure for displaying data in Crystal Reports

    Hi I am new to Oracle & Crystal Reports,so can any one please give me sample stored procedure to display data in Crystal report from Oracle by passing rwo input values.

    from site:-
    Crystal Reports will only support the return of a single refcursor from Oracle. Even the latest and greatest version 10 doesn't allow you to return more than one recordset at a time. You could add one more step to your procedure that would join up the output of the multiple refcursors into a PL/SQL table and then fetch the result set out through a single refcursor. That way you are using temporary space that will be cleaned up as soon as the connection is terminated and will only be returning a single refcursor

  • Need help for retreiving data

    Hi All,
    what i need to do is to loop through a FM when some particular checkbox is checked for each date (it is in range format) entered through the selection screen by user.
    I would like to just create one spool with all of the statements
    now how to get this date from the selection screen with all these requirements??
    useful answers will be awarded points..
    thanks

    I have solved the problem now, it may no be the best way, quite bit complex. //thanks

  • Need driver for display (ATI Mobility Radeon 7000 IGP)

    Necessary driver for display ATI MOBILITY RADEON 7000 IGP under operating system Win 98, ME

    Hi
    Like Joao said try to find necessary drivers on Toshiba download site. All drivers are designed for each notebook model and if you use a driver downloaded from graphic card producer site there is no guarantee that it will work properly.
    Good luck!

  • Need some logic for displaying data from Internal Table

    Hi Guys,
                  I have a Internal Table with multiple entries.
    My ITAB looks like below.
    PN  VBELN  MATNR MATKX
    1     111       P-101    XXX
    2     121       P-102    XYZ
    2     112       P-103    ABC
    3     134       P-104    DEF
    3     124       P-105    EFG
    Now my requirement is I need to display the out put as follows through ALV or normal display.
    <Header>                                                  <Date>
                                                                      <Time>
    PN = 1
    VBELN   MATNR  MATKX
    111         P-101   XXX
    <Footer>
    Some gap (May be a line to differentiate)
    <Header >                                                <Date>
                                                                     <Time>
    PN = 2
    VBELN   MATNR  MATKX
    121         P-102   XYZ
    112         P-102   ABC
    <Footer>
    Some gap (May be a line to differentiate)
    <Header >                                                <Date>
                                                                     <Time>
    PN = 3
    VBELN   MATNR  MATKX
    134         P-104   DEF
    124         P-105   EFG
    <Footer>
    Thanks in Advance.
    Prasad.

    HI,
    Use:
    Data: W_PNlike PN.
    LOOP AT ITAB.
    If Itab-PN ne W_PN.
    <Header> <Date>
    <Time>
    PN = 1.
    VBELN MATNR MATKX   >>>>>>>>>>>>>>>First Line enter
    ELSE.
    VBELN MATNR MATKX  > line Next entry
    ENDIF.
    W_PN = ITAB-PN.
    AT-END PN.
    <Footer>
    ENDAT.
    ENDLOOP.
    Hope this resolve your issue.
    Regards,
    Gurpreet

  • Need help for displaying key and description in Dropdown (ABAP WEBDYNPRO)

    Hi Experts,
    I am using dropdown as a table field. For this dropdown I want to display the value as well as description.
    In ALV table when we create a dropdown dynamically in table field, there is a method SET_KEY_VISIBLE in class CL_SALV_WD_UIE_DROPDOWN_BY_KEY.
    But I think we cannot use similar method for normal dropdown field in table.
    Is there any way we can display both value and description in dropdown value set ?
    Please help.
    Regards,
    Anand

    Hi,
    I think there is no such option. You need to consider one variable type string and while populating the
    valueset fill this variable by concatenating the value and description and assign it the key and value
    pair of the valueset.
    DATA:
      lt_value_set_ctry      type table of wdr_context_attr_value, " Country/Service Location
      lv_str type string.
        loop at lit_country into ls_country.
          concatenate ls_country-value ls_country-text into lv_str separated by space.
          ls_value_set-value = lv_str.
          ls_value_set-text  = lv_str.
          append  ls_value_set to lt_value_set_ctry.
          clear ls_value_set.
        endloop.
          lr_node_info->set_attribute_value_set( name = 'COUNTRY'
                     value_set = lt_value_set_ctry ).
    Consider this lit_country is a text table for countries.
    Regards,
    Lekha.

  • Need Help in displaying data labels at the top of the bars in CFCHART

    Hi,
    I have a cfchart with two line series and one bar. I want to display the data values at the top of the bar and the line series. Below is the XML I am using:
    <cfsavecontent variable="chartStyle">
    <?xml version="1.0" encoding="UTF-8"?>
    <frameChart is3D="false" isMultiline="true">
              <frame xDepth="12" yDepth="11" outline="black" stripColor="light_gray">
                   <background maxColor="black"/>
              </frame>
    <yAxis scaleMin="0" scaleMax="30">
                   <labelFormat pattern="###"/>
    <parseFormat pattern="###"/>
    <labelStyle orientation="Horizontal"/>
    <titleStyle font="Arial-11-bold" isMultiline="false"><![CDATA[
    #Vehicles       ]]>
    </titleStyle>
    </yAxis>
    <yAxis2 scaleMin="0" scaleMax="30">
                   <labelFormat pattern="###"/>
    <parseFormat pattern="###"/>
    <labelStyle orientation="Horizontal"/>
    <titleStyle font="Arial-11-bold" isMultiline="false"><![CDATA[
    Profitability       ]]>
    </titleStyle>
    </yAxis2>
    <dataLabels foreground="black" font="Arial-12-bold"/>
    <legend allowSpan="true" equalCols="false" halign="Center" isMultiline="true" placement="Bottom"><decoration style="None"/></legend>
    <elements place="Stacked" drawOutline="false">
    <series index="1" place="Stacked">
    <dataLabel style="value"/>               
    </series>     
              <series index="2" place="Stacked">
    <!--- <![CDATA[#summaryQuery.quotes[i]#+#summaryQuery.orders[i]#]]> --->
    </series>     
    <series index="3" place="Stacked">
    <!--- <![CDATA[#summaryQuery.quotes[i]#+#summaryQuery.orders[i]#]]> --->
    </series>
    <series index="0" place="Stacked" shape="Line" isSecondAxis="true">
    <dataLabel style="value"/>
              </series>
    <series index="1" place="Stacked" shape="Line" isSecondAxis="true">
    <dataLabel style="value"/>
              </series>
    </elements>
              <table>
                   <heatmap isEnabled="false" minLevel="0.0" maxLevel="0.0"/>
              </table>
              <popup background="white" foreground="black"/>
              <paint isVertical="true" min="26" max="76"/>
              <insets right="5"/>
    </frameChart>
    </cfsavecontent>
    Can anyone please tell me what is the mistake i am doing.
    Thanks in advance,
    Jeevan Pulugu.

    Hi,
    Probably you need to find a way to enhance the standard code.
    But make one thing sure that the code (included bu you) gets fired only when that specific report is being executed. Else it may harm the standard functionality.
    Hope this helps you.
    Regards,
    Tarun

  • Need code for multi data insert..to table

    Hi All,
    I have input parameter data like ..
    [email protected],b.gamil.com,c.gamil.com ...
    and need to insert to table T_TABLE...LIKE
    NAME
    A
    B
    C
    Please let me know how to implement...

    anbarasan wrote:
    Hi All,
    I have input parameter data like ..
    [email protected],b.gamil.com,c.gamil.com ...
    and need to insert to table T_TABLE...LIKE
    NAME
    A
    B
    C
    Please let me know how to implement...Like this?
    SQL> ed
    Wrote file afiedt.buf
      1  with t as
      2   (select '[email protected],b.gamil.com,c.gamil.com ' txt from dual)
      3  select upper(regexp_replace(REGEXP_SUBSTR(txt, '[^,]+', 1, level), '[@.](.*)$')) replace_str
      4    from t
      5* connect by level <= length(regexp_replace(txt, '[^,]*')) + 1
    SQL> /
    REPLACE_STR
    A
    B
    CLogic for converting comma separated string to row borrowed from this post of Loknath Giri :
    {message:id=10028213}
    Edited by: Vivek L on 9 Mar, 2012 12:22 PM

  • Need help for SRM Data Extraction into BI-7

    Hi Experts,
    I am looking for help regarding SRM DataSource Extraction to BW. I am working on BW project and need to extract data from SRM Data Source 0BBP_TD_CONTR_2 and 0SRM_TD_PRO. I need to know about the extraction process from SRM. Is there a tool available like LO Cockpit in SRM for extraction and how can we manage the delta in it. Or i can use the T-code RSA5 for that and follow the normal process. If I can get some documentation that can give me an idea for data extraction and delta management in SRM that would be appreciated. Any kind of help will be welcome.
    Thanks in Advance.

    SRM doesn't use kind of "cockpit" LO-like in ECC.
    Overall picture:
    http://help.sap.com/saphelp_srm40/helpdata/en/b3/cb7b401c976d1de10000000a1550b0/content.htm
    If you setup data flows accordign Business Content of SRM:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/3a/7aeb3cad744026e10000000a11405a/frameset.htm
    Then just perform an init load and schedule the deltas.

  • Need help for HR data migration

    Hi Experts,
         I need a help that i want to do data migration for PA30 and PP01 transactions.so if any std bapi for upload the data or bdc programs you have means let me know for further process.if early it is good for me.
    Thanks,
    Deesanth

    You can use the standard batch program RPUSTD00.  Also you can use the function module HR_INFOTYPE_OPERATION.
    Hope this is helpful.
    Thanks,
    Pavan

Maybe you are looking for

  • SQL Developer Data Modeler - integration with subversion

    I just discovered the release of SQL Developer Data modeler, and found this to be very interesting. We are still using Oracle Designer for database design, but we are looking for a replacement (for several reasons). My question is quite simple: Given

  • Installation is not completing

    sir  i have updated windows 10 technical preview as updates shows in updates tab .....fbl impressive 10049 .....has been downloaded and installed and laptop asks for restart.. i did that and after that windows taking updates and it reaches to applyin

  • Firefox 11 starts automatically at login - usual suspects eliminated

    How do I stop Firefox 11 from starting automatically on login? It starts automatically on one of the user accounts on my less-than-week-old Mac Air (OS X 10.7.3) is started, but not the other. I have investigated the usual suspects and found none of

  • ITunes doesn't sync all contacts

    Hello everyone! I have a small issue with syncing my contacts: The thing is, I would love to send someone a message through the new Message app for the mac. However, the number of that person was missing in the Message app. Well I was sure that the a

  • Want to Xfer songs from itouch to itunes.

    I just bought windows 7 and just reinstalled itunes. I did not back up my music because I thought it was possible to transfer all of the songs on my itouch to itunes library but it seems it's not possible. It let's me transfer my purchases but only s