Skip to Content
avatar image
Former Member

sapscript

hi gurus,

i have an issue with date printing format. ima extracting ERDAT in subroutine and i want to print that field in script in DD.MM.YYYY format can anybody please usggest its urgent.

thanks and regards,

Rajesh Reddy

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • avatar image
    Former Member
    Apr 03, 2008 at 04:30 AM

    Hi rajesh,

    while passing that date field from subroutine. u can change the date format using WRITE TO statement .....as below

    date: v_date type c length 10.

    write wa-itab-erdat to v_date.

    pass this v_date via subroutine....and print the same to get it done...

    Hope this solves ur problem.....

    all the very best.....

    Regards,

    Sreenivasa Sarma K.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 03, 2008 at 04:39 AM

    Hi,

    ERDAT is displayed as dd.mm.yyyy.

    if ur date is coming as ddmmyyyy then

    Use This FM CONVERT_DATE_BY_PERIOD_INPUT

    Pass ERDAT in Parameter I_EDATE.

    and in EXport Parameter pass a Variable to Store The Date in DD.MM.YYYY format

    Display the Value of the varable in SAPSCRIPT

    And you will get the result.

    Regards

    Sandipan

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      hi sandipan,

      can you please be more effective because i have called the function module nad tried its not working can you please expalin with an example so that i can work

      plz help me its urgent.

  • avatar image
    Former Member
    Apr 03, 2008 at 04:44 AM

    Hi,

    I don't think u need that conversion.

    Plz print the variable as it is.

    &ERDAT&

    Hop this is useful.

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 03, 2008 at 07:08 AM

    Use this before your print your date

    /: SET DATE MASK = 'DDMMYYY'

    Regards,

    SaiRam

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 03, 2008 at 07:21 PM

    Hi

    think this is sutable for ur question

    check it first

    /: SET DATE MASK = 'DDMMYYYY'

    Award points if helpful...

    Regards,

    Nagesh

    Edited by: Nagesh Babu on Apr 3, 2008 10:20 PM

    Add comment
    10|10000 characters needed characters exceeded