Validation of materials entered in multiple selection in selection-screen

Hi,
How can I do the validation for all the materials entered in multiple selection in selection-screen?

What kind of validation do you need to do?
One of the easiest options is to select the materials to an internal table and then loop through it. Something like this:
SELECT-OPTIONS: SO_MATNR FOR MARA-MATNR.
AT SELECTION SCREEN.
  SELECT MATNR FROM MARA
  INTO TABLE I_MATNR
  WHERE MATNR IN SO_MATNR.
  LOOP AT I_MATNR.
"   <do validations here>
  ENDLOOP.
Here table I_MATNR has only one field MATNR.
But please be careful with this, because you might end up going through thousands of material numbers. You might want to limit the user's choices by making the field required and removing some other options. Also you can check number of records in I_MATNR and allow only, say, not more than 50 materials, thusly forcing the users to limit their selection criteria.
Naturally, other selection options may be added here.

Similar Messages

  • [Help] Multiple Selection at Select Options.

    People, I've coded following Select Options:
    DATA: g_created TYPE zapomatxref-erdat,
                g_modif   TYPE zapomatxref-aedat,
                g_matnr   TYPE zapomatxref-pr1_material.
    SELECT-OPTIONS: s_creat FOR g_created,
                                   s_modif FOR g_modif,
                                   s_matnr FOR g_matnr OBLIGATORY.
    Thing is, when I execute the program and hit the Multiple Selection, an error pops up saying "Fill in all required fields".
    I know it goes through PBO validating that OBLIGATORY so I can't enter the multiple selection screen.. But is there a way to enter the multiple selection screen without changing the OBLIGATORY adition ?
    Thanks in advance.
    PS: This is an executable program, not module pool. Also I want to enter Mutliple Selection screen without filling s_matnr.

    Guys, solved the problem. You have to remove the OBLIGATORY addition and set the following code.
    ("Percentage symbol" below is the traditional percentage centessimal symbol we know, the mozilla wont let me insert it...)
    TOP Include:
    CONSTANTS: c_per002     TYPE c    VALUE '(percentage symbol)002'.
    MAIN PROGRAM:
    AT SELECTION-SCREEN ON s_matnr.
      IF sy-ucomm NE c_per002.
        IF s_matnr[] IS INITIAL.
          MESSAGE e025(ycapo).
        ENDIF.
      ENDIF.
    START-OF-SELECTION.
    PS: c_per002 comes to be the sy-ucomm value when hitting Multiple Selection Button at Selection Screen.. As any action validates the whole screen, you just set a clause when you don't want to validate if sy-ucomm not equals (different from) c_per002.

  • Multiple records in select options-Urgent help

    Hi all,
       Iam using the following function module to get the set values. I need to pass multiple values in select options(ie) select options with no intervals. to the function module parameter Shortname. I have declared the variable which has to be passed as
         S_SETID   FOR  SETHEADER-SETNAME NO INTERVALS.
      The problem is when i use S_SETID-LOW the value is passed to the function module , but if multiple data is entered in the input then how to pass all the data to the function module. Please Help.

    Hi,
    Declare the Range in the Function module , then you can pass that Select-option fields to that ranges and use that in the Function module.
    Or you can use the RANGE_C8 for the Select-optios in the Function module, you can declare the Internal table with the type of RANGE_C8 in the tables parameter, then pass the Select-option to this Internal table
    If you want more length field then search based on RANGE_* then you will get all the Range Structure.
    Regards
    Sudheer

  • How to accept multiple attachments on selection screen?

    Hi All,
    I need to know how to accept multiple attachments on selection screen and send them as email to external system (outlook).
    Basically, my req is to send a common email with attachments to certain users. These users are displayed in ALV. User will select ALL or specific user from ALV and send an email with message entered on selection screen.
    I used text editor control to input message body. I need to know how to accept attachments and send them.
    Appreciate any inputs.
    Thanks,
    SKJ

    SAP uses a nifty little button called 'Object Services' on ME23N (top left) which you can use to attach documents to business objects.
    http://help.sap.com/saphelp_nw70/helpdata/EN/be/3fe63659241157e10000009b38f889/frameset.htm
    It's a complicated way of doing it but might give you extra functionality in the long run.

  • To display multiple BOMS by selection

    I'm trying to avoid havig to create a report to collectively display multiple BOMS by selection (eg MRP controller, group of header materials etc) to satisfy the following:
    - collective display
    - multi-level display (indented)
    - factor scrap, giving component qtys as per base qty of BOM header
    Trans CS11 provides this info, only on an individual BOM basis.

    Hi,
    Can explain your query a bit more in brief?
    Thanks
    Kathir~

  • I need a report in SAP which allows multiple Profit centers selection with

    Hi,
        Cany anybody help me with below issue -
    I need a report in SAP which allowing multiple Profit centers selection with :
    - Profit Center #
    - Profit center Name
    - Profit center long text
    - Profit Center group
    - the related PC node showing the BU and the product category group.
    Let me know is there any report which can provide us with all this details.
    With regards.

    Hi,
    I recommend the PCA standard drill-down or interactive reports accessible via the follwoing menu path:
    Accounting --> Enterprise Controlling --> PCA --> Infosystem --> Reports for PCA
    There are several reports which allow entering profitcenter groups or profitcenters.
    Long Text is not possible. Makes also no sense to report on Long Text.
    Best regards,
    Andreas

  • Ranges input using multiple selection in select-options

    Hello,
    I have declared a single selection field with multiple selection as follows:
    SELECT-OPTIONS:
       S_PONUM FOR EKKO-EBELN NO INTERVALS,
    If a range is entered using multiple selection, no value appears in the selection field on screen, however, the ranges tab in multiple selection shows the range. Is there a way to programatically test if a range has been entered using multiple selection? Help is appreciated.
    Regards

    Hi,
    If you not displaying the intervals then user can enter only one value then option field will be with 'EQ' sign.
    LOOP AT S_PONUM.
    IF S_PONUM-OPTION NE 'EQ'
    " Then Values are entered using the multple selections
    ENDIF.
    ENDLOOP.

  • Multiple Input in selection screen more than 10000 material,,prg dumped?

    Hi All,
    I am running a report and giving  input as..
    multiple selection for Matnr(Material no)   = 14000 materials
    but I m getting a
      Possible error causes:
      o The maximum size of an SQL statement was exceeded.
      o The statement contains too many input variables.
      o The input data requires more space than is available.
    Please let me the solution of this error.
    Thanks and Regards
    Steve

    Hi,
    There is a limit on the SQL statement length and if it exceeds, the program will dump and that is exactly what is happening in your case too. So the only choice you have is to introduce options BT or CP etc .
    The other alternative would be to break the selection range into small bits of say 1000, 2000 lines ,and select the data and append it to the internal table using these smaller bits of the selection range.
    loop at selection_range.
    append selection_range to selection_range_1000.
    if sy-tabix mod 1000 = 0.    " Select for every 1000 records of selection range
    select * from dbtab appending itab where field in selection_range_1000.
    refresh selection_range_1000.
    endif.
    endloop.
    " Remaining records
    if selection_range_1000[] is not initial.
    select * from dbtab appending itab where field in selection_range_1000.
    endif.
    Hope this helps.
    Br,
    Advait

  • HT1918 Trying to edit my payment info.  I keep getting the message that my number is not valid for the type of card I have selected.  I have a VISA card.  I have typed in the number 4 times, but same message pops up.

    Trying to edit my payment info.  I keep getting the message that my number is not valid for the type of card I have selected.  I have a VISA card.  I have typed in the number 4 times, but same message pops up.
    Thoughts?

    You are probably entering your Visa's security code incorrectly.  Here's how to find it:
    http://support.apple.com/kb/HT3541

  • IRecruitment Offer Letter review button to have multiple template to select

    Hi,
    I have a requirement in i recruitement Offer letter generation to have multiple Offer letter selection at the time of review page. I've Created a custom template and associate the template to Business group and now i've 10 different templates with different texts . i've started the process for selecting applicants and then gone into Enter basic details and then to review page and in that view offer letter button . here i need to select a tempate among the 10 custom template which i created , I've register this 10 template in Assocation template form where on whatever the radio button i kept in that form only that template output is bedefault coming where as i need to select the template as per my choice. Kindly let me know if any advice on this matter.
    Regards,
    Abdul Samad

    You can not select template at that time. While creating the offer you just submitting the details for the offer. Once the request is approved, Go to Offer Workbench => click on offer letter. Once you click there you will be able to choose the template on the following screen.
    Save the offer letter once you choose the template.

  • Error: Show Details cannot be executed when multiple items are selected in a report filter field or in a slicer

    I have connected TABULAR Model to Excel, and in the pivot the filter is on multiple dimensions. When doing the drillthrough action it gives error - Error: Show Details cannot be executed when multiple items are selected in a report filter field or in a slicer
    Is there any workaround to this error?  so that drillthrough can be done even with multiple selection.

    Hi Vikas,
    The reason behind the error message requires the knowledge on what happens at the backend. When you perform a drill-through action, a query is sent to Analysis Services. This query is expressed in a query language called Multi-Dimensional Expression (MDX).
    Since the MDX language doesnot support drill-through command against a set (collection of tuples) an error is persisted. 
    For now, there is no workaround as it is a limitation of the underlying language that is generating the query.
    When multiple items are selected you lose the ability to drill-down on individual metrics. To resolve you must either:
    1. Select a single Item.
    2. Select all items.
    Hope this helps!
    Please mark as Answer if this helps! Thanks, Rajasekhar.

  • HT5622 I've downloaded the app clash of clans and I want to purchase an item on the game but when I go to purchase it something pops up and says I cannot connect to iTunes Store. Having said that I have a valid credit card entered into my iCloud account

    I've downloaded the app clash of clans and I want to purchase an item on the game but when I go to purchase it something pops up and says I cannot connect to iTunes Store. Having said that I have a valid credit card entered into my iCloud account.

    toshiro-99 wrote:
    when I try to make a purchase within Clash of Clans a box comes up saying my purchase cannot be completed, and another saying cannot connect to itunes store. HELP!
    To Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact

  • Passing multiple values to select-option low by submit at one go from zpro.

    Hi all,
    I have a requirement pass descrete multiple values form my z-program to to select-option low on selction screen of standard SAP program using SUBMIT statment at one go.At the same time select-option high will be empty.I will be thankful if anybody can help me in this regard.
    Sandeep.

    Hi Check this link...on submitting programs
    http://help.sap.com/saphelp_erp2004/helpdata/en/9f/db9d7535c111d1829f0000e829fbfe/frameset.htm
    here is the code . we are calling the same program....you can call any other program as well.
    REPORT  demo_program_submit_rep1.
    DATA number TYPE i.
    PARAMETERS      paramet(14) TYPE c.
    SELECT-OPTIONS  selecto FOR number.
    The program DEMO_PROGRAM_SUBMIT_REP1 is called by the following program using various parameters:
    REPORT demo_program_submit_sel_screen NO STANDARD PAGE HEADING.
    DATA: int TYPE i,
          rspar TYPE TABLE OF rsparams,
          wa_rspar LIKE LINE OF rspar.
    RANGES seltab FOR int.
    WRITE: 'Select a Selection!',
    SKIP.
    FORMAT HOTSPOT COLOR 5 INVERSE ON.
    WRITE: 'Selection 1',
         / 'Selection 2'.
    AT LINE-SELECTION.
      CASE sy-lilli.
        WHEN 4.
          seltab-sign = 'I'. seltab-option = 'BT'.
          seltab-low  = 1.   seltab-high   = 5.
          APPEND seltab.
          SUBMIT demo_program_submit_rep1 VIA SELECTION-SCREEN
                          WITH paramet eq 'Selection 1'
                          WITH selecto IN seltab
                          WITH selecto ne 3
                          AND RETURN.
        WHEN 5.
          wa_rspar-selname = 'SELECTO'. wa_rspar-kind = 'S'.
          wa_rspar-sign = 'E'. wa_rspar-option = 'BT'.
          wa_rspar-low  = 14.  wa_rspar-high = 17.
          APPEND wa_rspar TO rspar.
          wa_rspar-selname = 'PARAMET'. wa_rspar-kind = 'P'.
          wa_rspar-low  = 'Selection 2'.
          APPEND wa_rspar TO rspar.
          wa_rspar-selname = 'SELECTO'. wa_rspar-kind = 'S'.
          wa_rspar-sign = 'I'. wa_rspar-option = 'GT'.
          wa_rspar-low  = 10.
          APPEND wa_rspar TO rspar.
          SUBMIT demo_program_submit_rep1 VIA SELECTION-SCREEN
                          WITH SELECTION-TABLE rspar
                          AND RETURN.
      ENDCASE.

  • How can i select multiple values form select list

    Hi ,
    I have created few items in a page and all items are Lov items and based on these items stacked charts will display. My requirement is I need to select multiple values form LOV's
    Eg: In Interactive report goto filter and select an item and expression as IN and select multiple items and i need to select multiple values like this.
    Please anybody help me how to get multiple values.
    I have one more doubt Can we have a Print preview option in APEX.
    I have to see print preview for stacked charts. is it possible?
    Regards
    Narender B

    HI ,
    Thank you for valuable information and looks good.but Here our client need to select multiple values.... for eg: Open IR report and click on Actions button --->select filter
    select any column , operator as IN and from expression select multiple items.
    I need to select multiple values in that way so, could you please guide me how can i achieve this.
    Regards
    Narender B

  • Is there a way to import a choice list in multiple (or single) selection fields?

    Is there a way to import a previously created choice list in multiple (or single) selection fields in forms central? 

    Hello Dr. Ryan,
    Unfortunately there is no way to move this data into FormsCentral.
    As far as your question about using PDFs with FormsCentral, 'soon' is actually 'now'! You have two options:
    1) Author a new form with FormsCentral. From the distribute tab, save a submission-enabled PDF form. You can send this form out to your recipients and their responses will be collected on FormsCentral.
    2) Import an exsiting PDF form into FormsCentral from the dashboard, and then submission-enable it. Distribute the submission-enabled version and responses will be collected on FormsCentral.
    Thanks!
    Shannon

Maybe you are looking for

  • Windows 7 pro problem with redirected folder for 1 computer in the domain only.

    Hi. We have a computer in the domain we have that started to behave strangely. We have redirected folder on the GPO for the Desktop, favorites, and my documents folder. The server is 2012 essentials Sometimes the customer want to save it's document a

  • ITunes freezes when selecting "Add file to library" or "Add folder....

    Not had a problem before and everything worked fine. But this morning if I select "Add file to library" or "Add folder to library" nothing happens and itunes just freezes. I can play music already in the library. Any ideas?

  • Multimedia issues with Acrobat 9

    Hello, I have just upgraded to Acrobat 9 on a intel Macpro running leopard and need to create an interactive document with movies links, pop ups etc. The issues I am having is when I place a multimedia box with a weblink to the movie which does plays

  • Text field does not expand in imported template

    Hi Guys, I need to import a .pdf document template and work from there.  Some of the fields will recieve text values that are of a length that is not known at design time.  Therefore, the field needs to be able to grow.  I cannot get this to work. If

  • Syncing Labels from Lightroom to Bridge and vice versa.

    The labels in Lightroom over-ride those in Bridge and vice versa.  I have matched the descriptions of the coloured Labels between Lightroom 2.0 and Bridge, yet when I assign eg. a Green Label in Lighroom and then open Bridge, the Label appears White.