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

Problem with call transaction MMBE

Former Member
0 Likes
2,451

Hello,

I need to make a call to the transaction MMBE from within my Z program. This is the code that I have written for it:

......

WHEN 'STOCKOVW'.

SET PARAMETER ID 'MAT' FIELD line_rec-matnr.

SET PARAMETER ID 'WRK' FIELD line_rec-werks.

CALL TRANSACTION 'MMBE' and SKIP FIRST SCREEN.

ENDCASE.

When I try to branch to MMBE, I get the error "The material does not exist or is not activated'. Upon debugging I noticed that the material is not getting filled up in the MMBE screen. The data element corresponding to the screen field has the parameter ID MAT and line_rec-matnr has a valid value.

Could someone please tell me what is going wrong here and how I can correct it?

Thanks,

Rugmani

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,774

Did u check the value in line_rec-matnr ?

This code appears to come from USER-COMMAND or AT LINE-SELECTION event.

Both the places, you have to retrieve the values of selection made by user using HIDE command or SY-LISEL.

If you can tell the exact requirement and additional code for the USER-COMMAND event, we can help more.

Cheers!!!

Hello,

I need to make a call to the transaction MMBE from within my Z program. This is the code that I have written for it:

......

WHEN 'STOCKOVW'.

SET PARAMETER ID 'MAT' FIELD line_rec-matnr.

SET PARAMETER ID 'WRK' FIELD line_rec-werks.

CALL TRANSACTION 'MMBE' and SKIP FIRST SCREEN.

ENDCASE.

When I try to branch to MMBE, I get the error "The material does not exist or is not activated'. Upon debugging I noticed that the material is not getting filled up in the MMBE screen. The data element corresponding to the screen field has the parameter ID MAT and line_rec-matnr has a valid value.

Could someone please tell me what is going wrong here and how I can correct it?

Thanks,

Rugmani

7 REPLIES 7
Read only

Tamas_Hoznek
Product and Topic Expert
Product and Topic Expert
0 Likes
1,774

I tried your code in an ECC 6.0 system and it worked fine for me, the program called MMBE and displayed the stock situation for the selected material. No idea why it wouldn't work for you.

Read only

0 Likes
1,774

We are not yet on ECC 6.0 we are still on 4.7

Do you know if there is a problem on the 4.7 version?

Thanks,

Rugmani

Read only

Tamas_Hoznek
Product and Topic Expert
Product and Topic Expert
0 Likes
1,774

I don't have access to a 4.7 system, but I tried it in a 4.6C environment and it was working fine there as well.

Read only

venkat_o
Active Contributor
0 Likes
1,774

Hi Rugmani, <li> You used SET PARAMETER ID. There should be GET PARAMETER ID in MMBE transaction. The program for MMBE is RMMMBESTN. Use global search to find whether GET PARAMETER ID has been used in the program or not. <li>If you find *GET PARAMETER ID in MMBE, check whether ine_rec-matnr has value or not when SET PARAMETER ID 'MAT' FIELD line_rec-matnr. is executed. <li>I have searched for the same in ECC 6.0, I found GET PARAMETER ID in the include RMMMBENFF. Check the below one


*&---------------------------------------------------------------------*
*&      Form  RETTE_SPA_GPA
*&---------------------------------------------------------------------*
*     Parameter-ID's, die innerhalb des Prg's umgesetzt werden und auch
*     auf dem Selektionsbildschirm ziehen, müssen vor dem Umsetzen
*     gerettet und nach dem Aufruf der entspr. Umfeldfunktion wieder
*     zurückgesetzt werden
*&---------------------------------------------------------------------*
FORM rette_spa_gpa.

  GET PARAMETER ID 'MAT' FIELD matnr_spa_gpa.  "Material
  GET PARAMETER ID 'WRK' FIELD werks_spa_gpa.  "Werk
  GET PARAMETER ID 'LAG' FIELD lgort_spa_gpa.  "Lagerort
  GET PARAMETER ID 'LGN' FIELD lgnum_spa_gpa.  "Lagernummer note 620654
  GET PARAMETER ID 'CHA' FIELD charg_spa_gpa.  "Charge
* JH/4.0A/30.10.97 Int. Meld. 3484704 (Anfang)
  GET PARAMETER ID 'EKO' FIELD ekorg_spa_gpa.  "Einkaufsorganisation
* JH/4.0A/30.10.97 Int. Meld. 3484704 (Ende)
* tga / note 198614 wrong MRP area from sl-level / start
  GET PARAMETER ID 'BERID' FIELD berid_spa_gpa.
* tga / note 198614 wrong MRP area from sl-level / end
  GET PARAMETER ID 'KUN'   FIELD kun_spa_gpa.
* tga / note 205042 wrong SPA/GPA for MB51 / end
* tga / note 323951 wrong SPA/GPA for MB51 / start
  GET PARAMETER ID 'BES'   FIELD ebe_spa_gpa.
  GET PARAMETER ID 'AUN'   FIELD kda_spa_gpa.
* tga / note 323951 wrong SPA/GPA for MB51 / end

ENDFORM.                    " RETTE_SPA_GPA
Thanks Venkat.O

Read only

Former Member
0 Likes
1,775

Did u check the value in line_rec-matnr ?

This code appears to come from USER-COMMAND or AT LINE-SELECTION event.

Both the places, you have to retrieve the values of selection made by user using HIDE command or SY-LISEL.

If you can tell the exact requirement and additional code for the USER-COMMAND event, we can help more.

Cheers!!!

Read only

Former Member
0 Likes
1,774

Am guessing that, here the PARA ID is not MAT, even though its showing in its F1 help!! its some thing else!! but, this is just my guess, am may wrong!!

thanq

Read only

Former Member
0 Likes
1,774

Thanks a lot for all your inputs. This was because the screen parameter MATNR for transaction MMBE was a select-option. I

was able to resolve the problem by modifying my code as follows:

WHEN 'STOCKOVW'.

SET PARAMETER ID 'MAT' FIELD line_rec-matnr.

SUBMIT rmmmbest AND RETURN.