Function module which convert number to days to date

Hi,
Any one knows any function module which convert total number of days into date.
thnaks,
shilpa k

Hi,
    FIMA_DAYS_AND_MONTHS_AND_YEARS
FI_PSO_DAYS_MONTHS_YEARS_GET
RSSM_CONVERT_DAYSEC2TIMESTAMP
RSSM_CONVERT_TIMESTAMP2DAYSEC
Function Modules related to Date and Time Calculations
DATE_COMPUTE_DAY : Returns weekday for a date
DATE_GET_WEEK : Returns week for a date
DAY_ATTRIBUTES_GET : Returns attributes for a range of dates specified
MONTHS_BETWEEN_TWO_DATES : To get the number of months between the two dates.
END_OF_MONTH_DETERMINE_2 : Determines the End of a Month.
HR_HK_DIFF_BT_2_DATES : Find the difference between two dates in years, months and days.
FIMA_DAYS_AND_MONTHS_AND_YEARS : Find the difference between two dates in years, months and days.
MONTH_NAMES_GET : Get the names of the month
WEEK_GET_FIRST_DAY : Get the first day of the week
HRGPBS_HESA_DATE_FORMAT : Format the date in dd/mm/yyyy format
SD_CALC_DURATION_FROM_DATETIME : Find the difference between two date/time and report the difference in hours
L_MC_TIME_DIFFERENCE : Find the time difference between two date/time
HR_99S_INTERVAL_BETWEEN_DATES : Difference between two dates in days, weeks, months
LAST_DAY_OF_MONTHS : Returns the last day of the month
Regards

Similar Messages

  • Function module for converting number to exponential???

    Hi All
      please tell me Function module for converting number to exponential.
    Deepak

    try:
    REPORT Zconvertf.
    parameters p1 type p decimals 2 default '4711.99'.
    data f1 type f.
    move p1 to f1.
    write: / p1, f1.
    hope that helps
    Andreas

  • Function module to convert character type to required data type

    Hi,
    Is there a function module which can convert data in character type to any other required data type?
    Like i have a date 12.2.2008 and it is stored as character now i want to convert it into type d.
    so that when i use
    Describe field <field_name> type <type>.
    statement afterwards then it gives me  D not C as its data type.
    The requirement does'nt stick to conversion of just one data type.I need an FM which can convert data in character type to any data type.
    Hope you understood the problem.
    Thanks for your time.

    Hi,
    Use the code.
    data : date like sy-datum.
    call function 'CONVERT_DATE_TO_INTERNAL'
      exporting
        date_external                  =  '01.01.2008'
    IMPORTING
       DATE_INTERNAL                  = date
    EXCEPTIONS
       DATE_EXTERNAL_IS_INVALID       = 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.
    Regards,
    Morris Bond.
    Reward Points if Helpful.

  • Function Module which will take Wekk No & Return date range (from & To dat)

    Hello everyone,
    I need a Function Module which will take Week No as an input Parameter & return me the date range
    (From date & To date of that week) .
    Thanks in advance!
    Cheers!
    Moderator message: date calculation questions = FAQ, please search before posting.
    Edited by: Thomas Zloch on Nov 2, 2010 5:25 PM

    Hi,
         Please write the below logic..
    data : v_date11 type sy-datum,
              monday    type sy-datum,
              sunday  type sy-datum,
              v_count1 type i .
    *v_count1 = 20 * 7.            "   Say U want details for 20th week , or give a parameter for week and multiply with 7*
    v_date11 = '20100101'.     "   take the starting day of the year ....
    v_date11 = v_date11 + v_count1.   " add to the date
    CALL FUNCTION 'GET_WEEK_INFO_BASED_ON_DATE'   <-- call this FM
    EXPORTING
       DATE          = v_date11
    IMPORTING
      WEEK          = WEEK
       MONDAY        = MONDAY <-- will have the week starting day
       SUNDAY        = SUNDAY
    Regards,
    Srini.

  • Function module which generates number in sequence

    Hi All
    Is there any FM which generates number in a sequence. I am creating a bank file using DMEE. Now for detail records it should create a number say starting with 001, 002. 003....
    now every  time the bank file is created it should work in this way.
    Any help would be higly appreciated.
    C

    Hello
    1. Create interval: http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=50004015
    2. Use FM NUMBER_GET_NEXT: Re: how to create a number interval for a zprogram

  • Function Module to find number of days

    Hi, In my program I need to calculate the number of working days, ie days excluding Saturday and Sunday s Also excluding the holidays if any. Could you please suggest me a way to find the same. A code snippet would be very appreciating

    Hai,
    check these links.
    http://www.geocities.com/victorav15/sapr3/abapfun.html
    http://help.sap.com/saphelp_erp2004/helpdata/en/9f/db988735c111d1829f0000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/ef/d94b78ebf811d295b100a0c94260a5/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/43/41341147041806e10000000a1553f6/frameset.htm
    Check this link:
    http://help.sap.com/saphelp_erp2004/helpdata/en/9f/db988735c111d1829f0000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/ef/d94b78ebf811d295b100a0c94260a5/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/43/41341147041806e10000000a1553f6/frameset.htm
    See the following links:
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/26/64f623fa8911d386e70000e82011b8/content.htm
    withregards,
    sowjanya.b

  • Convert number of dayes per year to data

    Please i need help in Convert number of dayes to date
    I have ID's like id
    FT*09025*0000000001 date=20090125
    FT*01171*0000000002 date=20100620
    so should convert first five number after FT to date
    example *09025*
    09 map to 2009
    025 number of dayes per year map to 25 jan
    example *01171*
    01 map to 2010
    171 number of dayes per year map to 20 jun
    (jan+feb+mar+apr+may)=(31+28+31+30+31)=151
    171-151=20 for the next month
    Please need help so will added filter to informatica map with date
    Edited by: user8929623 on Jul 4, 2010 7:04 PM

    Well, I do not follow why when 09 maps into 2009, 01 maps into 2010, not into 2001. Assuming it should be 2001, use YYDDD format:
    SQL> with t as (
      2             select 'FT*09025*0000000001' id from dual union all
      3             select 'FT*01171*0000000002' from dual
      4            )
      5  select  to_date(substr(id,4,5),'yyddd') dt
      6    from  t
      7  /
    DT
    20090125
    20010620
    SQL> SY.

  • Function module reqd for fiscal period using current date

    Hi,
    Is there any function module which gives fiscal period using current date.
    Thnaks,
    Maheedhar

    Hi Maheedhar,
    Try the code below.
    CALL FUNCTION 'GET_CURRENT_YEAR'
      EXPORTING
        BUKRS         = '1000'     " Company Code
        DATE          = SY-DATUM   " Date to find fiscal year for
      IMPORTING
        CURRM         = w_currm    " Current Fiscal Month
        CURRY         = w_curry    " Current Fiscal Year
        PREVM         = w_prevm    " Previous Fiscal Month
        PREVY         = w_prevy.   " Previous Fiscal Year
    Regards,
    Amit.

  • Any1 aware of a function module to convert a number in exponential form

    any1 aware of a function module to convert a number in exponential form to normal form...
    eg... a no. like 8.00000000000004E-01 
                     8.88888888888884E-01
    and
    a no. like 1.50000000000000E+00 
               9.44444444444442E-01

    I think you can just move from type F to type p.
    p =  f .
    Regards,
    Rich Heilman

  • Function module to convert currency to USD

    Hi All,
                 I need the function module to convert the currency to USD and the mandatory fields to be passed to the function module.
    Thanks & Regards
    Suresh

    hi,
    Working With LSMW:
    Use TCODE LSMW
    Objects of LSMW:
    •Project – ID with max of 10 char to Name the data transfer project.
    • Subproject – Used as further structuring attribute.
    • Object – ID with max of 10 Characters, to name the Business object .
    • Project can have multiple sub projects and subprojects can have multiple objects.
    • Project documentation displays any documentation maintained for individual pop ups and processing steps
    User Guide: Clicking on Enter leads to interactive user guide which displays the Project name, sub project name and object to be created.
    Object type and import techniques:
    • Standard Batch / Direct input.
    • Batch Input Recording
    o If no standard programs available
    o To reduce number of target fields.
    o Only for fixed screen sequence.
    • BAPI
    • IDOC
    o Settings and preparations needed for each project
    Preparations for IDOC inbound processing:
    • Choose settings -> IDOC inbound processing in LSMW
    • Set up File port for file transfer, create port using WE21.
    • Additionally set up RFC port for submitting data packages directly to function module IDoc_Inbound_Asynchronous, without creating a file during data conversion.
    • Setup partner type (SAP recommended ‘US’) using WE44.
    • Maintain partner number using WE20.
    • Activate IDOC inbound processing.
    • Verify workflow customizing.
    Steps in creating LSMW Project:
    1) Maintain attributes – choose the import method.
    2)Maintain source structure/s with or without hierarchical relations. (Header, Detail)
    3) Maintain source fields for the source structures. Possible field types – C,N,X, date, amount and packed filed with decimal places.
    • Fields can be maintained individually or in table form or copy from other sources using upload from a text file
    4) Maintain relationship between source and target structures.
    5) Maintain Field mapping and conversion rules
    • For each Target field the following information is displayed:
    o Field description
    o Assigned source fields (if any)
    o Rule type (fixed value, translation etc.)
    o Coding.
    o Some fields are preset by the system & are marked with Default setting.
    6) Maintain Fixed values, translations, user defined routines – Here reusable rules can be processed like assigning fixed values, translation definition etc.
    6) Specify Files
    o Legacy data location on PC / application server
    o File for read data ( extension .lsm.read)
    o File for converted data (extension .lsm.conv)
    7) Assign Files – to defined source structures
    8) Read data – Can process all the data or part of data by specifying from / to transaction numbers.
    9) Display read data – To verify the input data being read
    10) Convert Data – Data conversion happens here, if data conversion program is not up to date, it gets regenerated automatically.
    11) Display converted data – To verify the converted data
    Import Data – Based on the object type selected
    • Standard Batch input or Recording
    o Generate Batch input session
    o Run Batch input session
    • Standard Direct input session
    o Direct input program or direct input transaction is called
    BAPI / IDOC Technique:
    • IDOC creation
    o Information packages from the converted data are stored on R/3 Database.
    o system assigns a number to every IDOC.
    o The file of converted data is deleted.
    • IDOC processing
    o IDOCS created are posted to the corresponding application program.
    o Application program checks data and posts in the application database.
    Finally Transport LSMW Projects:
    • R/3 Transport system
    o Extras ->Create change request
    o Change request can be exported/imported using CTS
    • Export Project
    o Select / Deselect part / entire project & export to another R/3 system
    • Import Project
    o Exported mapping / rules can be imported through PC file
    o Existing Project data gets overwritten
    o Prevent overwriting by using
    ‘Import under different name
    for more information follow this link.
    http://help.sap.com/saphelp_nw04s/helpdata/en/87/f3ae74e68111d1b3ff006094b944c8/content.htm

  • Functional Module which can send FAX

    Hi All,
    Can you please suggest a function module which we can use to send fax. We wanted to fax the output list genrated by the program.
    Regards,
    Vidya.

    The following program shows you how to send a fax from within ABAP/4. The report is delivered
    in the standard system and is used in Transaction SCOM for the function "Send test fax".
    Only the method via the call of SAPscript with DEVICE='TELEFAX', described below, ensures the
    generation of a correct transmission request, independent of the R/3 release and of the used
    fax server solution and its configuration.
    The regular printing (for example, with NEW-PAGE PRINT ON...) on an output device created in
    the spool administration of the device class 'Telefax' does generally not work!
    REPORT RSKSENDF MESSAGE-ID SK.
    Test report to send a test fax
    sends a fax to the number <TO_CNTRY>-<TO_NMBER>
    containing an automatically generated message text.
    TABLES: USR03.
    PARAMETERS: TO_CNTRY LIKE T005-LAND1 OBLIGATORY,
    TO_NMBER LIKE TSP01-RQTELENUM OBLIGATORY,
    FROM_USR(30) TYPE C DEFAULT SY-UNAME,
    TO_RECIP(30) TYPE C DEFAULT SY-UNAME.
    SAPscript content ITAB
    DATA: BEGIN OF TEST_DOC OCCURS 10.
    INCLUDE STRUCTURE TLINE.
    DATA: END OF TEST_DOC.
    SAPscript header struct
    DATA BEGIN OF HEADER.
    INCLUDE STRUCTURE THEAD.
    DATA END OF HEADER.
    INITIALIZATION.
    get county from user addres in usr03
    system->user profile->user address
    check if not empty
    SELECT SINGLE * FROM USR03 WHERE BNAME = SY-UNAME.
    IF SY-SUBRC = 0 AND USR03-LAND1 SPACE.
    TO_CNTRY = USR03-LAND1.
    ENDIF.
    START-OF-SELECTION.
    PERFORM FILL_UP_TEST_DOC.
    PERFORM SHOW_TEST_DOC.
    AT PF08.
    PERFORM SEND_FAX TABLES TEST_DOC USING TO_CNTRY
    TO_NMBER.
    AT SELECTION-SCREEN ON TO_NMBER.
    PERFORM CHECK_NUMBER USING TO_CNTRY TO_NMBER.
    *& Form CHECK_NUMBER
    FORM CHECK_NUMBER USING
    COUNTRY
    NUMBER.
    DATA: SERVICE LIKE TSKPA-SERVICE VALUE 'TELEFAX',
    LEN LIKE SY-FDPOS.
    FIELD-SYMBOLS
    windows GUI push the ? from mandatory input instead
    of overwriting it
    LEN = STRLEN( TO_NMBER ).
    IF LEN > 1.
    SUBTRACT 1 FROM LEN.
    ASSIGN TO_NMBER+LEN(1) TO
    IF
    = '?'.
    = SPACE.
    ENDIF.
    ENDIF.
    official check FM
    CALL FUNCTION 'TELECOMMUNICATION_NUMBER_CHECK'
    EXPORTING
    COUNTRY = COUNTRY
    NUMBER = NUMBER
    SERVICE = SERVICE.
    on old 21?/22? release you may have to handle the
    exception
    because the Function uses RAISE instead of
    MESSAGE... RAISING....
    ENDFORM. " CHECK_NUMBER
    *& Form FILL_UP_TEST_DOC
    fills test text in itab TEST_DOC *
    real life example needs to get real life data *
    FORM FILL_UP_TEST_DOC.
    DATA: DATUM(12) TYPE C,
    UZEIT(10) TYPE C.
    SAPscript initialization
    of course, you may want to set a few parameter
    (FORM,LAYOUT,....)
    CALL FUNCTION 'INIT_TEXT'
    EXPORTING
    ID = 'ST '
    LANGUAGE = SY-LANGU
    NAME = 'FOO-BAR'
    OBJECT = 'TEXT'
    IMPORTING
    HEADER = HEADER
    TABLES
    LINES = TEST_DOC
    EXCEPTIONS
    OTHERS = 1.
    IF SY-SUBRC 0.
    MESSAGE A400 WITH 'INIT_TEXT'.
    ENDIF.
    PERFORM ADD_EMPTY_LINE.
    WRITE: SY-DATUM TO DATUM.
    WRITE: SY-UZEIT TO UZEIT.
    PERFORM ADD_LINES USING 'This is test Telefax'(001)
    DATUM UZEIT.
    PERFORM ADD_EMPTY_LINE.
    PERFORM ADD_LINES USING 'From: &'(002) FROM_USR SPACE.
    PERFORM ADD_LINES USING 'To: &'(003) TO_RECIP SPACE.
    PERFORM ADD_LINES USING 'Fax number: & &'(004)
    TO_CNTRY TO_NMBER.
    PERFORM ADD_EMPTY_LINE.
    PERFORM ADD_LINES USING
    'This is a test fax send by Report RSKSENDF'(005)
    SPACE SPACE.
    PERFORM ADD_LINES USING 'on SAP system & '(006)
    SY-SYSID SPACE.
    PERFORM ADD_EMPTY_LINE.
    PERFORM ADD_LINES USING
    'the quick brown fox jumps over the lazy dog.'(101)
    SPACE SAPCE.
    PERFORM ADD_LINES USING
    'THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.'(102)
    SPACE SAPCE.
    PERFORM ADD_EMPTY_LINE.
    PERFORM ADD_LINES USING 'End of test'(007) SPACE
    SPACE.
    ENDFORM. " FILL_UP_TEST_DOC
    *& Form ADD_LINES
    printf a line an appends it in test_doc *
    --> cformat format.
    --> p1 param1
    --> p2 param2
    FORM ADD_LINES USING CFORMAT P1 P2.
    TEST_DOC-TDFORMAT = '/'.
    TEST_DOC-TDLINE = CFORMAT.
    IF TEST_DOC-TDLINE CA '&'.
    REPLACE '&' WITH P1 INTO TEST_DOC-TDLINE.
    IF TEST_DOC-TDLINE CA '&'.
    REPLACE '&' WITH P2 INTO TEST_DOC-TDLINE.
    ENDIF.
    ENDIF.
    APPEND TEST_DOC.
    ENDFORM. " ADD_LINES
    *& Form ADD_EMPTY_LINE
    appends an empty line to test_doc *
    FORM ADD_EMPTY_LINE.
    TEST_DOC-TDFORMAT = '/'.
    CLEAR TEST_DOC-TDLINE.
    APPEND TEST_DOC.
    ENDFORM. " ADD_EMPTY_LINE
    *& Form SHOW_TEST_DOC
    lists the test doc for aproval *
    *>>>> this is for fun only because PRINT_TEXT also
    offers a preview *
    FORM SHOW_TEST_DOC.
    FORMAT COLOR COL_BACKGROUND INTENSIFIED OFF.
    WRITE: / 'Test fax would look like this:'(020).
    ULINE.
    SKIP.
    LOOP AT TEST_DOC.
    IF TEST_DOC-TDLINE SPACE.
    WRITE:/ TEST_DOC-TDLINE.
    ELSE.
    SKIP.
    ENDIF.
    ENDLOOP.
    SKIP.
    ULINE.
    FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.
    WRITE: 'Press PF8 to send it'(021).
    ENDFORM. " SHOW_TEST_DOC
    *& Form SEND_FAX
    send fax by calling SAPscript *
    Note: Instead of using PRINT_TEXT you may also *
    call OPEN_FORM / WRITE_FORM_LINES / CLOSE_FORM, *
    this allows you to use a similar program structure *
    as with NEW-PAGE PRINT ON / WRITE / NEW-PAGE PRINT
    OFF *
    FORM SEND_FAX
    TABLES DOC2FAX STRUCTURE TEST_DOC
    USING COUNTRY
    NUMBER.
    DATA: SID(5) TYPE N.
    DATA BEGIN OF POPT.
    INCLUDE STRUCTURE ITCPO.
    DATA END OF POPT.
    DATA BEGIN OF PRES.
    INCLUDE STRUCTURE ITCPP.
    DATA END OF PRES.
    CLEAR POPT.
    POPT-TDCOPIES = 1. " one copy
    POPT-TDDEST = " done internaly by script,
    POPT-TDPRINTER = " do not fill !!!
    POPT-TDNEWID = 'X'. " do not reuse old spool request
    POPT-TDDATASET = 'TEST'(022). " fill as you want
    POPT-TDSUFFIX1 = 'FAX'(023). " fill as you want
    POPT-TDSUFFIX2 = SY-UNAME. " fill as you want
    POPT-TDIMMED = 'X'. " send now
    POPT-TDLIFETIME = 8. " keep 8 days in spool
    POPT-TDTELENUM = NUMBER. " number without country code
    POPT-TDTELELAND = COUNTRY. " country of recipient
    POPT-TDCOVER = 'test fax'(024).
    POPT-TDCOVTITLE = 'test fax'(024).
    POPT-TDIEXIT = 'X'.
    CALL FUNCTION 'PRINT_TEXT'
    EXPORTING
    APPLICATION = 'TX'
    ARCHIVE_INDEX = ' '
    ARCHIVE_PARAMS = ' '
    DEVICE = 'TELEFAX' "<<< here we say: fax it !
    DIALOG = 'X'
    HEADER = HEADER
    OPTIONS = POPT
    IMPORTING
    RESULT = PRES
    TABLES
    LINES = DOC2FAX
    EXCEPTIONS
    OTHERS = 01.
    do not bother with exception in sample code
    CANCELED = 01
    DEVICE = 02
    FORM = 03
    OPTIONS = 04
    UNCLOSED = 05
    UNKNOWN = 06
    FORMAT = 07
    TEXTFORMAT = 08
    EXTERNAL = 09.
    IF SY-SUBRC = 0.
    arriving here means we could send:
    SID = PRES-TDSPOOLID.
    IF SID > '00000'.
    MESSAGE S433 WITH SID.
    ENDIF.
    LEAVE .
    ELSE.
    do not bother with exception in sample code
    MESSAGE A400 WITH 'PRIN_TEXT'.
    ENDIF.
    ENDFORM. " SEND_FAX
    Regards.

  • Function Module to Convert Amount to the Right Decimal

    Hi,
    There is a function module that helps convert currency without decimals into the right format. For eg if the amount in BSEG table is in Taiwanese Dollars it will be displayed as 17.95 whereas the real amount is 1795.
    So there is a function module which will convert the amount of 17.95 to 1795 (which can be used in a report for eg), once we pass the amount and the currency.
    Any help would be greatly appreciated.
    Thanks in advance.
    Mick

    Hello,
    Make use of this sample:
    REPORT ZV_CONVERT_CURR .
    DATA : L_NETWR TYPE VBAP-NETWR.
    CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
         EXPORTING
              DATE             = SY-DATUM
              FOREIGN_AMOUNT   = '10.00'
              FOREIGN_CURRENCY = 'INR'
              LOCAL_CURRENCY   = 'EUR'
         IMPORTING
              LOCAL_AMOUNT     = L_NETWR
         EXCEPTIONS
              NO_RATE_FOUND    = 1
              OVERFLOW         = 2
              NO_FACTORS_FOUND = 3
              NO_SPREAD_FOUND  = 4
              DERIVED_2_TIMES  = 5
              OTHERS           = 6.
    WRITE: L_NETWR.
    Cheers,
    Vasanth

  • Function module to convert an internal table to an tab delimited XL file

    hi everyone
    can anyone tell me the name of the function module which can convert the data in the internal table to an Excel file (Tab de-limited).
    vamsi

    Hello Vamsi
    Just in case you need functions for the other way around (e.g. .csv-file -> internal table) SAP provides the following function modules:
    - TEXT_CONVERT_CSV_TO_SAP
    - SAP_CONVERT_TO_CSV_FORMAT
    This function group <b>TRUX </b>contains some more interesting function modules.
    Regards
      Uwe

  • Is there a BAPI function module which reverses the sign of an integer

    Hi Friends,
                     Could u plz tell me  a BAPI function module which can reverse the
    sign of an integer ?
    For example:       
    if i get the integer value in work area as <number> <sign> , i need to change it to <sign><number>. 
    i.e if i get the integer value in work area as    "248-" ("-" indicates minus sign) to " -248 ".
    i.e if i get the sign after the value , my requirement is to get the sign before the value.
    The actual ABAP query is:
    data: QTY_1 TYPE CHAR10,
            QTY_2  TYPE CHAR10,
            WA_DISTK_PORTLET-QUANTITY TYPE INT4.
    QTY_1 = WA_DISTK_PORTLET-QUANTITY.
                    SEARCH QTY_1 FOR '-'.
            IF SY-SUBRC = 0 AND SY-FDPOS <> 0.
              SPLIT  QTY_1 AT '-' INTO  QTY_1 QTY_2.
              CONDENSE  QTY_1.
              CONCATENATE '-'  QTY_1  INTO QTY_1.
              CONDENSE  QTY_1.
            ELSE.
              CONDENSE  QTY_1.
            ENDIF.
            CLEAR: WA_DISTK_PORTLET-QUANTITY.
         MOVE : QTY_1 TO  WA_DISTK_PORTLET-QUANTITY.
    when i move this QTY_1 to work area  quantity field The sign is coming after the numeric value.
    Note: There is no possibility to change the datatype of quantity field.
    I have tried my level best with 'CLOI_PUT_SIGN_IN_FRONT' function module.
    I will assign full points to the correct function module.

    Hi Ram,
    try this ang look into fields.
    data: fields type table of SVAL with header line.
    fields-tabname = 'MARA'. fields-fieldname = 'MATNR'. append fields.
    fields-tabname = 'BKPF'. fields-fieldname = 'BUDAT'. append fields.
    CALL FUNCTION 'POPUP_GET_VALUES'
      EXPORTING
        POPUP_TITLE           = 'Value Insert'
      TABLES
        FIELDS                = fields.
    Regards, Dieter

  • Function Module for getting Number ranges between two number

    Hi guys,
    Is there any Function module which provide us the number range between two numbers?
    For Ex:If i give 1 and 10 to FM it must give me 1
    2
    3
    4.....upto 10.
    is there any FM for doing this,but i'm not able to find exact Fm for same.
    I can write small piece of code for getting number ranges, but if i get FM it could save little work.

    Hi
    But why do u need a fm, can't you do it by yourself?
    DATA: FROM_NUMBER TYPE I VALUE 1,
          TO_NUMBER   TYPE I VALUE 15.
    DATA: NUMBER            TYPE I.
    DATA: BEGIN OF T_NUMBER OCCURS 0,
                  NR TYPE I,
              END    OF T_NUMBER.
    NUMBER = FROM_NUMBER.
    DO.
      IF NUMBER <= TO_NUMBER.
        T_NUMBER-NR = NUMBER.
        APPEND T_NUMBER.
      ELSE.
        EXIT.
      ENDIF.
      NUMBER = NUMBER + 1.
    ENDDO.
    LOOP AT T_NUMBER.
      WRITE: / T_NUMBER-NR.
    ENDLOOP.
    Max

Maybe you are looking for