cancel
Showing results for 
Search instead for 
Did you mean: 

SAPCRIPT : add new field in Medruck Sapscript form

Former Member
0 Kudos

Hello Experts

I need to add one field in Medruck form. For subcontracting componenets (Main Window) currently materila description is displaying but i need to display material number also . How can i get the material number corresponding to each material description .

Can anyone suggest me solution for this problem.

thanks & Regards

Priyanka

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Prinyanka,

If you want to add new field to the MEDRUCK form .Create subroutne pool in that get the required filed .Now come back to the MEDRUK Use PERFORM staement to get the field value in the form.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

First copy the standard form in Z-Form.After that u made the changes.

For Eg :

In Script write like this.

/:PERFORM GET_OBJID IN PROGRAM Z_MM_R_MMPO

/: using &makt-MAKTX&-----here u can get the material des.(give u r des variable)

/:changing&matnr&

p1 &matnr&----here u r material will displayed

in Se38 program write like this.

FORM GET_OBJID TABLES IN_TAB STRUCTURE ITCSY

OUT_TAB STRUCTURE ITCSY. "#EC CALLED

data : v_matnr type makt-matnr,

v_matnr(15) type c.

READ TABLE IN_TAB WITH KEY NAME = 'MAKT-MATNR'.

if sy-subrc is initial.

select single matnr from makt into v_matnr where MAKTX = IN_TAB-VALUE.

endif.

endif.

if v_matnr is not initial.

READ TABLE OUT_TAB WITH KEY NAME = 'MATNR'. "OBJNAM

if sy-subrc is initial.

V_matnr1 = V_matnr.

OUT_TAB-VALUE = V_matnr11.

MODIFY OUT_TAB INDEX SY-TABIX.

endif.

ENDFORM.