Skip to Content
avatar image
Former Member

Derive 0CALMONTH from 0DATE in RSANWB Routine

Hi all,

I want to derive 0CALMONTH from an 0DATE InfoObject in a RSANWB process, with a routine.

Can anyone help me with the code?

Thanks in advance. I will assign points if helpfull!

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Aug 21, 2007 at 03:59 PM

    Hi,

    you can just do a assignment. As the internal format of date is YYYYMMDD and the internal format for the calmonth is YYYYMM, just move the date to the month.

    kind regards

    Siggi

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Derived as follows:

      *TYPES: ...

      DATA: ls_source TYPE y_source_fields,

      ls_target TYPE y_target_fields.

      LOOP AT it_source INTO ls_source.

      MOVE-CORRESPONDING ls_source TO ls_target.

      ls_target-calmonth = ls_source-calday.

      APPEND ls_target TO et_target.

      endloop.