Skip to Content
author's profile photo Former Member
Former Member

HELP

I HAVE ONE PROBLEM.

I HAVE TO PRINT VALUE WITH OUT DECIMAL PLACES USING OFFSET FUNCTIONALITY.IF THIS VALUE IS FIXED I CAN ,BUT THE VALUES ARE NOT SIMMILER.

EX->23.33,123,343,1,433.JUST LIKE THAT SO HOW TO SEPERATE DIFFRENT DECIMAL PLACES CORESPONDING VALUES USING OFFSET FUNCTIONALITY.

WITH REGARDS.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 10, 2007 at 03:41 AM

    just declare

    data : var type p decimals 0.

    now take your value to var1.

    regards

    shiba dutta

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 10, 2007 at 03:46 AM
    if u do not want decimal places , then u can move that value to int and print it
    
    [code]data : v_int type i,
             v_dec type p decimals 2 value 12345.56.
    
    v_int = v_dec.
    
    write : v_int.

    or to use offset

    data : v_char(15),

    v_dec type p decimals 2 value 12345.56.

    v_char = v_dec.

    search v_char for '.'.

    if sy-subrc eq 0.

    sy-fdpos = sy-fdpos - 1.

    v_char = v_char+0(sy-fdpos)

    endi.[/code]

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 10, 2007 at 03:56 AM

    Hi,

    DATA : l_value TYPE p DECIMALS 2, "For schedule hours

    lc_value(5) TYPE c.

    Here lc_value should be of long enough to hold values.

    l_value = '23.33'.

    lc_value = l_value.

    REPLACE ALL OCCURRENCES OF '.' IN lc_value WITH ''.

    PACK lc_value to lc_value.

    Kindly reward points if it helps.

    Jayanthi Jayaraman

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.