Skip to Content
avatar image
Former Member

Variable Exit Code for the below requirement, Pls Urgent

I have a WorkDate and Finish Date coming in the cube. I have created 2 fields InfoObject High and InfoObject Low.

1. The InfoObject High should output "Gigh" if the current date (or date entered into the selection criteria) is after the workdate and the finish date is blank.

2. The InfoObject Low should output "Low" if the Finish Date has a value and it's greater than the WorkDate.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Aug 24, 2007 at 08:38 PM

    Hi Raj,

    In ver 3.5 this can be done using virtual logic in transaction CMOD. Please note you will need to key your infoobject names below.

    You will need to implement the following code within ZXRSRZZZ.

    ************************************************************************

    • FORM USER_<i>cubetobesepecified</i>

    ************************************************************************

    FORM USER_<i>cubetobespecified</i> USING I_S_RKB1D TYPE RSR_S_RKB1D

    CHANGING C_S_DATA TYPE ANY.

    ASSIGN COMPONENT G_POS_<i>cube_dateobjectusedforuserinput</i>

    OF STRUCTURE C_S_DATA TO <l_datekeyed>.

    ASSIGN COMPONENT G_POS_<i>cube_intoobjecthigh</i>

    OF STRUCTURE C_S_DATA TO <l_highlow>.

    ASSIGN COMPONENT G_POS_<i>cube_workdateojbect</i>

    OF STRUCTURE C_S_DATA TO <l_workdat>.

    ASSIGN COMPONENT G_POS_<i>cube_finishdateobject</i>

    OF STRUCTURE C_S_DATA TO <l_finishdat>.

    IF <l_finishdate> IS INITIAL

    AND <l_datekeyed> > <l_workdat>.

    <l_highlow> = 'High'.

    ELSEIF NOT <l_finishdate> IS INITIAL

    AND <l_datekeyed> < <l_workdat>.

    <l_highlow> = 'Low'.

    ENDIF.

    ENDFORM.

    After this is complete you will need to implement the following code in ZXRSRU02.

    l_s_chanm-chanm = '<i>dateobjectusedforuserinput<i>'.

    l_s_chanm-mode = rrke_c_mode-read.

    append l_s_chanm to e_t_chanm.

    l_s_chanm-chanm = '<i> intoobjecthigh</i> '.

    l_s_chanm-mode = rrke_c_mode-no_selection.

    append l_s_chanm to e_t_chanm.

    l_s_chanm-chanm = '<i>workdateobject<i>'.

    l_s_chanm-mode = rrke_c_mode-read.

    append l_s_chanm to e_t_chanm.

    l_s_chanm-chanm = '<i>finishdateobject<i>'.

    l_s_chanm-mode = rrke_c_mode-read.

    append l_s_chanm to e_t_chanm.

    Lastly under your Global data declarations, you will need to implement this code.

    G_POS_<i>cube_dateobjectusedforuserinput</i>,

    G_POS_<i>cube_intoobjecthigh</i>,

    G_POS_<i>cube_workdateojbect</i>,

    G_POS_<i>cube_finishdateobject</i>.

    I hope this helps.

    Kind Regards,

    Larry

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 22, 2007 at 02:16 AM

    Hi ,

    How about setting a restriction....get all records...where date < workdate then u can include one more variable displaying the result as HIGH.

    similarly u can do it for Finish date too...

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 30, 2007 at 08:09 PM

    Thank You for your reply, It's helpful.

    Add comment
    10|10000 characters needed characters exceeded