Owner: sap abap URL:http://abapcode.blogspot.com Join Date: Thu, 20 Dec 2007 06:15:54 -0600 Rating:0 Site Description: sap abap complete Site statistics:Click here
Using the raise Statement in Function Module 2008-02-16 10:57:49 Normally, after returning from a function module, the system automatically sets the value of sy-subrc to zero. Use one of the following two statements to set sy-subrc to a non-zero value:* raise
* message ... raisingUsing the raise StatementUse the raise statement to exit the function module and set the value of sy-subrc on return.Syntax for the raise StatementThe following is the syntax for the raise statement.raise xname.where:* xname is the name of the exception to be raised.The following points apply:* xname can be any name that you make up. It does not have to be previously defined anywhere. It can be up to 30 characters in length. All characters are allowed except " ' . , and :.* Do not enclose xname within quotes.* xname cannot be a variable.When the raise statement is executed, cont Read more:Module
SAP Upgrade : Read_text Function Module has been Modified 2008-01-30 09:28:06 Read_text Function Module
has been Modified in new Version.Please Comment INLINE table in ECC6.0.It is no more use in it.Older Version ( 4.6c)CALL FUNCTION 'READ_TEXT'EXPORTINGclient = sy-mandtid = thead-tdidlanguage = thead-tdsprasname = thead-tdnameobject = thead-tdobjectTABLESlines = inlineinline = XXXX "comment this one in new version , it is no more have any useEXCEPTIONSid = 1language = 2name = 3not_found = 4object = 5reference_check = 6wrong_access_to_archive = 7OTHERS = 8.
SAP Function modules Related to Files 2008-01-05 23:08:07 WS_UPLOAD - File transfer from presentation server file to internal tableWS_DOWNLOAD - File Transfer From Internal Table to Presentation Server FileWS_DOWNLOAD - Save Internal Table as File on the Presentation ServerWS_FILE_DELETE - Delete File at the FrontendWS_FILENAME_GET - Call File SelectorFILENAME_GET - popup to get a filename from a user, returns blank filename if user selects cancelLIST_DOWNLOAD - Download of ABAP list (Report) to local fileLIST_TO_ASCI - Converts the specified list (LIST_INDEX) or the provided list (LISTOBJECT) to ASCII.RZL_READ_FILE - Read a file from the presentation server if no server name is given, or read file from remote server. Very useful to avoid authority checks that occur doing an OPEN DATASET. This function using a SAP C program to read the data.RZL_W
SAP Function Module for Date and Time 2008-01-03 09:20:07 Get a date DATE_GET_WEEK Returns week for a dateWEEK_GET_FIRST_DAY Returns first day for a weekRP_LAST_DAY_OF_MONTHS Returns last day of monthFIRST_DAY_IN_PERIOD_GET Get first day of a periodLAST_DAY_IN_PERIOD_GET Get last day of a periodRP_LAST_DAY_OF_MONTHS Determine last day of monthDate calculationsDATE_COMPUTE_DAY Returns a number indicating what day of the week the date falls on. Monday is returned as a 1, Tuesday as 2, etc.DATE_IN_FUTURE Calculate a date N days in the future.RP_CALC_DATE_IN_INTERVAL Add days/months to a dateRP_CALC_DATE_IN_INTERVAL Add/subtract years/months/days from a dateSD_DATETIME_DIFFERENCE Give the difference in Days and Time for 2 datesMONTH_PLUS_DETERMINE Add or subtract months from a date. To subtract a month, enter a negative value for the 'months' paramet Read more:Module
Function modules Related to Amount and Currency 2008-01-02 11:26:32 CURRENCY_AMOUNT_SAP_TO_IDOC - Convert currency to IDOC formatCONVERT_TO_LOCAL_CURRENCY - Conversion of currencyCLOI_PUT_SIGN_IN_FRONT Move the negative sign from the left hand side of a number, to the right hand side of the number. Note that The result will be left justified (like allcharacter fields), not right justifed as numbers normally are.CONVERT_TO_FOREIGN_CURRENCY Convert local currency to foreign currency.CONVERT_TO_LOCAL_CURRENCY Convert from foreign currency to local currencyExample 1: Convert amount to/from stringAmount
to string:CALL FUNCTION 'HRCM_AMOUNT_TO_STRING_CONVERT'EXPORTINGbetrg = 3000WAERS = 'DKK'* NEW_DECIMAL_SEPARATOR =* NEW_THOUSANDS_SEPARATOR =IMPORTINGSTRING = slam.String to amount:CALL FUNCTION 'HRCM_STRING_TO_AMOUNT_CONVERT'EXPORTINGstring = slam2DECIMAL_SEPAR Read more:Currency
ABAP Interview Questions -SQL , Tables , Basic 2008-01-01 11:16:24 Basic Question :(1)Choose the menu path Tools->Administration, Monitoring->System monitoring->User overview. What is the transaction code for this transaction?(2) What is the transaction code for the R/3 main menu? (The main menu is the first menu displayed after logon.)(3)What is the transaction code for the menu path Tools->Development Workbench?(4)If there are three R/3 systems in your current system landscape, how many databases are there?(5)If an R/3 system has two application servers, how many instances does it have?(6)What is Open SQL
?(7)What advantages does Open SQL offer over native SQL?(8)Which part of the work process is used to implement Open SQL?(9)When is a roll area allocated, when is it de-allocated, and what does it contain?(10)When is a user context allocated, when is it Read more:Basic
, Tables
Learn Dialog Programming with an Example 2007-12-31 11:31:43 Checklist for simpe dialog programCreate the programCreate a new program in the repository browser (Transaction SE80) . Name standard for dialog programs is SAPMZIn the attributes window:- Module pool = M- Application = ZCreate the screen Create a new screen.Add a pushbutton to the screenIn the attributes screen for the pushbutton, enter a function codein the FctCode field ( In this example: 0020 ).When you create a screen, SAP automathic creates a field with the type OK. The function code of the psuhbutton will be placed here when you push the button. However you have to supply the name of the OK field ( In this example: OK_CODE ).You must also create a global variable in the program, to store the value of the OK field ( See below ).Create global variablesDATA:* Global variable to store O Read more:Dialog
, Programming
, Example
EDI Configuration : Define Port in transaction WE21 2008-04-28 11:20:58 Port is the medium in which data is transferred.Other Useful Link :Download a nice presentation on IDOC, EDI , ALEConfiguration
of EDI for the IDOC in case of standalone program EDI Configuration : Define Logical Systems T.code SALEAssign Client to the logical system T.code: SALEEDI Configuration : Create RFC Destination Tcode: SM59EDI Configuration : Define Port in transaction WE21EDI Configuration : Maintain Partner Profile ( WE20 )
EDI Configuration : Maintain Partner Profile ( WE20 ) 2008-04-28 11:17:50 In partner profile we specify the names of the partners which are allowed to exchange IDocs .Double Click on the Message type MATMAS the following opens.Enter the details for Receiving port, Pack size and Basic type.Other Useful Link :Download a nice presentation on IDOC, EDI , ALEConfiguration
of EDI for the IDOC in case of standalone programEDI Configuration : Define Logical Systems T.code SALEAssign Client to the logical system T.code: SALEEDI Configuration : Create RFC Destination Tcode: SM59EDI Configuration : Define Port in transaction WE21EDI Configuration : MaintainPartner
Profile ( WE20 )
What is Logical Database?Logical database in ABAP programming 2008-05-10 11:48:03 The Logical
Database Builder then saves you work by using components that you have already defined to generate proposals for other components. Some of the most important attributes of a logical database are set when you define its structure. When you have defined the structure, the Logical Database Builder automatically generates a proposal for the selection include. The system then generates an input mask for the database program, based on the structure of the logical database and the selections. These generated proposals allow you to create a working logical database quickly. However, you must program refinements such as authorization checks and performance optimization yourself. • Database tables. The table must be active in the ABAP Dictionary. Tables always have a flat structure. T
Example : How to create Logical Database 2008-05-18 08:23:55 Goto the transaction code SE36 ( Logical
database Builder) and enter the logical database name and click on the CREATE button.We need to have structure, selections and source code.Enter the short text and click on the CREATE button. In order to create
the structure, Enter the short text for the root node and the corresponding table and click on the CREATE button. Give the second node which should Read more:Example
, Database