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

change attributes of screen field dynamically

Hi all,

I have one urgent requirement.

VA01 transaction contains a field Batch id(ZZBATCH). The attributes of field can be changed by changing the module pool program SAPMV45A(screen 8549).

The requirement is that when sales order gets created via BDC the Batch id field should get populated. Since the Batch id field is a critical field we do not want the users to have authority to manupulate it. Hence we just need them to be greyed out in VA01/VA02 (however as mentioned earlier they should be populated when created by BDC).

Points will be given for rite answer.

Thanks in advance.

Nobin.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 29, 2007 at 11:40 AM

    You should be able to check the value of the system variable SY-CALLD to tell that the screen is being invoked in BDC, and open the field for input then i.e. something like:

    if not sy-calld is initial.
      loop at screen.
        if screen-name cs 'ZZBATCH'. "custom field
          screen-input = '1'.
          modify screen.
        endif.
      endloop
    endif.

    Jonathan

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Jonathan,

      I have an additional requirement in this issue, on which you have helped earlier.

      Now, with your help, i have made the ZZBATCH field greyed out when transaction VA01/VA02 is called manually and input enabled only when these transactions are called through BDC.

      The new requirement is When a new sales order is created using VA01,with reference to the one which was created via BDC, then the ZZBATCH field data of the reference order should not get populated in the new order

      Could you please help on this.

      Thanks in advance,

      Nobin

  • author's profile photo Former Member
    Former Member
    Posted on Nov 30, 2007 at 08:35 AM

    MODULE MODIFY_SCREEN OUTPUT.

    CASE SY-TCODE.

    WHEN 'Z19_TRANS1'.

    LOOP AT SCREEN.

    set titlebar 'title1'.

    IF SCREEN-NAME EQ 'DISPLAY' OR SCREEN-NAME EQ 'MODIFY'.

    SCREEN-INPUT = 0.

    MODIFY SCREEN.

    ENDIF.

    ENDLOOP.

    WHEN 'Z19_TRANS2'.

    LOOP AT SCREEN.

    IF SCREEN-NAME NE 'Z19_EKKO-DOCNO' AND SCREEN-NAME NE 'DISPLAY'.

    SCREEN-INPUT = 0.

    MODIFY SCREEN.

    ENDIF.

    ENDLOOP.

    WHEN 'Z19_TRANS3'.

    clear z19_ekko.

    LOOP AT SCREEN.

    IF SCREEN-NAME NE 'Z19_EKKO-DOCNO'.

    IF SCREEN-NAME EQ 'CREATE' OR SCREEN-NAME EQ 'DISPLAY'.

    SCREEN-INPUT = 0.

    ENDIF.

    SCREEN-REQUIRED = 0.

    ENDIF.

    MODIFY SCREEN.

    ENDLOOP.

    ENDCASE.

    ENDMODULE. " MODIFY_SCREEN OUTPUT

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 07, 2008 at 08:12 AM

    New Requirement

    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.