02-06-2007 6:41 PM
Hellow friends,
how to call sub screen 1001 prog name SAPLMGD1
and main program SAPLMGMM screen 4000 of tcode MM02.
i need to call the sub screen from abap report
02-06-2007 6:45 PM
in PBO
CALL SUBSCREEN <area_name> including SAPLMGD1 1001.
IN the PAI .
CALL SUBSCREEN <area_name>.
regds,
kiran
02-06-2007 6:55 PM
Hi Rajesh,
You can use FM MATERIAL_MAINTAIN_DIALOGUE to go to subcreen MRP1 in MM02.
Please check this sample code from other thread and enter 'MRP 1' for p_dytxt.
REPORT zsritest.
TABLES mara.
DATA: lv_bilds LIKE t133a-bilds,
ls_t130m LIKE t130m,
ls_rmmg1 LIKE rmmg1,
lwa_view TYPE mbildtab,
lwa_auswg TYPE mgauswg,
lt_views TYPE STANDARD TABLE OF mbildtab INITIAL SIZE 0,
lt_auswg TYPE STANDARD TABLE OF mgauswg INITIAL SIZE 0.
PARAMETERS: p_matnr LIKE mara-matnr,
p_werks LIKE marc-werks,
p_dytxt LIKE mbildtab-dytxt.
SELECT SINGLE * FROM mara WHERE matnr EQ p_matnr.
CHECK sy-subrc EQ 0.
CALL FUNCTION 'T130M_SINGLE_READ'
EXPORTING
tcode = 'MM02'
kzrfb = 'X'
IMPORTING
wt130m = ls_t130m
EXCEPTIONS
not_found = 1
wrong_call = 2
OTHERS = 3.
CALL FUNCTION 'BILDSEQUENZ_IDENTIFY'
EXPORTING
branche = mara-mbrsh
materialart = mara-mtart
tcode_ref = ls_t130m-trref
* KZRFB = ' '
IMPORTING
bildsequenz = lv_bilds
* KZ_BILDS_CHANGED =
EXCEPTIONS
wrong_call = 1
not_found = 2
OTHERS = 3.
CALL FUNCTION 'SELECTION_VIEWS_FIND'
EXPORTING
bildsequenz = lv_bilds
pflegestatus = mara-pstat
TABLES
bildtab = lt_views[]
EXCEPTIONS
call_wrong = 1
empty_selection = 2
OTHERS = 3.
ls_rmmg1-matnr = mara-matnr.
ls_rmmg1-werks = p_werks.
READ TABLE lt_views INTO lwa_view WITH KEY dytxt = p_dytxt.
CHECK sy-subrc EQ 0.
lwa_auswg-auswg = lwa_view-auswg.
APPEND lwa_auswg TO lt_auswg.
CALL FUNCTION 'MATERIAL_MAINTAIN_DIALOGUE'
EXPORTING
irmmg1 = ls_rmmg1
* IRMMG1_REF = ' '
KZ_EIN_DARK = 'X'
t_tcode = 'MM02'
* FLG_MATNR_RES = ' '
p_pstat = mara-pstat
* FLG_STAT_ALL = ' '
* CALL_MODE2 = ' '
* IMPORTING
* MATERIAL_NO =
* UPDATE_OK =
TABLES
iauswg = lt_auswg[]
EXCEPTIONS
no_authority = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Regards,
Ferry Lianto
07-03-2007 10:30 AM
Dear Ferry Lianto,
Using function 'MATERIAL_MAINTAIN_DIALOGUE' as you told i can open 'MM02' MRP 1 view but when i am trying to change the value of minimum order qty or something else , i am unable to save them. could u guide me what is the problem and how to resolve it
Thanks & Regards
Hemant
07-03-2007 9:14 AM
By using the function 'MATERIAL_MAINTAIN_DIALOGUE' i can open 'MRP 1 ' view in material master but when i am trying to change the value i am unable to save that can anbody gruide me how to do it or what is the problem
07-03-2007 10:33 AM
Implementing a subscreen
The following code implements a subscreen(0150). This is done by placing the subscreen into the subscreen area created on the original screen(0100).
*Flow logic for screen 0100
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
CALL SUBSCREEN GD_SUBSCREENAREA INCLUDING 'program_name' 'subscreen_number'.
* i.e. CALL SUBSCREEN GD_SUBSCREENAREA INCLUDING 'ZTESTPROG' '0150'.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0100.
reward points if it is usefull ...
Girish