Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

HI

Former Member
0 Likes
685

IN FUNCTION MODULE NUMERIC_CHECK.

WHAT VALUE SHOULD BE GIVEN IN STRING IN AND STRING OUT.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
654

data: st type string value '1234',

h_type type dd03l-datatype.

CALL FUNCTION 'NUMERIC_CHECK'

EXPORTING

STRING_IN = st

IMPORTING

STRING_OUT = st

HTYPE = H_TYPE.

string_in is the variable you want to check.....

string_out is optional....

7 REPLIES 7
Read only

Former Member
0 Likes
655

data: st type string value '1234',

h_type type dd03l-datatype.

CALL FUNCTION 'NUMERIC_CHECK'

EXPORTING

STRING_IN = st

IMPORTING

STRING_OUT = st

HTYPE = H_TYPE.

string_in is the variable you want to check.....

string_out is optional....

Read only

Former Member
0 Likes
654

REPORT ZSDN.

DATA: STRING_IN TYPE STRING,

STRING_OUT TYPE STRING.

DATA: HTYPE LIKE DD01V-DATATYPE.

STRING_IN = 'AA'.

CALL FUNCTION 'NUMERIC_CHECK'

EXPORTING

STRING_IN = STRING_IN

IMPORTING

STRING_OUT = STRING_OUT

HTYPE = HTYPE.

WRITE: / STRING_OUT,

HTYPE. " It returns the datatype

Read only

George_Lioumis
Active Participant
0 Likes
654

Hi.

Just pass whatever in string_in when calling the function module and it will return a new string in string_out and its type in HTYPE fields.

Try it in SE37 to see what I mean.

Reward if helpful.

Regards,

George

Read only

Former Member
0 Likes
654

Hi ramya,

function numeric_check.

*"----


*"Lokale Schnittstelle:

*" IMPORTING

*" STRING_IN -> pass the variable to be checked

*" EXPORTING

*" STRING_OUT -> same variable as STRING_IN

*" HTYPE LIKE DD01V-DATATYPE -> create a variable with reference to this parameter. This field will show the result.

*"----


Reward point(s) if this has helped you.

Read only

Former Member
0 Likes
654

Hi,

the function module retrns the data type of a given string.

INstring should be the value u enter , string out is output of the string

eg

when u execute this function module

call function 'Numeric_check'

exporting

string_in = '1213232'

importing

string_out = val_string

Htype = vval.

wal will have the data type .

in the above eg val_string will be 123232

and wal will be 'NUMC'.

regards,

Santosh Thorat

Read only

Former Member
0 Likes
654

apart from above FM you can try this code....

PARAMETERS : p_text TYPE char20.

IF NOT p_text CA sy-abcde.

WRITE 😕 'All numerics'.

ELSE.

WRITE 😕 'Not all numerics'.

ENDIF.

Read only

Former Member
0 Likes
654

hi ramya,

Go to se37, give ur function module name

and u can get the meaning for that importing and exporting fields not for this FM, for all other FM also.

Here,

CALL FUNCTION 'NUMERIC_CHECK'

EXPORTING

STRING_IN = ' value to be checked '

IMPORTING

STRING_OUT = ' optional '

HTYPE = 'type of that variable'.

regards,

guna..