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

Transfer Rountine Syntax Help..

Hi All,

I am using a transfer routine to populate 0CALDAY object. In our source we have just YYYYMM (Year and Month). And I have to populate the DAY and that Number SHOULD be the last day of that month, for example if a record has YYYYMM = 200412, then I have to pass 20041231 to 0CALDAY, as last day in December is 31, and if the YYYYMM = 200402, then 0CALDAY should be 20040228 as last day in February is 28.

I cant use a concatenate or move for this ?

Can someone direct me as how I can write ABAP routine to accomplish this?

Thank You,

Reddy

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 15, 2004 at 07:53 AM

    Hi Reddy,

    use the following:

    concatenate YYYYMM '01' into result. "first of the month

    result4(2) = result4(2) + '01'. "go to the next month

    result = result - 1. "go 1 day back

    • YYYYMM = your variable (may be calmonth)

    That should work.

    regards

    Siggi

    Message was edited by: Siegfried Szameitat

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Andreu,

      Yes you are right, but however I did not have to convert/reformat my YYYYMM into the VTBBEWE-DVALUT type.

      I just had to pass my YYYYMM into a variable and say that "Variable Like VTBBEWE-DVALUT". And that worked.By this I dont have to reformat or code YYYYMM. I am sure what you say will work too and thanks for replying.

      Thanks,

      Reddy

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.