- 10 basic steps to create Enhancement Spot/ BADI
- How are RANGES different from SELECT-OPTIONS?
- How do I download data in my internal table in a CSV file?
- How can I get the IP address of the system programmatically?
- How can I download my internal table into an Excel file?
- How can I read an Excel file from presentation server?
- How can I convert numerals into the corresponding text?
- How can I solve dump due to insufficient memory (SELECT)?
- How can I access parameters to MACROS?
- How do I create a long text for a document?
- How do I display / add the Terms and Conditions to the business document?
- How to convert from one currency value to other?
- How do I send e-mail?
- How do I receive and process e-mail?
- How do I generate PDFs?
- How to calculate last date of the month?
- How to change the deadline of the workitem programmatically in SAP?
- How to convert a date to internal or external format?
- How to find BADI/Exit calls in any transaction?
- What is this new transaction 'n' all about?
- What does ABAP stand for?
- What does R/3 stands for?
- Where are the long texts of a document stored and how to access the same?
- Where does the ABAP program run?
- When selection-screen output will use?
It is actually a quickstart transaction for Standard business process. For example if you take Purchase order creation ME21 you have to go through different screens( header data, item data) where as in the new enjoy transaction ME21n it can be found in single screen itself. BDC's wont work in Enjoy Transactions, you have to use BAPI.
ABAP currently stands for Advanced Business Application Programming; however the original meaning was Allgemeiner Berichtsaufbereitungsp rozessor, which is German for "generic report preparation processor"
A different explanation is Anfänger Basteln An Programmen, which is german for "beginners tinker with programs"
It is a structured language like C.
R/3 stands for Real time data processing / 3 tier architecture (as against mainframe's 2 tier architecture).
The processing logic of an application program, written in ABAP, is processed by the ABAP Interpreter.
More information can be found here.
They are the same, except SELECT-OPTIONS will provide an interface
on the selection screen for the user to input data.
Use the functions modules CONVERT_DATE_TO_EXTERNAL or CONVERT_DATE_TO_INTERNAL
to convert the date. When converting to external format, the date format from the user's user profile will be used.
When converting to internal format, the result will be in YYYYMMDD format.
Use the Function Module SAP_CONVERT_TO_CSV_FORMAT to convert the internal table into Comma seperated format then download this
internal table using the Function Module GUI_DOWNLOAD.
See a sample program below:
You can use cl_gui_frontend_services to get the system IP address.
Use the function module SAP_CONVERT_TO_XLS_FORMAT to download the internal table to an excel file.
Or get much more control by creating an XML file
You can use the Function module ALSM_EXCEL_TO_INTERNAL_TABLE to read the Excel file into the internal table of type alsmex_tabline.
From this internal table you can fill the target internal table.
Use the Function Module SPELL_AMOUNT to convert the integer into text.
I am using a SELECT query on a database table. Since the number of records in the table is very large,
the program dumps due to insufficient memory. How can I solve this?
In this case you could use the PACKAGE SIZE addition in the SELECT query to process in limited amount of data,
thus avoiding the memory overloads.
SAPlink is an opensource community project that makes it easy to share ABAP developments between programmers.
It provides the ability to easily distribute and package custom objects.
The long texts of a document are stored in a encrypted format in the STXH and STXL tables, where STXH stores the header information of the
long text like TDOBJECT, which indicates which text object the long text belongs to, TDID which indicates the Text ID and TDNAME which is
the actual name of the long text.
As these texts are stored in a encrypted format, the text cannot be read using a SELECT statement. You will have to use the function READ_TEXT. The easiest way of getting to know the parameter values is to go to a document, open the long text in a full screen mode. For example, when you wan to see the long text for a Purchase order, go to transaction ME23n. Assume, you want to see the parameters for the Header Text. In the first Tab Strip Control, click on the Texts tab and select the Header Text node on the left hand side, which will display the text on the right hand side. Now, double click on the text editor on the right hand side. This will open the text in the full screen mode. In the menu Go To --> Header, you should be able to see the values for all the three parameters we discussed above. We will have to do the same thing for whichever text parameters we want to see.
Please refer to the important parameters that are discussed in the previous question of reading texts. We will need the same parameters for saving the text as well. The function modules that you can use for this will be SAVE_TEXT followed by COMMIT_TEXT. The parameters play a very important roles as you might not see the saved text in the standard transaction if you give wrong parameter values.
I would suggest that you create separate SMART Form for the Terms and conditions and call that right after the PO main smart form. It gives the flexibility in calling the same smart form for other documents also, as generally these are the same Terms and Conditions for all the documents that a company uses.
We can have the Terms and Conditions stored as long texts in SO10 (Standard Text, TDOBJECT - TEXT and TDID - ST and TEXTNAME - Whatever name you want to give). This way if you want to change the text, its easy to change and you can transport the changes using program RSTXTRAN.
We have a text element in the smart form, and the general attributes of the text change the type to "Include Text". This will change the screen and you should be able enter the parameter values of Object, ID and name.
This will automatically print the entire long text on the smart form, we just need to make sure that this is a part of the main window of the smart form as the text might run into multiple pages.
We can Use the Following Function Module to convert from one Currency vale to other
In following function module we need to pass Foreign currency, Local Currency type_rate:Type of rate M=Average rate G=Bank buying rate B=bank selling rate
We Get Exchange rate for that day, foreign factor, Local factor.
And Foreign currency can be calculated as below mentioned in IF ENDIF
There are several methods to accomplish this:
Sending E-Mail from ABAP - Version 610 and Higher - BCS Interface
Sending E-Mail from ABAP - Version 46D and Lower - API Interface
BCS interface in BSPs
Develop a Web Service that sends an Email - in ABAP, Netweaver 04S
Following code is used to changes the deadline of any work item which is in WAITING state. The FMs needs the input like the object type for which the workflow has executed, the workflow ID to which the workitem belongs and the Task id of the standard task which is executed and in waiting state.
When selection screen-screen output will use?
Mostly selection screen will use for Repoting purpose.We can give range of inputs or particulat input or single input by selection screen.
Mostly this problem arises since the months have variable end date and we need to know at runtime, whether last date is 31 or 30 or in case of Feb 28 or29!!
Here's what can be done:
This method is better:
Use the function module FIMA_DATE_CREATE
With the other Exporting Parameters you can get the date of other years or months.
For example: I_YEARS = 2 => Input_Years = 2005 Output_Years = 2007
I_MONTHS = '-3' => Input_Month = 07 Output_Month = 04
Sometimes it is not so easy to find a BADI method or user exit to implement at an exact momment of the execution of a program. Here is one of the ways that can be used to spot which BADI method or user exit should be implemented.
1. Enter SE24;
2. Enter the class name CL_EXITHANDLER;
3. Double-click the method GET_INSTANCE;
5. Set a break-point at command line CASE sy-subrc (near line 25);
6. Execute the transaction you want to analyse; It will stop at the break-point you have just set on class CL_EXITHANDLER when it finds any BADI method/Exit call.
7. On debug screen, type the field name exit_name. This field contains the BADI method/Exit name which is being called in the program on that momment.
8. Press F8 to see the next calls.
1. Go to se18.
2. Enter the name enhancement spot and click create.
3. On next screen click on create new BADI.
4. Once the BADI is created then expand the tree on the left side.
5. Then double click on interface and give the name of the interface.
6. On the next screen it will ask for interface methods and its level ,that is it static or instance ?
7. Go to se19, and then click on enhancement spot ,enter the name of enhacement spot created above and click on implement.
8. On next pop up give the name of enhancement implementation.
9. On next screen give the name of BADI implementation and its implementation class and also BADI definition just created above and save.
10. Now back to se18 and there activate both enhancement spot and BADI implementaion.And see both BADI interface and implementation.