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 - Help!!!!!!!

Former Member
0 Likes
1,202

Hi Experts,

I need to display the result of Tcode MMBE in Function Module...For to do this i find out the STD program name & Copy the program content in SE37 by creating new FM.But that STD program contains lot of includes..

so its not working in custom FM....Is there any way to display result of Tcode MMBE in Function Module..bcz we are in interface..<b>we have to give result of Tcode MMBE to third party by using FM...</b>

Plz give me some idea...its very urgent.

Thanks

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,083

Hi Rich,

inside of Function module my coding is like this..

<b>Submit RMMMBEST with ms_matnr = '100-500'

with ms_werks = '2000' and return.</b>

I am working in 4.7 version..

Thanks...

10 REPLIES 10
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,083

You can get the data directly from table MARD and MSKA(special stock).

REgards,

Rich Heilman

Read only

0 Likes
1,083

Hi Rich,

our requirement is to get the same output screen of TCODE MMBE.Bcz we are going do show as Demo to third party..so we need exact output screen of TCODE MMBE. we have to do it in function module...

we are passing the output screen of TCODE MMBE to Third party by using RFC enable function module..Plz help me how to proceed...its really urgent..

Thanks..

Read only

0 Likes
1,083

Hi, understand that you will not be able to pass the output screen of MMBE anywhere. It will be local to the sapgui. You can only get the data in which is shown in the MMBE screen. Which you should create an RFC enabled function module and read the tables MARD and/or MSKA to get the data, you can then pass this data back thru the RFC funciton module. If you truely want to display this screen inside SAPgui via a function module, all you need to do is SUBMIT the underlying program of MMBE and pass a varaible for the material number(you can also pass plant and storage location).



submit RMMMBEST
      with ms_matnr = '000000000040001000'   "<- Some material number
            and return.

REgards,

Rich Heilman

Read only

0 Likes
1,083

Hi,

I also tried to submit the STD program in custom function module (input parameters r Material,plant,st.location) . its giving results for all plant to one material while entering input materail & plant...

Here how can i restrict to get result based on my input plant only.

eq..suppose i 'm giving input for Material 100-500 & plant 2000..

its giving results for Material 100-500 & all plants (1000,2000,3000,4000,,,..)

But i want results for Material 100-500 & plant 2000 only...

how to restrict it to get result based on my input plant only....

Read only

0 Likes
1,083

Simply passing the plant like the material.





 submit RMMMBEST
      with ms_matnr = '000000000040001000'   "<- Some material number
      with ms_werks = '2000'
            and return.

This works fine in my 46c system.

Regards,

Rich heilman

Read only

ferry_lianto
Active Contributor
0 Likes
1,083

Hi,

Perhaps you can create RFC enabled function module and incorporate this Rich's sample code.

Hope this will help.

Regards,

Ferry Lianto

Read only

Former Member
0 Likes
1,083

Hi Rich,

I tried as you told..but still i am getting all plants for one material...

like Material 100-500 & plant (1000,2000,3000,400,,,)

i want one plant for material..How to restrict it..plz check & let me know..

like Material 100-500 & plant (2000) result..while enter input plant 2000

Thanks..

Read only

0 Likes
1,083

Please post your code and tell what version of R/3 you are working with.

REgards,

Rich Heilman

Read only

Former Member
0 Likes
1,084

Hi Rich,

inside of Function module my coding is like this..

<b>Submit RMMMBEST with ms_matnr = '100-500'

with ms_werks = '2000' and return.</b>

I am working in 4.7 version..

Thanks...

Read only

0 Likes
1,083

I am on 46c and it works fine. So not sure what the problem is. Lets test one thing first. Change the code as below.

Submit RMMMBEST via selection-screen
     with ms_matnr = '100-500'
     with ms_werks = '2000' and return.

This will throw the selection-screen when executed, lets see if 2000 comes in the plant parameter field. If not, then the parameter name may have been changed, to check this look inside the program and check the parameter name. In my system, it is in the first INCLUDE of the program.

REgards,

Rich Heilman