on 04-14-2010 7:26 AM
Hi Experts,
Iam new to ABAP and alrady have update rule code in 3.x and same code i need in transformation field routine . can any one tell me detail steps the ame same code in bi.7
PROGRAM UPDATE_ROUTINE.
*$*$ begin of global - insert your declaration only below this line *-*
* TABLES: ...
DATA: mon(2) type n,
year(4) type n,
ymon like sy-datum.
*$*$ end of global - insert your declaration only before this line *-*
FORM compute_data_field
TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring
USING COMM_STRUCTURE LIKE /BIC/CSZIS_OUTSTANDING_AGING
RECORD_NO LIKE SY-TABIX
RECORD_ALL LIKE SY-TABIX
SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
CHANGING RESULT LIKE /BIC/AZOAR_MM00-CALDAY
RETURNCODE LIKE SY-SUBRC "Do not use!
ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
*
*$*$ begin of routine - insert your code only below this line *-*
* fill the internal table "MONITOR", to make monitor entries
ymon = COMM_STRUCTURE-/BIC/ZPUR_DATE.
* result value of the routine
RESULT = ymon.
* if abort is not equal zero, the update process will be canceled
ABORT = 0.
*$*$ end of routine - insert your code only before this line *-*
*
ENDFORM.
Regards
Rk
map the field(s) from source to target
DATA: mon(2) type n,
year(4) type n,
ymon like sy-datum.
ymon = Source-fields-/BIC/ZPUR_DATE.
result = ymon.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi bhaskar ,
Thank you vey much for your fast reply.
i tried your code it showing some syntax error.
here in 3.x data source zpur_date (infoobject) mapped to the badat and after that the code has been written in the update rule.
As per your reply i mapped 0calday to BADAT and zpur_date also mapped to BADAT i written the code in 0calday i got this error .Can you please let me know further solution
E:The field "SOURCE-FIELDS" is unknown, but there is a field with
similar name "SOURCE_FIELDS". "SOURCE_FIELDS".
Regards
Rk
hi ,
the update routine code
PROGRAM UPDATE_ROUTINE.
*$*$ begin of global - insert your declaration only below this line *-*
* TABLES: ...
DATA: mon(2) type n,
year(4) type n,
ymon like sy-datum.
*$*$ end of global - insert your declaration only before this line *-*
FORM compute_data_field
TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring
USING COMM_STRUCTURE LIKE /BIC/CSZIS_OUTSTANDING_AGING
RECORD_NO LIKE SY-TABIX
RECORD_ALL LIKE SY-TABIX
SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
CHANGING RESULT LIKE /BIC/AZOAR_MM00-CALDAY
RETURNCODE LIKE SY-SUBRC "Do not use!
ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
*
*$*$ begin of routine - insert your code only below this line *-*
* fill the internal table "MONITOR", to make monitor entries
ymon = COMM_STRUCTURE-/BIC/ZPUR_DATE.
* result value of the routine
RESULT = ymon.
* if abort is not equal zero, the update process will be canceled
ABORT = 0.
*$*$ end of routine - insert your code only before this line *-*
*
ENDFORM.
i tried what ever suggested still syntax error showing
E:The data object "SOURCE_FIELDS" does not have a component called
"/BIC/ZPUR_DATE".
Regards
Rk
Hi,
In BI & we have Source Fields and Targets Fields concept in Routines. You always need to maintain equal fields in both places, if you want to write any routine.
You can see the following coding blocks , if you click on Start Routine in Transformations, here I just given some example code, so in that both blocks you need to maintain the correct/equal Fields/InfoObejcts, you need to add manually if you get any error.
TYPES:
BEGIN OF _ty_s_SC_1,
* InfoObject: 0CUSTOMER Customer number.
CUSTOMER TYPE /BI0/OICUSTOMER,
* InfoObject: 0CPR_PARROL Partner Function.
CPR_PARROL TYPE /BI0/OICPR_PARROL,
* InfoObject: 0WORKCENTER Work Center/Resource.
WORKCENTER TYPE /BI0/OIWORKCENTER,
* Field: RECORD.
RECORD TYPE RSARECORD,
END OF _ty_s_SC_1.
*$*$ end of rule type
TYPES:
BEGIN OF _ty_s_tg_1_full,
* Field: SID Master data ID.
sid TYPE rssid,
* Field: DATAPAKID Data packet number.
datapakid TYPE rsdatapid,
* Field: RECORD Data record number.
record TYPE rsarecord,
* InfoObject: 0BILL_NUM Billing document.
bill_num TYPE /bi0/oibill_num,
* InfoObject: 0KNVAL Condition Value.
knval TYPE /bi0/oiknval,
* Field: RECORD.
record TYPE rsarecord,
END OF _ty_s_sc_1__rule_67.
Thanks
Reddy
Hi,
Click in Routine in Transforamtions in Change mod eand then add /BIC/ZPUR_DATE using + button i.e on Target InfoObejct you have routine so click on that routine and then add /BIC/ZPUR_DATE Infojbect by using F4 help and then enter into code window you can find that field in SOURCE_FIELDS so now try with your code.
RESULT = SOURCE_FIELDS-/BIC/ZPUR_DATE
As per your field you adjust the routine.
Thanks
Reddy
Hi,
thank you very much for your reply .
iam new this project here i have one enhancement required for ods .
3.x
here in transfer rules zpur_date assigned to badat from data source to ods.
in ods update rule routine has been written the code has been mentioed .insteaad of witting abap code why dont we assign brdat to 0calday in transfer rules.some loading problem in 3.x i designed in BI.7
BI.7
shall i map the badat to 0calday .Here Can you explain me what is the necessary writing routine according to the above code in 3.x
Regards
Rk
Edited by: rama krishan on Apr 14, 2010 12:18 PM
check this beautiful article
Hi,
Right click on update rules ---> Additional Functions ---> Create Transformation. Then the rules are converted to transformations and then activate.
Hope this helps,
Regards,
Rama Murthy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.