Unicode complaincy check for ABAP included in Start Routines
Hi,
we are planning to run unicode conversion for BW and we have tried to analyze our system with UCCHECK transaction to make sure that ABAP would be complaint with unicode. It's mentioned in documentation that this transaction is only capable of executing the check for certain objects, but are we able to make sure that our ABAP routines are unicode complaint? Should would go them through one by on?
BR, Gerd
Declare all the data you use inside form STARTUP at the top. It's really bad practice to define it in the middle of your logic. Use a SORTED table rather than a standard.
TYPES: BEGIN OF t_b05_o00200_ty,
h_callnr LIKE /bic/ab05_o00200-/bic/bcallnr,
h_callsts LIKE /bic/ab05_o00200-/bic/bcallsts,
h_sdate LIKE /bic/ab05_o00200-/bic/bstatd,
h_stime LIKE /bic/ab05_o00200-/bic/bstatt,
END OF t_b05_o00200.
DATA: t_b05_o00200 TYPE SORTED TABLE OF z_b05_o00200_ty WITH NON-UNIQUE KEY h_callnr h_callsts
READ TABLE t_b05_o00200 WITH TABLE KEY h_callnr = data_package-/bic/bcallnr
h_callsts = 'OPEN'
ASSIGNING <sla_record>.
READ TABLE t_b05_o00200 WITH TABLE KEY h_callnr = data_package-/bic/bcallnr
h_callsts = 'WORK IN PROGRESS'
ASSIGNING <sla_record>.
If you KNOW that the key h_callnr and h_callsts is UNIQUE, then define the table as
DATA: t_b05_o00200 TYPE HASHED TABLE OF z_b05_o00200_ty WITH UNIQUE KEY h_callnr h_callsts
The other code remains as above. This will give the biggest performance hike.
Please learn to use the tags to make your code readable. And also, offering points is against the rules of these forums.
matt
Similar Messages
-
ABAP Code in Start Routine for restricing the data records from ODS1 - ODS2
Hi
I need small ABAP Code in Start Routine Of Update rules Of ODS . Im in BW 3.5 .
I have records like below in first layer ODS and i want to restrict some records while going to second layer ODS ..
ODS1 :-
DocNO EventType Date
123 001 08/08/2008
123 003 08/08/2008
123 011 09/08/2008
I want one record in ODS2 for this document number whose EventType = 001 only and date of third record ... like below
Doc NO EventType From Date Todate
123 001 08/08/2008 09/08/2008
So how can i get like this record in the ODS2 which will get data from ODS1 . So i need to write the code in the start routine of the ODS2 .
So please give the me the code for start routine ....
Regards
SureshIts difficult in BW 3.5 to include this logic in START_ROUTINE as you cannot add the extra to_date field to the DATA_PACKAGE table.
You need to create a new global internal table with the same structure of DATA_PACKAGE with additional field to_date. then use the logic to fill in the global internal table
define a internal table new_data_package with the required structure like (docno, eventtype, fromdate todate)
data: l_w_datapkg_001 type data_package,
data: l_w_newdatapkg type new_data_package,
data: l_w_datapkg_011 type data_package
LOOP AT DATA_PACKAGE INTO l_w_datapkg_001 WHERE event_type = '001'.
l_w_newdatapkg-docno = l_w_datapkg_001-docno.
l_w_newdatapkg-event_type = l_w_datapkg_001-event_type.
l_w_newdatapkg-fromdate = l_w_datapkg_001-date.
MOVE CORRESPONDING FIELDS OF l_w_datapkg_001 INTO l_w_newdatapkg.
READ TABLE data_package INTO l_w_datapkg_011
WITH KEY docno = l_w_datapkg_001-docno
event_type = '011'.
l_w_newdatapkg-to_date = l_w_datapkg_011-date.
APPEND l_w_newdatapkg TO new_data_package
ENDLOOP.
Now the new datapackage contains the ODS2 data that u needed -
Thunderbird has stopped checking for new mail on start up.
After updating to Thunderbird 24.3, the program stopped checking for new mail on start up. I now have to manually click "get Mail" for each email account. I have checked the configuration for each account and check mail on start up is checked.
couple of possibilities here
Shift + F5 will get all mail
I have some general troubleshooting processes here http://thunderbirdtweaks.blogspot.com.au/2014/02/basic-troubleshooting-for-thunderbird.html
Please post your results. -
Need help in ABAP coding in start routine
Hi,
I have a requriement like
-To take the value of month which is an attribute of category(info Object) for which category value is 1. I need to apply the month obtained as the filter to another info object. I have opted to write this ABAP code in start routine. Can anyone guide me on this code.
Thanks in advance.do you not have an abap-er at your disposal? i don't imagine this to be quick & dirty that can be written without access to your system! some analysis work may also be required before the actual coding can be done...so I wouldn't post the entire functional spec (business requirement) here hoping for a solution; that would be too weird.
Regards. -
ABAP code in start routine (delete no in)
In my start routine, I would like to delete some data package whose employee id is not in the selection list.
but there are some ABAP grammer error in the where condition. Can somebody help this? I tried to read the document for 'WHERE - IN seltab', but still I could not give the right code.
<p>
employeeid_itab type table of string.
select /bic/zpe_employeeid into table employeeid_itab from /bic/pzpe_employeeid.
DELETE SOURCE_PACKAGE where ZEMP_employee_ID NOT IN employeeid_itab.
It seems that internal table employeeid_itab could not be directly used after the IN keyword.
how can I do this?
Edited by: Ben Li on Feb 22, 2008 2:09 PMHi Oscar,
Actually I had tried this before, using the code like the following,
<p>
Types: EmployeeID(7) type c.
<p>
data: sel_itab type range of EmployeeID.
<p>
select /bic/zpe_employeeid into table sel_itab from /bic/pzpe_employeeid.
<p>
delete SOURCE_PACKAGE where zemp_employee_id not in sel_itab.
<p>
The grammer check is OK, but when I debug it, I found that there are records in sel_itab, but all the records just have one charactor, actually, my employeeID have 7 charactors in database. So it does not work, I think I miss something in define of the range table. Can you please figure out? Thanks a lot. -
Convert ABAP code in start routine/update rule to transform. start routine
Dear BW ABAPers,
I have created a custom purchasing info cube (YCP_PURC1) based on 0CP_PURC1 standard cube. I would like to convert this new data flow to BI7 (from 3.x), and convert the standard update rule to transformation. I would need to rewrite the below start routine from the standard update rule to a start routine ABAP code in the newly created transformation / start routine. My ABAP knowledge is limited. Will you please help?
*this is the start routine from the update rule. As a side note, the data source is 2LIS_02_SCL.
LOOP AT SOURCE_PACKAGE.
IF ( SOURCE_PACKAGE-cppvlc EQ 0
AND SOURCE_PACKAGE-cppvoc EQ 0
AND SOURCE_PACKAGE-cpquaou EQ 0 ).
DELETE SOURCE_PACKAGE.
CONTINUE.
ENDIF.
no_scl is initial ( e.g. for good receipts, billing)
value has to be set depending on storno
IF SOURCE_PACKAGE-no_scl IS INITIAL.
IF SOURCE_PACKAGE-storno = 'X'.
SOURCE_PACKAGE-no_scl = -1.
ELSE.
SOURCE_PACKAGE-no_scl = 1.
ENDIF.
MODIFY SOURCE_PACKAGE.
ENDIF.
ENDLOOP.
if abort is not equal zero, the update process will be canceled
ABORT = 0.
Many thanks and look forward to your kind feedback.
Kind regards,
CsabaDear All, Durgesh,
thanks to you all for your valuable input. Mainly the ABAP part was more interesting for me.
Durgesh, thanks for your input, it was useful. I just had to change the info objects to data source fields and add the lines before the loop:
DATA: I_PACKAGE TYPE TYT_SC_1.
FIELD-SYMBOLS <i_package> TYPE tys_sc_1.
I_PACKAGE[] = SOURCE_PACKAGE[].
LOOP AT SOURCE_PACKAGE assigning <i_package>.
IF ( <i_package>-BWGEO EQ 0
AND <i_package>-BWGEOO EQ 0
AND <i_package>-BWMNG EQ 0 ).
DELETE SOURCE_PACKAGE index sy-tabix.
CONTINUE.
ENDIF.
no_scl is initial ( e.g. for good receipts, billing)
value has to be set depending on storno
IF <i_package>-NOSCL IS INITIAL.
IF <i_package>-ROCANCEL = 'X'.
<i_package>-NOSCL = -1.
ELSE.
<i_package>-NOSCL = 1.
ENDIF.
ENDIF.
ENDLOOP.
Points have been assigned accordingly.
Thanks,
Csaba -
ABAP Help at start routine of Update rule
Good After Noon All,
My requirement is that cube ZAPO_C24M theres an UPDR flowing from 8ZAPO_C24M back to itself so to speak.The request is to change the data in the cube from Fiscal Year Variant Z3 to Z4.
But in start routine i have to take the existing record and reverse all of the key figures, and also change the RECORDMODE of the record to indicate it is a reversal record. This for specific Country KR and for these country the Fiscal variant is Z3. Again in the start routine, create a new record identical to the existing record that has Fiscal Year Variant Z4 instead of Z3.
So the idea is wed load from the cube and send back to the cube one record that reverses out the existing data, and another record that contains the same data but with Fiscal Variant Z4 instead of Z3.
Please Help me.
Points will be awarded for the right answerHi Vaishali,
In the start routine copy the DATA_PACKAGE to a local table.
Select the records where the specific country is KR.
Delete all other records.
Then read the records in loop, Keep one record same and just change the fiscal year variant.
And for the same multiply all the key figures by -1.
Transfer the content of the local table back to DATA_PACKAGE.
maintain one to one mapping in the update rule.
I am sure it will update, but you need to be sure that if you change Fiscal year variant then probably your fiscal period value should change. In that case you have to update it accordingly in the start routine.
Regards. -
Execute ABAP code in Start Routine only once
I have ABAP code in a start routine that I only want to execute once. Is there a way to tell this is first execution of the start routine?
Also can I find out these value in the start routine ABAP:
1. How many data packets there are?
2. What data packet I am processing?
Regards,
Mike...Hi,
I've just setup a little test:
TRules, Start Routine Global Decl:
DATA: GVI TYPE I, GVN(5) TYPE N.
Start Routine:
IF GVI IS INITIAL.
GVI = 1.
ELSE.
ADD 1 TO GVI.
ENDIF.
MOVE GVI TO GVN.
This is basically counting the times the start routine is executed and populating the var GVN; I am posting GVN in a char ZTESTGV in the target cube. I am posting as well the datapakID in my cube.
I have loaded two requests (each 4 packets)
the first one first to PSA and then from the PSA to the target: this is Serially using one single process. Here's the result in the cube:
Request________________________________DATAPAKID_____ZTESTGV
REQU_8B5ASGQNYYNIV1OJN68HFH1SR____________1____________1
REQU_8B5ASGQNYYNIV1OJN68HFH1SR____________2____________2
REQU_8B5ASGQNYYNIV1OJN68HFH1SR____________3____________3
REQU_8B5ASGQNYYNIV1OJN68HFH1SR____________4____________4
In this case the global variable is persistent accross packets.
the second request is loaded in paralell: this is, multiple processes are executed at the time. Here's the result in the cube:
Request________________________________DATAPAKID_____ZTESTGV
REQU_14QVH21BSVH44FAJW94BD7N2H____________1____________1
REQU_14QVH21BSVH44FAJW94BD7N2H____________2____________1
REQU_14QVH21BSVH44FAJW94BD7N2H____________3____________1
REQU_14QVH21BSVH44FAJW94BD7N2H____________4____________1
In this case the global variable is always1 !!
This is logic since several a process cannot access the internal memory used by another one...
Conclusion; the global variable will work only if the load is serial...
hope this helps...
Olivier. -
Hello everybody,
I have written a code to delete some records in start routine, we are using BI 7.0.
here is the code,
TYPES: BEGIN OF tys_SC_3,
TCTUSERNM TYPE /BI0/OITCTUSERNM,
END OF tys_SC_3.
DATA zz_s_SC_3 type sorted table of tys_SC_3 with unique key TCTUSERNM.
DATA zz_s_SC_4 like line of zz_s_SC_3.
select TCTUSERNM from /B12/ARIAO0100 into table zz_s_SC_3
where TCTIOBJNM = '0TCAIPROV' and TCTLOW = '/MRG/RIMAC_01'.
DELETE SOURCE_PACKAGE where TCTUSERNM NOT IN zz_s_SC_3.
When I am running this code,I am getting an error
"E:"ZZ_S_SC_3" does not have the structure of a selection table."
can anybody out there help me out,
Thank you,
KarthikHi,
you need to define zz_s_SC_3 as:
data: zz_s_SC_3 type standard table of rsrange.
do the select as:
select TCTUSERNM as low from /B12/ARIAO0100 into table zz_s_SC_3
modify zz_s_sc_3 to set the fields sign and option to 'I' and 'EQ' for all records then it will work.
Siggi -
hi,
i have a code in this way in update routine of that info object
instead of writng that code in update routine i want to write in start routine
can any one tell me what r the changes i have to made
please suggest me
i will assigfn points
CASE COMM_STRUCTURE-crm_ctstat.
Contact Achieved
WHEN '0'.
Finished faultless
RESULT = '20'.
RETURNCODE = 0.
Contact Not Possible (Missing Communication Data)
WHEN '1'.
Finished faulty
RESULT = '10'.
RETURNCODE = 0.
Contact Not Possible (Incorrect Communication Data)
WHEN '2'.
Finished faulty
RESULT = '10'.
RETURNCODE = 0.
Contact Not Permitted (Max. Usage BP List)
WHEN '3'.
Finished faulty
RESULT = '10'.
RETURNCODE = 0.
Contact Not Permitted (Block Indicator for BP)
WHEN '4'.
Finished faulty
RESULT = '10'.
RETURNCODE = 0.
Contact Not Possible (Technical Problems)
WHEN '5'.
Finished faulty
RESULT = '10'.
RETURNCODE = 0.
ENDCASE.Hi,
loop at datapackage.
CASE datapackage-crm_ctstat.
Contact Achieved
WHEN '0'.
Finished faultless
RESULT = '20'.
RETURNCODE = 0.
Contact Not Possible (Missing Communication Data)
WHEN '1'.
Finished faulty
RESULT = '10'.
RETURNCODE = 0.
Contact Not Possible (Incorrect Communication Data)
WHEN '2'.
Finished faulty
RESULT = '10'.
RETURNCODE = 0.
Contact Not Permitted (Max. Usage BP List)
WHEN '3'.
Finished faulty
RESULT = '10'.
RETURNCODE = 0.
Contact Not Permitted (Block Indicator for BP)
WHEN '4'.
Finished faulty
RESULT = '10'.
RETURNCODE = 0.
Contact Not Possible (Technical Problems)
WHEN '5'.
Finished faulty
RESULT = '10'.
RETURNCODE = 0.
ENDCASE.
endloop. -
ABAP Code in Start Routine to fill a field
Hello,
with the following code in the start routine in BW3.5 I am trying to fill Intercompany-Indicator based on Distribution Channel. The main code is marked bold.
Distribution Channel = DISTR_CHAN
InterCompany-Indicator = G_CWWR14
Pls help. Thanks.
SD
Intercompany Indicator
IF NOT wa_daten-customer IS INITIAL.
SELECT SINGLE /b05/s_rbkunde FROM /b05/mrbcust INTO l_rbcust
WHERE /b05/s_rbcust = wa_daten-customer
AND objvers = 'A'
AND datefrom <= l_date
AND dateto >= l_date.
IF sy-subrc EQ 0.
SELECT SINGLE g_cwwr14 FROM /b05/mrbkdbkrs INTO l_ii
WHERE comp_code = wa_daten-comp_code
AND /b05/s_rbkdbkrs = l_rbcust
AND objvers = 'A'
AND datefrom <= l_date
AND dateto >= l_date.
IF sy-subrc = 0.
wa_daten-g_cwwr14 = l_ii.
ELSE.
CLEAR wa_daten-g_cwwr14.
ENDIF.
ELSE.
CLEAR wa_daten-g_cwwr14.
ENDIF.
ELSE.
IF wa_daten-G_CWWR14 = ' '.
CASE wa_daten-DISTR_CHAN.
WHEN 'Y4'.
wa_daten-G_CWWR14 = '4'.
WHEN 'Y5'.
wa_daten-G_CWWR14 = '2'.
WHEN OTHERS.
wa_daten-G_CWWR14 = '0'.
ENDCASE.
ENDIF.
ENDIF. " NOT wa_daten-customer IS INITIAL
MODIFY DATA_PACKAGE FROM wa_daten.
ENDLOOP.Hi Venkat,
Two things -One is the performance and the other ... there is no Append within the loop.
Try moving the select statement ousdie the loop to improve performance and move the modify statement into the loop ... change modify to append. Code below.
Let me know if you need more help.
Best regards,
Kazmi
data: it_data type standard table of data_package_structure
with header line
with non-unique default key initial size 0.
types: begin of billing_item_type,
BILL_NUM like /BIC/AZSD_O0700-BILL_NUM,
DOC_NUMBER like /BIC/AZSD_O0700-DOC_NUMBER,
PLANT like /BIC/AZSD_O0700-PLANT,
end of billing_item_type.
refresh it_data.
clear it_data.
it_data] = DATA_PACKAGE[.
refresh DATA_PACKAGE.
clear DATA_PACKAGE.
loop at it_data.
select DOC_NUMBER PLANT into (it_data-DOC_NUMBER, it_data-PLANT)
from /BIC/AZSD_O0700
where BILL_NUM = it_data-BILL_NUM
and FISCVARNT = it_data-fiscvarnt.
endselect.
if sy-subrc = 0.
move-corresponding it_data to DATA_PACKAGE.
Append DATA_PACKAGE.
endif.
endloop. -
Error on extended check for types include structure statements
Hi All ,
On Extended check im getting error :
Program: ZFIR_VALUATE_OBSOLETE_STOCK Include: ZFIR_VALUATE_OBSOLETE_STOCK_F Row: 1205
The current ABAP command is obsolete
Within classes and interfaces, you can only use "TYPE" to refer to ABAP Dictionary
types, not "LIKE" or "STRUCTURE".
Internal Message Code: MESSAGE G/B
(The message cannot be hidden using pseudo-comment "#EC .., bzw. durch SET
EXTENDED CHECK OFF/ON)
The error is in below line :
TYPES: BEGIN OF t_fttax.
INCLUDE STRUCTURE fttax.
TYPES: END OF t_fttax.
and fttax is a dictionary strucuture . i made internal table and work area using it .
DATA: i_fttax TYPE STANDARD TABLE OF t_fttax,
wa_fttax TYPE t_fttax.
Need Help ,what i should do to remove this error ?
Regardsdeclare as :
DATA: i_fttax TYPE STANDARD TABLE OF fttax,
wa_fttax TYPE fttax.
No need to declare as :
TYPES: BEGIN OF t_fttax.
INCLUDE STRUCTURE fttax.
TYPES: END OF t_fttax. -
Authentication or Security Checks for ABAP programs
Dear experts,
Please tell me where do we give the authentication or security checks to our ABAP programs and how do we do that. ( Do not allow all to execute our developed programs).
Regards,
MaanasaIf you know the authorization group u can use the following ways.
1. In the Attributes u can specify the authorization gourp name
2. AT SELECTION-SCREEN
AUTHORITY-CHECK OBJECT 'Z_TABU_DIS'
ID 'ACTVT' FIELD '03'
ID 'CUSTTYPE' FIELD v_class
ID 'TABLENAME' FIELD p_dbtble.
CASE SY-SUBRC.
WHEN 0.
WHEN OTHERS.
Error message
message I419(MO).
STOP.
ENDCASE. -
Error in abap coding in start routine..
Hello Gurus,
I am having difficulty run this program, can anyone advise?
IF wa_datapackage-calday LT l_rundate.
SELECT SINGLE /BIC/AUMR05005
INTO l_latestvisitdate
FROM /BIC/PAUMRSO0200
WHERE fiscper = wa_datapackage-fiscper AND "fiscper
/BIC/AUMR01310 = wa_datapackage-/BIC/AUMR01300 AND "customer
/BIC/AUMR02001 = wa_datapackage-/BIC/AUMR02001 AND "product
/BIC/AUMR03204 = wa_datapackage-/BIC/AUMR03204 AND "questions
/BIC/AUMR03202 = wa_datapackage-/BIC/AUMR03202. "subject
IF sy-subrc = 0.
IF wa_datapackage-calday > l_latestvisitdate.
APPEND wa_datapackage TO lt_datapackage.
ENDIF.
ENDIF.
ELSE.
APPEND wa_datapackage TO lt_datapackage.
ENDIF.
The above program gies the following error:
E:"/BIC/PAUMRSO0200" is not defined in the ABAP Dictionary as a table, projection view or database view.
Can you suggest any probable solution?
Thanks & Regards,
JPHi JP,
Check in SE11, /BIC/AUMR05005 may be defined as a structure, not as a table or view.
You may need to use some other table or view.
Reward points if useful.
Regards,
Atish -
Unicode check for BSP Business Server Pages
Could somebody please tell me whether there is a transaction to use to check BSP's for Unicode correctness?
For ABAP one uses the transaction UCCHECK. We need the equivalent of that to check our BSP's.
Thanks
LynetteHello Lynette,
SAP standard BSP's are Unicode compatible.
There is no SAP program for testing customized\new developed BSP's but there is no known issue with BSP's and conversion to Unicode.
Best regards,
Shay Oberziger
Solution Management
Globalization Services
Maybe you are looking for
-
Can I Do This - Multiple User Accounts, Same Apple Account?
I'm wondering if I can do this - I just got a new pc for my wife and kids, each of whom have an ipod. They have been sharing a username and Apple.com account (the xxxx@yyyy id) on the old pc, each synching their ipods with no problems. On the new PC,
-
How do I get the dialog box back when clicking on a pdf attachment in my email. Made the mistake of clicking save while the check box was ticked.
-
Hi, I have cleared the exams 1Z0-001 Introduction to Oracle: SQL and PL/SQL & 1Z0-023 Oracle8i: Architecture and Administration in the year 2001. Now I have cleared 1Z0-024 Oracle8i: Performance Tuning this month. My doubt is will I be able to become
-
Can't add to portal favorites with "&" in the name field
Hi there Interesting problem which has been identified this morning ... it appears that certain iviews cannot be added to the portal favorites, and upon closer inspection, it appears that those iviews all have the "&" character in the name field. For
-
How to install BPM Enterprise for weblogic
I need to install BPM Enterprise for Weblogic 10.3. However, the weblogic is installed in another machine. BPM and weblogic are installed in different machines. When I configure the BPM, how to set the weblogic home and workspace folder?