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

date format problem

hi all,

suggest me some function module for date format( from dd.mm.yyyy to yyyymmdd).

when i am passing sy-datum through bdctable to f-53 transaction code screen.

in sy-datum i have <b>dd.mm.yyyy</b>. and when it goes to on screen (in document date,and in posting date field) it change into to <b>yyyymmdd</b>.

In the table(bkpf) that fields stored as yyyymmdd only. i think due to this ,its happen.

how do i sove that problem.

thank you.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Posted on Sep 07, 2007 at 01:44 PM

    Yes, you must covert to external format when using the date in BDC. So do this.

    
    data: bdc_date(10) type c.
    
    call function 'CONVERT_DATE_TO_EXTERNAL'
         exporting
              date_internal = sy-datum
         importing
              date_external = bdc_date.
    
    
    

    Now pass the BDC_DATE field to the BDC PERFORM statement.

    Regards,

    Rich Heilman

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 07, 2007 at 01:44 PM

    concatenate l_docdate8(4) l_docdate4(2) l_docdate+0(2) into l_finaldate.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 07, 2007 at 01:47 PM

    hi pavan,

    u can convert the date format use EDIT MASK in write statement and then use that variable.

    hope this will be usefull...

    <b><REMOVED BY MODERATOR></b>

    Regards,

    prashant

    Message was edited by:

    Alvaro Tejada Galindo

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 07, 2007 at 01:53 PM

    hi

    good

    data : v_date like sy-datum.

    write : v_date using edit mask '__/__/____'

    call function 'CONVERT_DATE_TO_INTERNAL'

    thanks

    mrutyun^

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 07, 2007 at 01:53 PM

    While passing the date to BDC you cannot hardcode it.. you should take care of the user format..

    simply use WRITE statement to format the date in user format..

    data lv_date type char10 .
    
    WRITE sy-datum to lv_date

    then pass lv_date to BDC

    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.