Disabling the field in SM30 based on some condition

Hi all,
I hv 11 fields in my custom table.I have a field called STATUS in it. The data into the table is automaticcaly generated when v run a report. when v go to SM30 only 3 fields are enabled. User has the provision to change only those fileds...
The STATUS field may be 'C' or 'P'. If it is 'C', i shd make it as disabled,
and if it is 'P' , when changed to 'D' shd be disabled.
For this i hv taken the program name & screen no...in se51 i had created a new module in PAI.
MODULE disable_flds1.
module DISPLAY_FLDS1 input.
  IF ztest-zstatus EQ 'C'.
    LOOP AT SCREEN.
      IF screen-GROUP1 EQ 'STA'.
        screen-input = 0.
      ENDIF.
      MODIFY SCREEN.
    ENDLOOP.
  ENDIF.
endmodule.                 " DISPLAY_FLDS1  INPUT
But the above logic is not workin...
Can anyone help me..
Thanx...

Hi all,
I hv 11 fields in my custom table.I have a field called STATUS in it. The data into the table is automaticcaly generated when v run a report. when v go to SM30 only 3 fields are enabled. User has the provision to change only those fileds...
The STATUS field may be 'C' or 'P'. If it is 'C', i shd make it as disabled,
and if it is 'P' , when changed to 'D' shd be disabled.
For this i hv taken the program name & screen no...in se51 i had created a new module in PAI.
MODULE disable_flds1.
module DISPLAY_FLDS1 input.
  IF ztest-zstatus EQ 'C'.
    LOOP AT SCREEN.
      IF screen-GROUP1 EQ 'STA'.
        screen-input = 0.
      ENDIF.
      MODIFY SCREEN.
    ENDLOOP.
  ENDIF.
endmodule.                 " DISPLAY_FLDS1  INPUT
But the above logic is not workin...
Can anyone help me..
Thanx...

Similar Messages

  • How to dynamically add/remove a button from the ribbon based on some condition? (Ribbon XML)

    Hi,
    I have a ribbon (done using ribbon XML) with menu options. I need to remove few buttons from the menu dynamically based on some condition. Also, I want to change the label of another button. How to achieve this programmatically? (C#)
    Thanks in advance.
    Thanks Prasad

    Hello Prasad,
    Use callbacks for populating Ribbon controls such as menu, dropDown, gallery and etc. Then you can use the
    Invalidate or
    InvalidateControl methods of the
    IRibbonUI interface to get your callbacks invoked when required. Thus, you will be able to delete the required item(s).
    You will find the following articles in MSDN helpful:
    Chapter 11: Creating Dynamic Ribbon Customizations (1 of 2)
    Chapter 11: Creating Dynamic Ribbon Customizations (2 of 2)
    To change the label of your controls at runtime you need to use the getLabel callback and call the Invalidate or InvalidateControl methods of the IRibbonUI interface. The following series of articles describe the Fluent UI in depth:
    Customizing the 2007 Office Fluent Ribbon for Developers (Part 1 of 3)
    Customizing the 2007 Office Fluent Ribbon for Developers (Part 2 of 3)
    Customizing the 2007 Office Fluent Ribbon for Developers (Part 3 of 3)

  • Disabling the fields

    Hi All,
      How can i disable the fields when i press on Display button, the data shud be retrieved but the fields shud be in display mode only.
      waiting for ur reply.
    Thanx  & Regards
    Srinath

    You need to loop at screen and modify the attirbutes of the screen structure. Do this in the PBO and before doing this , check if the transaction is in Display mode or Change mode.
    if display_mode = 'X'.  "Variable set depending on the transaction
    Loop at screen
      screen-input = 0.
      screen-active = '0'.
    modify screen.
    endloop.
    endif.
    regards,
    Advait.

  • Routing : disable the field "net price" in external process

    Hi all PP guru,
    in Routing, is there any way i can disable the field "net price" in external process, not let user enter any value in, also force the Purchase info record as mandatory field ?
    anyone know how to use "OP5D" ?
    Regards
    kh

    Hi,
    In the Transaction: OP5D:
    Select PP/QM task lists: operation screens
    In the Next Screen all the Fields are arranged in the Alphabetical Order.
    For Net Price: Select the Disp. Radiobutton (Display)
    For Purcase Infor record: Select the Req Radiobutton ( Required)
    Every time the Filed Net Price is for display purpose and Purchase Info Record is a Mandory Field for you.
    Hope this helps..
    Regards,
    Siva

  • Grey out a particular row in ALV based on some condition.

    Hi All,
    How can we grey out the particular row in ALV based on some condition( I am using the function modules and not OOPS).
    Regards
    Ramesh.

    Hello Ramesh
    In this case you need to add a specific field to your structure:
    TYPES: BEGIN OF ty_s_outtab.
    INLCUDE TYPE <my table or structure>.
    TYPES: CELLTAB   TYPE lvc_t_styl.  " name is arbitrary but this one is most frequently used
    TYPES: END OF ty_s_outtab.
    DATA: gt_outtab  TYPE STANDARD TABLE OF ty_s_outtab
                                 WITH DEFAULT KEY.
    You can use the fieldcatalog to make an entire column non-editable (LVC_S_FCAT-EDIT = ' ' ).
    However, in case of rows you need to inactivate all cells of this row. For sample coding please refer to thread:
    How to conditionally set ALV field as hotspot
    Regards
      Uwe

  • Display Image(which set as behind text)   based on some condition.

    hi all
    I have developed a xml report and in that rtf am displaying a static image (which is set as behin text).
    But i need to display the image based on some condition
    for example i have a field as ORG_ID
    if org_id=87 then image should display for that purpose am planning to use <?if:ORG_ID=87?> condition but where to place this condition for the image.
    kindly help me
    thanks for all in advance.

    that too not working because
    on image am displaying some other fields.
    see i think you didn't get my point.
    in my out put page am displaying item details ,quantity,and cost and customer details just like invoice copy .
    behind this data am displaying my company logo which will capture whole page size..
    if i place the image in table then fields will be automatically in table so i cant restrict image in this way.
    Kindly suggest any other way that works only for image which is behind text. i mean condition should be applicable only for image and leaving all other fileds in rtf.
    or
    help on this how to set a dynamic image as behind the text.
    Edited by: maddy on Nov 28, 2012 7:32 AM
    Edited by: maddy on Nov 28, 2012 7:35 AM

  • How to make a region mandatory based on some conditions using CO Extension?

    Dear All,
    I want to make Attachments region in a seeded page mandatory, based on some conditions. I am able to make fields mandatory using CO Extension, but i am not able to make the attachments region mandatory. Please help.
    Thanks
    Raj

    Raj,
    I have not tried but check if you could get the rowcount which shows how many attachment are upload or not. Then by checking this throw exception if the rowcount is o.
    Thanks
    --Anil
    http://oracleanil.blogspot.com/

  • Display an exception based on some condition

    HI..
    how to run a exception based on some condition i.e
    i want to highlight the sales(key figure) which r less than the  average sales..
    where sales and average sales r keyfigures...

    Hi!
    welcome to SDN.
    create a calculated key figure which will be 1 if the sales is less then the average sales.
    create exception based on this calculated key figure.
    with regard
    ashwin
    <i>PS n: Assigning point to the helpful answers is the way of saying thanks in SDN.  you can assign points by clicking on the appropriate radio button displayed next to the answers for your question. yellow for 2, green for 6 points(2)and blue for 10 points and to close the question and marked as problem solved. closing the threads which has a solution will help the members to deal with open issues with out wasting time on problems which has a solution and also to the people who encounter the same porblem in future. This is just to give you information as you are a new user.</i>

  • Calling two table controlls based on some conditions......

    I hav a requirement in which i have two table controlls, which i want to call based on some conditions. Like if condition is satisfied the first table controll shud fill up the screen and other wise the secondtable controll shud fill the screen....

    Hello,
    In the main screen where u need to vary with the 2 table controls , create a subscreen area .
    Now create two subscreens with the required table controls respectively.
    You can dynamically call the subscreens accordingly for  the conditions.
    Hope this may help you.
    Neeraj

  • Calling a window in sapscript based on some conditions

    Hi all,
    I want to call a window in SAPScript based on some conditions.Plz suggest how could i do that.
    Regards,
    Chinmay.

    Hi,
    Use a text element in that window.
    ie..
    /E  TEXT
    &VBAK-VBELN&
    in ur driver program
    if vbak-vbeln is not initial. ( your condition)
    call function 'write_form'
    element = 'TEXT'
    window = 'WINDOW_NAME'
    Endif.
    hope this helps
    santhosh

  • Disabling the field 'Bill-to party' in sales order screen

    Hi friends,
    I need to disable following fields in the partner functions tab of sales order ,while creating/changing a sales order,since they will be automatically populated and user should not be able to modify.
    1.Bill-to party.
    2.Payer.
    I have tried with user exit MV45AFZZ,but program control is not coming there regarding PARTNERS tab,for diabling the screen.
    Can you give me some hints like,any other EXIT or BADI exists for writing the code for this?
    Thanks & Regards
    Seshagiri.

    Hi,
    Your requirement is to identify the bill to based on ship to. if so do the following.
    maintain the partner tab in ship to master record, here you assign the bill to party to whom you have to send the bill.
    Now in partner determination procedure maintain the bill to source as ship to. In partner determination procedure you have all the options from where system has to look for the other partner functions.
    In this processes system first checks with Sold to, finds out a ship to, now from ship to partner tab it automatically finds out the bill to in to the sales order.
    Hope you understood, if not let me know.
    Reward if it helps you.
    Venkat Cheedalla

  • Disable the Item Availability Button based on Order type and Item category

    Hi ,
    My requirement is to disable the Item availability check button in VA01 based on the Order Type & Item category. Is there any user Exits/ Badi / FM available for this.
    Thanks in advance.
    Srinivas.

    Hi,
    Although it is an old post I need to answer for people who search an answer to the same type of question. To hide a field
    you can use transaction variant 'tcode:SHD0'. But it is not based on Order type and Item category. May be you can use
    USEREXIT_FIELD_MODIFICATION form in user-exit MV45AFZZ. You can loop at screen and set screen-active = 0 in fields
    where you want them to be inactive.

  • How can i end the Process chain based on some condition

    HI All,
    I have a scenario where i have a main pc chain which call  the  new chain at the end which in turn again call pc1. So its more like a closed loop .
    pc1-->pc2->pc1
    What main chain does is it reads some field value from a dso and assign that to some variable and set some flag to identify that value has been used. My second chain just run the report using the same variables assign by first chain. Now i have to design the main chain such that when all the values have been read from the dso, it should exit and should not trigger 2nd chain. How can i achieve this scenario.
    Thanks
    Prashant

    Hi,
    For this try using Process Type-"Decision between multiple Alternatives" in your main chain.It helps you the set condieion based on some formulas
    Pls refer links
    Decision Between Multiple Alternatives
    thanks
    nilesh
    Edited by: npathak on Aug 11, 2010 1:16 PM

  • How to disable the field-input in xd01

    Hi Abappers,
                         I have created subscreen in xd01 using BADI: CUSTOMER_ADD_DATA_CS. After giving input to field, it has to go disable mode how is it possible.How to disable that field.
    Regards,
    simba.

    Hi,
       after u add some data to that field. Now check the field, if it is not initial then make that field in disable mode.
    for eg:
    loop at screen.
                 if itab-<fieldname> is not initial.
                 screen-input = 0.
                 modify screen.
                 endif.
              endloop.
    Regards,
    Kasuladevi Srinivas
    Edited by: Kasuladevi Srinivas on Sep 11, 2008 7:26 AM

  • Want to disable few fields im SM30

    Hi Gurus ,
    I have a requirement to maintain a  ztable thorugh t-code. This all have to be done by one program .
    In the program selection we have to radio button - a.)  Maintain   and b.)  Validate.
    What the program is doing is just calling sm30 t-code for that z table.
    Now if user have selected a.) Maintain  -    he should able to see and edit few fields.
    if he select  b.)  Validate  - he will be  able to see all the fields and able to change them.
    Please help me with the steps to achieve this.
    Regards,
    Sowmen

    Hi,
    You can work on this with 2 ways:
    Option 1:  modify the Function group which is created by table maintanance genration according to ur requirement.
    it is fast and easy but dont go for this way .AS if someone by mistakely Re- genrate that table maintanance in that all youe changes will go.Changes means the modification you have done for validation and all.
    Option 2:  go for the Z development. and achieve ur functionality
    thnaks.

Maybe you are looking for

  • LE 8 doesn't see all of my installed Jam Packs

    Just setting up a new mac. I installed all the Jam Packs. After that I brought up Garageband and when I click on "Loops" it show the following list. I did notice that when Garage Band came up, it indicated that it was searching for Jam Packs... Garag

  • Re: Satellite L300-11C - Which HDD is built in?

    Hi, I'd like to know if the hard drive in the L300-11C is SATA or IDE. Are they of particular size or will any 2.5" drive fit? Any help would be appreciated :) Many thanks,

  • Exporting HumanResources.Jobcandidate with SS Import/Export Wizard

    The default mapping results in execution errors. What is the correct setup for exporting the table to flat file from AdventureWorks2012?   Thanks. Kalman Toth Database & OLAP Architect SQL Server 2014 Design & Programming New Book / Kindle: Exam 70-4

  • Design a Query Form to display a particular form's filed's properties

    Hello, I need to design a Query form to see all the properties and its set values of each and every field (or may be any particular field) of any particular form. So, is there any way to get the properties set and their values of a field?

  • Wireless internet connection

    I am going on a long trip and need to have a wireless card or whatever they are called I have never had to use one before. However I need to know what to even call it. I know that verizon has a service like this but I only need it for like a month. W