Ws_query inEcc 6.0
hi friends,
can anyone tell me what is the replacement Callfunction
for WS_QUERY and WS_FILENAME_GET.this is both are obsolete
in ECC 6.0
thanks in advance
regards,
soorya
Hi Soorya,
You can use ABAP Objects.
Copy paste the code below it works fine.
PARAMETER : p_file LIKE rlgrap-filename.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR path.
DATA: directory TYPE string,
filetable TYPE filetable,
line TYPE LINE OF filetable,
rc TYPE i.
CALL METHOD cl_gui_frontend_services=>get_temp_directory
CHANGING
temp_dir = directory.
CALL METHOD cl_gui_frontend_services=>file_open_dialog
EXPORTING
window_title = 'SELECT THE FILE'
initial_directory = directory
file_filter = '*.XLS'
multiselection = ' '
CHANGING
file_table = filetable
rc = rc.
IF rc = 1.
READ TABLE filetable INDEX 1 INTO line.
P_FILE = line-filename.
ENDIF.
The WS_* functions are replaced by class CL_GUI_FRONTEND_SERVICES.
More info: -->
Old...
> New !
POPUP_TO_DECIDE...
> POPUP_TO_CONFIRM
POPUP_TO_GET_VALUE...
> POPUP_GET_VALUES
RH_USERS_OF_ACTIVITYGROUP_GET...
> RH_ACTIVITYGROUP_USER_VIEW (??Check it) !
WS_EXEC...
> CL_GUI_FRONTEND_SERVICES=>EXECUTE (or, FM: GUI_EXEC) !
WS_FILE_DELETE...
> CL_GUI_FRONTEND_SERVICES=>FILE_DELETE (or, FM: GUI_DELETE_FILE)!
WS_QUERY...
> Various methods in CL_GUI_FRONTEND_SERVICES (like GET_PLATFORM etc...)!
WS_FILENAME_GET...
> CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
Cheers
VJ
Message was edited by: Vijayendra Rao
Similar Messages
-
"WS_QUERY" is obsolete in ECC 6.0
Hi Guys
Which is the correct Function module in ECC 6.0 is related to "WS_QUERY"
Thanks,
Gourisankar.Refer to this thread in sdn
CALL FUNCTION 'WS_QUERY'
or refer
Use the appropriate module from the function group SFES.
The appropriate function modules from funciton group SFES.
GUI_GET_DESKTOP_INFO
GUI_GET_FILE_INFO
GUI_EXEC
GUI_RUN etc
The Equivalent Function Module for in ABAP 4.7 is
WS_QUERY-File Exist is CL_GUI_FRONTEND_SERVICES=>FILE_EXIST , or ,
WS_QUERY-Directory Exist is CL_GUI_FRONTEND_SERVICES=>DIRECTORY_EXIST.
Reward if useful. -
Replacement for ws_query
Hi,
We are using WS_QUERY FM to get the length of file name.
CALL FUNCTION 'WS_QUERY'
EXPORTING
filename = l_filename
query = 'FL'
IMPORTING
return = return
This FM is obslete in ECC 6.0. So is there any FM or method which provides the same functionality.
Thanks & Regards,
Sri ramya g.data:V_FILENAME LIKE RLGRAP-FILENAME value 'C:\Documents and Settings\narayanp\Desktop\pass.txt',
V_RETURN TYPE I.
DATA:L_FILE TYPE STRING,
RC TYPE I.
CALL FUNCTION 'WS_QUERY'
EXPORTING
FILENAME = V_FILENAME
QUERY = 'FL'
IMPORTING
RETURN = V_RETURN
EXCEPTIONS
OTHERS = 1.
*MOVE V_FILENAME TO L_FILE.
*CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_GET_SIZE
EXPORTING
FILE_NAME = L_FILE
IMPORTING
FILE_SIZE = RC
EXCEPTIONS
FILE_GET_SIZE_FAILED = 1
CNTL_ERROR = 2
ERROR_NO_GUI = 3
NOT_SUPPORTED_BY_GUI = 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.
*CALL METHOD CL_GUI_CFW=>FLUSH
EXCEPTIONS
CNTL_SYSTEM_ERROR = 1
CNTL_ERROR = 2
others = 3
*IF SY-SUBRC <> 0.
*MOVE RC TO V_RETURN .
*ENDIF.
WRITE V_RETURN . -
Replacement of WS_QUERY to get length of filename
Hi,
We are using WS_QUERY FM to get the length of file name.
CALL FUNCTION 'WS_QUERY'
EXPORTING
filename = l_filename
query = 'FL'
IMPORTING
return = return
This FM is obslete in ECC 6.0. So is there any FM or method which provides the same functionality.
Regards
MandeepGUI_GET_DESKTOP_INFO
or
You can make use of the method "FILE_EXIST" or "DIRECTORY_EXIST" or "GET_PLATFORM" of the class "CL_GUI_FRONTEND_SERVICES" -
Ws_query function module obsolete in ECC 6.0
HI experts,
V r upgrading system from 4.6 to ecc 6.0 . In one of the programs FM ws_query is obsole, pls let me know the replacement of it.
form process_selections_filen.
call function 'WS_QUERY'
exporting
filename = p_filen
query = 'FE'
importing
return = g_subrc
exceptions
others = 1.
check syst-subrc ne 0 or g_subrc ne 1.
message e000(zz) with p_filen text-e01.
endform.You must OO ABAP.
You can use a method of CL_GUI_FRONTEND_SERVICES class to do the same process. This is the new class for handling files. -
FRONTEND_ERROR in the "WS_QUERY"
Hello Experts,
I am getting an runtime error when trying to open an archived invoice via transaction FBL5N.This runtime error is coming in the FM " WS_QUERY" with description as " Exception condition "Frontend Error raised." Is this error is related to the SAP/IXOS/LiveLink or the SAP Gui?
Currently I am using SAP GUI 640 and we recently upgraded to the ECC 6.0 from 4.7.
Please provide your valuable inputs to overcome this problem.
Thanks and Regards,
SachinEven we are getting this error.
Is there any solution to this error? -
Regarding WS_QUERY function
HEY GUYS,
i have used old func module as below.
CALL FUNCTION WS_QUERY
exporting
QUERY = XP
IMPORTING
RETURN = XXL_DIR
CALL FUNCTION WS_QUERY
exporting
QUERY = ws
IMPORTING
RETURN = win_sys
now i want the same functionality replacement in 4.7
can u sugest me both equavalent one.
regards
ambichan.Hi ambi,
try:
CALL METHOD cl_gui_frontend_services=>directory_list_files
EXPORTING
directory = directory
CHANGING
file_table = ftab
count = z.
*don't forget:
CALL METHOD cl_gui_cfw=>flush.
Andreas -
Hi,
what is the purpose of ws_query function module??
Thanks & Regards,
abc xyzShort Text
OBSOLETE: Execute Query Functions on Presentation Server
This module is obsolete. Use the appropriate module from the function group SFES.
Queries the file parameters and environment variables on the presentation server. The length or the existence of files can be determined.
Parameters
ENVIRONMENT
FILENAME
QUERY
WINID
RETURN
Exceptions
INV_QUERY
NO_BATCH
FRONTEND_ERROR
Function Group
GRAP
Thanks,
Max -
hi all,
i wants to know the relavent function module for WS_QUERY whis is now absaolute
Please suggest me the function module name and how to use it.
Thank you.
Girish.Hi again,
1. here we dont have erp 2004.
so i won't be able to tell u the FM.
2. however,
3. u can use the FM (ws_query)
or the fm which i told u
(see SFES function group)
4. They will work fine, there won't be any problem,
bcos these functions are already there
in standard sap programs and working fine.
regards,
amit m. -
Hi all,
Can you please say me how am i to change this obsolete FM to class CL_GUI_FRONTEND_SERVICES
PARAMETERS: PCPATH LIKE RLGRAP-FILENAME
DEFAULT 'c:\temp\rbe_extract.txt'.
DATA: PATH LIKE PCPATH.
CALL FUNCTION 'WS_QUERY'
EXPORTING
ENVIRONMENT = ' '
FILENAME = PATH
QUERY = 'DE'
WINID = ' '
IMPORTING
RETURN = ERR_CODE
EXCEPTIONS
INV_QUERY = 1
NO_BATCH = 2
FRONTEND_ERROR = 3
OTHERS = 4.Hi,
Use this F.M
CL_GUI_FRONTEND_SERVICES=>DIRECTORY_EXIST (if the query is 'DE')
or CL_GUI_FRONTEND_SERVICES=>FILE_EXIST (if the query is 'FE')
IF U_QUERY = 'DE'.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>DIRECTORY_EXIST
EXPORTING
DIRECTORY = W_FILENAME
RECEIVING
RESULT = W_RETURN
EXCEPTIONS
CNTL_ERROR = 1
ERROR_NO_GUI = 2
WRONG_PARAMETER = 3
NOT_SUPPORTED_BY_GUI = 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.
ELSEIF U_QUERY = 'FE'.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_EXIST
EXPORTING
FILE = W_FILENAME
RECEIVING
RESULT = W_RETURN
EXCEPTIONS
CNTL_ERROR = 1
ERROR_NO_GUI = 2
WRONG_PARAMETER = 3
NOT_SUPPORTED_BY_GUI = 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.
ENDIF.
IF W_RETURN = 'X'.
C_RETURN = '1'.
ELSE.
C_RETURN = ' '.
ENDIF.
Cheers,
Simha.
Reward all the helpful answers... -
Replacement for ws_query FM
Is there any replacement for the function module WS_query.
santosh.bHi Santosh,
The Equivalent Function Module for <b>WS_QUERY</b>-File Exist in ABAP 4.7 is
CL_GUI_FRONTEND_SERVICES=>FILE_EXIST or WS_QUERY-Directory Exist is CL_GUI_FRONTEND_SERVICES=>DIRECTORY_EXIST.
Check this Link.
Re: absolute function
Regards,
AS -
Hi Experts, replace function module WS_QUERY to return the name of OS?
Hi Experts,
the function WS_QUERY can return your computer operating system, you can try it SE37(WS_QUERY), and only give value 'OS' to the QUERY parameter and execute the function, you can see it in RETURN parameter, but now this function is obsolete and I must replace it with another function or method, can anyone of you tell me which function can totally(the return value need to be the same, but any valuable feedback is also welcome) replace it? thanks in advance!
Kind regards
DawsonHi Dawson,
You can use the static method GET_PLATFORM of the class CL_GUI_FRONTEND_SERVICES.
Regards,
Jeevan -
Automatic creation InternalOrder inECC after Service Order creation in CRM
Hi,
After Service Order creation in CRM, the automatic creation of Internal Order in ECC not happening, needs to be do the related settings. Can anybody share the stepts for the same to do the settings.
rgds,
baluHello balu,
Have you released all items?
Also,please make sure that against the item category "Assign BW/CO" is set to Service.
Hope this helps!
Thanks and Best Regards,
Shanthala Kudva. -
How to createWebservice from Functional Module inECC system and how to test
Hi all
i have one functional module in backend system i.e BAPI_GL_ACC_GETLIST. now i want to create a Webservice from the above functional module. once the webservice is ready in ECC system then how do we access in webdynpro thru model. i want to test the same webservice in ECC system itself, what is the procedure??
can any body send the clear steps on starting from create of webservice and till to access the same in webdynpro.
if we want to access from webdynpro thru model for the same webservice which did in ECC system, is it require to deploy on J2ee engine by creating the same webservice or we can access that directly in Webdynpro??
can you please tell me clear steps on the same rather than documents??
Regards
Suresh babuHi Suresh,
refer This ppt link will help you.
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/244e7923-0a01-0010-5887-fe0b0c6dbb8d
Supraja -
Looking for some assistancte in GUI_DOWNLOAD
Hi there,
See I have this exercise I have to do here. Basically I have to create a program that will download the contects of SBOOK to my pc. I have to use GUI_DOWNLOAD in this exercise. Also, the user will have to input the path and file name of the file to be downloaded to. I have place appropriate error message on the screen as well but I'm not sure how to do this.Being relatively new to this, I tried looking for some samples and this is what I came up so far.
REPORT ZISTANZS_TRNG_EX9C.
TABLES: SBOOK.
PARAMETERS: FILEINP(30) DEFAULT 'c:\TEMP\wee.txt' OBLIGATORY.
DATA: BEGIN OF ITAB OCCURS 100.
INCLUDE STRUCTURE SBOOK.
DATA: END OF ITAB.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = FILEINP
FILETYPE = 'ASC'
write_field_separator = 'X'
TABLES
DATA_TAB = ITAB
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_WRITE_ERROR = 2
OTHERS = 3.
Unfortunately, it doesn't work though. It keeps saying that my FILENAME is not the same data type as FILEINP? I'm asking for some assistance in how this can be properly solved? Any help would be appreciated /Hi,
Please refer the code below:
* File download, uses older techniques but achieves a perfectly
* acceptable solution which also allows the user to append data to
* an existing file.
PARAMETERS: p_file like rlgrap-filename.
* Internal table to store export data
DATA: begin of it_excelfile occurs 0,
row(500) type c,
end of it_excelfile.
DATA: rc TYPE sy-ucomm,
ld_answer TYPE c.
CALL FUNCTION 'WS_QUERY'
EXPORTING
query = 'FE' "File Exist?
filename = p_file
IMPORTING
return = rc.
IF rc NE 0. "If File alread exists
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
* TITLEBAR = ' '
* DIAGNOSE_OBJECT = ' '
text_question = 'File Already exists!!'
text_button_1 = 'Replace'
* ICON_BUTTON_1 = ' '
text_button_2 = 'New name'
* ICON_BUTTON_2 = ' '
* DEFAULT_BUTTON = '1'
* DISPLAY_CANCEL_BUTTON = 'X'
* USERDEFINED_F1_HELP = ' '
* START_COLUMN = 25
* START_ROW = 6
* POPUP_TYPE =
IMPORTING
answer = ld_answer
* TABLES
* PARAMETER =
EXCEPTIONS
text_not_found = 1
OTHERS = 2.
* Option 1: Overwrite
IF ld_answer EQ '1'.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
* BIN_FILESIZE =
filename = p_file "File Name
filetype = 'ASC'
* IMPORTING
* FILELENGTH =
TABLES
data_tab = it_excelfile "Data table
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE i003(zp) WITH
'There was an error during Excel file creation'(200).
exit. "Causes short dump if removed and excel document was open
ENDIF.
* Option 2: New name.
ELSEIF ld_answer EQ '2'.
CALL FUNCTION 'DOWNLOAD'
EXPORTING
filename = p_file "File name
filetype = 'ASC' "File type
* col_select = 'X' "COL_SELECT
* col_selectmask = 'XXXXXXXXXXXXXXXXXXXXXXXXXX'
* "COL_SELECTMASK
filetype_no_show = 'X' "Show file type selection?
* IMPORTING
* act_filename = filename_dat
TABLES
data_tab = it_excelfile "Data table
* fieldnames =
EXCEPTIONS
file_open_error = 01
file_write_error = 02
invalid_filesize = 03
invalid_table_width = 04
invalid_type = 05
no_batch = 06
unknown_error = 07.
ENDIF.
ELSE. "File does not alread exist.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
* BIN_FILESIZE =
filename = p_file "File name
filetype = 'ASC' "File type
* IMPORTING
* FILELENGTH =
TABLES
data_tab = it_excelfile "Data table
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE i003(zp) WITH
'There was an error during Excel file creation'(200).
exit. "Causes short dump if removed and excel document was open
ENDIF.
ENDIF.
Thanks,
Sriram Ponna.
Maybe you are looking for
-
DL Break Point Issue - Please Help.
Hello, I use to work in DVDSP when you could only do one layer and even then I knew just enough to get the job done. Now I have a program that is 6.6 gigs total size (according to DVDSP) and I can't get this thing to find the break point. I have read
-
While generating 2001 qutoa i am getting error
hi while generating the 2001 wiht 24 quto type the error is " not enough quoto " it is giving .... but when i remove the tick mark for quota deduction for assign the counting rule to absence then i am not getting any error...but the limit is exceddin
-
Hi, While trying to start UCM server I am getting the following error. <Feb 21, 2011 7:27:50 AM MST> <Warning> <JDBC> <BEA-001110> <No test table set up for pool "CSDS". Connections will not be tested.> <Feb 21, 2011 7:27:51 AM MST> <Warning> <oracle
-
iphone 4 on verizon(16 gb) ios 4.2.1 tried to restore and update but got error code after download.... all the iphone does is sit there with the picture to connect to itunes. This is very important, please help!!!!!! updated itunes and restarted and
-
Copying while installation 11gr2
on windows-7 Ultimate 32bit 2gb ram core2duo desktop just downloaded Oracle Database 11gr2 when i try to install i receive the following errors one after another file not found c:\app\KASHIFLAB\product1\11.2.0\dbhome_1\oc4j\j2ee\oc4j_application\appl