Skip to Content
author's profile photo Former Member
Former Member

SAPCRIPT : add new field in Medruck Sapscript form

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 23, 2008 at 05:20 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 23, 2008 at 05:34 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.