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

can we call function module in sap script

laxman_sankhla3
Participant
0 Likes
1,517

hi

can we call function module in sap script

i want to use function module HR_TMW_GET_EMPLOYEE_NAME in sapscript

to get Empname by using personal no

pernr no is coming from bseg-pernr table

so how i can use it .

please help me

thanks in advanced.

7 REPLIES 7
Read only

Former Member
0 Likes
931

Hi,

In this case, you need to write on subroutine, there you can call this fm.

Regards

rams

Read only

0 Likes
931

how can i call bseg-pernr from sapsript to subroutine pool.

i m getting pernr in sapscript but i m not able to call that pernr into subroutine pool.

can u help me.

can i call function module in sapscript.

thanks in advanced

Read only

0 Likes
931

HI,

Store the value in the same workarea field bseg-pernr.

In the SAPscript use &BSEG-PERNR&.

Regards

Subramanian

Read only

Former Member
0 Likes
931

Hi,

you can call a function module directly from a sap script.

you need to cal this through subroutine..

Regards,

sarath

Read only

Former Member
0 Likes
931

Hi laxman,

You must be writing a driver program in se38 for your sap script.then, what is the problem in calling a function module?

Read only

0 Likes
931

i m getting pernr in sapscript but i m not able to call that pernr into subroutine pool.

Read only

Former Member
0 Likes
931

hi,

You can use like this:

PERFORM FUNCTION_MODULE IN PROGRAM SUBROUTINE_POOL

USING &FIELD1&

USING &FIELD2&

CHANGING &FIELD3&

ENDPERFORM.

where function_module is the func. module name defined in program SUBROUTINE_POOL , field1 n field2 are the fields to be passed, and field3 is the value which you want to display...

You have to read field1 & field2 in the pool, process them & get the value of field to be output.

Reward helpful answers.

Regards,

SIddhesh Sanghvi.