2009 Sep 18 10:52 PM
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
2009 Sep 19 3:45 AM
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
2009 Sep 18 11:25 PM
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.
2009 Sep 18 11:36 PM
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
2009 Sep 18 11:59 PM
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.
2009 Sep 19 1:42 AM
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
Thanks
Venkat.O
*&---------------------------------------------------------------------*
*& 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
2009 Sep 19 3:45 AM
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!!!
2009 Sep 20 1:56 AM
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
2009 Sep 21 10:59 PM
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.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |