Common Questions and Answers
about ABAP/4 and Developments
1. What is the difference between external & internal subroutine? 2. Why do we use ALV? 3. Why do we use GET CURSOR and what is it? 4. Both the events AT SELECTION-SCREEN and AT USER-COMMAND
are processed after user input.
Sudeshna Answer 1:
2) ALV gives many advantages than a list like sorting summing getting graphics like that stuff 3) While generating a interactive report we will use get cursor..use is to get the value of the fiel under the cursor.. 4) At selection screen is used to validate the fields in a selection screen...and at user command is used to modify the screen in a selection screen and in genarating secondary lists.. Sarath Reddy Answer 2:
2. SAP LIST VIEWER is ALV . its main advantage is by using ALV technique we can find totals ,subtotals ,sort in any order etc there itself in the list output of course we need to write all those functionalities while using ALV...also many functional modules are defined under ALV concept... 3. GETCURSOR is used to trace the position of the cursor
in the list ..
4.AT SELECTION-SCREEN is used where you have a seperate selection screen using select-options or parameters where as AT USER-COMMAND is used where no selection screen exists....at.user-command is mainly used while setting pf-status which means creating our own menu with function codes etc... Shiva I had seen some of the standard abap that the table name had *, like *ekpo. What is the meaning? What is the difference between with * and without * ? It just lets you use the table a second time. For example: select single * from ekpo where ebeln = '12345' and ebelp = '1'. select single * from *ekpo where ebeln = '67890' and ebelp = '1'. You now have two separate records, one in ekpo and one in *ekpo. Another way to do this is to simply use the 'into' argument in the 'select' statement to read the second ekpo record into some other field. The '*' format can be confusing, I think it may be left over from earlier releases, like 2.2. EKPO is database table and *EKPO is internal table. Once you select into EKPO, you can use it the same way
as *EKPO.
How do I use variables in the FORMAT command? DATA COLORID TYPE I VALUE 4.
When using CALL 'SYSTEM' id 'COMMAND' field unix-command, how does one capture the results of the command? For example, if the unix-command were the date? You capture the results in the table e.g TABL, like this
REFRESH TABL.
I am working on a program that needs to show number of days between 2 dates. When I scanned the function library, I only found a function to give you the number of years between dates. I can probably code this in ABAP but does anyone know if a function exists to do this. I wrote this example for you. I think this is what you need. DATA: DATE_1 LIKE SY-DATUM,
DATE_1 = SY-DATUM.
Run this code and then you will understand.
How do I concatenate two strings in Abap/4? For all SAP Versions
For SAP Version 3.0 choose: CONCATENATE STRING1 STRING2 INTO STRING3. If you want a space between both fields: CONCATENATE STRING1 STRING2 INTO STRING3 SEPARATED BY ' '. For SAP Version 2.2 choose Functions: STRING_CONCATENATE for 2 Strings and
Has anyone been successful in suppressing the selection screen that is automatically displayed when using logical data bases. I want to run a job in the background using a logical database and I do not want the user prompted for the parameters. I want to pass the parameters in the program. Try using the SUBMIT rep USING SELECTION-SET 'variant'
WITH ....
I would like to know how to execute from ABAP code an external Unix program and check for a return code? There are different ways to this: (1) OPEN DATASET <file> FOR OUTPUT 'unix command'
(2) or try the following program but unfortunately the
command CALL SYSTEM is
REPORT ZUNIXCOM . DATA: U_COMMAND(200).
START-OF-SELECTION . MOVE 'unix command' to U_COMMAND .
More ABAP Q & A
Get help for your ABAP problems
ABAP Programming Books
ABAP Tips
Best regards,
All the site contents are Copyright © www.erpgreat.com
and the content authors. All rights reserved.
|