GTS tables relations and important function modules
Hi Friends,
I am totally new for the developments in GTS. Wanted some help on the tables for master data, transactional data in GTS.
Also what are the important function modules used in GTS.
Anybody can give me some inputs on the above..?
regards
Nalin
Well, passing a table thru the interface with no type is easy, just don't assign a structure when defining the interface. It will then take its structure by what is being passed to it.
So if you would pass an internal table to it with the structure like so.
Data: begin of itab occurs 0,
line(1000) type c,
end of itab.
Then that is the structure inside the function module.
Did this answer your question? Please explain further if not.
Regards,
Rich Heilman
Similar Messages
-
Doubt in export, import and table para when creating Function Module
Dear fellow ABAPers,
I have a doubt in defining export, import and table parameter while creating a function module.
I am calling a function module inside a user exit. Now in the user exit the SAP fills an internal table called i_lfa1 with all the data user has eneterd.
Now I want to pass this whole internal table to function module and the perform some checks on the values of internal table.
After that function module fills an error structure with values depending on some check.
1)
How do I pass this internal table to function module ?
When I am creating function module in se37 where do I define this iternal table type ? Is it in Import or Table parameter during function module creation?
2)
Where do I define error structure type (which is returned by function module to main program)? Is it in Export or table parameter during function module creation?
Please clear my doubt..
Relevant points will be awarded.
Regards,
Tushar.Hi Tushar,
1. How do I pass this internal table to function module ?
I assume u are creating your own Y/Z FM.
Pass it thru TABLES parameter.
2. When I am creating function module in se37 where do I define this iternal table type
Define this in TABLES interface.
What Type ?
THE SAME TYPE WHICH HAS BEEN DEFINED
WHILE PASSING IN THE USER-EXIT FUNCTION MODULE.
IF U SEE THE FM OF THE USER-EXIT,
U WILL COME TO KNOW.
3.
Where do I define error structure type (which is returned by function module to main program)? Is it in Export or table parameter during function module creation?
Define it in TABLES interace. (not in export, import)
(Since what u are going to return is an internal table)
U can take for eg. BDCMSGCOLL.
OR u can create your own Y/Z structure
for the same purpose.
(or u can use the structure type T100)
I hope it helps.
Regards,
Amit M. -
Work flow and tables related with ESS Travel Module
Hi Experts,
I am new for work flow. Presently I am working for SAP ESS / MSS Travel module. Can you please let me know the names of work flows and tables related with ESS Travel module.
Regards,
GaryHi Gary,
Check if this [thread1|Let us learn SAP ESS Travel] [thread2|Travel Management Tables] helps you.
Regards,
Saumya -
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 -
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 -
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 -
How to get tables used by a Function Module
Hi,
How to know the tables used by a function module dynamically.
Cuurently im using BAPI_MATERIAL_SAVEDATA in my report program.
I tried FM GET_TABLES to know the tables, but could see only tables used in the report.
Main issue in my case is when im running this update program, could observe different tables being displayed as updated in SM50(Process Overview).Want to clarify as why these tables which are not being used in my report are being displayed in SM50.
So was doubtin weather this FM is using these displayed tables.
Thanks in advance for u r replys.
Regards,
DedeepyaHi Dedeepya,
you could use a SQL Trace (tx. ST05) to list all tables affected and operations that realize. Just active the trace, execute FM, and Deactive trace. Then click in "Display trace" and check it.
Best regards,
Pablo -
Update TVARV table entries using a Function Module or Program
Hi Gurus,
My requirement is that I have a entry in TVARV table which has a 'low'. We would like to change this value whenever we desire. We are unable to do it via sm30 and se16 as table maintenance access is not permitted in Production environment.
Can you please provide any Function module or program code to do it?
Requirement - User can enter a value into TVARV table by executing a function module or program
Thank you all, will award points,
PriyanshHi Priyansh,
Please refer to SAP Help for more information on variant maintenance and more specifically variable values in variants. You can use t/code STVARV for maintaining the variant variables in table TVARVC (Client-Specific Variant Variables).
Note: I suggest to use the TVARVC table instead of TVARV.
If you are looking for Function Modules in the area of Variant Maintenance, then please have a look at Function Group SVAR (t/code SE80).
If you are looking for Function Modules in the area of User Variables in Variants, then please have a look at Function Group SVUV (t/code SE80).
Furthermore, if you are looking for a program to update table TVARVC, please have a look at ABAP: Dynamic Variant Processing with STVARV.
Best eregards,
Sander -
Passing selection table as parameter to function modules
i tried to pass a selection table as a parameter to a function module but there is a problem stating the eror the table length is different.
*& Report ZSFSELECT_OPTIONS_PGM
REPORT zsfselect_options_pgm.
TABLES zselect_options.
SELECT-OPTIONS sop FOR zselect_options-id.
DATA : fname(15) TYPE c.
*CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = fname
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME =
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3
*IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*ENDIF.
DATA lth(2) TYPE c.
DATA ty TYPE i.
DATA o TYPE i.
DATA l TYPE i.
DATA k TYPE c.
DESCRIBE FIELD sop-sign TYPE lth LENGTH ty IN CHARACTER MODE.
CALL FUNCTION fname
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
sf_sop =sop
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
in the smart form i have tried to pass the sp as the table.
i have created a program line node
:SELECT * FROM zselect_options INTO TABLE it_tab WHERE id IN sf_sop.Hi,
If i understand ur problem correctly u r trying to pass a select-option to Tables for a smartform function module. It gives an error & it correct.
If u understand the structure of a select option, it will have 4 fields in it & the structure will be
SIGN CHAR1
OPTION CHAR2
LOW Type Zfield
HIGH Type Zfield
But ur receiving Table paramter of the smnartform FM will be having only 1 field - Type Zfield
So this mismatch gives u an error.
Solution:
Case1:
Write code outsied th FM in ur program to get all the values & build an internal table & pass that to the FM.
Case2:
Define the Structure of table in the smartforms as tols earlier & then try passsig the Select option.
Thanks & Regards,
Bhargava -
Hi,
Can you tell me list of important Function modules used in ABAP or send me a doc please?
My email id: [email protected]
Thanks in advance.Nuren,
Its all depends on what you need, you can get the list from se37 itself. Whenever you need to search, you can first use of searching with descrition by giving download .....
Similarly you can search in the same way for function groups and then the list of FM's under this FG.
See these links
<a href="http://www.sapdevelopment.co.uk/fmodules/fmssap.htm">http://www.sapdevelopment.co.uk/fmodules/fmssap.htm</a>
<a href="http://planetsap.com/Useful_function_modules.htm">http://planetsap.com/Useful_function_modules.htm</a>
<a href="http://www.sapgenie.com/abap/functions.htm">http://www.sapgenie.com/abap/functions.htm</a>
Regds
Manohar -
How to declare Dynamic table in Tables Parameters of a Function Module...
Hi Gurus,
I would like to Know how to declare a Dynamic table in Tables parameters of a Function Module.
so that it should be able to hold any table data ....
I have tried all possible ways of trying to assign fields-symbol like declarations which doesnt allow here ...
plz Dont reply with the basics of creating dynamic internal tables, coz my case is not an Internal table it is FM table parameter declaration.....Hi,
If you are requirement is to create a function module with tables parameter having a generic line type i.e. no specific line type
just declare it with a name under Parameter name with out specifying the type.
A reference function module with such parameter, i would quote is the standard GUI_UPLOAD/ GUI_DOWNLOAD where the parameters specified under TABLES are generic.
If you want to process the values passed to these parameters in the source code of function module, field symbols would be a preferable option.
Regards,
Sharath Panuganti -
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 -
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, -
CRM Tables , Tables Mappings , T-codes , Function modules
Hi All,
I am new to CRM , I want to know the tables , table mappings transaction
codes , functional modules used . Can any one mention the link / list down all which i have mentioned above .
I will be very helpful if i get this information.
cheers,
Chandra.hi,
CRM tables:
https://forums.sdn.sap.com/click.jspa?searchID=2400935&messageID=3134573
https://forums.sdn.sap.com/click.jspa?searchID=2400935&messageID=3128631
https://forums.sdn.sap.com/click.jspa?searchID=2400935&messageID=3269744
CRM FM:
https://forums.sdn.sap.com/click.jspa?searchID=2400963&messageID=3239545
Reward points if useful..
Regards
Nilesh -
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.
Maybe you are looking for
-
[JS, CS3] Setting Page Destination on Button
Hi I unsuccessfull try to set the a Page Destination on a Button. The script loops through the Document and picks certain textframes, which contain the page.name as text. inside the loop I do this: // START LOOP // Getting the Content of Textframe ->
-
U330 + Windows 7 Drivers Problem & Solutions
U330 Windows 7 Drivers http://consumersupport.lenovo.com/en/DriversDownloads/drivers_list.aspx?CategoryID=16 News Updates 11.4.09 - BIOS Release Fix Switchable Graphics and More The new bios version 67 fixes switchable graphics issues from before and
-
20" iMac Screen Bezel Replacement
I would like to replace a damaged screen bezel on my 20" i Mac---any ideas as to how much this would cost.........thanks I managed to carry this machine 1/2 way around the world in nice case ---and finally the last flight of my journey the airport se
-
Showing records where groups of 4 are present
I have an example table (input) where I want all records which can be grouped by 4 starting with number 1 (output). How could I accomplish this? input: id le 1 a 1 b 2 c 1 d 2 d 3 d 1 e 2 e 3 e 4 e 1 f
-
Comparing incoming file name having timestamp with system time.
Hi, The scenario is File to FIle. i have to read the incoming file name which will be having time stamp. compare the time stamp with the system time . if the difference in time is within specified time then send the file to target location,else send