Representation of "-" in ABAP
Hello,
As far as I know, in ABAP, we can use CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB
to represent a tab sign, I am wondering whether there is a similar thing to represent the "-" (i,e. the dash sign) in ABAP or it would be OK to use the dash sign directly for use in SPLIT statement? Thanks a lot!
Regards,
Anyi
Yes, "-" is a printable character. There will be no problem is using it in your statements, such as SPLIT or SEARCH. It is just any other printable character like, period(.) or comma(,).
Regards,
Rich Heilman
Similar Messages
-
ABAP-XML conversion via call transformation
Hi folks!
I'm using a deep structure for returning the reply from a function module. To save my test data I wanted to generate an XML from this ABAP structure.
I had in mind that I could use CALL TRANSFORMATION to get the asXML representation of the ABAP structure but I could not figure out how this works.
Can somebody give me a hint how I could convert my deep ABAP structure into XML without much coding?
Thanks!
BirgitHi stonefish,
1. internal table -
> Xml
xml -
> internal table
2. this program will show both.
3. It will do this for
T001 table.
4. Just copy paste in new program.
REPORT abc.
DATA
DATA : t001 LIKE TABLE OF t001 WITH HEADER LINE.
DATA : BEGIN OF itab OCCURS 0,
a(100) TYPE c,
END OF itab.
DATA: xml_out TYPE string .
DATA : BEGIN OF upl OCCURS 0,
f(255) TYPE c,
END OF upl.
DATA: xmlupl TYPE string .
FIRST PHASE
FIRST PHASE
FIRST PHASE
Fetch Data
SELECT * FROM t001 INTO TABLE t001.
XML
CALL TRANSFORMATION ('ID')
SOURCE tab = t001[]
RESULT XML xml_out.
Convert to TABLE
CALL FUNCTION 'HR_EFI_CONVERT_STRING_TO_TABLE'
EXPORTING
i_string = xml_out
i_tabline_length = 100
TABLES
et_table = itab.
Download
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filetype = 'BIN'
filename = 'd:\xx.xml'
TABLES
data_tab = itab.
SECOND PHASE
SECOND PHASE
SECOND PHASE
BREAK-POINT.
REFRESH t001.
CLEAR t001.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = 'D:\XX.XML'
filetype = 'BIN'
TABLES
data_tab = upl.
LOOP AT upl.
CONCATENATE xmlupl upl-f INTO xmlupl.
ENDLOOP.
XML
CALL TRANSFORMATION ('ID')
SOURCE XML xmlupl
RESULT tab = t001[]
BREAK-POINT.
regards,
amit m. -
IPC4.0: UserExit ABAP Structures konp, komp
Hi
I need some help with the representation of some ABAP structures in Java.
We are looking for the representation of the KOMP-TAXM1 field, which should be an attribute of the Java Interface "IPricingItemUserExit". However, the call
prItem.getItemAttributeValue("TAXM1")
seems not to work.
The ABAP KONP structure might be represented by IPricingConditionRecord:
IPricingConditionRecord konp = (IPricingConditionRecord)prCondition.getConditionRecord();
Is that correct?
Thanks for any help.
KilianHi Yatendra,
Question 1 ) Do i need to define/declare "constants" and "feild-symbols" in Java userexit, as mention in above ABAP code ?
Java has no such thing as 'field-symbols', thanks God for that, so the answer would be a no. And there is no such thing as 'constants' in Java, thou you can reach the same using a final class with a public static final variable of any given type you want.
Question2 ) How to write SELECT statement code in Java UserExit ?
You simply don't, and if you have such in ECC just raise ' ECC user exit is incorrect and should be fixed '... very very popular topic, pretty sure you will have a hard time to prove, but I'm certain you will prove that ECC userExit code in ABAP is a joke (because that code is a joke and I'm fairly positive it was created by an intern or something..)
Question 3) What would be equivalent code/logic in Java userexit for READ TABLE statement ?
as Sarath mentioned above, as soon you implement the BADI in ABAP code and Map the attributes accordingly, you will end up with no collection or Array inside the userExit itself, as stuff has been calculated before in the BADI and only final values have been passed forward to your custom Java code.
Hope it helps, you should read Sarath hyperlink as he compiled a master piece on IPC extensions.
Cheers,
D. -
SELECT statement does not work if characters ## are contained in field
Hi Experts,
I have the following statement:
select single field1
from table1
into var1
where field2 = text.
This is a very simple statement that is working for me almost always correct. However there is a situation where the system is not able to find the record in my table. If text is equal to JAN##2011 the system won't deliver a result even if I have an entry in table1 with exactly this value.
TABLE1
field1 field2
rome JAN##2011
paris JAN2011
only if text is JAN2011 the select will find a result.
all fields are defined as CHAR.
Thanks in advancedHi Alberto,
probably ## is not ## :-).
is the visible representation used by ABAP to show any non-displayable characters as control characters like TAB, CR, LF, FF and the like.
In debugger you can switch to HEX display of values, if you see something like 0A0D you can find this using CL_ABAP_CHAR_UTILITIES constant attributes.
Regards
Clemens -
Regarding the run time analysis
Hi All,
To check the performance of the program, we will go to Run time analysis, in the utilities. In the analyes part consist of graphical representation of the ABAP, DATABASE and System.
My Question is 'When we give small range of values in the Selection screen then the database hit is less, but when we give large range of values then database hit is more'.
So how to analyse the program performance in the scenario?
Please reply,
Thanks,
Rohit.that is exactly the point:
Check SQL Trace first,
SQL trace:
/people/siegfried.boes/blog/2007/09/05/the-sql-trace-st05-150-quick-and-easy
with small selection and large selection. You can compare the Summary by SQL statements, so problems will appear in both cases.
The table connected to the SELECTION-SCREEN will return different amounts of data, these you should write down.
Then run for both example
SE30
/people/siegfried.boes/blog/2007/11/13/the-abap-runtime-trace-se30--quick-and-easy
Assume that the amounts of data are 10 and 100 values, then your program should need not more than N*logN nearly 20 times longer for the larger example.
This should hold for the total time, but also for all individual lines in the SE30.
The program
Z_SE30_COMPARE
/people/siegfried.boes/blog/2008/01/15/a-tool-to-compare-runtime-measurements-zse30compare
compares 2 SE30 traces.
And
Nonlinearity Check
/people/siegfried.boes/blog/2008/01/24/nonlinearity-check-using-the-zse30compare
explains how you find programming bugs.
Siegfried -
Graphical Representation in Abap
Hi Abappers,
How to show Graphical Representation in Abap.If is possible plz send by showing examples.
Regards,
vani.Hi,
The following FM's are used to create graphs in SAP...
You can execute them and check the paramters to be passed
BUSG SAP Business Graphics
GRAPH_2D Calling up the 2D business graphics
GRAPH_2D_MENUE DO NOT USE (use 'GRAPH_2D' and 'GRAPH_BUSG_MENU_SET')
GRAPH_3D Calling up the 3D presentation graphics
GRAPH_BUSG_COLOR_SET Definition of color pallets for business graphics
GRAPH_BUSG_MENU_SET Pushbutton menu (tool bar) for all BUSG modules
GRAPH_MATRIX Calling up SAP Business Graphics (2D, 3D and 4D)
GRAPH_MATRIX_2D Calling up the 2D graphics (user-friendly version)
GRAPH_MATRIX_3D Structure of 3D graphics (user-friendly version)
GRAPH_MATRIX_4D Calling up a 3D graphic (4th dimension stacked representation)
Regards
Sk -
Is it possible to create an ABAP class that inherits from a business object in the BOR ?
If it isn't possible, is there a way to create a business object instance in an ABAP program ?
Thank you,
Elad.Hi,
You can have a look at the TRXN SE24 -> class browser. Here you will find all the Classes related to all the application components....
I think you can instantiate these classes and use...
Hope it helps...
Lokesh
Pls. reward appropriate points -
Hi All,
I like to know, is it NULL and Space value is same in ABAP, if it is not how to check null value.
Thank you.
Senthileverything is correct though some answers are not correct.
A Database NULL value represents a field that has never been stored to database - this saving space, potentially.
Usually all SAP tables are stored with all fields, empty fields are stored with their initial value.
But: If a new table append is created and the newly-added fields do not have the 'initial value' marked in table definition, Oracle will just set NULL values for them.
as mentioned: There is no NULL value to be stored in an ABAP field. The IS NULL comparison is valid only for WHERE clause in SELECT statement. WHERE field = space is different from WHERE field IS NULL. That's why you should check for both specially for appended table fields.
If a record is selected (fulfilling another WHERE condition) into an internal table or work area, NULL values are convertted to their initial values anyway.
Hope that sheds some light on the subject!
regards,
Clemens -
Why the cast error generates only in Widening cast?
Hi Shyam,
WELCOME TO SDN!!!
Please check this link
http://abapprogramming.blogspot.com/2007/10/oops-abap-8.html
The widening cast in this case does not cause an error because the reference airplane actually points to an instance in the subclass lcl_cargo_airplane. The dynamic type is therefore u2018REF TO lcl_cargo_airplaneu2019.
Here the widening cast produces the MOVE_CAST_ERROR runtime error that can be caught with u201CCATCH ... ENDCATCHu201D, because the airplane reference does not point to an instance in the subclass lcl_cargo_airplane, but to a u201Cgeneral airplane objectu201D. Its dynamic type is therefore u2018REF TO lcl_airplaneu2019 and does not correspond to the reference type cargo_airplane.
The widening cast logically represents the opposite of the narrowing cast. The widening cast cannot be checked statically, only at runtime. The Cast Operator u201C?=u201D (or the equivalent u201CMOVE ... ?TO u2026u201D) must be used to make this visible.
With this kind of cast, a check is carried out at runtime to ensure that the current content of the source variable corresponds to the type requirements of the target variables. In this case therefore, it checks that the dynamic type of the source reference airplane is compatible with the static type of the target reference cargo_airplane. If it is, the assignment is carried out. Otherwise the catchable runtime error u201CMOVE_CAST_ERRORu201D occurs, and the original value of the target variable remains the same.
Best regards,
raam -
SSO from non-SAP J2EE to NW04 ABAP WebService
Hello,
I currently have issues establishing SSO from a J2EE (which is NOT a NetWeaver system) server to a WebService that resides on a AS ABAP 6.40. When I look over the options I see no obvious SSO solution. I cannot be the only one in this situation. Which solution have you managed to implement.
I must stress that username/password is not a solution.
Withouth really understanding the different scenarios, I would prefer to make som sort of trust relation. And then just let the calling application supply the username in a header variable
Best regards,
Thomas Mouritsen>
Thomas Mouritsen wrote:
> Hello,
>
> I currently have issues establishing SSO from a J2EE (which is NOT a NetWeaver system) server to a WebService that resides on a AS ABAP 6.40. When I look over the options I see no obvious SSO solution. I cannot be the only one in this situation. Which solution have you managed to implement.
>
> I must stress that username/password is not a solution.
>
> Withouth really understanding the different scenarios, I would prefer to make som sort of trust relation. And then just let the calling application supply the username in a header variable
>
> Best regards,
> Thomas Mouritsen
Well, the best solution would be using message-based authentication (WS-Security) - either "X.509 Token" (digitally signed message) or "SAML (1.1) Token". Unfortenately you are using an older ABAP system where this feature is not available.
Especially regarding Web Services it is definetly worth to consider upgrading to NWAS 7.0 Enhancement Pack 1 (or at least: NWAS 7.0 with SP14 or higher).
But it also depends on the capabilities of "your" J2EE server. Does it support WS-Security and SAML Tokens? Can it servce as SAML Source Site?
Transport-level security (e.g. SSL with X.509 client certificates) will not help in your scenario (system-to-system calls). It would only be an option if the WS Consumer is an User Agent (-> SSL client represents a single user); only then X.509 client certificates can be used for SSO.
Best regards, Wolfgang -
Modification of ABAP Web DynPro iViews delivered via Business Packages
Hello Everyone,
If this has been answered before, I apologize.
Is there any 'supported' way ( or 'unsupported' ) to modify the out of the box ABAP WebDynPro iViews which are delivered via some of the new Business Packages for ECC 6.0?
For example, I want to hide some fields on the 'Create Order' iView delivered in the Business Package for Internal Sale Representative..
ThanksThese Business Packages are just iView definitions that point to normal Web Dynpro ABAP components/applications that reside on the backend ABAP system. They can be enhnaced like any other WDA application.
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/6b/edc21e5e1e4a33a492b8955afffac7/frameset.htm
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/47/b170d256293c5ce10000000a421937/frameset.htm
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/94/9cdc40132a8531e10000000a1550b0/frameset.htm
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/c5/f4b9422e0fb911e10000000a1550b0/frameset.htm
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/9f/95467bbefc4a808fffeba4c5177258/frameset.htm -
What is the difference between ABAP Clients represented by 000, 001, 100...etc? What do they share? Are the objects as in classes, tables, interface client dependent or independent (or we can specify this during creation)?
Regards,
Arpit
Edited by: Arpit Goyal on May 12, 2009 1:58 PMhai,
A client is a indipendent business entity in the SAP system,which represents and organization or a company
A client is a field in the database
CLIENTS with field u2018mandtu2019 are called client specific
CLIENTS without field u2018mandtu2019 are called cross client customizing
A client is data seperator
SAP Provides 3 default clients 000 001 066
000 is called a template,
other clients are defined by copying client 000
to define the client roles for an organization like cust client, test client, sand client, qty client prd client we shoudl define our own clients.
SAP provides the client mechanism for the company or orgaization to maintain uniquenes in the sysem
afzal -
Error when creating a new ABAP project
Hello ADT Gurus,
I'm trying to start using Eclipse for ABAP development. However after successful installation of ADT into Eclipse I'm still not able to create an ABAP project.
When I want to create ABAP project I always receive following error message:
An error has occurred. See error log for more details.
No enum constant com.sap.adt.destinations.model.internal.ISystemConfigurationInternal.OriginType.NUL
Does anyone have an idea, solution, suggestion....advice?
Thank you in advance.
My environment:
Windows 7 Enterprise 64bit
Eclipse Kepler 4.3.2
ADT 2.28.5
SAP GUI 7.30
SAP NetWeaver 7.31 SP8
Regards
MartinHi Uwe,
thanks for your advice.
That's exactely how I proceeded today and at the end found a reason of my error.... yey
There were invalid parameters in section [Origin] of my saplogon.ini file.
See attached screenshot.
According to OSS note 99435 - 'NUL' is not an allowed value.
Those items don't refer to a SAP systems, they represents only kind of a "separator" between landscapes with a description.
My problem was solved by changing those values to 'USEREDIT' .
Anyway...native SAP logon worked w/o problems even with these invalid entries in saplogon.ini.
Regards
Martin -
NW 7.3 + iView from remote source wizard + R3 Web Dynpro ABAP, not working
Hi,
I think this forum is my last resort.
I'm running NetWeaver 7.3 Enterprise Portal and also have an existing ECC6 on backend.
Our ABAP Programmer has built some WD4A application on ECC, I'd like to made them available
on EP as ABAP WebDynpro iView.
From the document, I know the way to create ABAP WD iView is different since 7.3. I have to use "iView from remote source" to do it.
On EP side, I have made an system alias (test ok) for ECC, assigned permission, provide mapping id/pwd, and test.
On ABAP side, all webdynpro app are activated (T-code sicf, /sap/bc/webdynpro, /sap/public/bc/webdynpro...). I can even test WAS by bringing up browser and access some sample ABAP webdynpro .
However, I cannot success on "iView from remote source" wizard and it always show me "Nothing found. Check your search Criteria.". Eventhough I use "*" as search criteria.
Anyone has the similar situation ? I even doubt that it is a placeholder of a feature , not working for now. Anyone made it work on NW 7.3 ?
More detail:
My System Alias for ECC:
Application Host: myr3.mydomain.com
SAP Client: 600
SAP System ID: DEV
SAP System Number: 00
Server Port: <leave it blank>
System Type: SAP_R3
Logon Method: UIDPW
User Mapping Type: admin,user
ICM Host: myr3.mydomain.com:8000
ICM Protocol: http
ICM URL prefix: <leave it blank>
SAP Netweaver AS Description: <leave it blank>
All other fileds are leave it as default value
I also assign a group to have "read" and "user" permission to this system
Also assign Alias to the system.
I also create a user belong to the group, assign his system mapping an ECC user ID & PWD to it.
I tested the System alias, it is working (both WEB AS test, and R3 test)
Then I try to create an iView on EP, under a PCD folder , new->iview->iview from remote source. A wizard show up. Then I can select the ECC alias just created, and provide * as application search criteria, and then select "WEB DYNPRO ABAP" as the application type. Then "GO"
as I mentioned, it always show "Nothing Found. Check your search crieteria"
But I'm sure the web dynpro applications are activated on R3.
OK, that's it, please help this one. Thanks
IF YOU DID MAKE IT WORK ON YOUR NW 7.3, PLEASE DROP A LINE HERE SO I KNOW IT IS MY OWN PROBLEM !!!
Edited by: Wilson KU on Nov 14, 2011 10:42 AM
Edited by: Wilson KU on Nov 14, 2011 10:46 AMThanks for the reply,
[About Backend]
I feel confident about the backend R3 system because I can use the WAS URL to access the sample WD4A application, for example, I can bring up the wd4a application ui in my browser. It is purely browser and R3 stuff, no EP involved.
http://soeprdev.mydomain.com:8000/sap/bc/webdynpro/bobf/demo_sales_order?sap-client=600&sap-language=ZF
I also already activate all nodes and sub-nodes (in SICF Services) under /sap/bc/webdynpro as well as /sap/public/bc/webdynpro. (and some other nodes to make icon and include work)
[About the system object in EP]
I have done all kind of test on the system object (alias):
1. In EP System Administration -> Landscape Configuration, I select the system object, click "Test Connection", It shows me a Check mark, and the detail message is SOE_DEV_600 connection
2. Edit the System object, then click on "Connection Tests" page, I see two lines there, check both and click test, here is the result:
SAP Web AS Connection:
: Test Details:
The test consists of the following steps:
1. Check the validity of the system ID in the system object
2. Check if the system can be retrieved
3. Check if the system object has a valid system alias
4. Check if an SAP system is defined in the system object
5. Validate the following parameters: Web AS protocol; Web AS hostname
6. Checks if the host name of the server can be resolved.
7. Pings the Web AS Ping service (works only if the service is activated on the Web AS, and only on ABAP Web AS)
8. Check HTTP/S connectivity to the defined back-end application
Results
1. The system ID is valid
2. System retrieved successfully
3. Retrieval of the default alias was successful
4. The system object represents an SAP system
5. The following parameters are valid: ICM Protocol (http) ICM Host Name (soeprdev.mydomain.com:8000)
6. The host name (soeprdev.mydomain.com) was resolved successfully
7. The Web AS ping service http://soeprdev.mydomain.com:8000/sap/bc/ping was pinged successfully
8. An HTTP/S connection to http://soeprdev.mydomain.com:8000 was obtained successfully.
Connection Test for Connectors:
: Test Details:
The test consists of the following steps:
1. Retrieve the default alias of the system
2. Check the connection to the back-end application using the connector defined in this system object
Results
Default alias retrieved successfully
Connection successful -
XSD Data Type to ABAP Proxy Tech. Type
I am working with an ABAP development team who is creating PROXYs from the Service Interfaces I have setup in the ESR (PI 7.11). I have been asked to set the type of a numeric field by the ABAP developer as this:
"Yeah we can convert from string to currency but sap internally stores currency with 3 decimals so we may got to do some multiplications and divisions based on how many decimals sender passes. If you could create a numeric with 3 decimals that is ideal."
The XSD type as xsd:decimal, but in the proxy it seems to create Tech. Type = STRING.
I can apply formatting rules in the message mapping, but developer is convinced that the Service Interface can have the correct ABAP Tech. Type. I do not find any messages in this forum, so not sure what to do.
Thank you for your time.Internal ABAP types like packed or float cannot be created by ABAP proxy.
I recommend to use String for any type. Inside XML you will have a String representation anyway, but you will encounter less issues in converting from XML to ABAP internal types.
I work a lot with currency fields, it is no problem at all. Inside ABAP you mave currency field to string field, the decimals are correct.
If course, in mapping you have to create a decimal field, but this would not be any change, if you had a decimal type in ABAP.
Maybe you are looking for
-
Need PW Reset self service in Webshop (SAP E-COMMERCE 5.0)
Our web shop users need to be able to reset the their web shop passwords online: Lost password steps: 1. Request new password to be sent 2. Temporary password is sent to email address on file 3. User clicks on activation link, and is promoted to rese
-
Recent Safari 1.3.2 Problems
On one of my Mac's, I am still running Mac OX 10.3.9 and, consequently, have Safari 1.3.2. Recently (in the last 3-4 months) I have been starting to see some problems. Most notably, Google Maps no longer works and trying it results in Safari crashing
-
How to read from untrusted https connection?
i try to read the content of a https URL but when calling httpsurl.getContent() or con.getInputStream() i get the following exception: javax.net.ssl.SSLException: untrusted server cert chain at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA
-
how can i start face time on my i phohne 4s which i bought from uk and i am living in india
-
Hi In a process order for a FG, for a component (reqd qty is 100), I want to withdraw 50 from one batch A & 50 from Batch "B". Is it possible to withdraw from multiple batches, if yes how to do? Valuable answers will be rewarded. Thanks & Rgds Kart