Skip to Content
0
Former Member
Jul 03, 2007 at 07:37 PM

PS module report .. converting fiscal year representation

35 Views

i have a report which prints the actuals for a fiscal year . Its like each country has their own fiscal year representation , i have to convert data of other countries to the fiscal year representation of US(sep-aug) . I dont understand how to give the select statement and how to proceed with this. I appreciate if anyone can help me with this.

  • Check for function modules and Check index's.

  • Lets load up the yps_costplan table for loading.

  • if they didn't specify a project to single load, go get them all.

  • if s_objnr is initial.

    • if in first fiscal month, "Sept", then get previous years data to

    • fill in the last month, month 12.

    if t_t009b-poper = '001'.

    select * from yps_costplan into table i_yps_costplan

    where yyobjnr gt 'PR00000000' and yygjahr ge yprevyear and

    yygjahr lt yplus1year.

    else.

    select * from yps_costplan into table i_yps_costplan

    where yyobjnr gt 'PR00000000' and yygjahr ge p_fiscal and

    yygjahr lt yplus1year.

    endif.

    • When getting all, start with 2003, when doing month, use current

    • fiscal year only.

    • yygjahr between t_yearm1 and t_yearp1.

    else.

    • They secified 1 project, go get his data.

    if not s_objnr-LOW cs '*'.

    concatenate s_objnr-low '%' into hold_projn.

    loop at s_objnr.

    if s_objnr-high eq space.

    concatenate s_objnr-low '*' into s_objnr-low.

    s_objnr-option = 'CP'.

    modify s_objnr.

    endif.

    endloop.

    select posid objnr from prps into table t_prps

    WHERE POSID IN S_OBJNR.

    else.

    • concatenate s_objnr-low(sy-fdpos) '%' into hold_projn.

    select posid objnr from prps into table t_prps

    • where posid like hold_projn.

    WHERE POSID IN S_OBJNR.

    endif.

    if sy-subrc eq 0.

    loop at t_prps.

    • if in first fiscal month, "Sept", then get previous years data to

    • fill in the last month, month 12.

    if t_t009b-poper = '001'.

    select * from yps_costplan into table h_yps_costplan where

    yyobjnr = t_prps-objnr and yygjahr ge yprevyear and

    yygjahr lt yplus1year.

    else.

    select * from yps_costplan into table h_yps_costplan where

    yyobjnr = t_prps-objnr and yygjahr ge p_fiscal and

    yygjahr lt yplus1year.

    endif.

    if sy-subrc eq 0.

    loop at h_yps_costplan.

    i_yps_costplan = h_yps_costplan.

    append i_yps_costplan.

    endloop.

    endif.

    endloop.

    endif.

    endif.