SE37 and test function module
I have an importing parameter in function module interface, type BEGDA (type DATUM), default value SY-DATUM.
When I execute test function module via SE37 and F8, the default value gets value "02....20.3" instead of 03.02.2012 as set up in SU01 for my user.
What can be wrong?
At the risk of also incurring your scorn, let me add that I cannot make this fail, using exactly what you have in the original post. Obviously, something unusual is happening this client/instance, or in code that is manipulating the incoming date value.... my dd.mm.yyyy input defaulted to sy-datum shows 20120306 in begda duringe execution (in debug). Without being able to debug the mentioned FM at every step, it would be hard to pinpoint a specific problem.
Similar Messages
-
GUI_DOWNLOAD and UPLOAD Function Modules?
Hi All,
What exactly done by GUI_DOWNLOAD and UPLOAD Function Modules?
Akshitha.What you exactly want know?
Here is the Sap documentation for both FM:
FU GUI_UPLOAD
Short Text
Upload for Data Provider
Functionality
The module loads a file from the PC to the server. Data can be transferred binarily or as text. Numbers and date fields can be interpreted according to the user settings.
Example
Binary upload: No conversion or interpretation
begin of itab,
raw(255) type x,
end of itab occurs 0.
CALL FUNCTION 'GUI_UPLOAD'
exporting
filetype = 'BIN'
filename = 'C:\DOWNLOAD.BIN'
tables
data_tab = itab.
Text upload
begin of itab,
text(255) type c,
end of itab occurs 0.
CALL FUNCTION 'GUI_UPLOAD'
exporting
filetype = 'ASC'
filename = 'C:\DOWNLOAD.TXT'
tables
data_tab = itab.
Parameters
FILENAME
FILETYPE
HAS_FIELD_SEPARATOR
HEADER_LENGTH
READ_BY_LINE
DAT_MODE
CODEPAGE
IGNORE_CERR
REPLACEMENT
CHECK_BOM
VIRUS_SCAN_PROFILE
NO_AUTH_CHECK
FILELENGTH
HEADER
DATA_TAB
Exceptions
FILE_OPEN_ERROR
FILE_READ_ERROR
NO_BATCH
GUI_REFUSE_FILETRANSFER
INVALID_TYPE
NO_AUTHORITY
UNKNOWN_ERROR
BAD_DATA_FORMAT
HEADER_NOT_ALLOWED
SEPARATOR_NOT_ALLOWED
HEADER_TOO_LONG
UNKNOWN_DP_ERROR
ACCESS_DENIED
DP_OUT_OF_MEMORY
DISK_FULL
DP_TIMEOUT
Function Group
SFES
FU GUI_DOWNLOAD
Short Text
Download an Internal Table to the PC
Functionality
Data transfer of an internal table form the server to a file on the PC. The Gui_Download module replaces the obsolete modules Ws_Download and Download. The file dialog of the download module is available in the class Cl_Gui_Frontend_Services.
Further information
TYPE-POOLS: ABAP.
Binary download table
DATA: BEGIN OF line_bin,
data(1024) TYPE X,
END OF line_bin.
DATA: data_tab_bin LIKE STANDARD TABLE OF line_bin.
Ascii download table
DATA: BEGIN OF line_asc,
text(1024) TYPE C,
END OF line_asc.
DATA: data_tab_asc LIKE STANDARD TABLE OF line_asc.
DAT download table
DATA: BEGIN OF line_dat,
Packed TYPE P,
Text(10) TYPE C,
Number TYPE I,
Date TYPE D,
Time TYPE T,
Float TYPE F,
Hex(3) TYPE X,
String TYPE String,
END OF line_dat.
DATA: data_tab_dat LIKE STANDARD TABLE OF line_dat.
Get filename
DATA: fullpath TYPE String,
filename TYPE String,
path TYPE String,
user_action TYPE I,
encoding TYPE ABAP_ENCODING.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
EXPORTING
WINDOW_TITLE = 'Gui_Download Demo'
WITH_ENCODING = 'X'
INITIAL_DIRECTORY = 'C:\'
CHANGING
FILENAME = filename
PATH = path
FULLPATH = fullpath
USER_ACTION = user_action
FILE_ENCODING = encoding
EXCEPTIONS
CNTL_ERROR = 1
ERROR_NO_GUI = 2
NOT_SUPPORTED_BY_GUI = 3
others = 4.
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
IF user_action <> CL_GUI_FRONTEND_SERVICES=>ACTION_OK.
EXIT.
ENDIF.
Download variables
DATA: length TYPE I.
Binary download
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = fullpath
FILETYPE = 'BIN'
IMPORTING
FILELENGTH = length
TABLES
DATA_TAB = data_tab_bin
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22.
Ascii download
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = fullpath
FILETYPE = 'ASC'
IMPORTING
FILELENGTH = length
TABLES
DATA_TAB = data_tab_asc
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22.
DAT download
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = fullpath
FILETYPE = 'DAT'
IMPORTING
FILELENGTH = length
TABLES
DATA_TAB = data_tab_dat
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22.
Parameters
BIN_FILESIZE
FILENAME
FILETYPE
APPEND
WRITE_FIELD_SEPARATOR
HEADER
TRUNC_TRAILING_BLANKS
WRITE_LF
COL_SELECT
COL_SELECT_MASK
DAT_MODE
CONFIRM_OVERWRITE
NO_AUTH_CHECK
CODEPAGE
IGNORE_CERR
REPLACEMENT
WRITE_BOM
TRUNC_TRAILING_BLANKS_EOL
WK1_N_FORMAT
WK1_N_SIZE
WK1_T_FORMAT
WK1_T_SIZE
WRITE_EOL
FILELENGTH
DATA_TAB
FIELDNAMES
Exceptions
FILE_WRITE_ERROR
NO_BATCH
GUI_REFUSE_FILETRANSFER
INVALID_TYPE
NO_AUTHORITY
UNKNOWN_ERROR
HEADER_NOT_ALLOWED
SEPARATOR_NOT_ALLOWED
FILESIZE_NOT_ALLOWED
HEADER_TOO_LONG
DP_ERROR_CREATE
DP_ERROR_SEND
DP_ERROR_WRITE
UNKNOWN_DP_ERROR
ACCESS_DENIED
DP_OUT_OF_MEMORY
DISK_FULL
DP_TIMEOUT
FILE_NOT_FOUND
DATAPROVIDER_EXCEPTION
CONTROL_FLUSH_ERROR
Function Group
SFES -
Need help on mapping of obsolete and new function module
Hi Expert,
We are working on a upgradation tool in which i have to repace the obsolete function module "HELP_VALUES_GET_WITH_CHECKTAB
" by "F4IF_FIELD_VALUE_REQUEST
". I am not sure about the functionalities of these function modules as i have never used it. Can anyone please help me by providing some information abt these FMs. Also i need to do the mapping of parameters of old and new function module. So please provide the details of mapping also. Any pointers on this will be highly appreciated.
Thanks & Regards,
P Sharma
Moderator message : Duplicate post locked. Continue with [Parameter mapping of FMs|Parameter mapping of FMs;.
Edited by: Vinod Kumar on Jul 8, 2011 9:40 AMHey Enivass,
you can ckeck the input field "Account Number" whether it is numeric or Alphabet using *"Conversions ->Fixvalues"*
Steps:
1. Extract first character of input using *" Text -> substring"* -- start position 0 , char count 1
2. In Fix Value table you have to give following values:
Dafault value : Alphabet
key----
value
0----
Number
1----
Number
2----
Number
9----
Number
3. Write logic IF "number" than "Arithmatic -> FormatNumber (0000000000) -
// for leading zeros
ELSE
concat with extra space -
Thanks -
Functioning of Enqueue and dequeue function modules
Hi to all
Please tell me what is the actual functioning of HR_EMPLOYEE_ENQUEUE and HR_EMPLOYEE_DEQUEUE function modules.
My requirement is that if any one working on same employee no. or other tcode is processing same emp no then no one able to work on thet and an error message should be displayed.
How to do it.
Please advice.
Regards
Anubhav GuptaHi,
Use the following.
BAPI_EMPLOYEE_ENQUEUE
BAPI_EMPLOYEE_DEQUEUE.
Pass pernr to it.
Regards,
Nishant Gupta -
Start conditions and check function modules
Hi,
When we apply start conditions to any particular even linkage you will find check function module as SWB_2_CHECK_FB_START_COND_EVAL. However, what if i want to implement both a custom check function module AND start conditions ?
My requirement is to implement both start conditions and check function module.
Is this possible ?
Thank you,
Nikhil.Hi,
You can use both of the things, however its advisable to check all start conditions if you are using check FM.
This is interface for custom check FM,once you have the key value, you can put all the checks here
*"*"Local Interface:
*" IMPORTING
*" VALUE(OBJTYPE) TYPE SWETYPECOU-OBJTYPE
*" VALUE(OBJKEY) TYPE SWEINSTCOU-OBJKEY
*" VALUE(EVENT) TYPE SWETYPECOU-EVENT
*" VALUE(RECTYPE) TYPE SWETYPECOU-RECTYPE
*" EXPORTING
*" REFERENCE(REFERENCE) TYPE C
*" TABLES
*" EVENT_CONTAINER STRUCTURE SWCONT
*" EXCEPTIONS
*" NOT_TRIGGERD
Hope this helps.
Regards,
Sangvir Singh -
No entries in Define conversion group and external function module setting.
Hi all,
After active bussiness function SAP Oil & Gas, my system have a problem in SPRO.
SPRO --> IMG --> Industry solution Oil & Gas (Downstream) --> HPM --> QCI configuration --> Define conversion group and external function module setting.
Problem appear: Has no entries in there!
Please, help me! Thank you so much!
Tks & best regards,
DatHTDat,
There are few entries normally delivered by SAP and which are good for a regular implementation. It is possible that those are not copied over from the reference client. Second option is to check the BC set (if) available for this activity and pull those in. Check the SAP reference client first, most likely that has entries which you can copy over to your regular client.
Regards, -
Encrypt and Decrypt function modules
Hi
Please tell the function module names to Encrypt the code with key and Decrypt code with key.
i know these function module names
'FIEB_PASSWORD_ENCRYPT' and 'FIEB_PASSWORD_DECRYPT'
but its not working.
Is there any other function modules?
if it is not there please tell the documentation of the to create encrypt function module and decrypt function module.
Thanks.
Edited by: Craig Cmehil on Jul 18, 2008 10:01 AMtry this it will do little bit closer to encription and decription
DATA:
g_key TYPE i VALUE 26101957,
g_slen TYPE i,
g_pwd type string VALUE 'Pass1234',
g_pwd1 type xstring ,
obj type ref to cl_http_utility.
CREATE OBJECT obj.
CALL METHOD obj->if_http_utility~encode_utf8
EXPORTING
unencoded = g_pwd
receiving
encoded = g_pwd1
EXCEPTIONS
conversion_failed = 1
others = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL METHOD obj->if_http_utility~decode_utf8
EXPORTING
encoded = g_pwd1
receiving
unencoded = g_pwd
EXCEPTIONS
conversion_failed = 1
others = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
write:/ g_pwd. -
Testing Function Module before using in DataSource?
Hi Experts,
After writing a Function module for Transaction DataSouce (by copying RSAX_BIW_GET_DATA_SIMPLE), is there any way to test the Function Module before using in Transaction DataSource? (to see how many records it retrieves).
Also can somebody please throw some light in understanding the source code of RSAX_BIW_GET_DATA_SIMPLE function module, as it has many declarations like E_T_DATA,
I_T_SELECT which will be used in the new function module?
Looks like, the function module RSAX_BIW_GET_DATA_SIMPLE uses only one table SPFLI.
If it is just one table why do we need to write function module to extract data?
Forgive me for my lack of ABAP knowledge.
Thank you,
LakshmiThe generic function moduel is used when there is no BW extractor and you cannot get to the data via a view or table
The extractor is quite simple
You create a extract strcuture of data to send to BW
Then you create the function module - e_t_data takes on the extract structure
The select options read data via the infopackage selection from BW (and thus when you create your datasource you shoudl click the fields to be select option)
So in the ABAP
You read the select option and put them into a range
You select from which ever tables you need to in R3 and put into an itab
You then loop aroudn the itab and manipulate the data or read other tables
The data finally ends up in e_t_data
The whole thing gets looped around based on the size of the data package - ie if it is 10000 records then the fetch next cursor after 10000 records will send the package of e_t_data out to the refc scheduler and down the line to BW - then the fetch next cursor will get the next 10000 records for the next
I use this all the tiem (so sorry for the brain dump)
I especially use it for virtual cubes - ie to get real time data from R3 from within BW - the data is not requested by ipak but by the query at runtime against a Virtual cube which connects to this generic extractor
Note: this generic extractor can also live on the BW side - ie you can use it instead of APD to snapshot cube or DSO data to send as an ipak into another cube -
Runtime error when testing function module 'RSWR_RFC_SERVICE_TEST'
Hi,
I'am integrating BIW 3.5 with EP 6.0 according to the report 'RSPOR_SETUP'.I've carried all the steps,but an error on step 12 : system failure during call of function module 'RSWR_RFC_SERVICE_TEST' is there .When I test the connection with function module 'RSWR_RFC_SERVICE_TEST', a runtime error is coming i.e. "<--Localization failed: ResourceBundle='com.sap.engine.services.rfcengine.RFCR'.
Any help would be highly appreciated.
Regards.
ManojHi Manoj,
From this I can understand that a critical resource is missing which is required to start the RFC service in Reporting Services Web Runtime. This might be because of incomplete patch deployment. Deploy all the required software component archives related to com.sap.engine.services component and then retry this... I think this should solve the issue.
Imran... -
Hello all,
iam testing the function module convert_to_local_currency and i gave import parameters but iam not able to see export parameters but iam geeting enter rate 40/21.25 rate type m for 04.04.2008 in system testings?Please help me regarding this.
Thanks & Regards
PriyaHi Priya,
Did you read the Function module Documentation thoroughly. Apart from giving the Local currency, local amount, foreign currency and foreign amount, you should also pass the Rate ( Rate is nothing but the Exchange rate)
Also regarding the type of rate, by default it is 'M' means Average rate. try to pass the value depend on the rate of the currency.
Type of rate M=Average rate G=Bank buying rate B=bank sellin rate.
Return ->
Type of rate M=Average rate G=Bank buying rate B=bank sellin
By default always pass Average rate.
data lv_netwr type ekpo-netwr.
CALL FUNCTION 'CONVERT_TO_FOREIGN_CURRENCY'
EXPORTING
CLIENT = SY-MANDT
DATE = sy-datum
FOREIGN_CURRENCY = 'SAR'
LOCAL_AMOUNT = 1000
LOCAL_CURRENCY = 'INR'
RATE = 11
TYPE_OF_RATE = 'M'
READ_TCURR = 'X'
IMPORTING
EXCHANGE_RATE =
FOREIGN_AMOUNT = lv_netwr
FOREIGN_FACTOR =
LOCAL_FACTOR =
EXCHANGE_RATEX =
DERIVED_RATE_TYPE =
FIXED_RATE =
EXCEPTIONS
NO_RATE_FOUND = 1
OVERFLOW = 2
NO_FACTORS_FOUND = 3
NO_SPREAD_FOUND = 4
DERIVED_2_TIMES = 5
OTHERS = 6
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. -
SRM 7 ECS : SC and PO Function Modules
Hi Gurus,
Has anybody some documentation about function modules which are triggered in extended classic regarding SC and PO.
Many thanks in advance.What are the FM involved in PO replication to the backend?
Thanks -
Hanlding Unit Pack and Unpack Function module
Hi All,
Can any one know the functiona modules for PACK Handling Unit and UNPACK Handling Unit? If so please reply me.
Thanks,
PranavHi,
Please check this FM.
PACK_HANDLING_UNIT
UNPACK_HANDLING_UNIT
Hope this will help.
Regards,
Ferry Lianto -
Pricing and Rebates Function Module
Hi,
I need function module for uploading the prices in the following transaction
VK11 : Creation of condition type
VK12 : Change of condition type and
VB01 : Creation of Rebate Agreements
VB01 : Change of Rebate Agreements
Please, Let me the function module.
Regards,
M.SaravananHi,
check the FM BAPI_PRICES_CONDITIONS for Pricing conditions .
Because this is FM which is INBOUND FM for Cond_A02 idoc type for posting Pricing Routines,
<REMOVED BY MODERATOR>
Raj
Edited by: Raj D on Jun 13, 2008 5:11 PM
Edited by: Alvaro Tejada Galindo on Jun 13, 2008 11:12 AM -
Delete and rename function module
Hi,
I have created a function module, but wanted to rename it afterwards.
that was not possible, because I have got the message, that it´s locked in any transport requests.
So I have copied the function and want to delete the old one now. But the same problem...
I have removed the object entry on "function modules" in the request, but I still get the message, that
it´s locked in the request.
What can I do to delete and rename the functions?
Thank you!hi ,
GO to se03.
in that you can see , search for objects in request /tasks.
click that ,
in the object selection screen
in R3TR / FUGR - 'Give that function group name'.
you can get all the request , where that function group exists.
Note down the requests.
Then, go back in se03 itself.
There u can see 'unlock objects'.
give the transport numbers in that. It will unlock the function module.
Hope , it vil solve it.
Regards,
sabari -
BW Upgrade and Missing Function Modules
We just upgraded our BW development system from 3.1 to 3.5 with 353 content and we found out all our customer developed function modules are missing from the upgraded version. Our custom function groups are named "ZBIW" and function modules start with "ZBW*". Would this have caused any problems? Should our modules have started with "Z_" as opposed to "Z".
Any help is greatly appreciated.
Thanks
ShaiHi Dinesh,
But the back up is taken prior to upgrade. I do not know if we will end up in more problems, trying to restore objects from different versions of BW.
Thanks
Shai
Maybe you are looking for
-
DI API: 2005A PL: 08 Special Prices
Hi everyone, I am using the DI-Object SpecialPrices for adding a special price in the Database. We use a German MSSQL Server 2000 and VB.Net (1.1) My Code: Public Sub PreislisteZwischenspeichernLöschenUndSetzen() 'Dim oPreisliste As SAPbo
-
Fingerprin​t reader on Lenovo KUF0452 keyboard not working with Lenovo X1
Hi, I have a Lenovo KUF0452 keyboard with built-in fingerprint reader. Up until two weeks ago I had a two year old X1 Carbon laptop which co-existed happily with the keyboard - I could unlock Windows with a swipe of the keyboard's fingerprint reader.
-
Library list came back after reformat??
OK, this is just too weird. I reformatted my computer. I assumed that I lost my library and playlists. I reinstalled ITunes after the reformat and then I found that all was restored as it was before the reformat! Please, someone explain this one to m
-
I want to use iCloud as my mail instead of Hotmail or Outlook, but ...
I want to use iCloud as my mail instead of Hotmail or Outlook, but it's not working out, because I only get an error message that it is a problem with activating my e-mail.
-
SCCM client is connecting to the wrong SCCM site
We have a domain controller say TEST1, on which we have 4 SCCM servers. The SCCM’s have the following site codes PR1, PR1, PR3 and PR4 We had a Group Policy for client installation created for site ‘PR1’, under ‘Group Policy Management' console in Ac