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

Table-control fields control by Username.

Hi,

I am having problem with Table control.

I created a screen having Table control.

This screen is used by 2 users . If User1 uses the 'Z' transaction for this table control screen, i want certain fields in Table control should be input.

The same when the User2 uses the same transaction for the screen, then the table control should not be input.

By userid , i have to made this.

I used If sy-uname = 'usr01'.

Loop at screen.

if screen-field = 'IT_TC1-MATNR'.

SCREEN-INPUT = 0.

endif.

modify screen.

endloop.

endif.

But it is not working.Pls suggest me.

Thanks in Advance,

Best Regards,

Pavan.

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 Feb 23, 2005 at 05:30 AM

    Hi Pavan,

    Could try out this piece of code instead ?

    IF SY-UNAME = 'USER1'.
      LOOP AT TC-COLS-SCREEN.
        IF TC-COLS-SCREEN-NAME = 'IT_TC1-MATNR'
          TC-COLS-SCREEN-INPUT = 0.
          MODIFY TC-COLS-SCREEN.
        ENDIF. 
      ENDLOOP.
    ENDIF.

    Regards,

    Anand Mandalika.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 23, 2005 at 05:28 AM

    Hi,

    1. Have you checked if this block of code is being executed? Is the IF condition being met? If you have written code exactly as you specified, you will have to change <b>IF sy-uname = 'USR01'</b> rather than <b>'usr01'</b>.

    2. Have you put this code in PBO or PAI?

    Regards

    Message was edited by: Shehryar Khan

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 23, 2005 at 08:26 AM

    Hi Pavan,

    Put the code you have mentioned inside the LOOP... ENDLOOP for the table control. This will work. The LOOP AT SCREEN outside this loop only contains fields outside the table control.

    Best regards,

    Mayank

    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.