Function module to validate input value
Hi all,
can you please provide me the name of the function module to validate input value.
I have a case where i have to validate decimal values. sometimes users may enter wrong decimal values by mistake instead of "0.23" "0..23' and it gives CONVT_NO_NUMBER runtime error so have to come up with some solutions to validate user input.
Please provide me Function module if anybody knows.
Thanks,
Try this one
data: lv_htype TYPE dd01v-datatype.
CALL FUNCTION 'NUMERIC_CHECK'
EXPORTING
string_in = my_number
IMPORTING
htype = lv_htype.
IF lv_htype NE 'NUMC'.
Raise an error here...
ENDIF.
Similar Messages
-
Function Module to validate a value against domain fixed values
Hi,
Could anybody please let me know if there is a standard Function Module that takes a Value and Domain name as an input and checks if the input value exists in the Fixed Values of the domain.
Thanks,
ShalabhHi,
you can use fm FM_DOMAINVALUE_CHECK. Pass parameter values for I_DOMNAME and I_DOMVALUE.
If the value is invalid, exception VALUE_NOT_ALLOWED will occur.
Regards,
Klaus -
Function module to validate numeric values
Hi all.
Can some one please tell me Is there any Function Module to validate only numeric values?
Like in year variable, it can never contain alphanumeric values or special symbols?
Is there any function module to check, wheather the variable contains only numeric values, no alphanumeric value or special symbol?
If there is no as such function module then what is the alternative approach we can take?
Plz help me .
Regards
DipankarFunction Module NUMERIC_CHECK for Editing and checking numeric fields ( i.e. Num validations)
Check using the Function Module "NUMERIC_CHECK".
CALL FUNCTION 'NUMERIC_CHECK'
EXPORTING
STRING_IN = X
IMPORTING
STRING_OUT = X
HTYPE = H_TYPE.
if h_type = 'CHAR'.
WRITE:/ 'Not Numeric'.
else.
write:/ 'Numeric'.
ENDIF.
REWARDS IF USEFUL
GAURAV J.
Edited by: GAURAV on Feb 3, 2008 2:19 PM -
API - BAPI , RFC Function module to validate user id and password
Hi,
Can anyone provide me with the function module to validate the username and password of the user of the back end R/3 System.
Best Regards
SidUse function module SUSR_CHECK_LOGON_DATA. You need to provide auth_method (P for password check), userid and password.
Be careful when you execute the function in test mode because it converts the input into upper case hence if you have lower case characters in your password it will return with invalid password. If you pass the lower case into the function in a program everything is fine.
Regards,
Michael -
Hi. i used Function module to change Characteristic values of a sales order
hi. i used Function module to change Characteristic values of a sales order..
but sales order's Characteristic values didn't change.
And the Function module doesn't occur any log message.
please tell me wrong code, and how to solve this problem.
if i have wrong method, what data can i pass to change the characteristic values
DATA: LT_E1CUVAL TYPE TABLE OF E1CUVAL.
DATA: WA_E1CUVAL TYPE E1CUVAL.
DATA: LS_CFG_HEAD LIKE CUXT_CUCFG_S,
LS_INSTANCES LIKE CUXT_CUINS_S,
LS_VALUES LIKE CUXT_CUVAL_S,
LS_E1CUCFG LIKE E1CUCFG,
LS_E1CUINS LIKE E1CUINS,
LS_E1CUVAL LIKE E1CUVAL,
LS_PROFILE LIKE E1CUCOM,
LS_VBAP LIKE VBAP,
L_CUOBJ LIKE INOB-CUOBJ,
L_ATINN LIKE CABN-ATINN.
DATA: LT_INSTANCES LIKE CUXT_CUINS_S OCCURS 0,
LT_PART_OF LIKE CUXT_CUPRT_S OCCURS 0,
LT_VALUES LIKE CUXT_CUVAL_S OCCURS 0,
LT_VAR_KEYS LIKE CUXT_CUVK_S OCCURS 0,
LT_KSML LIKE KSML OCCURS 0 WITH HEADER LINE,
BEGIN OF LT_CLINT OCCURS 0,
CLINT LIKE KSSK-CLINT,
END OF LT_CLINT.
DATA: LT_CUIB LIKE CUIB_CUOBJ_S OCCURS 0 WITH HEADER LINE.
DATA: E_ROOT_INSTANCE TYPE CUXT_INSTANCE_NO.
DATA: EV_ROOT_PERSIST_ID TYPE IBEXTINST_DATA-EXT_INST_ID.
DATA: EV_CFG_HAS_CHANGED TYPE XFELD.
DATA: EV_HANDLE_APPL_LOG TYPE BALLOGHNDL.
DATA: L_CUOBJ_NEW TYPE CUOBJ.
DATA: L_OWNER TYPE IBXX_BUSINESS_OBJECT.
REFRESH LT_E1CUVAL.
CLEAR LS_VBAP.
SELECT SINGLE CUOBJ INTO CORRESPONDING FIELDS OF LS_VBAP
FROM VBAP WHERE VBELN = I_VBELN
AND POSNR = I_POSNR.
IF SY-SUBRC <> 0.
RAISE INSTANCE_NOT_FOUND.
ENDIF.
REFRESH LT_CUIB. CLEAR LT_CUIB.
LT_CUIB-INSTANCE = LS_VBAP-CUOBJ.
APPEND LT_CUIB.
CALL FUNCTION 'CUCB_INITIALIZER'
EXPORTING
IT_INSTANCES = LT_CUIB[].
CALL FUNCTION 'CUXI_GET_SINGLE_CONFIGURATION'
EXPORTING
I_ROOT_INSTANCE = LS_VBAP-CUOBJ
IMPORTING
E_CFG_HEAD = LS_CFG_HEAD
ES_PROFILE = LS_PROFILE
ET_RETURN = ET_RETURN
TABLES
E_TAB_INSTANCES = LT_INSTANCES
E_TAB_PART_OF = LT_PART_OF
E_TAB_VALUES = LT_VALUES
E_TAB_VAR_KEYS = LT_VAR_KEYS
EXCEPTIONS
INVALID_INSTANCE = 1
NO_ROOT_INSTANCE = 2
INSTANCE_IS_A_CLASSIFICATION = 3
INTERNAL_ERROR = 4
NO_PROFILE_FOUND = 5
INVALID_DATA = 6
OTHERS = 7.
IF SY-SUBRC <> 0.
CASE SY-SUBRC.
WHEN 1.
RAISE INSTANCE_NOT_FOUND.
WHEN 3.
RAISE INSTANCE_IS_A_CLASSIFICATION.
WHEN OTHERS.
RAISE INVALID_DATA.
ENDCASE.
ELSE.
LOOP AT LT_VALUES INTO LS_VALUES.
IF LS_VALUES-CHARC = 'SAP_MILLCA_PACKAGING'
OR LS_VALUES-CHARC = 'PD_CA_PACKING_DM'.
LS_VALUES-VALUE = '7100010'. "This is test data
MODIFY LT_VALUES FROM LS_VALUES.
ELSE.
DELETE LT_VALUES WHERE CHARC = LS_VALUES-CHARC.
ENDIF.
CLEAR LS_VALUES.
ENDLOOP.
ENDIF.
영업정보 특성 변경
CALL FUNCTION 'CUXI_SET_SINGLE_CONFIGURATION'
EXPORTING
I_CFG_HEADER = LS_CFG_HEAD
I_ROOT_INSTANCE = LS_VBAP-CUOBJ
I_PLANT =
I_STRUCTURE_EXPLOSION_DATE =
I_STRUCTURE_EXPLOSION_APPL_ID =
I_LOGSYS =
IS_PROFILE = LS_PROFILE
IV_ONLY_SINGLE_LEVEL =
IV_HANDLE_APPL_LOG =
IV_OBJECT_APPL_LOG = 'CIF'
IV_SUBOBJECT_APPL_LOG = 'T_CNFG'
IMPORTING
E_ROOT_INSTANCE = E_ROOT_INSTANCE
EV_ROOT_PERSIST_ID = EV_ROOT_PERSIST_ID
EV_CFG_HAS_CHANGED = EV_CFG_HAS_CHANGED
EV_HANDLE_APPL_LOG = EV_HANDLE_APPL_LOG
ET_RETURN = ET_RETURN
TABLES
I_TAB_INSTANCES = LT_INSTANCES
I_TAB_PART_OF = LT_PART_OF
I_TAB_VALUES = LT_VALUES
I_TAB_VAR_KEYS = LT_VAR_KEYS
I_TAB_BLOB =
EXCEPTIONS
NO_CONFIGURATION_DATA = 1
NO_ROOT_INSTANCE = 2
INVALID_INSTANCE = 3
INSTANCE_IS_A_CLASSIFICATION = 4
INTERNAL_ERROR = 5
NO_PROFILE_FOUND = 6
INVALID_DATA = 7
OTHERS = 8
IF SY-SUBRC <> 0.
CASE SY-SUBRC.
WHEN 1.
RAISE NO_CONFIGURATION_DATA.
WHEN 3.
RAISE NO_ROOT_INSTANCE.
WHEN 3.
RAISE INVALID_INSTANCE .
WHEN 3.
RAISE INSTANCE_IS_A_CLASSIFICATION.
WHEN 3.
RAISE INTERNAL_ERROR.
WHEN OTHERS.
RAISE INVALID_DATA.
ENDCASE.
ENDIF.
COMMIT WORK.
save configuration with next commit
CLEAR: LS_INSTANCES.
READ TABLE LT_INSTANCES INTO LS_INSTANCES INDEX 1.
L_OWNER-OBJECT_TYPE = LS_INSTANCES-OBJ_TYPE.
L_OWNER-OBJECT_TYPE = 'PVS_POSVAR'.
L_OWNER-OBJECT_KEY = LS_INSTANCES-OBJ_KEY.
CALL FUNCTION 'CUCB_CONFIGURATION_TO_DB'
EXPORTING
ROOT_INSTANCE = LS_VBAP-CUOBJ
ROOT_OBJECT = L_OWNER
IMPORTING
NEW_INSTANCE = L_CUOBJ_NEW
EXCEPTIONS
INVALID_INSTANCE = 1
INVALID_ROOT_INSTANCE = 2
NO_CHANGES = 3
OTHERS = 4.
IF SY-SUBRC > 1 AND SY-SUBRC <> 3.
CLEAR LS_VBAP-CUOBJ.
RAISE INTERNAL_ERROR.
ELSEIF SY-SUBRC = 1.
LS_VBAP-CUOBJ = L_CUOBJ_NEW.
ENDIF.
What's wrong?
help me to solve this problem.
Thanks a lot.<b>SD_SALES_DOCUMENT_READ</b> Reads sales document header and business data: tables VBAK, VBKD and VBPA (Sold-to (AG), Payer (RG) and Ship-to (WE) parties)
<b>SD_SALES_DOCUMENT_READ_POS</b> Reads sales document header and item material: tables VBAK, VBAP-MATNR
<b>SD_DOCUMENT_PARTNER_READ</b> partner information including address. Calls SD_PARTNER_READ
<b>SD_PARTNER_READ</b> all the partners information and addresses
<b>SD_DETERMINE_CONTRACT_TYPE</b>
In: at least VBAK-VBELN
Exceptions: NO CONTRACT | SERVICE_CONTRACT | QUANTITY_CONTRACT
<b>SD_SALES_DOCUMENT_COPY</b>
<b>RV_ORDER_FLOW_INFORMATION</b> Reads sales document flow of sales document after delivery and billing
SD_SALES_DOCUMENT_SAVE create Sales Doc from the copied document
SD_SALES_DOCUMENT_ENQUEUE to dequeue use DEQUEUE_EVVBAKE
RV_DELIVERY_PRINT_VIEW Data provision for delivery note printing
SD_PACKING_PRINT_VIEW
SD_DELIVERY_VIEW Data collection for printing
called from RV_DELIVERY_PRINT_VIEW, SD_PACKING_PRINT_VIEW
RV_BILLING_PRINT_VIEW Data Provision for Billing Document Print
regards
vinod -
LSMW or ABAP Program:- I need BAPI function module or Direct input program
hi experts,
I have to develop the program which uploads the transportation pricing data for freight cost management.
the transcation code is XK15 for the application A.
There is a program called RV14BTCI which will uploads for the application V or M not for A.
So i can use lsmw or direct input program in both lsmw and abap program so plz help me if there is any BAPI function module or Direct input program for Application A.
thank you,
waiting for u r reply.
Edited by: SANTOSH MARUPALLY on Jan 22, 2008 6:27 AMHi Santosh
Am not really sure if RV14BTCI can not be used for other applications apart from V and M.
You can try using BAPI: BAPI_PRICES_CONDITIONS. Over the forum you can find few example coding.
Regards
Eswar -
Function modules for converting Char value to hexadecimal value
Hi All,
Function modules for converting Char value to hexadecimal value.
Thanks in advanceHi,
use this function module:
<b>RSS_UNIQUE_CONVERT_TO_HEX</b>
regards
Debjani
Rewards point for helpful answer -
Function module to find charateristic values
hi all,
i need to find charateristic value and characteristic description for the given class type and batch number (CHARG) of a material.. is there any function module that gives these value because this value r not stored in the tables..
thanks in advance,
aswin.Hi,
Please check this FM.
VC_I_GET_CONFIGURATION
CUCB_GET_CONFIGURATION
call function 'VC_I_GET_CONFIGURATION'
exporting
INSTANCE = vbap-cuobj
LANGUAGE = SY-LANGU
TABLES
CONFIGURATION = i_config
EXCEPTIONS
INSTANCE_NOT_FOUND = 1
INTERNAL_ERROR = 2
NO_CLASS_ALLOCATION = 3
INSTANCE_NOT_VALID = 4
OTHERS = 5.
OR
data: i_char type table of comw with header line.
* Retrieve Characteristics.
call function 'CUD0_GET_VAL_FROM_INSTANCE'
exporting
instance = vbap-cuobj
tables
attributes = i_char
exceptions
instance_not_found = 1.
Regards,
Ferry Lianto -
Is there any function module to give absolute value of a number?
Hi,
Is there any function module to give absolute value of a number?
That has similar functionality to the Built in Function ABS.
Please let me know.
Thanks,
cshi,
why are you looking for any function module.
You can easily get it by mathematical function ABS .
Syntax : <Turget Variable> = ABS <Source Variable>
\[removed by moderator\]
Anirban Bhattacharjee
Edited by: Jan Stallkamp on Jun 27, 2008 4:19 PM -
Function Module to validate date
Hi,
Is there a Function module to validate date in transfer rules or update rules. I checked the forum, couldn't find an answer. Any help is appreciated
Thanks
BalaYou should be able to use this FM:
CALL FUNCTION 'RSAR_DATE_CHECK_PLAUSIBILITY'
EXPORTING
i_date = yourdate
EXCEPTIONS
PLAUSIBILITY_CHECK_FAILED = 1 -
Any function to check the input value is integer?
May I know if there's any function to check the input value is integer in Form 4.5?
Thanks.just to add :) - (couldn't resist) :
create or replace function is_integer ( p_number in varchar2 ) return boolean is
v_return boolean := true;
v_number number;
begin
v_number := p_number;
if v_number != trunc(v_number) then
v_return := false;
end if;
return v_return;
exception
when others then
v_return := false;
return v_return;
end;
begin
if not is_integer(1.1) then
dbms_output.put_line('is not');
end if;
if is_integer(1) then
dbms_output.put_line('is');
end if;
if not is_integer('a') then
dbms_output.put_line('is not');
end if;
end; -
Hi All,
Can any one tell me is there any Remote function module to update the values of components in STPO table while creating Sales order BOM, Material BOM, and WBS BOM. For example I want to update the Spare Part Indicator for Item components based on Plant.
Please do the needful..
Regards
YathishHi Naren,
Thanks for ur reply,
The BAPI that you have gave is to update only Material BOM. But I want to Change and create spare part indicator for 4 BOM's, ie Sales Order BOM, Eqipment BOM and also Material BOM and WBS BOM.
Can u please shed some light on it,so that it would be helpfull to me.
Thanks
Yathish -
Hi All,
Can any one tell me is there any Remote function module to update the values of components in STPO table while creating Sales order BOM, Material BOM, and WBS BOM. For example I want to update the Spare Part Indicator for Item components based on Plant.
Please do the needful..
Regards
YathishFor material bom: CSAP_MAT_BOM_CREATE
and CSAP_ORD_BOM_CREATE for Order BOM.
Regards,
Ravi -
Function module to convert character value of month into numeric value?
Hi Experts,
I need to convert a character value of a month in three alphabets to its numeric value.
e.g. 'jun' should be converted into '06' and 'jan' into '01' using a function module.Can anybody please provide me a similar function module?
TIA
Abhishektry this code:
DATA: text(20) TYPE c,
date TYPE sy-datum.
text = '06. Jul 06'.
TRANSLATE text TO UPPER CASE.
TRANSLATE text USING '. '.
CONDENSE text NO-GAPS.
CALL FUNCTION 'CONVERSION_EXIT_SDATE_INPUT'
EXPORTING
input = text
IMPORTING
output = date.
WRITE date USING EDIT MASK '__.__.____'.
Regards,
Dara. -
Function Module to extract char values for a matl variant
Experts,
Looking for a Function Module with which I can extract the Char value for a specific characteristic on my material variant. So, the class type is 300 & I would like to pass this material (variant) as an input in order to retrieve the value for the specific characteristic (which will be unique to this variant)
Any one, an idea?
thanksOk, I found what I needed. For everyone's benefit, herez what I found:
1. every application/object in the SAP side which uses the configuration has a unique Internal Object #. For material variants, Sales Documents, Prodn Ord headers & components, so on so forth.
2. In the system the fields CUOBF, CUOBJ carry these Internal Obj #'s. For the sake of getting the material variant char & values I found the func module VC_I_GET_CONFIGURATION, where the input could be the Int Obj # from the MARA or the one from VBAP, based on the need.
Thanks
Maybe you are looking for
-
Unable to Modify quantity in STO
Experts, We are in post implementation support for mill products. User Created a STO with qty X, later he wanted to modify qty to Y system is not allowing to modify. After changing the qty when he try to save STO system says no data
-
Connecting to Oracle9i through ADO
Hi, I have an visual basic 6.0 application .It connects to the Database using ADO .The application works fine with Oracle7.x and Oracle 8i.However there are issues when the Database is Oracle 9i.The problem is Stored Procedures using ADO do not get e
-
Compressor "unknown time issue"
Ive been reading a few posts and this software seems to have a lot of timing issues. I have one of my own. Lately Ive noticed compressor has been getting really slow and sometimes wont work at all, saying "remaining time unknown". Is this a popular i
-
Broadcaster - burst to Portal?
Hi all, When using the Information Broadcaster one can use the option 'Broadcast by E-mail (<u>Bursting</u>)'. Nice feature here is that you can <i>filter the documents by a characteristic value</i> (e.g. Vendor nr) so each recipient receives the doc
-
MS-6915 driver for win98/XP?
Help! Does anyone have a driver for the IDE raid controler card MS-6915 ver;1? It is equipped with a Promise PDC20265 chip.