How to use SET BIT and GET BIT in ABAP Programming
Hi,
Our team is currently working for an Upgrade project which is using a tool automatically upgrades when we supplly the code. fine, But now the requirement is , we need to write different test cases for the available key words in ABAP. Now we r looking for the usage of " BIT ", keyword. so , kindly provide any program or code using this key word.
Please find the description Provided and give some relative ABAP code to satisfy the given description.
The data object byte_string must be byte-type. The statement reads the bit at the bit position BITPOS of the variable byte_string and assigns its value to the variable val. A default mode can be specified if required *
Thanks & Regards,
P.N.Kumar.
What on earth are you testing? That ABAP still works? I think SAP might have run that through rigourous testing themselves.
If you want sample code, why not read the ABAP help, and work some out for yourself?
matt
Similar Messages
-
How to use Hide Tech. and Get cursor field
Hai Experts,
Can any one tell me about
how and when we use hide tech. and get cursor stmt in interactive report.
In my reqirement , i want to display PO header details like PO docno, Vendor No, and so on. when i am double clicking the EBELN , it will display the item details of the particular document number which i am clicked in the basic list.
if i am double click the vendor number, it will show the vendor details.
how can i get this?
Thanks in advance for ur reply.
Regards,
MsivasamyThanks for ur reply.
I got the output in this way.
*& Report SAPMZMMPO
REPORT SAPMZMMPO no standard page heading.
tables: ekko.
DATA: f(40) TYPE c, off TYPE i, lin TYPE i, val(10) TYPE c, len TYPE i.
data: begin of iekko occurs 0,
bukrs like ekko-bukrs,
bsart like ekko-bsart,
ekorg like ekko-ekorg,
ekgrp like ekko-ekgrp,
ebeln like ekko-ebeln,
lifnr like ekko-lifnr,
bedat like ekko-bedat,
end of iekko.
data: begin of iekpo occurs 0,
ebeln like ekko-ebeln,
ebelp like ekpo-ebelp,
matnr like ekpo-matnr,
menge like ekpo-menge,
meins like ekpo-meins,
netpr like ekpo-netpr,
matkl like ekpo-matkl,
werks like ekpo-werks,
lgort like ekpo-lgort,
eeind like rm06e-eeind,
end of iekpo.
data: begin of ilfa1 occurs 0,
lifnr like lfa1-lifnr,
name1 like lfa1-name1,
stras like lfa1-stras,
ort01 like lfa1-ort01,
end of ilfa1.
*parameters: p_ebeln like ekko-ebeln default '4500006130'.
select-options: s_ebeln for ekko-ebeln DEFAULT '4500006130' TO '4500006135'
OPTION bt SIGN i.
*start-of-selection.
start-of-selection.
select bukrs bsart ekorg ekgrp ebeln lifnr bedat
from ekko into corresponding fields of table iekko
where ebeln in s_ebeln.
loop at iekko.
write:/ iekko-ebeln HOTSPOT COLOR 5 INVERSE ON,
iekko-lifnr HOTSPOT COLOR 3 INVERSE ON ,
iekko-bukrs,iekko-bsart,iekko-ekorg,iekko-ekgrp.
hide: iekko-ebeln,iekko-lifnr.
endloop.
iekko-lifnr,iekko-ebeln.
at line-selection.
GET CURSOR FIELD f VALUE val .
WRITE: / 'Field: ', f,
/ 'Offset:', off,
/ 'Line: ', lin,
/ 'Value: ', (10) val,
/ 'Length:', len.
case sy-lsind.
when 1.
*if val = iekko-ebeln.
if f = 'IEKKO-EBELN'.
select ebeln ebelp menge meins lgort werks
matnr matkl netpr from ekpo
into corresponding fields of table iekpo
where ebeln = iekko-ebeln.
for all entries in iekko where ebeln = iekko-ebeln.
loop at iekpo.
write:/ iekpo-ebelp,iekpo-matnr,iekpo-menge,iekpo-meins,
iekpo-werks,iekpo-lgort,iekpo-matkl,iekpo-netpr.
endloop.
endif.
*if val = iekko-lifnr.
if f = 'IEKKO-LIFNR'.
select lifnr name1 stras ort01 from lfa1
into corresponding fields of table ilfa1
where lifnr = iekko-lifnr.
loop at ilfa1.
write:/ ilfa1-lifnr,ilfa1-name1,ilfa1-stras,ilfa1-ort01.
endloop.
endif.
when others.
leave screen.
endcase. -
How to use where clause with get statement in LDB programs
Hi All,
I am using logical databse in my report program.I am not getting how to use the where clause in the get statement is it possible to use?or if not possible only option is we should filter it after get statment is right?Can you please some body throw some idea on this?
Regards
MaheshHi,
Reffer these links
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9bfa35c111d1829f0000e829fbfe/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c6/8a15381b80436ce10000009b38f8cf/frameset.htm
/people/srivijaya.gutala/blog/2007/03/05/why-not-logical-databases
reward if helpful
Thanks,
Suma. -
How to use 'is null' in select statement of ABAP program
hi,
I want to use 'is nul' or 'not null' in select statement of my ABAP program for any field. I have written below query but I am getting sy-subrc = 4 and getting no data.
SELECT * FROM mara INTO TABLE it_mara
WHERE volum IS NULL .
Can anyone resolve this.Hi PKB,
Check the below thread for NULL and Space value in ABAP . It will help you
NULL and Space value in ABAP
Regards,
Pawan -
How to use the forums and get (helpful) help!
Please, I beg you, read the Javadoc on the class you are asking about:
http://java.sun.com/j2se/1.4/docs/api/index.html
Have you looked for an answer in Suns training documentation, tutorials and Java specification?
http://developer.java.sun.com/developer/infodocs/
Post your code so that it is readable:
http://forum.java.sun.com/faq.jsp#messageformat
Of course, is everyone followed these rules (including me) these forums would probably be a very lonely place ;)You either use single quotes in the SQL string, or (my preferred method) use a Prepared Statement
String sql = "select count(cc.id) from customers c, creditcards cc where c.cc_id = '" + ccID+ "' ";
// or better IMO
sql = "select count(cc.id) from customers c, creditcards cc where c.cc_id = ?");
PreparedStatement pstmt = con.prepareStatement(sql);
sql.setString(1, ccID);The prepared statement protects you agains SQL injection attacks, and any values that would need escaping in SQL. What would happen if someone entered a single quote in the ccID field? -
I just purchased logitech z906 surround sound 5.1 speakers and also have the new imac 27 inch fully loaded.
My only concern prior to receiving my speakers, will I be able to hook it up with my computer? Do i need any extra external HDMI cables or what not?
Sorry, Im not tech savvy so please adivse in lay english, and non-technical wording.
I will appreciate everyone's input and also will take any brand name suggestions as to if I will need to buy any other supplies to truly enjoy these speakers.
Thanks everyone.Hi there
If you have a 2010 + MacBook Pro, then you will be able to play audio/video via the MiniDisplay Port to HDMI. You can purchase an adapter from here, or a 3rd party adapter from here.
Taylor -
I have CC and everytime i do a update or install a program i get a 32 bit and 64 bit version which is using up all my space on my harddrive. i have 2 versions of everything
mrhtaylor
If you are on windows computer, navigate to Control panel > Programs and features.
Then Locate the Adobe products and right click on it, then choose uninstall.
In the uninstaller window you may uncheck 64 bit and uninstall only 32 bit, may also do wise versa. -
How to use SET and GET parameter commands ?
Explain these two giving an example?As which is used for what?
Hi Albert,
SAP allows you to make use of SPA/GPA technique to fill the input fields of a called transaction with data from the calling program.SPA/GPA parameters are values that the system stores in the global, user-specific SAP memory. SAP memory allows you to pass values between programs. A user can access the values stored in the SAP memory during one terminal session for all parallel sessions. Each SPA/GPA parameter is identified by a 20-character code. You can maintain them in the Repository Browser in the ABAP Workbench. The values in SPA/GPA parameters are user-specific.
ABAP programs can access the parameters using the SET PARAMETER and GET PARAMETER statements.
To fill one, use:
SET PARAMETER ID <pid> FIELD <f>.
This statement saves the contents of field <f> under the ID <pid> in the SAP memory. The code <pid> can be up to 20 characters long. If there was already a value stored under <pid>, this statement overwrites it. If the ID <pid> does not exist, double-click <pid> in the ABAP Editor to create a new parameter object.
To read an SPA/GPA parameter, use:
GET PARAMETER ID <pid> FIELD <f>.
This statement fills the value stored under the ID <pid> into the variable <f>. If the system does not find a value for <pid> in the SAP memory, it sets SY-SUBRC to 4, otherwise to 0.
To fill the initial screen of a program using SPA/GPA parameters, you normally only need the SET PARAMETER statement.
The relevant fields must each be linked to an SPA/GPA parameter.
On a selection screen, you link fields to parameters using the MEMORY ID addition in the PARAMETERS or SELECT-OPTIONS statement. If you specify an SPA/GPA parameter ID when you declare a parameter or selection option, the corresponding input field is linked to that input field.
On a screen, you link fields to parameters in the Screen Painter. When you define the field attributes of an input field, you can enter the name of an SPA/GPA parameter in the Parameter ID field in the screen attributes. The SET parameter and GET parameter checkboxes allow you to specify whether the field should be filled from the corresponding SPA/GPA parameter in the PBO event, and whether the SPA/GPA parameter should be filled with the value from the screen in the PAI event.
When an input field is linked to an SPA/GPA parameter, it is initialized with the current value of the parameter each time the screen is displayed. This is the reason why fields on screens in the R/3 System often already contain values when you call them more than once.
When you call programs, you can use SPA/GPA parameters with no additional programming overhead if, for example, you need to fill obligatory fields on the initial screen of the called program. The system simply transfers the values from the parameters into the input fields of the called program.
However, you can control the contents of the parameters from your program by using the SET PARAMETER statement before the actual program call. This technique is particularly useful if you want to skip the initial screen of the called program and that screen contains obligatory fields.
If you want to set SPA/GPA parameters before a program call, you need to know which parameters are linked to which fields on the initial screen. A simple way of doing this is to start the program that you want to call, place the cursor on the input fields, and choose F1 followed by Technical info. The Parameter ID field contains the name of the corresponding SPA/GPA parameter. Alternatively, you can look at the screen definition in the Screen Painter.
The SPA/GPA parameter for the input field Company has the ID CAR. Use this method to find the IDs CON, DAY, and BOK for the other input fields.
The following executable program is connected to the logical database F1S and calls an update transaction:
REPORT BOOKINGS NO STANDARD PAGE HEADING.
TABLES SBOOK.
START-OF-SELECTION.
WRITE: 'Select a booking',
SKIP.
GET SBOOK.
WRITE: SBOOK-CARRID, SBOOK-CONNID,
SBOOK-FLDATE, SBOOK-BOOKID.
HIDE: SBOOK-CARRID, SBOOK-CONNID,
SBOOK-FLDATE, SBOOK-BOOKID.
AT LINE-SELECTION.
SET PARAMETER ID: 'CAR' FIELD SBOOK-CARRID,
'CON' FIELD SBOOK-CONNID,
'DAY' FIELD SBOOK-FLDATE,
'BOK' FIELD SBOOK-BOOKID.
CALL TRANSACTION 'BOOK'.
The basic list of the program shows fields from the database table SBOOK according to the user entries on the selection screen. These data are also stored in the HIDE areas of each line.
Cheers
Nishanth -
Network stream using 64-bit and 32-bit VIs on same computer
I have a project where I'm forced to use a VI written in 32-bit LV2012 (because I need mathscript, which isn't supported in 64-bit) to communicate via network streams with a VI written in 64-bit LV2012 (they only version I can use an externally written 64-bit toolkit for my camera communication) on the same PC.
I need a network stream target to run on the 32-bit VI, and a host to run on 64-bit VI.
It kept not working, and finally I checked using the example host.vi and target.vi, and discovered if I open both in either 32-bit or 64-bit, they work, but if I open one in 32-bit and the other in 64-bit it won't connect, giving error -314100 (specified endpoint doesn't exist).
So question: is there any inherent reason this happens, since both 64-bit and 32-bit should support Network Streams? My first obvious alternative would be rewriting the mathscript code in native LV so i can all be on 64-bit VI's, but it's quite big (based on old, proven Matlab script) and that would be a significant effort I don't have time for now.
The reason I'm using net streams is that I also get data from 2x other networked PC's at the same time. Is there an alternative to network streams that can communicate data over a network in real(ish)-time?
Cheers
DanI just tested this and was able to get it to work. Were you running both reader and writer applications on the same computer? If so, I suspect you might be running into context naming issues with multiple application instances running on the same computer. See this link for more info how to specify a context in the URL. I suspect you might find it easier to create your own test VI for this rather than modify the shipping examples.
-
How to load both 32 bit and 64 bit version of addon on same machine
Hi,
When deploying an addon using SAP Business One Extension Manager, how can we install both 32 bit and 64 bit version of the addon for same machine?
If the OS is 64 bit, SAP allows to install and use both 32 bit SBO client and 64 bit SBO client. I want that when the 32 bit SBO client is used, my 32 bit addon should get loaded, and when 64 bit client is used, my 64 bit addon should get loaded.
But the SBO Extension Manager loads the addon for a given company; there seems to be no option to specify different addon files for 32 bit and 64 bit.
Is there a way?
Thanks.Hi Rajesh,
There might be the problem while creating the add-on.
It is the system behavior that once you login to 32 bit SAP Client, you can use only 32 bit Add-on. Means 32 bit add-on will be loaded automatically.
Same is in the case of 64 Bit.
What you have to do is:
If OS is 64 Bit and you have installed both 32 and 64 Bit SAP Client then once open 32 bit client and install only 32 bit add-on
Then open 64 Bit SAP Client and install only 64 bit add-on.
By doing this you will be able to use 32 bit add-on on 32 bit SAP Client and vice versa.
Hope it helps.
Thanks & Regards
Ankit Chauhan -
How to use SET & GET Parameters in Module Pool
Hi Friends,
Can anyone please tell how to use SET / GET parameters and PARAMETER ID for a text box (Input / Output field ) in module pool? What is the purpose and where do we need to do coding for it?
Note : I will definitely give the marks for good responses.
Thanks in advance,
PradeepHi Pradeep,
You can save values in the SAP memory using a parameter ID. These
are user and terminal-session specific, but available to all internal and
external sessions.
SET Parameter copies the corresponding field contents into the SAP
System memory in the PAI processing block.
GET Parameter copies the corresponding field contents from the SAP
memory at the end of the PBO processing block, after data has been
transferred from the program, if the screen field still has its initial value
You can link an input/output field to an area of the SAP memory in the
ABAP Dictionary.
When you use an input/output field that is defined in the ABAP
Dictionary, its parameter ID is displayed in the Dictionary attribute
Parameter ID in the Screen Painter.
Usage
SET PARAMETER ID: CAR FIELD space,
CON FIELD space,
DAY FIELD space.
Here is the link that explains the usage of GET/SET in detail
<a href="http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db9e0435c111d1829f0000e829fbfe/content.htm">http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db9e0435c111d1829f0000e829fbfe/content.htm</a>
Regards,
Sharadha -
Lenovo advertises this title:
When is it possible to switch between 32 bit and 64 bit versions of Microsoft Operating Systems by using recovery media?
In this page:
http://www-307.ibm.com/pc/support/site.wss/MIGR-74752.html
BUT
Doesn’t give any info that how??? I
How do I contact a Lenovo Support Centre to place an order. Link brings you to contact numbers for Lenovo and after I call them they say these numbers are for IBM and it is only for hardware support.
I am wondering got know how on earth they accept orders for this type of complex issue by phone???
Specially that I am dealing with so special situation and I need some e-mail address to describe it Lenovo and wait for the answer...
I appreciate it if somebody could help me with this...
Thanks in advance for your help guys...Awesome dude,
Thanks for well described reply. I enjoyed it specially when I found out you don't work for Lenovo.
I am curious to know something. I could buy Windows 7 Bit for a very good price form Microsoft offers for university students that it probably cost me the same price as recovery media. Do you think it is a good idea to install a totally fresh windows 7 (NOT from the recovery media) on my t400s?
I am asking this because when you install operation system with provided recovery Media it builds another partition
with this name SERVICEV003 that is about 2 Gb and contains system files and stuff related to my laptop. I am afraid if I install windows without using recovery media but using Microsoft original DVDs then my laptop doesn't function properly?
What is your idea about this issue,
Thanks again for all your help, I appreciate it,
Cheers,
Mehrad -
How to create a ARD for 64 Bit And 32 Bit Systems
Dear All,
Please help me to solve my problem. I am not able to create the ARD for both type systems (32 Bit and 64 Bit Bit). My system is OS Windows 7, 32 bit operating system. Sometimes my add-ons run successfully for 32 bit , sometimes for 64 bit. I am creating 2 ARD's for each add-on but I have failed.
I have read many threads but I got no success.
Please help me.
RegardsHi Pedro Magueija, Edy Simon,
Thanks for your reply. I follow below mentioned steps to create the ARD File. I build my add-on code as mentioned below:
Solution Configuration
Solution Platform
Project Properties/Compile/ Advanced Compile Option/ Target CPU
Add-on Registration Data Generator x64 Option
Debug
x86
x86
FALSE (Unchecked)
Debug
x86
x86
True (Checked)
I was able to create and use ARD by doing in above mentioned way. But sometimes these ARD doesn't work or doesn't get installled.
Regards -
Someone hacked my computer and set up a new administrative account by re-registering my computer. I can not access this account nor delete it. How can I fix this and get my computer back to the way it was? And also prevent this from being able to happen again. I have the link the kid used (http://www.ihackintosh.com/2009/05/how-to-hack-the-user-password-in-mac-os-x-wit hout-an-os-x-cd/) Apparently he used hack 2. HELP PLEASE!
Not sure why you can't delete that account. If you have admin privileges, you should be able to. Sounds like you only removed the Home Folder for that account.
You should highlight/select the account you want to remove and then click the minus button. Might need to unlock the padlock with your admin password.
Have a look at these articles from Apple, if necessary.
http://docs.info.apple.com/article.html?path=Mac/10.5/en/8235.html
http://docs.info.apple.com/article.html?path=Mac/10.5/en/8162.html
http://support.apple.com/kb/DL1399 -
How do I swap 64-bit and 32-bit floats from little-endian to big-ending
I am trying to read a file that could contain a list of 64-bit floats or 32-bit floats that were written on a PC so they are little-endian.
I need to convert the float values to big-endian so that I can process the values. I know that straight swapping each byte with the adjacent byte doesn't work (especially since their floating point values). I've tried swapping them end for end (i.e., byte 15 from the file becomes byte 0 in my array) and that didn't work either.
I know that if I were to read the little-endian float into the big-endian float type (float or double) that the format is pretty much lost (from little I understand about how floating point values are stored in memory).
So, what I need is a way to read in a series of little-endian floating point values (64-bit and 32-bit) into a big-endian array of floating point values.
Anyone have any ideas on how to do this? Any help would be much appreciated.A 64-bit double is represented by the sign bit, an 11-bit (biased) exponent
followed by a 52-bit mantissa. Both x86 and SPARC use the exact same
representation for 64-bit double. The only difference is the endianness
when stored to memory, as you observed.
A 32-bit float is represented by the sign bit, an 8-bit (biased) exponent
followed by a 23-bit mantissa. Again, both x86 and SPARC use the exact
same representation for 32-bit float modulo endianness.
As you can see, a 64-bit double is not merely a pair of 32-bit float.
You need to know exactly how the floating-point data was written:
if a 32-bit float was written, you must endian-swap it as a 32-bit float;
if a 64-bit double was written, you must endian-swap it as a 64-bit double.
Maybe you are looking for
-
Computer Shuts down when trying to update to v4.2
Hi Internet, I am trying to update my firmware from version 4.1 to 4.2 and as I click the update button, my computer just shuts down and does not update. It's like the update button is acting as the shutdown button from the start menu. Is anybody els
-
Why does my Laserjet 2055dn only print the first page of a print job?
In our domain, we have a number of 2055dn printers that act up on intermittent bases. At times, they function properly, but other times they will only print the first page of a print job. Our domain has only HP printers so there should be no confli
-
Dear All, Adobe is repeatedly asking for sign in for Photoshop, Illustrator, Acrobat Pro, etc., etc. I recently installed another cloud service on my computer because I cannot trust Adobe Cloud storage for file transfer. Could the addition of the n
-
Can't print Canon LBP3050 with Airport Express
I'm using a MBP 13" and printing with a Canon LBP 3050. When directly plugging the USB into my MBP, the printing works totally fine. I'm using the CAPT v3.40 driver and it supports the printer. When I plug the USB into the Airport Express, it recogni
-
Help to edit itune 10.5.2.11 artwok in vista
Hi I am running vista 32bit and itune 10.5.2.11. I have a collection of audio CDs which I have transferred to itune (WAVencoder). whilst the CD was in ( using advance tab, I asked for "get track names & get artwork". I have got most of the track a