‎2009 Feb 16 1:47 PM
Hi Friends,
In one requirement i need to copy the program of standard t-code MD06 and i have to assign a custom t-code(zmd06). but while running ZMD06, i got the following error.
"Argument ZMD06 not in Table T450N ".
even I copied the field values of MD06 to ZMd06 in table t450n entries!!
Can you please suggest me, whether it needs any settings or something?
Thanks n regards,
Sagar.
‎2009 Feb 16 1:58 PM
Hi
I think u don't need to insert a new hit in table T450N, but change the following routines:
Include MM61RO00_SETZEN_STATUS:
- Here u need to replace the code for MD06:
MODULE set_activetab OUTPUT.
*--> aktuellen Tab aus Memory holen nach Rücksprung
IF am61r-xcode EQ space.
PERFORM import_tabnr_to_buffe.
ENDIF.
*--> aktiven Tab setzen bei Neueinstieg und Rücksprung
IF am61r-xcode EQ space
OR am61r-xcode EQ 'BACK'.
CASE sy-tcode.
WHEN 'MD04'.
IF tab_nr EQ char2.
tabnr300 = '2'.
tab300-activetab = 'F02'.
sub300 = '0212'.
ELSE.
tabnr300 = '1'.
sub300 = '0301'.
tab300-activetab = 'F01'.
ENDIF.
WHEN 'MD07'.
IF tab_nr EQ char1.
tabnr210 = '1'.
sub210 = '0301'.
tab210-activetab = 'F01'.
ELSE.
tabnr210 = '2'.
tab210-activetab = 'F02'.
sub210 = '0212'.
ENDIF.
WHEN 'MS04'.
IF tab_nr EQ char2.
tabnr600 = '2'.
sub600 = '621'.
tab600-activetab = 'F02'.
ELSE.
tabnr600 = '1'.
sub600 = '601'.
tab600-activetab = 'F01'.
ENDIF.
WHEN 'MS07'.
IF tab_nr EQ char1.
tabnr620 = '1'.
sub620 = '0601'.
tab620-activetab = 'F01'.
ELSE.
tabnr620 = '2'.
tab620-activetab = 'F02'.
sub620 = '0621'.
ENDIF.
WHEN 'MD05'.
IF tab_nr EQ char2.
tabnr300 = '2'.
tab300-activetab = 'F02'.
sub300 = '0202'.
ELSE.
tabnr300 = '1'.
sub300 = '0301'.
tab300-activetab = 'F01'.
ENDIF.
WHEN 'MD06'.
IF tab_nr EQ char1.
tabnr200 = '1'.
sub200 = '0301'.
tab200-activetab = 'F01'.
ELSE.
tabnr200 = '2'.
tab200-activetab = 'F02'.
sub200 = '202'.
ENDIF.
*---------------------- Start of modifications ------------------------------
WHEN 'ZMD06'. "<---------Modifications for trx ZMD06
IF tab_nr EQ char1.
tabnr200 = '1'.
sub200 = '0301'.
tab200-activetab = 'F01'.
ELSE.
tabnr200 = '2'.
tab200-activetab = 'F02'.
sub200 = '202'.
ENDIF.
*---------------------- End of modifications ------------------------------
WHEN 'MS05'.
IF tab_nr EQ char2.
tabnr600 = '2'.
sub600 = '611'.
tab600-activetab = 'F02'.
ELSE.
tabnr600 = '1'.
sub600 = '601'.
tab600-activetab = 'F01'.
ENDIF.
WHEN 'MS06'.
IF tab_nr EQ char1.
tabnr610 = '1'.
sub610 = '0601'.
tab610-activetab = 'F01'.
ELSE.
tabnr610 = '2'.
tab610-activetab = 'F02'.
sub610 = '0611'.
ENDIF.
ENDCASE.
ENDIF.
*--> Memory löschen
DELETE FROM SHARED BUFFER mdtab(ar) ID 'MD_TAB_MEMORY'.
ENDMODULE. " SET_ACTIVETAB OUTPUTInclude MM61RF10_READ_T450N:
FORM set_t450n.
DATA: trans_code LIKE sy-tcode.
*--> Daten für T450N vorbereiten
CASE sy-tcode.
WHEN 'MD04'.
if tabnr300 = '1'.
trans_code = 'MD04'.
elseif tabnr300 = '2'.
trans_code = 'MD07'.
endif.
WHEN 'MS04'.
if tabnr600 = '1'.
trans_code = 'MS04'.
elseif tabnr600 = '2'.
trans_code = 'MS07'.
endif.
WHEN 'MD05'.
if tabnr300 = '1'.
trans_code = 'MD05'.
elseif tabnr300 = '2'.
trans_code = 'MD06'.
endif.
WHEN 'MS05'.
if tabnr600 = '1'.
trans_code = 'MS05'.
elseif tabnr600 = '2'.
trans_code = 'MS06'.
endif.
WHEN 'MD06'.
if tabnr200 = '1'.
trans_code = 'MD05'.
elseif tabnr200 = '2'.
trans_code = 'MD06'.
endif.
*---------------------- Start of modifications ------------------------------
WHEN 'ZMD06'. "<---------Modifications for trx ZMD06
if tabnr200 = '1'.
trans_code = 'MD05'.
elseif tabnr200 = '2'.
trans_code = 'MD06'.
endif.
*---------------------- End of modifications ------------------------------
WHEN 'MS06'.
if tabnr610 = '1'.
trans_code = 'MS05'.
elseif tabnr610 = '2'.
trans_code = 'MS06'.
endif.
WHEN 'MD07'.
if tabnr210 = '1'.
trans_code = 'MD04'.
elseif tabnr210 = '2'.
trans_code = 'MD07'.
endif.
WHEN 'MS07'.
if tabnr620 = '1'.
trans_code = 'MS04'.
elseif tabnr620 = '2'.
trans_code = 'MS07'.
endif.
ENDCASE.
SELECT SINGLE * FROM t450n
WHERE tcode EQ trans_code.
IF sy-subrc > 0.
MOVE 'T450N' TO am61r-tbnam.
SET PARAMETER ID 'TAB' FIELD am61r-tbnam.
MESSAGE e001 WITH sy-tcode am61r-tbnam.
ENDIF.
ENDFORM. " SET_T450NMax
‎2009 Feb 16 1:51 PM
Check both program properties, and see if the original uses logical databases. If it does, just copy the data to the zprogram properties.
‎2009 Feb 16 1:58 PM
Hi
I think u don't need to insert a new hit in table T450N, but change the following routines:
Include MM61RO00_SETZEN_STATUS:
- Here u need to replace the code for MD06:
MODULE set_activetab OUTPUT.
*--> aktuellen Tab aus Memory holen nach Rücksprung
IF am61r-xcode EQ space.
PERFORM import_tabnr_to_buffe.
ENDIF.
*--> aktiven Tab setzen bei Neueinstieg und Rücksprung
IF am61r-xcode EQ space
OR am61r-xcode EQ 'BACK'.
CASE sy-tcode.
WHEN 'MD04'.
IF tab_nr EQ char2.
tabnr300 = '2'.
tab300-activetab = 'F02'.
sub300 = '0212'.
ELSE.
tabnr300 = '1'.
sub300 = '0301'.
tab300-activetab = 'F01'.
ENDIF.
WHEN 'MD07'.
IF tab_nr EQ char1.
tabnr210 = '1'.
sub210 = '0301'.
tab210-activetab = 'F01'.
ELSE.
tabnr210 = '2'.
tab210-activetab = 'F02'.
sub210 = '0212'.
ENDIF.
WHEN 'MS04'.
IF tab_nr EQ char2.
tabnr600 = '2'.
sub600 = '621'.
tab600-activetab = 'F02'.
ELSE.
tabnr600 = '1'.
sub600 = '601'.
tab600-activetab = 'F01'.
ENDIF.
WHEN 'MS07'.
IF tab_nr EQ char1.
tabnr620 = '1'.
sub620 = '0601'.
tab620-activetab = 'F01'.
ELSE.
tabnr620 = '2'.
tab620-activetab = 'F02'.
sub620 = '0621'.
ENDIF.
WHEN 'MD05'.
IF tab_nr EQ char2.
tabnr300 = '2'.
tab300-activetab = 'F02'.
sub300 = '0202'.
ELSE.
tabnr300 = '1'.
sub300 = '0301'.
tab300-activetab = 'F01'.
ENDIF.
WHEN 'MD06'.
IF tab_nr EQ char1.
tabnr200 = '1'.
sub200 = '0301'.
tab200-activetab = 'F01'.
ELSE.
tabnr200 = '2'.
tab200-activetab = 'F02'.
sub200 = '202'.
ENDIF.
*---------------------- Start of modifications ------------------------------
WHEN 'ZMD06'. "<---------Modifications for trx ZMD06
IF tab_nr EQ char1.
tabnr200 = '1'.
sub200 = '0301'.
tab200-activetab = 'F01'.
ELSE.
tabnr200 = '2'.
tab200-activetab = 'F02'.
sub200 = '202'.
ENDIF.
*---------------------- End of modifications ------------------------------
WHEN 'MS05'.
IF tab_nr EQ char2.
tabnr600 = '2'.
sub600 = '611'.
tab600-activetab = 'F02'.
ELSE.
tabnr600 = '1'.
sub600 = '601'.
tab600-activetab = 'F01'.
ENDIF.
WHEN 'MS06'.
IF tab_nr EQ char1.
tabnr610 = '1'.
sub610 = '0601'.
tab610-activetab = 'F01'.
ELSE.
tabnr610 = '2'.
tab610-activetab = 'F02'.
sub610 = '0611'.
ENDIF.
ENDCASE.
ENDIF.
*--> Memory löschen
DELETE FROM SHARED BUFFER mdtab(ar) ID 'MD_TAB_MEMORY'.
ENDMODULE. " SET_ACTIVETAB OUTPUTInclude MM61RF10_READ_T450N:
FORM set_t450n.
DATA: trans_code LIKE sy-tcode.
*--> Daten für T450N vorbereiten
CASE sy-tcode.
WHEN 'MD04'.
if tabnr300 = '1'.
trans_code = 'MD04'.
elseif tabnr300 = '2'.
trans_code = 'MD07'.
endif.
WHEN 'MS04'.
if tabnr600 = '1'.
trans_code = 'MS04'.
elseif tabnr600 = '2'.
trans_code = 'MS07'.
endif.
WHEN 'MD05'.
if tabnr300 = '1'.
trans_code = 'MD05'.
elseif tabnr300 = '2'.
trans_code = 'MD06'.
endif.
WHEN 'MS05'.
if tabnr600 = '1'.
trans_code = 'MS05'.
elseif tabnr600 = '2'.
trans_code = 'MS06'.
endif.
WHEN 'MD06'.
if tabnr200 = '1'.
trans_code = 'MD05'.
elseif tabnr200 = '2'.
trans_code = 'MD06'.
endif.
*---------------------- Start of modifications ------------------------------
WHEN 'ZMD06'. "<---------Modifications for trx ZMD06
if tabnr200 = '1'.
trans_code = 'MD05'.
elseif tabnr200 = '2'.
trans_code = 'MD06'.
endif.
*---------------------- End of modifications ------------------------------
WHEN 'MS06'.
if tabnr610 = '1'.
trans_code = 'MS05'.
elseif tabnr610 = '2'.
trans_code = 'MS06'.
endif.
WHEN 'MD07'.
if tabnr210 = '1'.
trans_code = 'MD04'.
elseif tabnr210 = '2'.
trans_code = 'MD07'.
endif.
WHEN 'MS07'.
if tabnr620 = '1'.
trans_code = 'MS04'.
elseif tabnr620 = '2'.
trans_code = 'MS07'.
endif.
ENDCASE.
SELECT SINGLE * FROM t450n
WHERE tcode EQ trans_code.
IF sy-subrc > 0.
MOVE 'T450N' TO am61r-tbnam.
SET PARAMETER ID 'TAB' FIELD am61r-tbnam.
MESSAGE e001 WITH sy-tcode am61r-tbnam.
ENDIF.
ENDFORM. " SET_T450NMax
‎2009 Feb 16 3:00 PM
Thank you max..
Itz working ..but still with some problems.
when I chk the radio button for Vendor, It is throwing an error " Please specify valid vendor"!!,
Instead of turning the vendor to change mode.( may be some problem with the function code)
Any more changes in the code?
Thank and regards,
Sagar.
‎2009 Feb 16 3:11 PM
Hi
It seems there's a control on value of AM61R-XCODE: when a radiobutton is pressed it shoudl be DETL.
If the AM61R-XCODE has that value the control for vendor is skipped:
See the include MM61RI00_CHECK_LIEF_OVERVIEW
MODULE CHECK_LIEF_OVERVIEW INPUT.
*--> nur prüfen, wenn über Lieferant selektiert wird
CHECK NOT RM61R-LIEKZ IS INITIAL.
*--> nicht prüfen, wenn erst Radiobutton gewählt
CHECK NOT AM61R-XCODE eq 'DETL'. "<----- Here the control is skipped
*--> Lieferant lesen
PERFORM SELECT_LFA1 USING RM61R-LIFNR.
IF SY-SUBRC <> 0.
CLEAR LFA1-NAME1. "new SA 46c
*--> Lieferant ist nicht vorhanden
SET CURSOR FIELD 'RM61R-LIFNR'.
MESSAGE E619. "with rm61r-lifnr. "<-----Here the error u get
....................................
So u should check which value is transfered to AM61R-XCODE after pressing a radio button.
Max
‎2009 Feb 17 1:15 PM