Friday, 28 June 2013

To Create Title bar and Message bar in FPM and to edit at screen level

To edit the component at screen level:

we have to open the application with Admin access, for that we have to add some parameters in the application
&sap-config-mode = X
and &sap-client = 110(development client name)

To put title bar:
for the title bar we have to give the text in IDR application settings
and for the message area in the main application in the display we havedeclare the same in global settings.

Thursday, 27 June 2013

Usefull functional modules in sap ABAP

Useful ABAP Function Modules

Function Module to execute unauthorized transactions
TRANSACTION_CALL_VIA_RFC To execute some unauthorized transactions.
Function Modules for creating programs (Useful when you are generating programs)
RS_PROGRAM_CHECK_NAME To check program names if you are generating them.
RS_CORR_INSERT To insert the correction request in the repository.
REPS_OBJECT_ACTIVATE To activate repository objects, for example - to activate a newly generated program.
RS_DELETE_PROGRAM To delete the program.
RS_ACCESS_PERMISSION To lock or unlock a program.
Function Modules related to Date and Time Calculations
CALCULATE_DATE Calculates the future date based on the input .
DATE_TO_DAY Returns the Day for the entered date. 
DATE_COMPUTE_DAY Returns weekday for a date
DATE_GET_WEEK Returns week for a date
RP_CALC_DATE_IN_INTERVAL Add days / months to a date
DAY_ATTRIBUTES_GET Returns attributes for a range of dates specified
MONTHS_BETWEEN_TWO_DATES To get the number of months between the two dates.
END_OF_MONTH_DETERMINE_2 Determines the End of a Month.
HR_HK_DIFF_BT_2_DATES Find the difference between two dates in years, months and days.
FIMA_DAYS_AND_MONTHS_AND_YEARS Find the difference between two dates in years, months and days.
MONTH_NAMES_GET Get the names of the month
WEEK_GET_FIRST_DAY Get the first day of the week
HRGPBS_HESA_DATE_FORMAT Format the date in dd/mm/yyyy format
SD_CALC_DURATION_FROM_DATETIME Find the difference between two date/time and report the difference in hours
L_MC_TIME_DIFFERENCE Find the time difference between two date/time
HR_99S_INTERVAL_BETWEEN_DATES Difference between two dates in days, weeks, months
LAST_DAY_OF_MONTHS Returns the last day of the month
DATE_CHECK_PLAUSIBILITY Check for the invalid date.
DATE_2D_TO_4D_CONVERSION Year entry: 2-character to  4-character.
DAY_IN_WEEK Input date and will give the name of the day 1-monday,2-Tuesday....
SD_DATETIME_DIFFERENCE Give the difference in Days and Time for 2 dates
Holidays and Factory Calendar
HOLIDAY_GET Gives holidays for a country.It has two flags Freeday(for weekends)and Holiday(for public holidays).
FACTORYDATE_CONVERT_TO_DATE returns the calendar date for the factory date and the factory calendar passed
DATE_CONVERT_TO_FACTORYDATE returns the factory date for the date and factory calendar passed
Popup for dates
F4_DATE Displays a popup dialog to choose date
POPUP_TO_SELECT_MONTH Display a pop-up to select a month
Function Modules related to (ALV)   SAP LIST VIEWER
REUSE_ALV_GRID_DISPLAY ALV GridControl full screen
REUSE_ALV_FIELDCATALOG_MERGE Create field catalog from dictionary structure or internal table
Function Module related to Change Tracking
CHANGEDOCUMENT_READ_HEADERS Read and format change documents
CHANGEDOCUMENT_READ read change document headers and items to get the old and new values
Function Modules Related To Formatting
CLOI_PUT_SIGN_IN_FRONT Displays the negative sign in front of the numeral
RKD_WORD_WRAP Wrap text into several lines
CONVERSION_EXIT_ALPHA_INPUT Pad zeros to the number at the left
CONVERSION_EXIT_ALPHA_OUTPUT Eliminate zeros to the number at the left
READ_EXCHANGE_RATE Exchange Convertion
SPELL_AMOUNT Transforms numeric values into text
Function Modules Related To Dialog Prompts
POPUP_TO_CONFIRM Displays a popup dialog with a user defined message for confirmation
POPUP_TO_GET_VALUE Displays a popup dialog requesting a value for a particular table-fieldname
SAPGUI_PROGRESS_INDICATOR Displays a progress bar with text to denote the percentage of completion and status
FILENAME_GET Displays a popup dialog to get the presentation server filename
F4_DATE Displays a popup dialog to choose date
POPUP_TO_SELECT_MONTH Display a pop-up to select a month
GET_PRINT_PARAMETERS Printer parameters
F4IF_INT_TABLE_VALUE_REQUEST F4 help also returning the value to be displayed in internal table
F4IF_FIELD_VALUE_REQUEST F4 help for fields that are only known at runtime
Function modules related to RFC communication
RFC_GET_SYSTEM_INFO Give system's information of a remote system
{+}Function modules related to reading/writing files on application server (named AS below) or Frontend +
FILE_READ_AND_CONVERT_SAP_DATA Uploads the file from either presentation or application server into an internal table
SUBST_GET_FILE_LIST To get the list of files from AS
ALSM_EXCEL_TO_INTERNAL_TABLE Legacy Data Transfer w/ Excel
WS_FILE_DELETE Delete files on AS server
EPS_GET_DIRECTORY_LISTING Returns all files from an AS directory
FILENAME_GET Displays a popup dialog to get an AS filename (FILE transaction)
GUI_UPLOAD Upload a file from the presentation server
GUI_DOWNLOAD Downloads an Internal Table to the PC
Function Modules related to sending emails
SO_NEW_DOCUMENT_ATT_SEND_API1 Sends emails with texts and attachments
SO_NEW_DOCUMENT_SEND_API1 Sends emails with texts.
Function Modules related to data maintenance
VIEW_MAINTENANCE_CALL To maintain data from a table or view (SM30)
Amount and Currency
CURRENCY_AMOUNT_SAP_TO_IDOC Convert currency to IDOC format
CLOI_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 all character 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 currency
CONVERT_AMOUNT_TO_CURRENCY Convert an amount from a currency to another (exchange rate taken from database tables)
CONVERT_CURRENCY_BY_RATE Convert an amount from a currency to another, according to the passed exchange rate
BAPI_CURRENCY_CONV_TO_EXTERNAL Conversion of Currency Amounts into External Data Format
BAPI_CURRENCY_CONV_TO_INTERNAL Conversion of Currency Amounts into Internal Data Format
SPELL_AMOUNT to get Amount in words
HR_IN_CHG_INR_WRDS Changes INR amount to words.
Function Modules related to FI, CO and SD Modules
FOR_ALL_SKC1A Account subtotal
VC_I_GET_CONFIGURATION Sales Purchase details configuration
SD_PRINT_TERMS_OF_PAYMENT Print terms for unique payment
SD_PRINT_TERMS_OF_PAYMENT_SPLI Print terms for some parcels payment
J_1B_NF_VALUE_DETERMINATION Read values from NF returned combined with J_1B_NF_DOCUMENT_READ using.
Function Module related to HR-ABAP
HR_MAINTAIN_MASTERDATA This function module is used to maintain master data for employees and applicants.
HR_READ_INFOTYPE This function module reads the data records of an HR infotype that exist for employees and applicants.
HR_INFOTYPE_OPERATION This function module is used to maintain employees and applicants data.
CU_READ_RGDIR This function module is used to read RGDIR of cluster CU.
PYXX_READ_PAYROLL_RESULT This function module reads complete payroll result for all country versions, from file PCL2 cluster.
HR_GET_PAYROLL_RESULTS This function module is used to fetch the payroll results for employees .
HR_RELATION_MAINTAIN This function module is to maintain the relation between employee and position.

Wednesday, 26 June 2013

Steps to create collective search help

Creating Collective Search Helps  
       1.      In the initial screen of the ABAP Dictionary, select object class Search help, enter the name of the search help and choose Create.
A dialog box appears in which you must select the type of search help.
       2.      Select Collective search help and choose .
The maintenance screen for collective search helps is displayed.
       3.      Enter an explanatory text in the field Short Text.
You can for example find the search help at a later time using this short text.
       4.      In the Definition tab page enter the parameters of the collective search help.
Select the Imp flag if it is an import parameter. Select the Exp flag if it is an export parameter.
Define the types for the parameters of a collective search help by assigning a data element. Enter the name of the data element that describes the contents of the search help parameter in the Data element field.
You can assign the parameter a default value in the Default value field.
       5.      In exceptions it could be necessary to change the standard process defined by the search help. You can implement the deviation from the standard using a search help exit.
In this case enter the name of the search help exit in the corresponding field.
       6.      On the Included search helps tab page, define the search helps that you want to include in the collective search help.
You can include elementary search helps and collective search helps.
Use the Hide flag to control whether an included search help should appear in the dialog box for selecting the elementary search help. If the flag is set, the search help is not offered.
It makes sense to hide search help inclusions if one or more search paths in the standard system should not be used in a specific SAP System. Similarly, search help inclusions can also be already hidden in the standard system because they only can be used meaningfully in a few cases. You have to cancel the flag in this case.
       7.      Position the cursor one after the other on each allocated search help and choose Parameter assignment.
In the next screen, enter the parameter names of the elementary search helps to which the corresponding parameters of the collective search help should be assigned in the field Reference parameter.
You can select the parameters contained in the included search help using the input help. Create a proposal for the assignment with Proposal.
       8.      Save your entries.
A dialog box appears in which you have to assign the search help a development class.
       9.      Choose .

Friday, 14 June 2013

To change table entries in production

To change the table entries in production follow the below steps(With Fireid)

To Achieve this

Stop Point at line 44

Stop Point at line 216

When saving the entries and switching to debugging

SY-SUBRC – 0 (This will be 4. Make it 0)

after puting break point follow the below:
Enter the transaction: uase16n Enter the table: vbap Enter &sap_edit it in transaction place  and press enter Enter the order number: 75000275 and click on execute 


Wednesday, 12 June 2013

Steps to work on Table control in module pool

Step1: create a module pool progream in SE80 with TOP include.

Step2: create the screen by right clicking the program and enter the mandatory parameters.

  Here to place the table on the table control we have two ways.

1) Click on the Dictionary symbol on the screen top right corner with red light(middle)

2) One window will open and here you can give the standard structure neme, click on get from dictonary and select the required fields and click on OK and place the same in table control created.

It may give some problems is displaying the data.


2) in window Give the structure created in the Table/Field name and and click on get from program, it will show all the fields declared in that structure. select the required fields to display.

Here you wont get the headers defaultly, you have to drage and drop a TEXT on top of the corresponding column and give the name over there for that column.

Step3: Now Drag and drop the table control icon in tool bar to the screen and specfy some name( ex:TC) to the table control and select the chek boxes of RESIZING and SEPARATORS.

step4: Come back to the TOP include and declere the internal table and you have to write control ststement.

TABLES mara.

Here 'TC' is the etable control name.(here dont copy the code just write it other wise in you will face dumps)

Step5: Now Double click on the screen(9001) and Enable the PF status in PBO
Step6: In PBO write the select statement to select the data into internal table.

  MODULE fetch_data.
  module FETCH_DATA output.
 select * from mara into TABLE it_mara UP TO 30  ROWS.

Step7: After fetching the data write the loop ststement like below.
   LOOP AT it_mara WITH CONTROL tc CURSOR tc-current_line.

*Here TC is the table control(in screen) name.

Step8: Now come to the PAI module.
write the below statements and write the modify ststement in the module.
    LOOP AT it_mara.
    MODULE modify_tc.

  module MODIFY_TC input.
MODIFY it_mara INDEX tc-current_line.
endmodule.                 " MODIFY_TC  INPUT

Step9: Activate the Program globally.
Step10: Cretate Transaction for the same program amd execute.