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

Convert 0CALDAY to 0CALMONTH in a transfer rutine

Hi all!!

Im using a transfer rutine that fills the object 0CALMONTH, when this is in blank, so when the field no have data, take the object 0CALDAY and fill 0CALMONTH, Im doing this in a transfer rules, but its dont work.

I hope somebody can help me,

This is my code

TABLES: /BI0/SDATE.

DATA:

VFECHA(6) TYPE C,

VMES(2) TYPE C,

VANIO(4) TYPE C.

$$ end of global - insert your declaration only before this line -

$$ begin of routine - insert your code only below this line -

CLEAR: VMES, VANIO.

IF TRAN_STRUCTURE-PERIODO = ''.

VMES = TRAN_STRUCTURE-FECHA_F+5(2).

VANIO = TRAN_STRUCTURE-FECHA_F+0(4).

CONCATENATE VMES VANIO INTO RESULT.

ELSE.

RESULT = TRAN_STRUCTURE-PERIODO.

ENDIF.

Thanks

Monica

Add comment
10|10000 characters needed characters exceeded

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Aug 03, 2006 at 01:59 AM

    hi Monica,

    it's like

    concatenate TRAN_STRUCTURE-calday+4(2)

    TRAN_STRUCTURE-calday+0(4) into RESULT.

    try

    concatenate TRAN_STRUCTURE-FECHA_F+4(2)

    TRAN_STRUCTURE-FECHA_F+0(4) into RESULT.

    • +4(2) not +5(2)

    hope this helps.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Monica,

      I think you map 0CALDAY to 0CALMONTH instead of routine if you are using these object(not Referenced objects) and you need to Calender month always from Calender day.

      Thanks AHP.

      All the best.

      Regards,

      Nagesh Ganisetti.