Application Development 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: 

can we call function module in sap script

laxman_sankhla3
Participant
0 Kudos

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

Former Member
0 Kudos

Hi,

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

Regards

rams

0 Kudos

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

0 Kudos

HI,

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

In the SAPscript use &BSEG-PERNR&.

Regards

Subramanian

Former Member
0 Kudos

Hi,

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

you need to cal this through subroutine..

Regards,

sarath

Former Member
0 Kudos

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?

0 Kudos

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

Former Member
0 Kudos

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.