Skip to Content
0
Former Member
Jun 11, 2009 at 02:58 AM

Putting C_CELL_CONTENT = I_TEXT_VALUE. on 2 lines

28 Views

Hi SDN Community

I am trying to achieve the fiscal year period on one line, and the text Actual or Forecast on a second line.

We have written the following ABAP and placed it in 2 methods in the CLASS Builder.

But in the web, the C_CELL_CONTENT only appears on one line, instead of 2 lines as we require. Is this possible.

JUL 2008 Actual AUG 2008 Actual SEP 2008 Actual OCT 2008 Actual NOV 2008 Actual DEC 2008 Actual JAN 2009 Actual FEB 2009 Actual MAR 2009 Actual APR 2009 Actual MAY 2009 Actual JUN 2009 Forecast

In debug i can see a # indicating a separate line, but may require different syntax for the c_cell_content.

method INIT.

CALL METHOD SUPER->INIT

EXPORTING

I_R_PAGE = i_r_page

I_R_DATA_SET = i_r_data_set

I_R_ITEM = i_r_item

I_R_GRID = i_r_grid.

  • .

data: l_cl_rsr_request type ref to cl_rsr_request.

data: li_txt_symbols type rrx1_t_txt_symbols.

data: ls_txt_symbols like line of li_txt_symbols.

data: txt_symbols_set type RRWS_S_TEXT_SYMBOLS.

break-point.

data:

l_template_id type string.

data:

ld_fiscper type RRXSYMVALUE.

*you should first check that I_R_DATA_SET actually has values.

READ TABLE I_R_DATA_SET->N_SX_VERSION_20A_1-TXT_SYMBOLS WITH KEY

SYM_NAME = 'VARVALUE_ZP_FPER' INTO txt_symbols_set.

ld_fiscper = txt_symbols_set-SYM_VALUE.

L_FILTER = ld_fiscper.

method CHARACTERISTIC_CELL.

  • .

data:

ld_fiscper type RRXSYMVALUE,

ld_poper type RRXSYMVALUE,

ld_poper1 type RRXSYMVALUE.

data:

I_TEXT_VALUE type RRXSYMVALUE.

  • Variable value from ZP_FPER

ld_fiscper = L_FILTER.

ld_poper = ld_fiscper+0(3).

  • Posting Period from Table Output

ld_poper1 = I_CHAVL+6(3).

  • Define Actual or Forecast Column Month

if i_y = 1 and i_is_sum <> 'X'.

if ld_poper1 <= ld_poper.

CONCATENATE I_TEXT 'Actual' INTO I_TEXT_VALUE SEPARATED BY

CL_ABAP_CHAR_UTILITIES=>NEWLINE.

C_CELL_CONTENT = I_TEXT_VALUE.

else.

CONCATENATE I_TEXT 'Forecast' INTO I_TEXT_VALUE SEPARATED BY

CL_ABAP_CHAR_UTILITIES=>NEWLINE.

C_CELL_CONTENT = I_TEXT_VALUE.

endif.

Thank you.

Simon