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

Function Module creation

Former Member
0 Likes
767

Hello All,

I have a table having two columns with 40 k records.

I need a function module code in which i shud give the input of the 1st column and I shud get the corresponding value in the 2nd column from the FM.

Can anyone tell me how to do it.please...?

Thanks,

Varun.

9 REPLIES 9
Read only

Former Member
0 Likes
750

hi ,

it is better to use the report than the function module...for this it is easy to do in the report .

Read only

Former Member
0 Likes
750
Read only

0 Likes
750

You don't need function module for such requirement, you can simply use select statement into the program.

Read only

0 Likes
750

I also saod that Report is easy.

But they need a FM.

Please help

Read only

Former Member
0 Likes
750

Hi,

If you think the same purpose will be done at couple of places then go for a FM. Else you can write a subroutine in the program itself and get this JOB done.

Anyways for the FM,

Se37 - create a FM with the required name.

in the tables TAB of the FM - give the table of the structure you are looking for ....In your case since this is a table with only 2 fields you might have to create a structure of the same in SE11 and use this.

SO when you call the FM pass the table in the table Option of the same structure with values in column 1. Write the code in the source code of the FM to fill in column 2.

Hope this is what u r excepting.

Thanks,

Shreekant

Read only

0 Likes
750

Hello Sreekanth,

I have already data in 2 columns.

If I give input data with 1st column of the table

FM shud return 2nd column value.

Thanks,

varun

Read only

0 Likes
750

hi check this..

for this use the perform in the function module .....using and changing table

Read only

0 Likes
750

I am abit Confused, You say You have data in 2 columns and then you are wxcepting the FM to return Values in the second column.

Anyways,

Go to SE11, Create a structure with only 2 fields.

Exactly the same way structure as you would like to pass to the function Module or like the internal table you would have with 2 columns.

Please create a FM in SE37 .

GO to the Tables Tab.

give the parameter type ( The structure you have created)

in the source code please loop at the table Parameter and then try to fill the second column.

You could handle this LOGIC as you wish for the performance.

You can use this FM when and as required but please pass the IT with values in the first column. once the FM is executed the IT will have data in both the columns.

Thanks,

Shreekant

Read only

Former Member
0 Likes
750

Hello All,

Please tell me in detail.

My table name is YRDM_ZZPROJ.

1st column field name is PSPID_ALT.

2nd Column fileld name is PSPID_NEU.

Please expalin me in detail

what shud i give in Import Export tables paramters.

and what shud i write in Code.

In brief..

If I give the 1st column field data..i shud get the O/P data of 2nd column.

Please help me.

Thanks,

varun