Monday, January 29, 2007

[ nw 2004s ] web template text element transport

You can create the following text types with the text input dialog:

Language-Independent Text

When you select this text type, you can enter the free text of your choice. The text is not translated.

Language-Dependent Text Stored in Object (Web Template or Reusable Web Item)

When you select this text type, you can enter free text that is either specific to the Web template or specific to a reusable Web item. Texts of this type are translated and transported with the relevant object (Web template or reusable Web item). See Structure linkTransport System.

To enter a new text of your choice, choose New. Then save the text.

To edit a text that has already been saved, proceed as follows:

...

a. From the dropdown box of the Text Properties dialog segment, choose the text you want to change.

b. Choose Edit.

c. Edit the text in the Current Text Input dialog segment and save it.

Language-Dependent Text Stored in Table

When you select this text type, you can edit texts that are saved in table RSBEXTEXTS of the BI system and that have a translation connection, and you can create new texts. The texts are not transported with the object, but they can be used in other BEx tools (such as the Report Designer). You can transport the texts created here to other systems by transporting the contents of table RSBEXTEXTS.

...

a. In the Text Properties dialog segment, choose Maintain. The BEx Text Maintenance dialog box appears.

b. In the text maintenance dialog, choose the text that you want to change and make your changes. In addition to the key and the text, the language is also displayed in the text maintenance dialog.

or

In the empty row of the text maintenance dialog, enter your text into the Key and Text fields, and enter the language of the text created into the Language field. Note that at design time for the text maintenance, you can select the language of the text, but that at runtime, the text is displayed in the portal logon language.

c. Choose Save Changes. Your changes are saved to the table.

Note

To get a better overview of the translated texts, in the text maintenance dialog, you can sort the table according to the Key, Language, or Text columns.

Language-Dependent Report Text (Obsolete)

When you select this text type, you can select the texts of an ABAP report program that you have created. These texts have a translation connection; they are not transported with the object and have to be created in the relevant report program in the BI system. See also Creating ABAP Programs for Maintaining Language-Dependent Texts.

...

a. In the Report field of the Text Properties dialog segment, enter the name of the report program; in the Key field, enter the key for the text you want to edit.

b. Choose Retrieve Text. The selected text is displayed in the Current Text Input field.

Tuesday, January 23, 2007

[ BIIP BPS ] Close transactional cube open request function module RSAPO_CLOSE_TRANS_REQUEST

call function 'RSAPO_CLOSE_TRANS_REQUEST'
exporting
i_infocube = 'ZCQUOTPLN'.

Wednesday, January 17, 2007

[bw] sample code export csv file to al11 folder ( folder on application server )

REPORT ZJEFFTEST.
tables: /BI0/PCUSTOMER.
data: cus_text type table of /BI0/TCUSTOMER.
data: cus_text_w type /BI0/TCUSTOMER.

*** Changes made here
data: ls_singlerow type string.
DATA: filename TYPE string VALUE '/bw/flatfile/test.csv'.
*** Changes ends here

select A~customer A~TXTMD A~TXTLG
from /BI0/TCUSTOMER as A JOIN /BI0/PCUSTOMER as B
ON A~customer = B~customer
into table cus_text
where B~COUNTRY = 'TW'
and B~/BIC/ZNAME_FLG <> 'Y'.


*** Changes made here
*close DATASET filename.
DELETE DATASET filename.
write sy-subrc.
OPEN DATASET filename FOR appending IN TEXT MODE ENCODING default.
loop at cus_text into cus_text_w.

concatenate cus_text_w-CUSTOMER
cus_text_w-TXTMD
* cus_text_w-TXTLG
into ls_singlerow
separated by ','.

IF SY-SUBRC = 0.
TRANSFER ls_singlerow TO filename.
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
ENDIF.
endloop.
close DATASET filename.

if sy-subrc <> 0.
write sy-subrc.
write 'Unsuccessful'.

Tuesday, January 16, 2007

[BIIP] sample code of delete cube and master data ( including dimension table data )

TYPES: rsd_chavl LIKE rsgeneral-chavl. " char. value
TYPES: rsd_t_chavl TYPE rsd_chavl OCCURS 100.
data:
L_S_RANGE TYPE RSDRD_S_RANGE,
L_THX_SEL TYPE RSDRD_THX_SEL,
L_T_MSG TYPE RS_T_MSG,
g_t_chavl_del type rsd_t_chavl,
l_s_chavl_del type rschavl,
L_SX_SEL TYPE RSDRD_SX_SEL.
CLEAR L_SX_SEL.
L_SX_SEL-IOBJNM = 'ZPLNVER'.

CLEAR L_S_RANGE.
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPTION = 'EQ'.
L_S_RANGE-LOW = 'T20061225'.
L_S_RANGE-KEYFL = 'X'.
APPEND L_S_RANGE TO L_SX_SEL-T_RANGE.
INSERT L_SX_SEL INTO TABLE L_THX_SEL.
CALL FUNCTION 'RSDRD_SEL_DELETION'
EXPORTING
I_DATATARGET = 'ZCQUOTPLN'
I_THX_SEL = L_THX_SEL
I_AUTHORITY_CHECK = 'X'
I_NO_LOGGING = ''
I_PARALLEL_DEGREE = '1'
CHANGING
C_T_MSG = L_T_MSG.
write sy-subrc.
CALL FUNCTION 'RSDRD_SEL_DELETION'
EXPORTING
I_DATATARGET = 'ZCVERTEXT'
I_THX_SEL = L_THX_SEL
I_AUTHORITY_CHECK = 'X'
I_NO_LOGGING = ''
I_PARALLEL_DEGREE = '1'
CHANGING
C_T_MSG = L_T_MSG.

l_s_chavl_del = L_S_RANGE-LOW.
append l_s_chavl_del to g_t_chavl_del.
write sy-subrc.
call function 'RSDMD_DEL_MASTER_DATA'
exporting
I_IOBJNM = 'ZPLNVER'
i_t_chavl = g_t_chavl_del
I_FLG_DIALOG = ''.
write sy-subrc.

[bw] sample code of delete select data from realtime ods

method IF_RSPLFA_SRVTYPE_IMP_EXEC~EXECUTE.
DATA: l_r_param_elem TYPE REF TO if_rsplfa_param_elem,
l_r_param_keyf_sel TYPE REF TO if_rsplfa_param_keyf_sel,
l_t_keyfnm TYPE rsplf_t_keyfnm,
l_r_param_value TYPE CHAR10,
l_kyf TYPE rsiobjnm.
*BPS STRUCTURE
TYPES: BEGIN OF LS_DATA,
ZPLNVER TYPE /BIC/OIZPLNVER,
ZPQ_NO TYPE /BIC/OIZPQ_NO,
ZQUOT_TYP TYPE /BIC/OIZQUOT_TYP,
ZSCH_END TYPE /BIC/OIZSCH_END,
ZSCH_STR TYPE /BIC/OIZSCH_STR,
ZPHASE TYPE /BIC/OIZPHASE,
ZCOSIND TYPE /BIC/OIZCOSIND,
ZCST_CAT TYPE /BIC/OIZCST_CAT,
ZTY_CURVE TYPE /BIC/OIZTY_CURVE,
CALMONTH TYPE /BI0/OICALMONTH,
ZQUOT_AMT TYPE /BIC/OIZQUOT_AMT,
ZQUOT_OVR TYPE /BIC/OIZQUOT_OVR,
END OF LS_DATA.
* EXPORT STRUCTURE
types: BEGIN OF LT_DATA,
/BIC/ZYYYY_REV TYPE /BIC/OIZYYYY_REV,
/BIC/ZE_GRADE TYPE /BIC/OIZE_GRADE,
/BIC/ZE_PQ_NO TYPE /BIC/OIZE_PQ_NO,
/BIC/ZSCOPE TYPE /BIC/OIZSCOPE,
/BIC/ZCC_TYPE TYPE /BIC/OIZCC_TYPE,
/BIC/ZCC_TYPED TYPE /BIC/OIZCC_TYPED,
/BIC/ZSS_TYPE TYPE /BIC/OIZSS_TYPE,
/BIC/ZSS_TYPED TYPE /BIC/OIZSS_TYPED,
/BIC/ZYYYYMM TYPE /BIC/OIZYYYYMM,
/BIC/ZAMOUNT TYPE /BIC/OIZAMOUNT,
RECORDMODE TYPE RODMUPDMOD,
END OF LT_DATA.
DATA: RECORDS TYPE I,
LS_DATA_W TYPE LS_DATA,
LT_DATA_W TYPE LT_DATA,
LT_DATA_I TYPE TABLE OF LT_DATA WITH DEFAULT KEY .
data LT_EXT_SEL TYPE STANDARD TABLE OF BAPI6116SLIO.
DATA LS_EXT_SEL TYPE BAPI6116SLIO.
* data: i_d like sy-index.
* do.
* if i_d = 2.
* exit.
* else.
* endif.
* enddo.
FIELD-SYMBOLS: TYPE ANY,
TYPE ANY.
l_r_param_elem = i_r_param_set->get_param_elem( 'PLNVER' ).
l_r_param_elem->get_value( IMPORTING E_VALUE = l_r_param_value ).
LOOP AT c_th_data ASSIGNING .
move-corresponding to LS_DATA_W.
assign component '0CALMONTH' of structure to .
IF LS_DATA_W-ZCST_CAT = '000041'
OR LS_DATA_W-ZCST_CAT = '000042'
OR LS_DATA_W-ZCST_CAT = '000045'.
LT_DATA_W-/BIC/ZYYYY_REV = LS_DATA_W-ZPLNVER.
LT_DATA_W-/BIC/ZE_GRADE = LS_DATA_W-ZQUOT_TYP.
LT_DATA_W-/BIC/ZE_PQ_NO = LS_DATA_W-ZPQ_NO.
LT_DATA_W-/BIC/ZSCOPE = LS_DATA_W-ZPHASE.
CASE LS_DATA_W-ZCST_CAT.
WHEN '000041'.
LT_DATA_W-/BIC/ZSS_TYPE = 'd_ab43'.
LT_DATA_W-/BIC/ZSS_TYPED = '一般費用'.
WHEN '000042'.
LT_DATA_W-/BIC/ZSS_TYPE = 'd_ab41'.
LT_DATA_W-/BIC/ZSS_TYPED = '交際費'.
WHEN '000045'.
LT_DATA_W-/BIC/ZSS_TYPE = 'd_ab42'.
LT_DATA_W-/BIC/ZSS_TYPED = '差旅費'.
ENDCASE.
LT_DATA_W-/BIC/ZYYYYMM = .
*----國內
LT_DATA_W-/BIC/ZAMOUNT = LS_DATA_W-ZQUOT_AMT.
LT_DATA_W-/BIC/ZCC_TYPE = 'I'.
LT_DATA_W-/BIC/ZCC_TYPED = '國內'.
COLLECT LT_DATA_W INTO LT_DATA_I.
*----國外
LT_DATA_W-/BIC/ZAMOUNT = LS_DATA_W-ZQUOT_OVR.
LT_DATA_W-/BIC/ZCC_TYPE = 'O'.
LT_DATA_W-/BIC/ZCC_TYPED = '國外'.
COLLECT LT_DATA_W INTO LT_DATA_I.
ENDIF.
ENDLOOP.
*DELETE DATA FIRST
LS_EXT_SEL-IOBJNM = 'ZYYYY_REV'.
LS_EXT_SEL-SIGN = 'I'.
LS_EXT_SEL-OPT = 'EQ'.
LS_EXT_SEL-LOW = LS_DATA_W-ZPLNVER.
APPEND LS_EXT_SEL TO LT_EXT_SEL.
CALL FUNCTION 'RSDRI_ODSO_DELETE_RFC'
EXPORTING
I_ODSOBJECT = 'ZOPPL40'
I_DELETE_ALL = 'X'.
CALL FUNCTION 'RSDRI_ODSO_MODIFY'
EXPORTING
I_ODSOBJECT = 'ZOPPL40'
I_T_MODIFY = LT_DATA_I
IMPORTING
E_RECORDS = RECORDS.
endmethod.