Unicode impact on ABAP programming & Functional
Hi all,
We are on SAP 4.7 (non-unicode) system. Now we are planning for unicode version in SAP 6.0.. Can u please explain me what would be the impact on ABAP object as well as functional impact occurs while moving from non-uncode version to unicode version.
Thanks & Regards,
Pramitha.
Hi friend,
Unicode provides a unique number for every character, independent of platform and programming language. That is why every system is getting upgraded to unicode one(ECC 6.0)
See some other statements also,
1.
Non-unicode:
DESCRIBE FIELD PWD LENGTH LEN.
The above statement is obsolete in ECC. So, replace it with the following statement:
Unicode (ECC 6.0):
DESCRIBE FIELD PWD LENGTH LEN IN CHARACTER MODE. <-- character or byte mode
2.
Non-unicode:
In unicode programs the "-" character cannot appear in names. Ex: DATA name-new type c.
Unicode (ECC 6.0):
Use '_' (underscore) for names. Ex: DATA name_new type c.
3.
Non-unicode:
Search 'Hello SAP' for 'SAP'. <-- will work
Unicode (ECC 6.0):
Search 'Hello SAP' for 'SAP'. <--- will not work and will not give any syntax error.
So, use --> FIND FIRST OCCURRENCE OF 'SAP' in 'Hello SAP'.
4.
Non-unicode:
Explicit length is not required. Ex: DATA name type c.
Unicode (ECC 6.0):
Explicit length is required Ex: DATA name(5) type c.
Use T-code UCCHECK for checking unicode errors.
Thanks..
Edited by: Sap Fan on Mar 13, 2009 10:11 AM
Edited by: Sap Fan on Mar 13, 2009 10:12 AM
Edited by: Sap Fan on Mar 13, 2009 10:13 AM
Similar Messages
-
Unicode impact on abap programming
We are on SAP 4.7 (non-unicode) system. Now we are planning for unicode version in SAP 6.0.. Can u please explain me the difference between non-unicode, unicode version and also tell me what would be the impact on abap object while moving from non-uncode version to unicode version.
Thanks
Mohit khandelwalHi friend,
Unicode provides a unique number for every character, independent of platform and programming language. That is why every system is getting upgraded to unicode one(ECC 6.0)
See some other statements also,
1.
Non-unicode:
DESCRIBE FIELD PWD LENGTH LEN.
The above statement is obsolete in ECC. So, replace it with the following statement:
Unicode (ECC 6.0):
DESCRIBE FIELD PWD LENGTH LEN IN CHARACTER MODE. <-- character or byte mode
2.
Non-unicode:
In unicode programs the "-" character cannot appear in names. Ex: DATA name-new type c.
Unicode (ECC 6.0):
Use '_' (underscore) for names. Ex: DATA name_new type c.
3.
Non-unicode:
Search 'Hello SAP' for 'SAP'. <-- will work
Unicode (ECC 6.0):
Search 'Hello SAP' for 'SAP'. <--- will not work and will not give any syntax error.
So, use --> FIND FIRST OCCURRENCE OF 'SAP' in 'Hello SAP'.
4.
Non-unicode:
Explicit length is not required. Ex: DATA name type c.
Unicode (ECC 6.0):
Explicit length is required Ex: DATA name(5) type c.
Use T-code UCCHECK for checking unicode errors.
Thanks..
Edited by: Sap Fan on Mar 13, 2009 10:11 AM
Edited by: Sap Fan on Mar 13, 2009 10:12 AM
Edited by: Sap Fan on Mar 13, 2009 10:13 AM -
ABAP program/Function module to assign the roles in SU01
Hi,
Is there any ABAP program/function module to assign the roles in SU01. And program/function module which does all teh SU01 related activities.
Thanks and Regards,
RashmiHello,
Check the function modules that start with BAPI_USER*
To assign roles :
BAPI_USER_ACTGROUPS_ASSIGN
To assign profiles :
BAPI_USER_PROFILES_ASSIGN
To change user's metadata (name, settings, ... other SU01 functions) :
BAPI_USER_CHANGE
Success.
Wim -
Unicode Printing in ABAP program
Hi all,
I have a problem in Unicode printing. When I write a report, I use Unicode font. Everything is Ok when I print preview this report. But when i send it to the printer, the unicode font doesn't present.
Do you know how to solve this problem ?
Thank you very much.
Sylvecast.Hi Atish,
Yes, of course. I can print any word document with unicode font. I don't know if there must have any settings in ABAP program ? But when i print preview it, evrey thing is OK.
Kindly regards,
Sylvecast. -
Unicode Impact on customised program - Please Help, Thank you
Dear all,
What is the impact on customised program after the installation of the unicode in the system?
1)Example : if Chinese unicode is installed, when we execute a customised program/report, will it cause a short dump? what pre-empt steps must we take?
2) If Chinese unicode is installed, when we execute a customised report and we want the report in English language for plant A (Singapore) and in Chinse language for plant B (China), is it possible?
Thank you.This should be universal:
http://www.apple.com/uk/itunes/ -
Inactive ABAPs (Program, Functions...)
Hi,
I need to generate a list of objects (programs, functions, tables etc.) that are inactive. Where can I find this information?
Any Function or Table contains this information?
tks,
Mário Jr.You can look at table REPOSRC, the R3STATE column will tell you if the program is active or not. Look at table DD02L for tables, the AS4LOCAL column will tall you if it is active or not.
Regards,
Rich Heilman -
Extend execution of ABAP programs - function module TH_REDISPATCH
Hello Experts,
Does anyone now where I can find documentation for FM TH_REDISPATCH?
When this FM is called, Does it really forces a commit work?
I have already read note 25528, but I need more information.
Thanks in advance and regards!TH_REDISPATCH is internally used by SAP to prevent a long running work process (especially online processes) from getting timed out.
TH_REDISPATCH is part of task handler functions. Other functions in the group like TH_WPINFO lists the work processes run on an application server in real time (used by transaction SM51). I often use TH_WPINFO to see what db activity a running job is currently doing (what we see in SM51 against a process). As SM51 access is normally not provided in production TH_WHPINFO comes handy. -
Finding number of lines in a program/function module
Hi Expets,
I would like to know is there any way to find the number of code lines in a ABAP program/function module.
Additionally, can i extend this to a package such that the utility will find the number of codelines in all the programs/function modules/include programs in that package.
Any hints regarding the same would be appreciated.
Regards,
Ramanath1. First using Read report to load the source code to your internal table.
2. Using SCAN statement to do analysis about the source code. pls refer to the sap keyword help about "SCAN".
Syntax Diagram
SCAN
Note
This statement is for internal use only.
It cannot be used in application programs.
Variants:
1. SCAN ABAP-SOURCE itab1 ...TOKENS INTO itab2
...STATEMENTS INTO itab3.
2. SCAN AND CHECK ABAP-SOURCE itab1 ...RESULT INTO itab2.
Variant 1
SCAN ABAP-SOURCE itab1 ...TOKENS INTO itab2
...STATEMENTS INTO itab3.
Parts marked with " ..." are interchangeable
Extras:
1. ... FROM n1
2. ... TO n2
3. ... KEYWORDS FROM itab4
4. ... LEVELS INTO itab5
5. ... STRUCTURES INTO itab6
6. ... OVERFLOW INTO c1
7. ... WITH ANALYSIS
8. ... WITH COMMENTS
9. ... WITH INCLUDES [IMPLEMENTATIONS FROM itab]
10. ... WITH TYPE-POOLS
11. ... WITH LIST TOKENIZATION
12. ... PRESERVING IDENTIFIER ESCAPING
13. ... WITHOUT TRMAC
14. ... [INCLUDE] PROGRAM FROM c2
15. ... INCLUDE INTO c3
16. ... MESSAGE INTO c4
17. ... WORD INTO c5
18. ... LINE INTO n3
19. ... OFFSET INTO n4
20. ... WITH EXPLICIT ENHANCEMENTS [IMPLEMENTATIONS FROM itab]
21. ... FRAME PROGRAM FROM c2
22. ... ENHANCEMENTS INTO itab -
Call an ABAP Program from Web Application designer
Hi Gurus,
I have an requirement in which I need to fetch an CSV file from the server and place the file into an internal table in R/3.I got the function module and wrote the program for this,but now I need to call this ABAP program from Web Application designer.
To make it more explicit ,I need to call an ABAP Program /function module from the WAD.I am new to WAD Please help.
AnkitHi Ankit,
take a look:
/thread/725385 [original link is broken]
WAD and ABAP
How to call a ABAP or ABAP Class from the WEB
/people/kai.wachter/blog/2008/03/11/how-to-write-own-items-in-bi-70-java-runtime
Regards
Andreas -
Regarding Conversion Of ABAP program from non unicode to uni code
Hi Can you please let me know the procedure for converssion of non unicode to unicode?
Thanks in advance,
zuberaHi
The Link will be helpful to you.
Re: Upgrade 4.6 to ECC - What are the responsibilites
regarding Unicode influence in Standard programs
Very good document:
http://www.doag.org/pub/docs/sig/sap/2004-03/Buhlinger_Maxi_Version.pdf
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d37d1ad9-0b01-0010-ed9f-bc3222312dd8
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/589d18d9-0b01-0010-ac8a-8a22852061a2
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f8e316d9-0b01-0010-8e95-829a58c1511a
You need to use the transaction UCCHECK.
The report documentation is here
ABAP Unicode Scan Tool UCCHECK
You can use transaction UCCHECK to examine a Unicode program set for syntax errors without having to set the program attribute "Unicode checks active" for every individual program. From the list of Unicode syntax errors, you can go directly to the affected programs and remove the errors. It is also possible to automatically create transport requests and set the Unicode program attribute for a program set.
Some application-specific checks, which draw your attention to program points that are not Unicode-compatible, are also integrated.
Selection of Objects:
The program objects can be selected according to object name, object type, author (TADIR), package, and original system. For the Unicode syntax check, only object types for which an independent syntax check can be carried out are appropriate. The following object types are possibilities:
PROG Report
CLAS Class
FUGR Function groups
FUGX Function group (with customer include, customer area)
FUGS Function group (with customer include, SAP area)
LDBA Logical Database
CNTX Context
TYPE Type pool
INTF Interface
Only Examine Programs with Non-Activated Unicode Flag
By default, the system only displays program objects that have not yet set the Unicode attribute. If you want to use UCCHECK to process program objects that have already set the attribute, you can deactivate this option.
Only Objects with TADIR Entry
By default, the system only displays program objects with a TADIR entry. If you want to examine programs that don't have a TADIR entry, for example locally generated programs without a package, you can deactivate this option.
Exclude Packages $*
By default, the system does not display program objects that are in a local, non-transportable package. If you want to examine programs that are in such a package, you can deactivate this option.
Display Modified SAP Programs Also
By default, SAP programs are not checked in customer systems. If you also want to check SAP programs that were modified in a customer system (see transaction SE95), you can activate this option.
Maximum Number of Programs:
To avoid timeouts or unexpectedly long waiting times, the maximum number of program objects is preset to 50. If you want to examine more objects, you must increase the maximum number or run a SAMT scan (general program set processing). The latter also has the advantage that the data is stored persistently. Proceed as follows:
- Call transaction SAMT
- Create task with program RSUNISCAN_FINAL, subroutine SAMT_SEARCH
For further information refer to documentation for transaction SAMT.
Displaying Points that Cannot Be Analyzed Statically
If you choose this option, you get an overview of the program points, where a static check for Unicode syntax errors is not possible. This can be the case if, for example, parameters or field symbols are not typed or you are accessing a field or structure with variable length/offset. At these points the system only tests at runtime whether the code is sufficient for the stricter Unicode tests. If possible, you should assign types to the variables used, otherwise you must check runtime behavior after the Unicode attribute has been set.
To be able to differentiate between your own and foreign code (for example when using standard includes or generated includes), there is a selection option for the includes to be displayed. By default, the system excludes the standard includes of the view maintenance LSVIM* from the display, because they cause a large number of messages that are not relevant for the Unicode conversion. It is recommended that you also exclude the generated function group-specific includes of the view maintenance (usually L<function group name>F00 and L<function group name>I00) from the display.
Similarly to the process in the extended syntax check, you can hide the warning using the pseudo comment ("#EC *).
Applikation-Specific Checks
These checks indicate program points that represent a public interface but are not Unicode-compatible. Under Unicode, the corresponding interfaces change according to the referenced documentation and must be adapted appropriately.
View Maintenance
Parts of the view maintenance generated in older releases are not Unicode-compatible. The relevant parts can be regenerated with a service report.
UPLOAD/DOWNLOAD
The function modules UPLOAD, DOWNLOAD or WS_UPLOAD and WS_DOWNLOAD are obsolete and cannot run under Unicode. Refer to the documentation for these modules to find out which routines serve as replacements.
Regards
Anji -
How to upload Excel file in BI using function module in abap program
How to upload Excel file in BI using function module in abap program?
Hi Anuj,
To upload the file , you can try a standard program "RSEPSFTP" .
while you execute the program , a selection screen appears in which the inputs should be give as
RFC destination - The target server name
FTP command- PUT
local file - your file name
local directory - path of your local file
remote file - your target file name
remote directory - where it has to be stored
Hope this is useful for you
Thanks & regards
Anju -
How to create Inbound Idocs in a ABAP program? Any function Module?
Hello Experts,
My requirement is : I have sales order data which I extracted from third party system in my internal tables. In the same box I need to create inbound Idocs and then consequently create sales orders.
I have used the function module IDOC_INBOUND_WRITE_TO_DB to create inbound Idocs from Sales Orders data in internal tables. I have populated all the data records with correct PSGNUM and HLEVEL values. My plan is to create inbound idocs with this function module and send those to IDOC_INPUT_ORDERS function module which creates Sales Orders.
If a sales order in the internal table in ABAP program contains only one item, then I am getting correct idocs. But if more than one item exists for a sales order then the line item segments which got repeated in Idoc are having PSGNUM and HLEVEL values as zero when I checked in WE02. As a result the hierarchy from the second item segment is getting disturbed and getting the status 60.
I populated T_EDIDD with data records from IDOC_INBOUND_WRITE_TO_DB.
To the function module IDOC_INPUT_ORDERS, T_EDIDC and T_EDIDD are the input. I observed that in T_EDIDD also the PSGNUM and HLEVEL values are blank.
I am getting Status 60 with message 'EDI: Syntax error in IDoc (segment cannot be identified)' for idocs which have more than one item.
I need to extract sales data from third party and create inbound idocs and create sales orders in one ABAP program only. I need to display corresponding Idoc numbers for the corresponding third party sales order number in a listoutput.
Can anybody please provide inputs?
Regards.Hi Anjali,
Thanks for the response.
I have passed the PSGNUM and HLEVEL values while populating the data records. Then I sent the data records and control record information to the function module IDOC_INBOUND_WRITE_TO_DB. Inside this function module there is code to clear the PSGNUM values and HLEVEL values.
for compatibility: clear administration data of data records
perform data_records_wipe
tables
t_data_records.
FORM DATA_RECORDS_WIPE
TABLES
T_DATA_RECORDS_IN STRUCTURE EDIDD.
LOOP AT T_DATA_RECORDS_IN.
CLEAR: T_DATA_RECORDS_IN-MANDT,
T_DATA_RECORDS_IN-DOCNUM,
T_DATA_RECORDS_IN-SEGNUM,
T_DATA_RECORDS_IN-PSGNUM,
T_DATA_RECORDS_IN-HLEVEL.
modify t_data_records_in.
ENDLOOP.
ENDFORM. " DATA_RECORDS_WIPE
This is the code which is clearing all the PSGNUM and HLEVEL values. After coming out of this function module we are getting the error idocs created with disturbed hierarchy.
I need to create INBOUND Idocs with the data in ABAP program.
Please let me know if any inputs? Is there any function module existing to create Inbound Idocs inside an ABAP program?
Regards -
Problem in using function module parameters in abap program
i want to use the coding present in on one of the function module 'AS_API_INFOSTRUC_FIND' i got the problem using the function module parameters in my abap program.
these are the parameters inside fm
""Lokale Schnittstelle:
*" IMPORTING
*" VALUE(I_FIELDCAT) TYPE AIND_FCAT
*" VALUE(I_FIELDS) TYPE TABLE OPTIONAL
*" VALUE(I_OBLIGATORY_FIELDS) TYPE TABLE OPTIONAL
*" EXPORTING
*" VALUE(E_INFOSTRUC) TYPE AIND_DESC
*" REFERENCE(E_ALL_FIELDS) TYPE TABLE
*" REFERENCE(E_MATCHING_FIELDS) TYPE TABLE
*" EXCEPTIONS
*" NO_INFOSTRUC_FOUND
i want to declare E_ALL_FIELDS parameter in my abap program,
i have declared as
data: E_ALL_FIELDS TYPE TABLE.
but the system throws error that
'type of field 'TABLE' is generic .no table line has been specified'.
i want to use it in my abap program how can i declare in my abap program .You have to declare the table using any specific type.
The type table in the FM is generic so you can pass any type you need.
For instance:
TYPES: BEGIN OF ty_fields,
fieldname LIKE dfies-fieldname,
END OF ty_fields,
TYPES: TY_T_GLU1 LIKE GLU1 OCCURS 0,
ty_t_fields type ty_fields occurs 0.
DATA: lt_info_struct_fields TYPE ty_t_fields WITH HEADER LINE,
lt_matching_fields TYPE ty_t_fields WITH HEADER LINE.
CALL FUNCTION 'AS_API_INFOSTRUC_FIND'
EXPORTING
i_fieldcat = ft_fieldcat-fieldcat
i_fields = ft_fields_filled[]
IMPORTING
e_infostruc = lv_info_struct_name
e_all_fields = lt_info_struct_fields[]
e_matching_fields = lt_matching_fields[]
EXCEPTIONS
no_infostruc_found = 1. -
Call an ABAP program or a function module from command prompt/python script
Dear All,
I want to call a function module/ABAP program from command prompt or a python script.
Let me explain with an example.
There is a function module "z_add" that takes two integers as input parameters and generates their sum.
the sum is the output parameter.
Now i want to call this function module from command prompt / python script and pass parameters to this function module.
In return i must get the sum(i.e. the output of function module).
I tried using STARTRFC ,was able to call the FM but could not get the return value(output) from FM.
Can you please provide me the code of such a function module and the method to call it thereby passing parameters and getting the sum.
Thanks and regards,
Gaurav
Edited by: gauravkec2005 on Mar 4, 2010 7:41 AMthank you both! helpful answers! :o)
anyway!
i have written the program which is called from the SAPScript:
/: PERFORM GET_VATNUMBER IN PROGRAM ZFI_F140_OPERATIONS
/: USING &BKPF-BUKRS&
/: CHANGING &VATNUMBER&
CE VAT Registration No : &VATNUMBER&
REPORT zfi_f140_operations.
FORM get_vatnumber TABLES in_par STRUCTURE itcsy
out_par STRUCTURE itcsy.
DATA: lv_co_code TYPE bukrs,
lv_vat_no TYPE stceg.
READ TABLE in_par WITH KEY name = 'BKPF-BUKRS'.
MOVE in_par-value TO lv_co_code.
SELECT SINGLE stceg FROM t001
INTO lv_vat_no WHERE bukrs = lv_co_code.
out_par-name = 'VATNUMBER'.
WRITE lv_vat_no TO out_par-value.
CONDENSE out_par-value.
MODIFY out_par INDEX 1.
ENDFORM.
it is not working and i cannot work out why...
i have not been ABAPing for very long but have had a go....
any thoughts as to what i have done wrong?
or point me where i should be looking? thank you! -
LSMW or ABAP Program:- I need BAPI function module or Direct input program
hi experts,
I have to develop the program which uploads the transportation pricing data for freight cost management.
the transcation code is XK15 for the application A.
There is a program called RV14BTCI which will uploads for the application V or M not for A.
So i can use lsmw or direct input program in both lsmw and abap program so plz help me if there is any BAPI function module or Direct input program for Application A.
thank you,
waiting for u r reply.
Edited by: SANTOSH MARUPALLY on Jan 22, 2008 6:27 AMHi Santosh
Am not really sure if RV14BTCI can not be used for other applications apart from V and M.
You can try using BAPI: BAPI_PRICES_CONDITIONS. Over the forum you can find few example coding.
Regards
Eswar
Maybe you are looking for
-
How the message is processed in the BPM?
Hello, First in XI I developed a scenario JDBC->XI->RFC. It worx now. This time I'd like to use ccBPM for the same process but with time dalay (to be sure, that the process uses the steps from the ccBPM). I've configured following scenario: ->START -
-
I have worked out in similar fashion as given in site "http://stardeveloper.com/articles/display.html?article=2001101101&page=1" But iam not getting output. I used tomcat server. The result i got is Sending failed; nested exception is: javax.mail.Mes
-
Mail Server empty option value Error
I am running a 10.3.9 mail serever and can not get the POP or IMAP to enable. I am getting this error in the log file: Jul 14 13:46:53 www master[2253]: empty option value on line 16 of configuration file The error happened after i tried to change th
-
Hi All, We're on 12.1.3, we need to list all the HRMS DB tables used in our instance to use with an external system! please advise what's the best way to do so? Many Thanks in advance ..
-
ok I have just recently recieved a BB 7100 new. I have been working on activating everything, and as of now Browser, messages and everything work well. The only thing I am missing that I know should be there is the NOL, Where i can download ringers,