How to switch two fields with one of them OBLIGATORY

Hi everyone,
i have two radio button on the screen: RD_A  and RD_B, while there are two fields corresponding to them: P_A and P_B, P_A is OBLIGATORY.
i want to implment: when i click RD_A, field P_A is enable and field p_B is disable. when i click RD_B, field P_B is enable and field P_A is disable.
i tried using LOOP AT SCREEN ...screen-input = '0' and screen-required = '0' ....MODIFY SCREEN...statements, but it cannot work fine. when i switch from A to B, it always popup error message 'Fill in all required entry fields'.
can anyone help me? thanks in advance!

you can try this approach, instead of using Obligatory Addition.
REPORT  ztest_radio.
TABLES: sflight.
SELECT-OPTIONS: carrid FOR sflight-carrid,
                connid FOR sflight-connid.
PARAMETERS: r1 RADIOBUTTON GROUP g1 USER-COMMAND abc DEFAULT 'X',
            r2 RADIOBUTTON GROUP g1.
AT SELECTION-SCREEN OUTPUT.
  IF r1 = 'X'.
    LOOP AT SCREEN.
      IF screen-name CS 'CONNID'.
        screen-input = 0.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ELSE.
    LOOP AT SCREEN.
      IF screen-name CS 'CARRID'.
        screen-input = 0.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ENDIF.
AT SELECTION-SCREEN.
  IF sy-ucomm = 'ONLI'.   "This triggers only when you press execute button
    IF r1 = 'X'.
      IF carrid IS INITIAL.
        MESSAGE 'Enter Carrid' TYPE 'E'.
      ENDIF.
    ELSE.
      IF connid IS INITIAL.
        MESSAGE 'Enter Connid' TYPE 'E'.
      ENDIF.
    ENDIF.
  ENDIF.

Similar Messages

  • How to sync two IPhone with one PC , but with different applications

    How to sync two IPhone with one PC , but with different applications ?
    We have two IPhones , but one PC , we want to sync separately , is that possible ?

    Absolutely, connect each phone, select what content you want on each phone, then hit the sync button. iTunes will keep everything straight, by device, upon subsequent syncs, including separate backups.

  • How to print two sides with one page?

    I have a PDF that is one page long and I'd like to print the same thing twice (front and back) on one page. Can I do that?
    I've tried printing two copies with the printer set to double-sided, but it just printed two sheets with one side on each sheet.

    Well sure; Go back to the authoring application that created the documents and do a 2-UP page. Make the existingg page large enough to accomodate the extra content. Is that what you're asking or do you really mean print to a printer with a back up ? In that case just flip the page over and print page 2 on the other side.
    Or are we missing something ?

  • How to run two programs with one PC and two monitors

    Good Morning,
    I have a requirement to run a parallel loop and update the progress in two monitors with one computer.
    For ex: its a two test stage, the process and progress of the 1st stage needs to displayed in monitor1 and similarly for 2nd stage to monitor 2 with program running with one computer.Would it be possible to do that.
    Thanks in advance

    Hi Parker,
    yes, it's possible. You also have properties to set windows to specific monitors...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • How to get two fields with same tech name in LIS Extractors?

    Hi Experts,
    I need "ERDAT" field from two structures (QMSM & QMFE) in 2LIS_18_IOTASK extractor.
    In LBWE first I moved ERDAT from QMSM. When I moved ERDAT from QMFE it gives an error:
    "Field with same technical name is already available in the Extract Structure".
    I don't want to create Append Structure as we need to write User exit.
    Can any one tell me how to get this field added in the extractor from QMSM and QMFE?
    Thanks for your help.
    Regards,
    Sree

    this is not possible as the all those fields are put in one structure. per definition you can't put the same field name twice in a structure, table in the data dictionary...
    hence, you really need to use an append and fill via user exit
    M.

  • How to map two fields to one field

    Hi, All,
    I have three datastore objects (three data fields): Year, term, and period key. Their relationship is like this:
    If year = 2010, term = '010', period key will be "1010".  In selection screen, I want users to input year (2010) and term (010), but get the report with period key = '1010'. Does anybody can tell me how to do that?
    Thanks.
    Marea

    Hi,
    Here two options as our experts said  through customer exit
    By creating the project with ompnets EXIT_SAPLRSAP_001
    Then write code when first two varibleas are entered means ( user entry varibles year and term) then execute the third varible  period key
    for that a smaall code is required  u can write it .
    when the customer exit varibles executes it fetches data form bith user entry varibles and update last 2char from year and last 2 char from period that is concept u can ask ur abaper fro small help.
    If not
    if you are willing to do at tranformations level just add one more field as period key  and activate it ,in transformations level u can assign both year and term to period key and write a small routien as below
    result  = source_fields-year 2(4) + source_fields-term1(3).
      choice is urs as per ur flexibility u can aceive the above requirement.
    Thanks & Regards,
    sathish

  • How to use two iPhones with one iCloud account

    I am really confused at how to set our iPhones up.
    My wife and I each have an iPhone 5. 
    We have one iCloud account because we share our calendar and contacts.
    I did get her her own iCloud account to add some calendar events I don't need to sync.
    That is working all well and good. 
    The only problem is Siri.  It says my name to her when she makes a request.  So I went in to Siri and choose her name out of contacts.  Then it starts calling me by her name on my iPhone.
    Obvioulsy Siri is linked via iCloud and I am not seeing a setting to change that.
    If we could share calendars between two different iCloud accounts all would be well.
    Can we.  Can I set my calendar up as something she can subscribe to?

    Hi Friend,
    About Siri, it must know who you are. To do that, go to: Settings>>General>>Siri>> My Information. There, you can select your own information, like name, phone number, home address, office address and so on.
    About Calendars, you can set what you want to share with her, and what she wants to share with you as well. To do it, you must set it in two different places:
    1o: Set with iCloud: Settings>>iCloud, there you can set if you want to sync with;
    2o: Set which kind of calendars you want to sync: Calendars>>Calendars, there if you want to sync Calendars, but you won't sync your Work Calendars, unmark Work. It will private your Work Calendars just with your iPhone device.
    3o: General settings of your Calendars: Settings>>Mail,Contacts,Calendars>>Calendars, there you can setthe period of events you want to sync and set your Standard Calendar.
    Hope it will be helpful

  • How to manage two viewstacks with one linkbar?

    hello all,
    I currently am creating my website utilizing flex and have come across a roadblock.  I need a single linkbar to manage two viewstacks but cannot figure out how to do this so far.  i have tried using both id's in the dataProvider but the only one it manages is the last input.  please advise how to do this or another way in which i can accomplish what i am trying to do.
    for your information:  one viewstack will be for the pages of the site and the other will be for banners on each page.  I cannot put the banners in the viewstack because they will be larger than the pages
    here is some of the code:
    <mx:LinkBar x="10" y="116" dataProvider="{body, ads}" fontSize="18" height="29">
    </mx:LinkBar>
    when i run the application i do not receive any errors however the only viewstack that changes is the ads or vice versa if i have body last.

    Sure, user a Timer:
    http://livedocs.adobe.com/flex/3/html/help.html?content=08_Dates_and_times_4.html
    http://blog.flexexamples.com/2007/08/14/creating-a-simple-timer-in-flex-with-the-flashutil stimer-class/
    http://livedocs.adobe.com/flex/3/html/help.html?content=16_Event_handling_7.html
    http://www.cs.vu.nl/~eliens/im/assets/flex3/langref/flash/utils/Timer.html
    If this post answered your question or helped, please mark it as such.

  • How to manage two iPhones with one Apple ID

    My company is moving to iPhones and away from BlackBerry so I may soon end up with a second iPhone.  I believe that I can set up the app store account using my current Apple ID so I can download apps that I have already purchased to the new phone.  But do I need to set up separate iCloud accounts?  And if so how do you do that?

    use your existing apple ID.

  • Syncing two iphones with one computer

    A co-worker and I share a secretary. We'd like to be able to sync our individual calendars (in Outlook '03) on our secretary's PC.
    Is this possible?

    UPDATE:
    Well I thought I figured it out when I realized iTunes gives you the option of syncing only selected calendars. My plan was to check only my calendar to sync with my phone and Gary's calendar to syn with his phone.
    Unfortunately, the option to sync only selected calendars is grayed out in iTunes. I can only check the "sync all calendars" box.
    Surely others have figured out how to sync two phones with one computer and only have the data you specify synced to the specific phone.
    Do I have to create another Windows user account where only Gary's calendar is maintained and then switch back and forth between user accounts whenever syncing?
    Any help would be much appreciated.

  • How can I have two fields with the same name if it makes sense?

    Hello, folks :)
    I have a pretty hard time figuring out how I can have two text fields with the same binding name.
    The whole problem is that when I need two fields with the same binding name they are still differnent coz they have the same name but differnt indices.
    I should make a form filled at runtime by merging a pdf form file and an fdf file data file. And I have no choice to do it differently. And my form file needs some data like customerName, companyName twice in one form. But there's only one possible buinding name indexed zero.
    How can I create a field with absolutely the same name or is it just impossible due to possible name conflicts? And is there a workaround to this problem? I just need one piece of data repeated in different places.
    Thanks for your replies :)
    P.S. if u think that the problem is not clear enough let me know. I'll supply you with more details. But the general process can not be changed.
    One pdf should be mergred with an fdf with as the result of their merge a new filled and flattened form. I have no control over fdfs their are generated by Oracle and I can not fill the form using XML files coz this process should be integrated in a working application.

    I just thought about a really ugly workaround with a server-side script adding values to fdf files but it's a bit of work and tests and personally i think it's a bad idea :-(

  • I have two iphones with one apple id. How do I set up 'find a phone'?

    have two iphones with one apple id. How do I set up 'find a phone'?

    To wjosten-
    I just posted a similar question asking HOW you get into a menu for 'my devices' in order to name them? Thanks!

  • Re: How to create More two class with one object

    haii,
             i have small information How to create More two class with one object,
    bye
    bye
    babu

    Hello
    I assume you want to create multiple instance of your class.
    Assuming that you class is NOT a singleton then simply repeat the CREATE OBJECT statement as many times as you need.
    TYPES: begin of ty_s_class.
    TYPES: instance   TYPE REF TO zcl_myclass.
    TYPES: end of ty_s_class.
    DATA:
      lt_itab      TYPE STANDARD TABLE OF ty_s_class
                     WITH DEFAULT KEY,
      ls_record  TYPE ty_s_class.
      DO 10 TIMES.
        CLEAR: ls_record-instance.
        CREATE OBJECT ls_record-instance.
        APPEND ls_record TO lt_itab.
      ENDDO.
    Regards
      Uwe

  • My user folder has disappeared from my hard drive though if I do a find for it it says it is still there. Anyone know how to restore it. I can drag a duplicate from the find window onto the hard drive but don't want two copies with one hidden.

    My user folder has suddenly disappeared from my hard drive though if I do a find for it it comes up as still being there with all its data. Can drag a duplicate copy from the find window back onto the hard drive but don't want two copies there with one of them hidden. Any suggestions anyone?

    Did you update to 10.9.3?
    If you did then update to iTunes 11.2.1.
    That is the fix for that problem.
    Allan

  • How to delete copies in two projects with one master

    Hello,
    I drug images from one project to another, thinking they would be moved. I see that it instead made a copy and now both projects have the same image, but they apparently share the same master. When I choose "delete version" with one of them, the message that comes up is "delete master image and all versions", presumably because there is only one version in the project. If I go ahead and continue the deletion, I lose the image from both projects (and the master).
    Is there a way to get out of this conundrum?
    Many thanks, Steve

    So, that means that if I use an image in an album, it's master is forever locked in location and can't be moved? That seems like a severe drawback.
    I know I've moved referenced masters for images in albums without a problem by using 'relocate masters', but you are saying that dragging the image from one project to another will make two versions referencing a single master rather than moving the master?
    I don't understand why I can't just delete one of the versions, then. They each seem to think they are the version of the master.

Maybe you are looking for