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
Dipankar
Function 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
Similar Messages
-
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. -
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 -
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 -
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 -
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 -
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 -
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 validate Sales Deal in VA01
Dear Experts,
I have a requirement to validate the sales deal for material/material group and customer/customer group
discounts. I need to activate/deactivate the condition type based on the sales deal entered in the sold-to-party and ship-to-party
level. Please let me know if any function module is available for the same.
Thanks
Ramesh ManoharanHi,
Using custom ROUTINES in requirement column of pricing procedure (V/08) we can activate/deactivate any condition type in sales order. For your requirement you have to define the exact logic to write in routine.
n routine, you need to set the SY-SUBRC value.
If SY-SUBRC = 0, then the condition type will be triggered in sales order.
If SY-SUBRC = 4, then the condition type will not be triggered in sales order.
I hope this will help you.
If my understanding is wrong, please explain in detail about your requirement.
Regards,
Shashwath -
Function Module to Read attributes value from Classification tab
Dear Experts ,
We are using material classification in the material master. Under classification tab of material master , we are maintaining certain characteristics and their corresponding values.
I want to read those values and use those in one of the report.
Can you please help me in identifying Function Module which will return the values of all the attributes of that material.
Thanks in advnce,
Regards,
NikhilYou can check those details using CT06 transaction.
FM CLAF_CLASSIFICATION_OF_OBJECTS can be used to retrive the data using program.
CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'
EXPORTING
class = gc_class
classtext = 'X'
classtype = gc_classtype
clint = gc_mmpsk
features = 'X'
language = sy-langu
object = l_object
key_date = sy-datum
initial_charact = 'X'
change_service_clf = ' '
inherited_char = 'X'
TABLES
t_class = lt_class
t_objectdata = lt_objectdata
EXCEPTIONS
no_classification = 1
no_classtypes = 2
invalid_class_type = 3
OTHERS = 4. -
Function module to validate posting date
Hi all,
i am using function module amfi_period_get_and_check to validate posting date.
if posting date is not open this module raises error message but when i am using it
in my code its not showing error message but when i am executing the module
it is showing the message for the same date
please reply soon
thnxat selection-screen on pos_dt.
CALL FUNCTION 'AMFI_PERIOD_GET_AND_CHECK'
EXPORTING
i_bukrs = com_code-low
I_GJAHR =
i_koart = 's'
I_KONTO = ' '
I_MONAT = '00'
I_BUDAT = pos_dt.
IMPORTING
E_MONAT =
E_GJAHR =
EXCEPTIONS
ERROR_PERIOD = 1
ERROR_PERIOD_ACC = 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.
Maybe you are looking for
-
Hi All ~ Thanks in advance for your help! I have been on a support chat with Adobe for 2 hours now and they can't figure this out but hopefully one of you can! I exported my files as a LightRoom Catalog I zipped the catalog and the smart previews t
-
Suggestions for current ANE development instructions
Any recommended links for instructions on building ANEs ( android in particular )? I am looking for current tutorials if available. I was last looking at this this one by Mark Hood: http://www.adobe.com/devnet/air/articles/ane-android-devices.html bu
-
Failed to Refresh Dynamic Report
Hi Gurus, I'm having issue refreshing a report with dynamic selection of entities. There are no error message but it just didn't list out all the entity I've selected. The same report has no issue listing out the entities in 2 other computers which I
-
Want to create a movable jtable
I want to be able to create a jtable in a layout that is movable. By movable, i mean like moving a box in photoshop or something like that. I want to be able to mouse drag the jtable around the layout that i have created. I am able to create the jtab
-
BAPI Error - Condition FS00 is missing in pricing procedure A V
ORDER_CONDITIONS_IN-ITM_NUMBER = '000010'. ORDER_CONDITIONS_IN-COND_ST_NO = '10'. ORDER_CONDITIONS_IN-COND_COUNT = '10'. ORDER_CONDITIONS_IN-COND_TYPE = 'FS00'. ORDER_CONDITIONS_IN-COND_VALUE = '20000'. ORDER_CONDITIONS_IN-CURRENCY = 'KRW'. ORDER_CON