cancel
Showing results for 
Search instead for 
Did you mean: 

Variable Exit Code for the below requirement, Pls Urgent

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Answers (2)

Answers (2)

Former Member
0 Kudos

Thank You for your reply, It's helpful.

0 Kudos

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...

Former Member
0 Kudos

I am not clear, can you pls explain me in detail.