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

Disable column in sales order

Hi guys,

I need to disable the matnr and zmeng(qty) field in sales order change mode.I have done the coding in userexit -

USEREXIT_FIELD_MODIFICATION->userexit_field_input_enable.Iam able to disable the material and quantity field.But my requirement is, i need to disable complete column(material and quantity).

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Apr 08, 2011 at 10:44 AM

    Hi,

    You can do with screen variants.

    Thanks,

    Shailaja Ainala.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 09, 2015 at 07:20 PM

    Found a way;

    The specific problem I faced was how to disable two fields, but let standard mapped data to be displayed in them.

    To cater this requirement I used the following;

    Include: MV45AFZZ

    User Exit Name: USEREXIT_FIELD_MODIFICATION

    Enhancement Name: -Any name you want-<br/>

    I created an Enhancement and wrote the following code;

    "Specify the condition

    IF VBAK-VKORG = '1234' AND ( sy-TCODE = 'VA02' OR sy-TCODE = 'VA01' ) AND ( screen-name = 'VBAP-KDMAT' OR screen-name = 'VBAP-ARKTX' ).

    screen-input = 0."disable input

    MODIFY SCREEN.

    DATA: i_tab_mara TYPE TABLE OF MARA WITH HEADER LINE.

    DATA: l_maktx TYPE MAKT-MAKTX.

    DATA: WA_MARA LIKE LINE OF i_tab_mara.

    DATA: i_tab_vbap TYPE TABLE OF VBAP WITH HEADER LINE.

    DATA: wa_vbap LIKE LINE OF i_tab_vbap.

    IF sy-TCODE = 'VA01' .

    SELECT SINGLE * from MARA INTO WA_MARA WHERE MATNR eq VBAP-MATNR.

    SELECT MAKTX FROM MAKT INTO l_maktx WHERE MATNR eq VBAP-MATNR.

    ENDSELECT.

    VBAP-KDMAT = WA_MARA-KDMAT.

    VBAP-ARKTX = l_maktx.

    MODIFY SCREEN.

    ELSEIF sy-TCODE = 'VA02' .

    SELECT SINGLE * FROM VBAP INTO WA_VBAP WHERE VBELN eq VBAK-VBELN AND POSNR eq VBAP-POSNR.

    IF WA_VBAP-ARKTX eq ''." Check if the fileds are empty, otherwise old data is overwritten

    SELECT MAKTX FROM MAKT INTO l_maktx WHERE MATNR eq VBAP-MATNR.

    ENDSELECT.

    VBAP-ARKTX = l_maktx.

    MODIFY SCREEN.

    ENDIF.

    IF WA_VBAP-KDMAT eq ''." Check if the fileds are empty, otherwise old data is overwritten

    SELECT SINGLE * from MARA INTO WA_MARA WHERE MATNR eq VBAP-MATNR.

    VBAP-KDMAT = WA_MARA-KDMAT.

    MODIFY SCREEN.

    ENDIF.

    ENDIF.

    ENDIF.

    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.