convert abap spool output to PDF
Convert SAP documents (SAPScript) to other types.
Convert SAP documents (SAPScript) to other types.
Example: CALL FUNCTION "CONVERT_OTF" EXPORTING FORMAT = "PDF" IMPORTING BIN_FILESIZE = FILE_LEN TABLES OTF = OTFDATA LINES = PDFDATA EXCEPTIONS ERR_MAX_LINEWIDTH = 1 ERR_FORMAT = 2 ERR_CONV_NOT_POSSIBLE = 3 OTHERS = 4. |
converts a OTF spool to PDF (i.e. Sapscript document)
Convert local currency to foreign currency.
Convert from foreign currency to local currency
Check to see if a date is in a valid format for SAP. Works well when validating dates being passed in from other systems.
Returns a number indicating what day of the week the date falls on. Monday is returned as a 1, Tuesday as 2, etc.
will return the week that a date is in.
Calculate a date N days in the future.
Converts a date in internal format to a text description of a day. For example 20030529 returns Thursday
Return useful information about a day. Will tell you the day of the week as a word (Tuesday), the day of the week (2 would be Tuesday), whether the day is a holiday, and more.(provided by Francois Henrotte)
download a file to the presentation server (PC)
Read the values from a dynpro. This function can be used to read the values from a report's selection screen too (Another example).
Convert local currency to foreign currency.
Convert from foreign currency to local currency
Check to see if a date is in a valid format for SAP. Works well when validating dates being passed in from other systems.
Returns a number indicating what day of the week the date falls on. Monday is returned as a 1, Tuesday as 2, etc.
will return the week that a date is in.
Calculate a date N days in the future.
Converts a date in internal format to a text description of a day. For example 20030529 returns Thursday
Return useful information about a day. Will tell you the day of the week as a word (Tuesday), the day of the week (2 would be Tuesday), whether the day is a holiday, and more.(provided by Francois Henrotte)
download a file to the presentation server (PC)
Read the values from a dynpro. This function can be used to read the values from a report's selection screen too (Another example).
Similar to DYNP_VALUES_READ, this function will allow the updating of fields on a dynpro. Very useful when you want to change a field based on the value entered for another field.
Wait a specified period of time before continuing processing.
Lock an abap program so that it cannot be executed.
Wait a specified period of time before continuing processing.
Lock an abap program so that it cannot be executed.
Example: Set the parameters as follows: RELID = 'ZZ' SRTF2 = 0 SRTF = (your report name) |
Please note that you should not use SY-REPID to pass your report name to the function. The value of SY-REPID will change as it is being passed to the function module, and will no longer hold the value of the calling report.
return a list of filenames from a local or network drive
Pass in a filename and a path, and will return attributes for the file
displays a calendar in a popup window and allows user to choose a date, or it can be displayed read only.
Use values from a DDIC table to provide a list of possible values. TABNAME and FIELDNAME are required fields, and when MULTIPLE_CHOICE is selected, more than one value can be returned.
F4 help that returns the values selected in an internal table. Very handy when programming your very own F4 help for a field.
return a list of filenames from a local or network drive
Pass in a filename and a path, and will return attributes for the file
displays a calendar in a popup window and allows user to choose a date, or it can be displayed read only.
Use values from a DDIC table to provide a list of possible values. TABNAME and FIELDNAME are required fields, and when MULTIPLE_CHOICE is selected, more than one value can be returned.
F4 help that returns the values selected in an internal table. Very handy when programming your very own F4 help for a field.
Function Group GRAP is now obsolete. SAP recommends using functions in function group SFES instead. Below is an overview of the changes.
Fetch values from a set.
Get the current fiscal year.
Fetch values from a set.
Get the current fiscal year.
Example: CALL FUNCTION 'GET_CURRENT_YEAR' EXPORTING BUKRS = '1000' " Company Code DATE = SY-DATUM " Date to find fiscal year for IMPORTING CURRM = w_currm " Current Fiscal Month CURRY = w_curry " Current Fiscal Year PREVM = w_prevm " Previous Fiscal Month PREVY = w_prevy. " Previous Fiscal Year |
Returns a list of all tables, select options, texts, etc for a program. Even includes the text definitions for the selection screen
Returns a list of all INCLUDES in a program
Get the current job number from a program. Also returns other useful info about the current job.
Returns a fully formatted payslip, ready for displaying
Create a directory on the presentation server
Replaces WS_FILE_DELETE. Delete a file on the presentation server
Replaces WS_DOWNLOAD. Download table from the app server to presentation server
Replaces WS_EXECUTE. Start a File or Program Asynchronously with WinExec
Replaces WS_QUERY. Delivers Information About the Desktop (client)
Delete a directory on the presentation server
Start a File or Program Asynchronously with ShellExecute
Replaces WS_UPLOAD. Upoad file from presentation server to the app server
Display help for a field. Useful for doing AT SELECTION SCREEN ON VALUE REQUEST for those fields that do not provide F4 help at the DDIC level.
Show a list of possible values for F4 popup help on selection screens. This function module pops up a screen that is just like all the other F4 helps, so it looks like the rest of the SAP system. Very useful for providing dropdowns on fields that do not have them predefined.
Returns a list of all INCLUDES in a program
Get the current job number from a program. Also returns other useful info about the current job.
Returns a fully formatted payslip, ready for displaying
Create a directory on the presentation server
Replaces WS_FILE_DELETE. Delete a file on the presentation server
Replaces WS_DOWNLOAD. Download table from the app server to presentation server
Replaces WS_EXECUTE. Start a File or Program Asynchronously with WinExec
Replaces WS_QUERY. Delivers Information About the Desktop (client)
Delete a directory on the presentation server
Start a File or Program Asynchronously with ShellExecute
Replaces WS_UPLOAD. Upoad file from presentation server to the app server
Display help for a field. Useful for doing AT SELECTION SCREEN ON VALUE REQUEST for those fields that do not provide F4 help at the DDIC level.
Show a list of possible values for F4 popup help on selection screens. This function module pops up a screen that is just like all the other F4 helps, so it looks like the rest of the SAP system. Very useful for providing dropdowns on fields that do not have them predefined.
Example: tables: t001w. DATA: lc_werks LIKE t001w-werks, ltab_fields LIKE help_value OCCURS 0 with header line, BEGIN OF ltab_values OCCURS 0, feld(40) TYPE c, END OF ltab_values. *-- Set up fields to retrieve data ltab_fields-tabname = 'T001W'. ltab_fields-fieldname = 'WERKS'. ltab_fields-selectflag = 'X'. APPEND ltab_fields. ltab_fields-tabname = 'T001W'. ltab_fields-fieldname = 'NAME1'. ltab_fields-selectflag = space. APPEND ltab_fields. *-- Fill values select * from t001w. ltab_values-feld = t001w-werks. append ltab_values. ltab_values-feld = t001w-name1. append ltab_values. endselect. CALL FUNCTION 'HELP_VALUES_GET_WITH_TABLE' EXPORTING fieldname = 'WERKS' tabname = 'T001W' title_in_values_list = 'Select a value' IMPORTING select_value = lc_werks TABLES fields = ltab_fields valuetab = ltab_values EXCEPTIONS field_not_in_ddic = 01 more_then_one_selectfield = 02 no_selectfield = 03. |
documents the different reasons to use a search help exit, and shows how it is done.
This function does not exist in 4.6 and above. Use F4IF_INT_TABLE_VALUE_REQUEST instead.
popup to get a filename from a user, returns blank filename if user selects cancel
Print out selection criteria. Nicley formatted.
Takes a message id and number, and puts it into a variable. Works better than WRITE_MESSAGE, since some messages use $ as a place holder, and WRITE_MESSAGE does not accommadate that, it only replaces the ampersands (&) in the message.
Execute a command on the FTP server
Open a connection (and log in) to an FTP server
Close the connection (and log off) the FTP server
You can use this function module to display simple material BOMs. You cannot display BOM groups (for example, all variants of a variant BOM). as in transaction CS03. Current restrictions: You cannot display long texts. You cannot display sub-items. You cannot display classification data of BOM items for batches. You can only display one alternative or variant. You cannot enter an alternative for module CSAP_MAT_BOM_READ, so you always see alternative 01. The following example came from a posting on the SAP-R3-L mailing list.
This function does not exist in 4.6 and above. Use F4IF_INT_TABLE_VALUE_REQUEST instead.
popup to get a filename from a user, returns blank filename if user selects cancel
Print out selection criteria. Nicley formatted.
Takes a message id and number, and puts it into a variable. Works better than WRITE_MESSAGE, since some messages use $ as a place holder, and WRITE_MESSAGE does not accommadate that, it only replaces the ampersands (&) in the message.
Execute a command on the FTP server
Open a connection (and log in) to an FTP server
Close the connection (and log off) the FTP server
You can use this function module to display simple material BOMs. You cannot display BOM groups (for example, all variants of a variant BOM). as in transaction CS03. Current restrictions: You cannot display long texts. You cannot display sub-items. You cannot display classification data of BOM items for batches. You can only display one alternative or variant. You cannot enter an alternative for module CSAP_MAT_BOM_READ, so you always see alternative 01. The following example came from a posting on the SAP-R3-L mailing list.
Example: data: begin of tstk2 occurs 0. include structure stko_api02. data: end of tstk2. data: begin of tstp2 occurs 0. include structure stpo_api02. data: end of tstp2. data: begin of tdep_data occurs 0. include structure csdep_data. data: end of tdep_data. data: begin of tdep_descr occurs 0. include structure csdep_descr. data: end of tdep_descr. data: begin of tdep_source occurs 0. include structure csdep_source. data: end of tdep_source. data: begin of tdep_order occurs 0. include structure csdep_order. data: end of tdep_order. data: begin of tdep_doc occurs 0. include structure csdep_doc. data: end of tdep_doc. data: flg_warning like capiflag-flwarning. call function 'CSAP_MAT_BOM_READ' exporting material = 'MAT100' plant = '0001' bom_usage = '1' valid_from = '20.12.1996' * valid_to importing fl_warning = flg_warning tables t_stko = tstk2 t_stpo = tstp2 t_dep_data = tdep_data t_dep_descr = tdep_descr t_dep_source = tdep_source t_dep_order = tdep_order t_dep_doc = tdep_doc exceptions error = 1. |
No comments:
Post a Comment