Replacement of Function Module RH_AHQ_INT_BUILD_WHERE_CLAUSE
In 4.5B ver I am using Function module <b>RH_AHQ_INT_BUILD_WHERE_CLAUSE</b> for generating dynamic where clause for select statement.
But In 4.7 ver this Function does not exit please let me know any other FM is there which will satisfies my requirements.
Thanks in Advance.
Dear Sir,
Can you please tell me how to use these function modules that you have mentioned.
Thanks Ranjan MR
Similar Messages
-
Replacement for Function Module 'SEND_TABLE_TO_EXCEL' in ECC 6.0
Hi Friends,
Can anybody help me to find the replacement of Function Module <b>'SEND_TABLE_TO_EXCEL'</b> in ECC 6.0.
The Function Module exists in 4.6b. But it is no longer available in ECC 6.0.
Regards,
Vaitheeswaran.If you want to download an internal table to excel format you can use the <b>"GUI_DOWNLOAD"</b> function.Some sample code is as below.
types: begin of gs_xcel,
vkorg type vbak-vkorg,
del1(1) type c,
vtweg type vbak-vtweg,
del2(1) type c,
zzposmgr type zzsdacspo-zzposmgr,
del3(1) type c,
zz_region type zzsdaregn-zz_region,
del4(1) type c,
ename2 type pa0001-ename,
del5(1) type c,
zzcsospos type vbak-zzcsospos,
del6(1) type c,
ename type pa0001-ename,
del7(1) type c,
vbeln type vbfs-vbeln,
del8(1) type c,
text type t100-text,
del9(1) type c,
msgv1 type vbfs-msgv1,
del10(1) type c,
auart type vbak-auart,
del11(1) type c,
erdat type vbsk-erdat,
del12(1) type c,
wadat_ist type likp-wadat_ist,
end of gs_xcel.
data: gt_xcel type table of gs_xcel,
gws_xcel type gs_xcel.
data: v_tmp_name type string,
v_tmp_name = 'c:\sdrinver.xls'.
call function 'GUI_DOWNLOAD'
exporting
BIN_FILESIZE =
filename = v_tmp_name
FILETYPE = 'ASC'
APPEND = ' '
WRITE_FIELD_SEPARATOR = ','
HEADER = '00'
TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = ' '
CONFIRM_OVERWRITE = ' '
NO_AUTH_CHECK = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = ' '
TRUNC_TRAILING_BLANKS_EOL = 'X'
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
IMPORTING
FILELENGTH =
tables
data_tab = gt_xcel
FIELDNAMES =
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 -
How to replace ws_filename_get function module to file_open_dialog
how to replace ws_filename_get function module to file_open_dialog
Here it is,
DATA: i_file_name TYPE FILETABLE,
w_file_name TYPE FILE_TABLE,
v_rc TYPE i.
CALL METHOD cl_gui_frontend_services=>file_open_dialog
EXPORTING
INITIAL_DIRECTORY = 'C:\'
CHANGING
file_table = i_file_name
rc = v_rc
EXCEPTIONS
FILE_OPEN_DIALOG_FAILED = 1
CNTL_ERROR = 2
ERROR_NO_GUI = 3
others = 4.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
READ TABLE i_file_name INTO w_file_name INDEX 1.
No wthe w_file_name will contain the file name.
Regards
Kathirvel -
Replacement of Function module in ECC 6.0
Hello All,
The Function module 'NAMETAB_GET' is shown to be obsolete in ECC 6.0 .
Please suggest which of the function modules among 'DDIF_FIELDINFO_GET' and 'DDIF_NAMETAB_GET' can be used as a replacement for the same.
Also ,it would be helpful if the use of these function modules is mentioned.
Best Regards,
Lavanya.use 'DDIF_NAMETAB_GET'
Functionality
This function module reads the runtime information (nametab) of a table or in general of any type of the ABAP Dictionary. However, the runtime information does not contain any text. You should use the function module DDIF_FIELDINFO_GET to read the runtime information including text (or to determine the domain for table fields).
The types of the ABAP Dictionary are divided into data elements, structured types and table types.
A structured type consists of a sequence of components that are each identified by a unique name. A type is defined for each of these components. In addition to the types of the ABAP Dictionary, you can also use the built-in types of the R/3 System (CHAR, NUMC,...) to define the types of the components.
All its components as well as the fields of its structured components are called the fields of a structured type. The name of a field no longer uniquely identifies it within a structured type. For example, a structured type S could have a structured component F, which itself has a component called F. In this case S would have two fields with the name F. For this reason, its long field name is used to identify a field within a structured type. The long field name is the same as the name of the components for the components of the structured type itself. For the fields of a structured component, the long field name is a concatenation of the name of this structured component, the separator '-' and the long field name of the field in the structured component.
A field whose type is defined by a data element or a built-in type is also called an elementary type. A structured type whose components are all defined as elementary types is called flat. All other structured types are called deep.
This module gets the runtime information for the type whose name is defined in the IMPORT parameter TABNAME. If there is no such type, the exception NOT_FOUND is triggered.
Caution: If the IMPORT parameter ALL_TYPES is not set, only flat structured types are taken into consideration. In this case the exception is also triggered if the specified type is a data element, deep structure or a table type.
If the IMPORT parameter LFIELDNAME is not initial, only structured types having a field with the long name defined by LFIELDNAME are taken into consideration. The exception NOT_FOUND is triggered for all other types.
The internal representation of the runtime object is returned in parameters X030L_WA and X031L_TAB. Depending on the type category, this information is then edited in the corresponding parameters (see documentation about the parameters).
Notes
1. If parameter LFIELDNAME is not initial, X031L_TAB nevertheless contains the description of all fields of the structured type. The decoded form is only determined for the specified field, and the result is copied to DFIES_WA instead of DFIES_TAB. Since decoding for all the fields often takes up most of the runtime for this module, you should set parameter LFIELDNAME if you only need information about one field of the structured type.
This module gets the runtime information about a type. This means that only the currently active version of the type is taken into consideration. If none exists, the exception NOT_FOUND is triggered.
The corresponding function module DDIF_<object type>_GET is used to read the actual definition of a type of the ABAP Dictionary.
Caution: These read modules are much less efficient than the modules for defining the runtime information. You should therefore only use them if the runtime information is not sufficient.
2. The documentation for IMPORT parameter GROUP_NAMES describes how to handle named includes. -
Replacement of Function Module 'www_get_mime_object' in ECC 6.0
HI,
I need an exact replacement for the Function Module 'www_get_mime_object' in ECC 6.0.
Please help it out.
Regards,
Ashok.hey
-
Need Help in Replacement of Function Modules
Hello all,
I am working on Upgrade project from ECC 5.0 to ECC 6.0. I am facing problems for Replacement of two Obsolete Function Modules. Please give me a solution. FM's are as follows.
1) SET_AUTHORITY : This FM is obsolete in ECC 6.0 and there is not alternative FM present in help.sap.com or any other web portal.
2) WS_QUERY : Here as per my knowledge we use class CL_GUI_FRONTEND_SERVICES and methods FILE_EXIST or DIRECTORY_EXIST as per the parameters in old FM. For parameter 'FS' we use 'FILE_EXIST' and 'DS' we use 'DIRECTORY EXIST'.
But in our program prev. FM has parameter 'OS' i.e. Operating System.
But there is not method called 'OS EXIST' or similar. Please suggest suitable method.
Thanking you all in anticipation.
Best Regards,
HarishHi Harish,
I too could not find any replacement for SET_AUTHORITY
Obsolete Modules can be used in newer versions, but it is not supported by SAP in case of any technical issues.If you still need a replacement, you can replace it by the source code in the FM SET_AUTHORITY itself and modify according to your needs.
Below is the source code of FM SET_AUTHORITY, so you can modify it according to your requirement.
DATA: l_actvt TYPE tact-actvt,
l_hier TYPE STANDARD TABLE OF sethier WITH HEADER LINE.
CASE action.
WHEN 'A '.
l_actvt = activity-add.
WHEN 'C '.
l_actvt = activity-modify.
WHEN 'D '.
l_actvt = activity-display.
WHEN 'E '.
l_actvt = activity-delete.
WHEN 'UD '.
l_actvt = activity-display.
ENDCASE.
CALL FUNCTION 'G_SET_TREE_IMPORT'
EXPORTING
no_descriptions = 'X'
no_rw_info = 'X'
setid = set
tabname = table
root_header_only = 'X'
TABLES
set_hierarchy = l_hier
EXCEPTIONS
OTHERS = 0.
READ TABLE l_hier INDEX 1.
IF sy-subrc <> 0.
CLEAR l_hier.
l_hier-shortname = set.
ENDIF.
CALL FUNCTION 'G_SET_AUTHORITY_CHECK'
EXPORTING
actvt = l_actvt
authgr = l_hier-authgr
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
CASE action.
WHEN 'A '.
MESSAGE e827 WITH l_hier-shortname RAISING no_authority.
WHEN 'C '.
MESSAGE e828 WITH l_hier-shortname RAISING no_authority.
WHEN 'D '.
MESSAGE e829 WITH l_hier-shortname RAISING no_authority.
WHEN 'E '.
MESSAGE e830 WITH l_hier-shortname RAISING no_authority.
WHEN 'UD '.
MESSAGE e831 WITH l_hier-shortname RAISING no_authority.
ENDCASE.
ENDIF.
If you need help in replacing in the above source code, please post your code here so that I can help you in modifying accordingly.
Regards,
Vasuki -
iam using the function module HELP_VALUES_GET_WITH_TABLE in 4.6c which is replaced by
F4IF_INT_TABLE_VALUE_REQUEST in ecc 6.0.But i want to know the parameters passed to this new FM in ecc.could you please helpHi,
check this example.
TABLES: mara, makt.
DATA mat LIKE mara-matnr.
DATA: BEGIN OF itab OCCURS 0,
matnr LIKE mara-matnr,
END OF itab.
DATA : BEGIN OF btab OCCURS 0,
maktx LIKE makt-maktx,
END OF btab.
DATA : return LIKE ddshretval OCCURS 0 WITH HEADER LINE.
SELECT-OPTIONS: so_matnr FOR mara-matnr,
so_maktx FOR makt-maktx.
INITIALIZATION.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR so_matnr-low.
PERFORM matnr.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR so_matnr-high.
PERFORM matnr.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR so_maktx-low.
PERFORM maktx.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR so_maktx-high.
PERFORM maktx.
*& Form matnr
text
FORM matnr.
REFRESH itab.
SELECT matnr FROM mara INTO TABLE itab.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'MATNR '
dynprofield = 'P_MATNR '
dynpprog = sy-repid
dynpnr = sy-dynnr
value_org = 'S'
TABLES
value_tab = itab
return_tab = return.
mat = return-fieldval.
UNPACK mat TO mat.
so_matnr = return-fieldval.
REFRESH return.
CLEAR return.
ENDFORM. "matnr
*& Form maktx
FORM maktx.
REFRESH btab.
SELECT maktx FROM makt INTO TABLE btab WHERE matnr = mat AND spras =
sy-langu.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'MAKTX'
dynprofield = 'SO_MAKTX '
dynpprog = sy-repid
dynpnr = sy-dynnr
value_org = 'S'
TABLES
value_tab = btab
return_tab = return.
so_maktx = return-fieldval.
REFRESH return.
CLEAR return.
ENDFORM. "maktx -
Regarding replacement of function module 'GUI_GET_DESKTOP_INFO'
what function module is replaced by obselete function module 'GUI_GET_DESKTOP_INFO'
Hi Naveenkumar,
For differenct fucntions specified in obselete FM
1: Host name (host name of current system) -- CL_GUI_FRONTEND_SERVICES=>GET_IP_ADDRESS
CL_GUI_FRONTEND_SERVICES=>GET_COMPUTER_NAME
2: Windows directory -- CL_GUI_FRONTEND_SERVICES=>GET_WINDOWS_DIRECTORY
3: System directory -- CL_GUI_FRONTEND_SERVICES=>GET_SYSTEM_DIRECTORY
4: Temp. directory -- CL_GUI_FRONTEND_SERVICES=>GET_TEMP_DIRECTORY
5: Domain user name -- CL_GUI_FRONTEND_SERVICES=>GET_USER_NAME
6: Platform -- use CL_GUI_FRONTEND_SERVICES=>GET_PLATFORM
7: Windows build number
8: Windows version
9: Program name
10: Program path
11: Current directory (Directory for current process) --
CL_GUI_FRONTEND_SERVICES=>GET_SAPGUI_WORKDIR
Regards,
Mohaiyuddin -
Replacement for function modules
can anyone let me know the replacement for these function modules
POPUP_TO_CONFIRM_STEP
POPUP_TO_CONFIRM_WITH_MESSAGEIt says the name of the replacement right there in the Attributes of the above FMs: POPUP_TO_CONFIRM.
Hope this helps.
Sudha -
Replace REUSE_ALV function module with use of OO ALV(obect oriented)
HI,
I m using function module 'REUSE_ALV_GRID_DISPLAY' to disply the report but now client want to use object oriented ALV instead of REUSE_ALV function
pls help me.its very urgent
thanks!
Vipin
pls find the code below.
FORM f0001_get-select_data .
SELECT a~pernr
a~endda
a~begda
a~bukrs
a~werks
a~persg
a~persk
a~btrtl
a~abkrs
a~kostl
a~orgeh
a~plans
b~nachn
b~vorna
b~midnm
INTO CORRESPONDING FIELDS OF TABLE i_pa0001_pa0002
FROM pa0001 AS a INNER JOIN pa0002 AS b
ON apernr = bpernr
WHERE a~pernr IN s_pernr
AND a~werks IN s_werks
AND a~orgeh IN s_orgeh
AND a~plans IN s_plans.
SORT i_pa0001_pa0002 BY pernr .
IF NOT i_pa0001_pa0002[] IS INITIAL .
CLEAR: w_i_lines.
DESCRIBE TABLE i_pa0001_pa0002 LINES w_i_lines.
IF w_i_lines GT 0.
SELECT pernr
kostl
lstar
werks
lifnr
ebeln
ebelp
lstnr
FROM pa0315
INTO CORRESPONDING FIELDS OF TABLE i_pa0315
FOR ALL ENTRIES IN i_pa0001_pa0002
WHERE pernr = i_pa0001_pa0002-pernr
AND kostl = i_pa0001_pa0002-kostl
AND ebeln IN s_ebeln.
SORT i_pa0315 BY pernr kostl.
ENDIF.
CLEAR: w_i_lines.
DESCRIBE TABLE i_pa0001_pa0002 LINES w_i_lines.
IF w_i_lines GT 0.
SELECT pernr
endda
begda
schkz
FROM pa0007
INTO CORRESPONDING FIELDS OF TABLE i_pa0007
FOR ALL ENTRIES IN i_pa0001_pa0002
WHERE pernr = i_pa0001_pa0002-pernr
AND endda = i_pa0001_pa0002-endda
AND begda = i_pa0001_pa0002-begda.
SORT i_pa0007 BY pernr.
ENDIF.
CLEAR: w_i_lines.
DESCRIBE TABLE i_pa0001_pa0002 LINES w_i_lines.
IF w_i_lines GT 0.
SELECT orgeh
orgtx
FROM t527x
INTO CORRESPONDING FIELDS OF TABLE i_t527x
FOR ALL ENTRIES IN i_pa0001_pa0002
WHERE orgeh = i_pa0001_pa0002-orgeh.
SORT i_t527x BY orgeh.
ENDIF.
CLEAR: w_i_lines.
DESCRIBE TABLE i_pa0001_pa0002 LINES w_i_lines.
IF w_i_lines GT 0.
SELECT plans
plstx
FROM t528t
INTO CORRESPONDING FIELDS OF TABLE i_t528t
FOR ALL ENTRIES IN i_pa0001_pa0002
WHERE plans = i_pa0001_pa0002-plans.
SORT i_t528t BY plans.
ENDIF.
ENDIF.
Merging data of i_pa0001_pa0002,i_pa0315 & i_pa0007 into i_outtab.
LOOP AT i_pa0001_pa0002 INTO w_pa0001_pa0002 .
MOVE-CORRESPONDING w_pa0001_pa0002 TO w_final.
READ TABLE i_pa0315 INTO w_pa0315 WITH KEY pernr =
w_pa0001_pa0002-pernr
kostl = w_pa0001_pa0002-kostl BINARY SEARCH.
IF sy-subrc = 0.
w_final-kostl = w_pa0315-kostl.
w_final-lstar = w_pa0315-lstar.
w_final-werks_p = w_pa0315-werks.
w_final-lifnr = w_pa0315-lifnr.
w_final-ebeln = w_pa0315-ebeln.
w_final-ebelp = w_pa0315-ebelp.
w_final-lstnr = w_pa0315-lstnr.
ENDIF.
READ TABLE i_pa0007 INTO w_pa0007 WITH KEY pernr =
w_pa0001_pa0002-pernr BINARY SEARCH.
IF sy-subrc = 0.
w_final-schkz = w_pa0007-schkz.
ENDIF.
READ TABLE i_t527x INTO w_t527x WITH KEY orgeh = w_pa0001_pa0002-orgeh
BINARY SEARCH.
IF sy-subrc = 0.
w_final-orgtx = w_t527x-orgtx.
ENDIF.
READ TABLE i_t528t INTO w_t528t WITH KEY plans =
w_pa0001_pa0002-plans BINARY SEARCH.
IF sy-subrc = 0.
w_final-plstx = w_t528t-plstx.
ENDIF.
APPEND w_final to i_outtab.
ENDLOOP.
ENDFORM. "f001_get-select_data
*& Form f002_display_data
text
FORM f0002_display_data.
Build the field catalog
ls_fieldcat-col_pos = '1'.
ls_fieldcat-fieldname = 'PERNR'.
ls_fieldcat-tabname = 'i_outtab'.
ls_fieldcat-ref_tabname = 'PA0001'.
APPEND ls_fieldcat TO lt_fieldcat.
CLEAR: ls_fieldcat.
ls_fieldcat-col_pos = '2'.
ls_fieldcat-fieldname = 'NACHN'.
ls_fieldcat-tabname = 'i_outtab'.
ls_fieldcat-ref_tabname = 'PA0002'.
APPEND ls_fieldcat TO lt_fieldcat.
CLEAR: ls_fieldcat.
ls_fieldcat-col_pos = '3'.
ls_fieldcat-fieldname = 'VORNA'.
ls_fieldcat-tabname = 'i_outtab'.
ls_fieldcat-ref_tabname = 'PA0002'.
APPEND ls_fieldcat TO lt_fieldcat.
CLEAR: ls_fieldcat.
ls_fieldcat-col_pos = '4'.
ls_fieldcat-fieldname = 'MIDNM'.
ls_fieldcat-tabname = 'i_outtab'.
ls_fieldcat-ref_tabname = 'PA0002'.
APPEND ls_fieldcat TO lt_fieldcat.
CLEAR: ls_fieldcat.
ls_fieldcat-col_pos = '5'.
ls_fieldcat-fieldname = 'BUKRS'.
ls_fieldcat-tabname = 'i_outtab'.
ls_fieldcat-ref_tabname = 'PA0001'.
APPEND ls_fieldcat TO lt_fieldcat.
CLEAR: ls_fieldcat.
ls_fieldcat-col_pos = '6'.
ls_fieldcat-fieldname = 'WERKS'.
ls_fieldcat-tabname = 'i_outtab'.
ls_fieldcat-ref_tabname = 'PA0001'.
APPEND ls_fieldcat TO lt_fieldcat.
CLEAR: ls_fieldcat.
ls_fieldcat-col_pos = '7'.
ls_fieldcat-fieldname = 'PERSG'.
ls_fieldcat-tabname = 'i_outtab'.
ls_fieldcat-ref_tabname = 'PA0001'.
APPEND ls_fieldcat TO lt_fieldcat.
CLEAR: ls_fieldcat.
ls_fieldcat-col_pos = '8'.
ls_fieldcat-fieldname = 'PERSK'.
ls_fieldcat-tabname = 'i_outtab'.
ls_fieldcat-ref_tabname = 'PA0001'.
APPEND ls_fieldcat TO lt_fieldcat.
CLEAR: ls_fieldcat.
ls_fieldcat-col_pos = '9'.
ls_fieldcat-fieldname = 'BTRTL'.
ls_fieldcat-tabname = 'i_outtab'.
ls_fieldcat-ref_tabname = 'PA0001'.
APPEND ls_fieldcat TO lt_fieldcat.
CLEAR: ls_fieldcat.
ls_fieldcat-col_pos = '10'.
ls_fieldcat-fieldname = 'ABKRS'.
ls_fieldcat-tabname = 'i_outtab'.
ls_fieldcat-ref_tabname = 'PA0001'.
APPEND ls_fieldcat TO lt_fieldcat.
CLEAR: ls_fieldcat.
ls_fieldcat-col_pos = '11'.
ls_fieldcat-fieldname = 'ORGEH'.
ls_fieldcat-tabname = 'i_outtab'.
ls_fieldcat-ref_tabname = 'PA0001'.
APPEND ls_fieldcat TO lt_fieldcat.
CLEAR: ls_fieldcat.
ls_fieldcat-col_pos = '12'.
ls_fieldcat-fieldname = 'ORGTX'.
ls_fieldcat-tabname = 'i_outtab'.
ls_fieldcat-ref_tabname = 'T527X'.
APPEND ls_fieldcat TO lt_fieldcat.
CLEAR: ls_fieldcat.
ls_fieldcat-col_pos = '13'.
ls_fieldcat-fieldname = 'PLANS'.
ls_fieldcat-tabname = 'i_outtab'.
ls_fieldcat-ref_tabname = 'PA0001'.
APPEND ls_fieldcat TO lt_fieldcat.
CLEAR: ls_fieldcat.
ls_fieldcat-col_pos = '14'.
ls_fieldcat-fieldname = 'PLSTX'.
ls_fieldcat-tabname = 'i_outtab'.
ls_fieldcat-ref_tabname = 'T528T'.
APPEND ls_fieldcat TO lt_fieldcat.
CLEAR: ls_fieldcat.
ls_fieldcat-col_pos = '15'.
ls_fieldcat-fieldname = 'SCHKZ'.
ls_fieldcat-tabname = 'i_outtab'.
ls_fieldcat-ref_tabname = 'PA0007'.
APPEND ls_fieldcat TO lt_fieldcat.
CLEAR: ls_fieldcat.
ls_fieldcat-col_pos = '16'.
ls_fieldcat-fieldname = 'KOSTL'.
ls_fieldcat-tabname = 'i_outtab'.
ls_fieldcat-ref_tabname = 'PA0315'.
APPEND ls_fieldcat TO lt_fieldcat.
CLEAR: ls_fieldcat.
ls_fieldcat-col_pos = '17'.
ls_fieldcat-fieldname = 'LSTAR'.
ls_fieldcat-tabname = 'i_outtab'.
ls_fieldcat-ref_tabname = 'PA0315'.
APPEND ls_fieldcat TO lt_fieldcat.
CLEAR: ls_fieldcat.
ls_fieldcat-col_pos = '18'.
ls_fieldcat-fieldname = 'WERKS'.
ls_fieldcat-tabname = 'i_outtab'.
ls_fieldcat-ref_tabname = 'PA0315'.
APPEND ls_fieldcat TO lt_fieldcat.
CLEAR: ls_fieldcat.
ls_fieldcat-col_pos = '19'.
ls_fieldcat-fieldname = 'LIFNR'.
ls_fieldcat-tabname = 'i_outtab'.
ls_fieldcat-ref_tabname = 'PA0315'.
APPEND ls_fieldcat TO lt_fieldcat.
CLEAR: ls_fieldcat.
ls_fieldcat-col_pos = '20'.
ls_fieldcat-fieldname = 'EBELN'.
ls_fieldcat-tabname = 'i_outtab'.
ls_fieldcat-ref_tabname = 'PA0315'.
APPEND ls_fieldcat TO lt_fieldcat.
CLEAR: ls_fieldcat.
ls_fieldcat-col_pos = '21'.
ls_fieldcat-fieldname = 'EBELP'.
ls_fieldcat-tabname = 'i_outab'.
ls_fieldcat-ref_tabname = 'PA0315'.
APPEND ls_fieldcat TO lt_fieldcat.
CLEAR: ls_fieldcat.
ls_fieldcat-col_pos = '22'.
ls_fieldcat-fieldname = 'LSTNR'.
ls_fieldcat-tabname = 'i_outtab'.
ls_fieldcat-ref_tabname = 'PA0315'.
APPEND ls_fieldcat TO lt_fieldcat.
CLEAR: ls_fieldcat.
ls_fieldcat-col_pos = '23'.
ls_fieldcat-fieldname = 'BEGDA'.
ls_fieldcat-tabname = 'i_outtab'.
ls_fieldcat-ref_tabname = 'PA0001'.
APPEND ls_fieldcat TO lt_fieldcat.
CLEAR: ls_fieldcat.
ls_fieldcat-col_pos = '24'.
ls_fieldcat-fieldname = 'ENDDA'.
ls_fieldcat-tabname = 'i_outtab'.
ls_fieldcat-ref_tabname = 'PA0001'.
APPEND ls_fieldcat TO lt_fieldcat.
CLEAR: ls_fieldcat.
Display the list
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-cprog
i_callback_user_command = 'USER_COMMAND'
it_fieldcat = lt_fieldcat
TABLES
t_outtab = i_outtab.
ENDFORM. " F_DISPLAY_DATAHi,
check the system defined program BCALV_EDIT_05.
rgds,
bharat. -
Need replacement for function module "WWW_GET_SCRIPT_AND_HTML"
Hi,
We are upgrading the system from 4.6c to ECC 6. "WWW_GET_SCRIPT_AND_HTML" is flagged as obsolete in the ECC 6 version.Can you please give me a replacement for the above FM.The code is as follows.......thanks in advance
CALL FUNCTION 'WWW_GET_SCRIPT_AND_HTML'
EXPORTING
obj_name = 'SDCAS_XML_TEMPLATE'
TABLES
html = xml_output.
Thanks n regards,
InduHi Indu,
Did you find the answer? If so could you post it?
Thanks in Advanced!
Kind Regards,
Gerardo J -
Replacement for Function module 'ADDRESS_READ_FOR_USER'
Hi,
Please let me know the replacement for the FM 'ADDRESS_READ_FOR_USER'. This is obsoletein ECC6.0.Hi aparna,
ADDRESS_READ
Regards,
Vamshi -
Replacement of obseleute function modules
Hi,
We are upgrading our system from ECC 4.6 to ECC 6.0. For that we are Replacing the below obseleute function module shown in below.
TZ_USER_SYSTEMCLOCK
TZ_LOCATION_TIMEZONE
ADDRESS_GET_DATA
HELPSCREEN_CREATE
HELP_DOCU_SHOW_FOR_FIELD
Could any one please help me out to replace the function module which supports ecc6.0.
Thanks a lot for your help in advance.
Regards,
Balaji..Hi,
Thanks a lot Lakshman. I have checked the link given by you (Link: List of Obsolete Function Modules in ECC .0)
But in that list the below mentioned function module is not there.
ADDRESS_GET_DATA
HELPSCREEN_CREATE
If you have any idea, Please share with me..
Regards,
Balaji.. -
Not able to use Commit after the function module STATUS_OBJECT_CREATE
I am using function module STATUS_OBJECT_CREATE
CALL FUNCTION 'STATUS_OBJECT_CREATE'
EXPORTING
CHGKZ = 'X'
CLIENT = SY-MANDT
OBJNR = LV_OBJNR3
OBTYP = 'IWE'
STSMA = 'ZS_RE_01'
IMPORTING
OBJNR = LV_OBJNR3.
STONR = LV_STONR.
IF SY-SUBRC = 0.
COMMIT WORK.
ENDIF.
i am getting error after the COMMIT WORK .
I am not getting any issue in the function module .after the function module i am using the COMMIT WORK and i am getting the following error message
Category ABAP Programming Error
Runtime Errors SAPSQL_ARRAY_INSERT_DUPREC
Except. CX_SY_OPEN_SQL_DB
ABAP Program SAPLBSVU
Application Component CA-GTF-TS-SMT
Date and Time 03/17/2014 07:01:29
|Short text |
| The ABAP/4 Open SQL array insert results in duplicate database records. |
|What happened? |
| Error in the ABAP Application Program |
| |
| The current ABAP program "SAPLBSVU" had to be terminated because it has |
| come across a statement that unfortunately cannot be executed. |
|What can you do? |
| Note down which actions and inputs caused the error. |
| |
| |
| To process the problem further, contact you SAP system |
| administrator. |
| |
| Using Transaction ST22 for ABAP Dump Analysis, you can look |
| at and manage termination messages, and you can also |
| keep them for a long time. |
|Error analysis |
| An exception occurred that is explained in detail below. |
| The exception, which is assigned to class 'CX_SY_OPEN_SQL_DB', was not caught |
| in |
| procedure "STATUS_UPDATE" "(FUNCTION)", nor was it propagated by a RAISING |
| clause. |
| Since the caller of the procedure could not have anticipated that the |
| exception would occur, the current program is terminated. |
| The reason for the exception is: |
| If you use an ABAP/4 Open SQL array insert to insert a record in |
| the database and that record already exists with the same key, |
| this results in a termination. |
| |
| (With an ABAP/4 Open SQL single record insert in the same error |
| situation, processing does not terminate, but SY-SUBRC is set to 4.) |
|How to correct the error |
| Use an ABAP/4 Open SQL array insert only if you are sure that none of |
| the records passed already exists in the database. |
| |
| If the error occures in a non-modified SAP program, you may be able to |
| find an interim solution in an SAP Note. |
| If you have access to SAP Notes, carry out a search with the following |
| keywords: |
| |
| "SAPSQL_ARRAY_INSERT_DUPREC" "CX_SY_OPEN_SQL_DB" |
| "SAPLBSVU" or "LBSVUU01" |
| "STATUS_UPDATE" |
| |
| If you cannot solve the problem yourself and want to send an error |
| notification to SAP, include the following information: |
| |
| 1. The description of the current problem (short dump) |
| |
| To save the description, choose "System->List->Save->Local File |
| (Unconverted)". |
| |
| 2. Corresponding system log |
| |
| Display the system log by calling transaction SM21. |
| Restrict the time interval to 10 minutes before and five minutes |
| after the short dump. Then choose "System->List->Save->Local File |
| (Unconverted)". |
| |
| 3. If the problem occurs in a problem of your own or a modified SAP |
| program: The source code of the program |
| In the editor, choose "Utilities->More |
| Utilities->Upload/Download->Download". |
| |
| 4. Details about the conditions under which the error occurred or which |
| actions and input led to the error. |
| |
| The exception must either be prevented, caught within proedure |
| "STATUS_UPDATE" "(FUNCTION)", or its possible occurrence must be declared in |
| the |
| RAISING clause of the procedure. |
| To prevent the exception, note the following: |
|System environment |
| SAP Release..... 702 |
| SAP Basis Level. 0010 |
| |
| Application server... "sds6ci" |
| Network address...... "11.224.101.53" |
| Operating system..... "Linux" |
| Release.............. "2.6.18-194.el5" |
| Hardware type........ "x86_64" |
| Character length.... 16 Bits |
| Pointer length....... 64 Bits |
| Work process number.. 17 |
| Shortdump setting.... "full" |
| |
| Database server... "gctsdb01lds.hsi.hugh" |
| Database type..... "ORACLE" |
| Database name..... "DS6" |
| Database user ID.. "SAPDS4" |
| |
| Terminal.......... "GCTEMP02VDI" |
| |
| Char.set.... "C" |
| |
| SAP kernel....... 720 |
| created (date)... "Sep 14 2013 05:28:14" |
| create on........ "Linux GNU SLES-9 x86_64 cc4.1.2 use-pr130820" |
| Database version. "OCI_102, 10.2.0.5.0, V2, default" |
| |
| Patch level. 500 |
| Patch text.. " " |
| |
| Database............. "ORACLE 10.1.0.*.*, ORACLE 10.2.0.*.*, ORACLE 11.2.*.*.*" |
| SAP database version. 720 |
| Operating system..... "Linux 2.6, Linux 3" |
| |
| Memory consumption |
| Roll.... 1317248 |
| EM...... 0 |
| Heap.... 0 |
| Page.... 0 |
| MM Used. 1242912 |
| MM Free. 53400 |
|User and Transaction |
| Client.............. 160 |
| User................ "DV018458" |
| Language key........ "E" |
| Transaction......... "SE38 " |
| Transaction ID...... "5323C30FC9364665E10000000BE06533" |
| |
| EPP Whole Context ID.... "002655EE0F241ED3ABB7D81260A28C44" |
| EPP Connection ID....... 00000000000000000000000000000000 |
| EPP Caller Counter...... 0 |
| |
| Program............. "SAPLBSVU" |
| Screen.............. "RSM13000 3000" |
| Screen Line......... 2 |
| Debugger Active..... "none" |
|Information on where terminated |
| Termination occurred in the ABAP program "SAPLBSVU" - in "STATUS_UPDATE". |
| The main program was "RSM13000 ". |
| |
| In the source code you have the termination point in line 60 |
| of the (Include) program "LBSVUU01". |
| The program "SAPLBSVU" was started in the update system. |
| The termination is caused because exception "CX_SY_OPEN_SQL_DB" occurred in |
| procedure "STATUS_UPDATE" "(FUNCTION)", but it was neither handled locally nor |
| declared |
| in the RAISING clause of its signature. |
| |
| The procedure is in program "SAPLBSVU "; its source code begins in line |
| 1 of the (Include program "LBSVUU01 ". |
|Source Code Extract |
|Line |SourceCde |
| 30| LOOP AT jsto_upd WHERE chgkz = 'X'. |
| 31| CHECK: jsto_upd-chgnr > '000', |
| 32| jsto_upd-stsma NE jsto_upd-stsma_old. |
| 33| CLEAR jcdo_tab. |
| 34| MOVE-CORRESPONDING jsto_upd TO jcdo_tab. |
| 35| MOVE-CORRESPONDING chdat TO jcdo_tab. |
| 36| jcdo_tab-stsma_new = jsto_upd-stsma. |
| 37| APPEND jcdo_tab. |
| 38| ENDLOOP. |
| 39|* Änderungen zu Einzelstatus (Insert) |
| 40| LOOP AT jest_ins WHERE chgkz = 'X'. |
| 41| CHECK jest_ins-chgnr > '000'. |
| 42| CLEAR jcds_tab. |
| 43| MOVE-CORRESPONDING jest_ins TO jcds_tab. |
| 44| MOVE-CORRESPONDING chdat TO jcds_tab. |
| 45| jcds_tab-chind = 'I'. |
| 46| APPEND jcds_tab. |
| 47| ENDLOOP. |
| 48|* Änderungen zu Einzelstatus (Update) |
| 49| LOOP AT jest_upd WHERE chgkz = 'X'. |
| 50| CHECK jest_upd-chgnr > '000'. |
| 51| CLEAR jcds_tab. |
| 52| MOVE-CORRESPONDING jest_upd TO jcds_tab. |
| 53| MOVE-CORRESPONDING chdat TO jcds_tab. |
| 54| jcds_tab-chind = 'U'. |
| 55| APPEND jcds_tab. |
| 56| ENDLOOP. |
| 57|* Verbuchung Statusobjekte |
| 58| DESCRIBE TABLE jsto_ins LINES sy-tabix. |
| 59| IF sy-tabix > 0. |
|>>>>>| INSERT jsto CLIENT SPECIFIED |
| 61| FROM TABLE jsto_ins. |
| 62| ENDIF. |
| 63| DESCRIBE TABLE jsto_upd LINES sy-tabix. |
| 64| IF sy-tabix > 0. |
| 65| field-symbols <fs_jsto_line> like jsto_upd. |
| 66| loop at jsto_upd assigning <fs_jsto_line>. |
| 67| IF <fs_jsto_line>-chgnr = '000'. |
| 68| <fs_jsto_line>-chgnr = '999'. |
| 69| ENDIF. |
| 70|* on change of status profile delete user status related to old profile |
| 71| IF <fs_jsto_line>-STSMA NE <fs_jsto_line>-STSMA_OLD. |
| 72| DELETE FROM JEST CLIENT SPECIFIED WHERE |
| 73| MANDT = <fs_jsto_line>-MANDT AND |
| 74| OBJNR = <fs_jsto_line>-OBJNR AND |
| 75| STAT LIKE 'E%'. |
| 76| DELETE FROM JCDS CLIENT SPECIFIED WHERE |
| 77| MANDT = <fs_jsto_line>-MANDT AND |
| 78| OBJNR = <fs_jsto_line>-OBJNR AND |
| 79| STAT LIKE 'E%'. |i tried with out using commmit but it is not creating Status.
When i see the function module help and they are trying to COMMIT
FU STATUS_OBJECT_CREATE
Short Text
Create Status Object
Functionality
The function module generates a status object.
Take the object number from the object number management (function modules OBJECT_NUMNBER_GET_xx).
If no object number is given, the module takes a temporary object number that must be replaced later (function module STATUS_OBJECT_SWITCH_NUMBER).
Example
Creating an internal order with number 100123 (object type "ORC") for status profile "STATSCHEM" with final object number
call function 'OBJECT_NUMBER_GET_OR'
exporting
aufnr = '100123'
importing objnr = objektnummer.
call function 'STATUS_OBJECT_CREATE'
exporting
objnr = objektnummer
obtyp = 'ORC'
stsma = 'STATSCHEM'.
commit work.
Creating the same order with a temporary object number
data: objectkey like ionra.
* TBO00-REFSTRUCT for object type 'OR' is 'IONRA'
objectkey-aufnr = '100123'.
call function 'STATUS_OBJECT_CREATE'
exporting
i_objectkey = objectkey
obtyp = 'ORC'
stsma = 'STATSCHEM'.
importing
objnr = objektnummer.
call function 'OBJECT_NUMBER_GET_OR'
exporting
aufnr = '100123'
importing objnr = objektnummer_neu.
call function 'STATUS_OBJECT_SWITCH_NUMBER'
exporting
objnr_old = objektnummer
objnr_new = objektnummer_neu.
commit work.
Notes -
Function module Registry_get
Hi All,
We are going for upgrade from 4.6 to ECC 6.0.Function module REGISTRY_GET is obselete in 4.6 instead of this i have used class CL_GUI_FRONTEND_SERVICES method 'registry_get_value' .But the there is a diffrence in number of parameter passed in function module and that class method.Below is the code both in 4.6 and ECC 6.0.
In 4.6 it was as below:
CALL FUNCTION 'REGISTRY_GET'
EXPORTING
KEY = 'protocol\StdFileEditing\server'
SECTION = 'ExcelWorksheet'
IMPORTING
VALUE = EXCEL_PATH.
Now in ECC 6.0 i replaced as below:
call method cl_gui_frontend_services=>registry_get_value
exporting
root = cl_gui_frontend_services=>hkey_classes_root
key = 'protocol\StdFileEditing\server'
value = ''
importing
reg_value = reg_value
exceptions
get_regvalue_failed = 1
cntl_error = 2
error_no_gui = 3
others = 4.
If i compair both the code then parameters differ's.But i am not able to undestand what the use of these parameter.Please sugest if i am doing the right thing in ECC6.0 and please also let me know the replacement of function module 'Profile_GET' used as below in 4.6:
call function 'PROFILE_GET'
exporting
filename = 'front.ini'
key = 'Path'
section = 'Filetransfer'
importing
value = dir_path
exceptions
others = 1.
Thanks
MohitSample to understand :
Code 46C
* Test, ob OrgPublisher lokal installiert ist
CALL FUNCTION 'REGISTRY_GET'
EXPORTING
key = 'CLSID'
section = 'OrgPublisher.Document.2'
IMPORTING
value = class_id.
IF class_id IS INITIAL.
Code ECC 6.0
CALL METHOD cl_gui_frontend_services=>registry_get_value
EXPORTING
root = cl_gui_frontend_services=>hkey_classes_root
key = 'OrgPublisher.Document.2\CLSID'
IMPORTING
reg_value = class_id
EXCEPTIONS
get_regvalue_failed = 1
cntl_error = 2
error_no_gui = 3
not_supported_by_gui = 4
OTHERS = 5.
CALL METHOD cl_gui_cfw=>flush
EXCEPTIONS
cntl_system_error = 1
cntl_error = 2
OTHERS = 3.
IF class_id IS INITIAL OR sy-subrc NE 0.
Regards,
Raymond
Maybe you are looking for
-
Set an attribute inherited by an interface
Hello, I've got a problem setting an attribute, so i appreciate your help or a link to a solution in advantage. Situation: I've created an interface hosting some attributes. I've created an business object inheriting the interface. Now i try to set t
-
Can I use an alias for personal fundraising?
I want to use PayPal for personal fundraising. I live in a VERY small town and would prefer to use an alias, but I do not have a "Doing Business As" registered in the alias. I am financially in need because I became unemployed (but I am seeking wor
-
Hello, I need help with SQL... My database version is Oracle 10g Release 1.2. I have two table with the exact same structure as follows... create table t1(cust_id number(5), zone_number number(2), part_number varchar2(10)) create table t2(cust_id num
-
Where is the 'rotatable' arrow symbol in Pages for iPad?
My friend has it on his 'Pages', why don't I???
-
Need serial number for iwork '08
I need serial number for iwork '08?