Selection option error message

Dear Experts,
I need your help to code an error message:
This is an ABAP report program:
User can enter either Group Key (LFA1-KONZS) or Vendor Number (LFA1-LIFNR), if enter both, send an messagee : 'Please enter either Group Key or Vendor Number, not both'
The error message show at the status line of the button of the input selection option screen.
How do I do that?
Here are my codes so far:
Selection Options
selection-screen: begin of block box1 with frame title text-001.
select-options: so_bukrs for bkpf-bukrs obligatory.
select-options: so_blart for bkpf-blart obligatory.
select-options: so_cpudt for bkpf-cpudt obligatory.
select-options: so_konzs for lfa1-konzs.
select-options: so_lifnr for lfa1-lifnr.
selection-screen end of block box1.
Thank you very much!
Helen

Hi,
Test the following Sample Code Hope will solve out your problem,
TABLES: bkpf, lfa1.
SELECTION-SCREEN: BEGIN OF BLOCK box1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: so_bukrs FOR bkpf-bukrs OBLIGATORY.
SELECT-OPTIONS: so_blart FOR bkpf-blart OBLIGATORY.
SELECT-OPTIONS: so_cpudt FOR bkpf-cpudt OBLIGATORY.
SELECT-OPTIONS: so_konzs FOR lfa1-konzs. " This
SELECT-OPTIONS: so_lifnr FOR lfa1-lifnr. " This
SELECTION-SCREEN END OF BLOCK box1.
AT SELECTION-SCREEN.
  IF so_konzs IS NOT INITIAL AND so_lifnr IS NOT INITIAL.
    MESSAGE: 'Please enter either Group Key or Vendor Number, not both' TYPE 'I'.
  ENDIF.
" if you need that user must enter one value from the both than use the following lines of code too else Remove
  IF so_konzs IS INITIAL AND so_lifnr IS INITIAL.
    MESSAGE: 'Please enter Group Key or Vendor Number, not both' TYPE 'I'.
  ENDIF.
Kind Regards,
Faisal
Edited by: Faisal Altaf on Feb 9, 2009 10:16 PM
Edited by: Faisal Altaf on Feb 9, 2009 10:34 PM

Similar Messages

  • Selection screen error message question

    On a selection screen, I have a selection-options for kunnr. If the user enters other than 100001 or 100002 or 100003 for this field, I want to display a error message. How do you do that? Can you please provide a sample code for this?
    Thanks a lot.

    hi,
    Try this code
    tables : kna1.
    data: begin of it_kna1 occurs 0,
              kunnr like kna1-kunnr,
           end of it_kna1,
           v_fnd.
    select-options : s_kunnr for kna1-kunnr.
    at selection-screen on s_kunnr.
       select kunnr from kna1
                    into table it_kna1
                   where kunnr in s_kunnr.
       if sy-subrc = 0.
          read table it_kna1 with key kunnr = '0000100001'
                             binary search.
          if sy-subrc <> 0.
            read table it_kna1 with key kunnr = '0000100002'
                               binary search.
            if sy-subrc <> 0.
              read table it_kna1 with key kunnr = '0000100003'
                                 binary search.
              if sy-subrc = 0.
                v_fnd = 'X'.
              endif.
            else.
              v_fnd = 'X'.
            endif.
          else.
            v_fnd = 'X'.
          endif.
       endif.
      if v_fnd = ' '.
        message e000(zz) with 'Invalid customer'.
      endif.
    regards,
    Sailaja.
    Message was edited by: Sailaja N.L.

  • Selection-Subcreens  &  Error messages

    Hi experts.
    I have a report where i use selection-subscreens. Depending on wich subcreen i am, i need some select-options to be obligatory but i can't use the obligatory condition because it will give an error when navigating to other screen if there's no input.
    So what i did is that at selection screen, i check the user command and when it's 'ONLI' (= report launched) if the required data is not field i send an error message like this :
      CASE mytab_dynnr.
        WHEN 100.
          IF p_cont IS INITIAL.
            MESSAGE text-e01 TYPE 'E'.
          ENDIF.
        WHEN 200.
    ENDCASE.
    The thing is that when sending this message then, the input filled can't be editable. I have to change screen and come back to edit again.
    How can i avoid that ?
    Thanks for your help and time.
    For more information here is my selection screen and initialization :
    SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
    SELECT-OPTIONS p_cont FOR but000-partner NO INTERVALS.
    SELECTION-SCREEN END OF SCREEN 100.
    SELECTION-SCREEN BEGIN OF SCREEN 200 AS SUBSCREEN.
    SELECT-OPTIONS p_cont2 FOR but000-partner NO INTERVALS.
    PARAMETERS p_test_c TYPE c AS CHECKBOX.
    SELECTION-SCREEN : SKIP.
    PARAMETERS: rt1 RADIOBUTTON GROUP rad2 ,
                p_temp TYPE bu_partner.
    SELECTION-SCREEN  SKIP.
    PARAMETERS:  rt2 RADIOBUTTON GROUP rad2 DEFAULT 'X'.
    *PARAMETERS : p_temp TYPE bu_partner.
    *ULINE.
    SELECT-OPTIONS p_meta FOR but000-zzmeta_customer NO INTERVALS.
    SELECT-OPTIONS s_sold FOR but000-partner NO INTERVALS.
    SELECT-OPTIONS s_inst FOR but000-partner NO INTERVALS.
    SELECTION-SCREEN END OF SCREEN 200.
    SELECTION-SCREEN BEGIN OF SCREEN 300 AS SUBSCREEN.
    SELECT-OPTIONS p_cont3 FOR but000-partner NO INTERVALS.
    PARAMETERS p_test_d TYPE c AS CHECKBOX.
    SELECTION-SCREEN  SKIP.
    SELECT-OPTIONS p_meta2 FOR but000-zzmeta_customer NO INTERVALS.
    SELECT-OPTIONS s_sold2 FOR but000-partner NO INTERVALS.
    SELECT-OPTIONS s_inst2 FOR but000-partner NO INTERVALS.
    SELECTION-SCREEN END OF SCREEN 300.
    SELECTION-SCREEN: BEGIN OF TABBED BLOCK mytab FOR 10 LINES,
                      TAB (20) button1 USER-COMMAND push1,
                      TAB (20) button2 USER-COMMAND push2,
                      TAB (20) button3 USER-COMMAND push3,
                      END OF BLOCK mytab.
    AT SELECTION-SCREEN.
      CASE sy-dynnr.
        WHEN 1000.
          CASE sy-ucomm.
            WHEN 'PUSH1'.
              mytab-dynnr = 100.
            WHEN 'PUSH2'.
              mytab-dynnr = 200.
            WHEN 'PUSH3'.
              mytab-dynnr = 300.
            WHEN 'ONLI'.
              PERFORM screen_control USING mytab-dynnr.
            WHEN OTHERS.
          ENDCASE.
      ENDCASE.
    INITIALIZATION.
      button1 = text-i01.
      button2 = text-i02.
      button3 = text-i03.
      mytab-prog = sy-repid.
      mytab-dynnr = 100.
      mytab-activetab = 'PUSH1'.
      w_repid = sy-repid.

    Instead of only message,
    MESSAGE text-e01 TYPE 'E'.
    Use:
    message text-e01 type 'S' DISPLAY LIKE 'E'.
    leave list-processing.
    Regards,
    Naimesh Patel

  • No unit found for selected resource ( error message /SAPAPO/SDP318 )

    Hello
    I am loading resource using standard SNP Planning book. When I try to load the resource, I am getting this error message "No unit found for selected resource". Can someone tell me where in the resource I set the UOM that corresponds to Planning book UOM.
    Thanks for the hlep.
    Najam

    Hi,
    Please check the type of the resource. This should be a single Mixed or Multi Mixed resource to maintain the SNP capacity.
    And also run cons check / live cache check
    Thanks,
    Venkat

  • Quick selection tool error message

    When I use the quick selection tool (or when I use content-aware scaling) I get an error message saying "could not complete your request because of a program error." I am working with NEF files, 4 GB of RAM, fast machine with plenty of scratch space, Radeon X1950 crossfire graphics card. With small .jpg files, the problem doesn't occur. Thanks for any help.

    That's right, Chris... and even when I turn it off, it seems erratic as to whether or not the scaling works. I just tried it again and couldn't get it to work without the program error message even when I turned it off. I suspect that if I reboot the whole machine it might work but I'm not sure. Something is buggy in there.

  • Selection screen error message

    Dear friends:
    I have a report.In the selection screen,In the sales group field , I should enter only C01 , If i give C02 or other input, the system should show a error message. Please help me with sample & simple code, because i am a functional consultant.
    Thanks&Regards
    MSReddy

    hi,
    u have to write all your validations at AT SELECTION-SCREEN event.
    u can valdate a single field or no.of. fileds based on your requirement.
    parameters: p_group like [salesgroup name].
    AT selection-screen. [ for no of fields]
    if p_group NE 'C01'.
         message E000 with 'NTER ONLY C01 materials'.
    endif.
    for single field in selection screen then
    AT selection-screen on fldname. [ for single field]
    if p_group NE 'C01'.
         message E000 with 'NTER ONLY C01 materials'.
    endif.
    if helpful reward soem points.
    with regards,
    suersh.

  • Brush Option Error Message

    I have a problem with brush option in PSE7 (which come with Wacom bamboo that bought many years ago and never use it).
    It show me "invalid numeric" (see pic) and I can't do anything, the error message re-open after click "ok", I must go to my task manager and force close it evertime.
    I don't know what happen, so if who know how to fix it, please tell me.
    Thank you.

    Try this
    1. Close Elements.
      2. Launch the Photoshop Elements Welcome Screen and hold down ctrl + alt + shift as you click Editor.
    3. Continue to hold the keys until you see a message box asking if you want to delete Photoshop Elements settings file; click Yes. Elements will open with default preferences.

  • Trouble with lasso selection, quick selection, and error messages (saying selection is empty)

    Hi there
    I am trying to sect a person out of a picture and paste it into this collage picture I am working on. First i tried using the quick selection tool but I guess my man that I am trying to cut out has too many colors: when I go to use the quick selection it immediately goes into a box around the entire picture. I even tried painting the rest of the photo black with the exception of the man, but still the same results with the quick selection. Then I tried the lasso but nine times out of ten it would stop and make an odd selection. when I finally did get a good lasso selection (done after much cursing) then CS6 told me that "the selection is empty" . What? I did make a new layer before I did the selection.
    Can you help me resolve these issues?
    I just downloaded CS6 just a day ago and have a lot to learn, but i have worked with Paint.net and Paint Shop Pro for the past two years so I am familiar with paint and photo editing software.
    Thanks
    Kelly
    [ text changed to be readable by an admin ]

    Please don't submit your request in green. It is a needless distraction.
    Currently you are trying to make a selection in a blank layer.
    Return to the image layer, not the blank one you created, and you will be able to make a selection.
    Once selected, hit Cmd+J to put your selected object on a new layer. I think that is what you had in mind.

  • Date as a select option in sales order report.....

    hello guys i want to add sales doc date from as a lower field and date to as a higher field on a selection screen.....so please help me out......i also want to add error message for it.....

    Simply add the date field as select-options error msg on choosing wrong date format will be automatically triggred.
    For example for order creation date.
      select-options:   audat for vbak-audat.
    anya

  • URGENT :  select options

    Hye techies,
      I have a requirement, where i have 3 select options. Atleast data one select option should be entered. So, i cannot use obligatory tag.
    i am writing the code as follows.
    select-options: s_a for ztab-a,
                          s_b for ztab-b,
                          s_c for ztab-c.
    data: chk_input type i.
    chk_input = 0.
    if s_a is not initial.
    chk_input = chk_input + 1.
    endif.
    if s_b is not initial.
    chk_input = chk_input + 1.
    endif.
    if s_c is not initial.
    chk_input = chk_input + 1.
    endif.
    case chk_input.
    when 0:.
    MESSAGE 'Select atleast one entry in block 2' TYPE 'I'.
    when 1.
    when others.
    MESSAGE 'Too many inputs in block 2' TYPE 'E'.
    endcase.
    I have 2 problems here.
    1. When i am clicking on the arrow next to select options, it is displaying the first message considering the entry as empty.
    2. If i enter one entry in one of the select options and then click on arrow for multiple selection, second error message is coming.
    Please help me, as my requirement is one entry should be dere in one select options and it can have multiple values. but one entry is mandatory.. If the entry is wrong, previously entered values should be cleared.
    At selection-sceen output.
    Thanks in advance
    Imran.

    Hi İmran,
    You firstly create a block and then put the select options within this block like this:
    SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE text-003.
    SELECT-OPTIONS:
    s_lgort FOR ekpo-lgort  NO-EXTENSION NO INTERVALS,
    s_vtweg FOR vbak-vtweg.
    SELECTION-SCREEN END OF BLOCK  block1.
    Afterwards,
    AT SELECTION-SCREEN ON BLOCK block1.
      IF s_lgort[] IS INITIAL AND
         NOT s_vtweg[] IS INITIAL.
        MESSAGE e101(c+) WITH
          'Please enter the value.... write here whatever you want'
      ELSEIF s_vtweg[] IS INITIAL AND
             NOT s_lgort[] IS INITIAL.
        MESSAGE e101(c+) WITH
            'Please enter the value.... write here whatever you want'
      ENDIF.
    In the past I have used this and it works.
    Hope helps.
    Edited by: Deniz Toprak on Jun 17, 2008 10:12 AM

  • Error message does not lead to the custom tab me51n

    Hi Experts,
    When I try to to create a PR in me51n and check, a popup with error messges appear when we pick one of the entry and select edit button that leads to the field of that concerned tab.I have a custom tab and cutom field the issue is error message is displayed to fill the custom field but when I check mark that error and select edit that does not take me to the custom tab where custom field exists please suggest I have tried lot of user exits but no use.
    appreciate your help......

    We added some error message checking using Function exit EXIT_SAPLMEREQ_005. How we can bring the screen to Customer Data Tab when there are any errors under the tab. And as long as the error is not fixed, the screen will stay on the tab?
    To eloborate my question - in ME51n/Me52n, the system gives a messages window/subscreen with errors or warnings upon clicking the check button or upon save. On the messages window/subscreen, we can select a particular message and edit will take action to the corresponding tab with the cursor on the field with the issue. I understand this is standard functionality.
    However I'm looking for a way to make this work for a mandatory field on the customer data tab i.e., when I select the error message pertaining to this mandatory field and choose edit, control should jump to the customer data tab with the cursor on the mandatory field.

  • Error message in sales order against target value contract

    Hi experts
    I have value contracts scenario, when I create a Release Orders thatu2019s exceeds the value of the contract the system raise a message error, but in this case the decimal expression in wrong.
    The decimal expression of the country is 1.234.567,89
    The decimal expression of my user is 1.234.567,89
    Example:
    The contract value is 10.000
    I create a release order for 15.000
    The message error is "Target value in contract &1, item &2 is exceeded by 50.00", the correct messages should be: "Target value in contract &1, item &2 is exceeded by 5.000,00"
    I release two errors, the decimal expression according to my user and country doesn't match or the validation is doing some conversion.
    Do you have any idea was wrong??
    Thanks in advanced any input is really appreciated
    Susana

    Hi Susan.
    Just select the error message in the log  and click technical info . In the performance assistant it will show like :
    Technical Data
    Message type__________ E (Error)
    Message class_________ ZCRM_CSI_UI (Messages for UI of Leasing)
    Message number________ 022
    Message variable 1____ 
    Message variable 2____ RK78
    Message variable 3____ 0000001000
    Message variable 4____ 185124 020(Task:0000003105)
    Message Attributes
    Level of detail_______ 
    Problem class_________ 1 (very important)
    Sort criterion________ 
    Number________________ 1
    Environment Information
    Object Type___________ 15
    Logical Key___________ 
    Object GUID___________ DE3B1C475098F9F187E4002264F648B2
    Object Type___________ A
    Message class_________ 
    Save message__________ X
    Message no longer erro
    This will give you details of what  internal values are getting used for calculation . If you can give the error message class and error message number probably i can help u out.
    Regards
    Apoorva

  • ALV Filter Selection w/ error "WBS element 0000000000000000 does not exist"

    Hello,
    In a few ALV reports, we have WBS Element column showed in ALV list and WBS Element defined as type BSEG-PROJK, which has conversion routine ABPSP.
    When WBS Element is used for ALV list Filter, in Selection screen, error message "WBS element 0000000000000000 does not exist" is pop up as we hit Enter key or click on u201CSelection optionsu201D button with no value entered in Input fields.
    We get same error even after we enter an existing WBS Element in Low selection input field and hit Enter key.
    Itu2019s ok if we enter existing WBS Element value in both Low and High selection input fields.
    We know we have workaround by entering both Low and High input field, and we can fix ALV reports by using character based WBS Element, such as PRPS-POSKI.
    BUT, as users told me, they donu2019t have this problem before and it just happened. We checked the recent Transports and couldnu2019t see anything relevant.
    Could any of you let me know if you have any clue or if thereu2019s any other way to fix it besides changing report by report.
    Thank you.
    SL

    Hello,
    In a few ALV reports, we have WBS Element column showed in ALV list and WBS Element defined as type BSEG-PROJK, which has conversion routine ABPSP.
    When WBS Element is used for ALV list Filter, in Selection screen, error message "WBS element 0000000000000000 does not exist" is pop up as we hit Enter key or click on u201CSelection optionsu201D button with no value entered in Input fields.
    We get same error even after we enter an existing WBS Element in Low selection input field and hit Enter key.
    Itu2019s ok if we enter existing WBS Element value in both Low and High selection input fields.
    We know we have workaround by entering both Low and High input field, and we can fix ALV reports by using character based WBS Element, such as PRPS-POSKI.
    BUT, as users told me, they donu2019t have this problem before and it just happened. We checked the recent Transports and couldnu2019t see anything relevant.
    Could any of you let me know if you have any clue or if thereu2019s any other way to fix it besides changing report by report.
    Thank you.
    SL

  • Error Message for Incoming Yahoo! Emails

    I have a friend that just purchased a Pre and is getting error messages when receiving incoming emails.  We have set his Y! email account up numerous times to make sure his credentials are correctly entered.  He is able to get into his account from the Mail Icon and view/access his email, but every time he receives a notification of a new email and touches the envelope in the lower right hand corner of the screen, he receives a Y!-branded error message that says that his Login Credentials are rejected and that he needs to tap to update his password.  When he selects the error message, it sends him to the Mail sign-in page where he can update his credentials.  He can send emails without any problem.
    Post relates to: Pre p100eww (Sprint)
    Post relates to: Pre p100eww (Sprint)

    Try to remove the email account perform a restart shown here and add the account again. If the issue keeps happening you may need to do a partial and full erase.

  • Restart error messages

    Hi All,
                   While processing the files, some messages getting the system error status. these messages needs to be resend is there any possibility to resend the error messages?
    Thanks
    Sagar

    Hi Sagar,
                There are 3 possibilities to resend the messages.
    1.  JAVA Stack:
                 Go to Runtime Workbench--->Message Monitoring. Select either Integration Server or Adapter Engine, give the appropriate Sender business system, Sender interface, Sender namespace, Receiver System, Receiver Interface, Receiver namespace and click Start.
                 All status messages display. Here you should select the error messages and click on 'Resend'.
    2. ABAP  Stack.
                 SXMB_MONI, should select error message. From Edit menu  click on "Reschedule XML messages after Error" or "F6"
    3. Report.
                 RSXMB_RESTART_MESSAGES is the report to resend the error messages automatically.
    Thanks,
    Satish.

Maybe you are looking for

  • How to Trigger PAYEXT IDoc from Payment Run?

    How do I trigger an IDoc of message type PAYEXT / PEXR2002 when I execute a payment run T Code F110? What are the config steps required? Thanks, Bhaskar Gahndikota

  • Reduced confirmation quantity not correct in ME22N/ME23N

    Hi Guys, We are working with confirmations for our purchase orders. The problem is this: After GR (+ corrections like 102 movements), the reduced quantity for the confirmation is correctly updated in the EKES-table. Also, the stock & requirements lis

  • TS3899 My IPhone took the liberty of useing a nickname for my husband.

    My IPhone e-mail sent me a forwarded missive from my husband and substituted, "Buggy" for his real name. This is odd since I have never written "Buggy" on any communication to him although I have called him that many times. My computer e-mail did not

  • HT1343 Why doesn't Command-X cut a file in finder?

    Why doesn't Command-X cut a file in finder? According to this article it must to! http://support.apple.com/kb/HT1343?viewlocale=en_US&locale=en_US What is  way to cut the a file WITH OUT using a mouse/trackpad - with keyboard only?

  • Coldfusion.sql.DatabaseConnectionException

    After two years having database connections running without any problems, i'm now since three month faced with the following error intermittently . "Coldfusion.sql.DatabaseConnectionException" In total i've got 12 different dadabase connections runni