Selection for up to 3 import parameters

Hi,
I am creating a FM for a BAPI that has to select data based on the following prerequisites:
2 tables are to be used:
table_h:
salesman_no  key     BusinessPartner
record last changed   DATS
table_i
Salesman_no  key    BusinessPartner
ProductID                
ProductPrice
A bapi has to be generated from a FM that has these import parameters:
I_Salesman_no1
I_Salesman_no2
I_Salesman_no3
The user who requests the data can ask for 1 to 3, but at least 1. That gives the 3 possible combination of searched:
Salesman_no1 only (mandatory for search)
Salesman_no1 and Salesman_no2
Salesman_no1 and Salesman_no2 and Salesman_no3
The search has to find productprices for either 1, 2 or 3 salesmen and return the data to an output table within the FM.
What puzzles me is: How to handle the various numbers of import  parameters / selections in the source code for the FM ?

You can create a range and fillup the values in the range and use that range in the selection.
Like:
DATA: R_KUNNR TYPE RANGE OF KNA1-KUNNR,
LA_KUNNR LIKE LINE OF R_KUNNR.
IF I_IMPORT_1 IS NOT INITIAL.
LA_KUNNR-SIGN = 'I'.
LA_KUNNR-OPTION = 'EQ'
LA_KUNNR-LOW = I_IMPORT_1.
APPEND LA_KUNNR TO R_KUNNR.
CLEAR LA_KUNNR.
ENDIF.
IF I_IMPORT_2 IS NOT INITIAL.
LA_KUNNR-SIGN = 'I'.
LA_KUNNR-OPTION = 'EQ'
LA_KUNNR-LOW = I_IMPORT_2.
APPEND LA_KUNNR TO R_KUNNR.
CLEAR LA_KUNNR.
ENDIF.
IF I_IMPORT_3 IS NOT INITIAL.
LA_KUNNR-SIGN = 'I'.
LA_KUNNR-OPTION = 'EQ'
LA_KUNNR-LOW = I_IMPORT_3.
APPEND LA_KUNNR TO R_KUNNR.
CLEAR LA_KUNNR.
ENDIF.
SELECT KUNNR
INTO IT_KNA1
FROM KNA1
WHERE KUNNR IN R_KUNNR.
Regards,
Naimesh Patel

Similar Messages

  • I've been using LR with my Nikon D3200 for a year or so. Shooting in RAW/NEF no issues with import etc until I updated LR and now I can't get LR to allow me to select when I try to import. It does show the images but they're grayed out and not able to be

    I've been using LR with my Nikon D3200 for a year or so. Shooting in RAW/NEF no issues with import etc until I updated LR and now I can't get LR to allow me to select when I try to import. It does show the images but they're grayed out and not able to be selected. Any thoughts? TIA

    Greyed imaged in the Import dialog box mean you have already imported the photos into Lightroom, so there is no need and no benefit to importing them a second time.
    Just go to the Library module, search for the desired photos, and resume working on these photos.

  • Import parameters for FM's

    Hi
      I have to use the FM 'SERNR_DELETE_FROM_HU' to delete the existing serial number and FM 'SERNR_ADD_TO_HU' to add a new serial number. Can anyone please  tell me what are the import parameters for these FM's.
    Thanks in advance.
    Vasudha

    which system are you using?
    i guess the FM name is :SERNR_DEL_FROM_HU
    you can just see the where used list of that FM.
    its used in LV51PF17, use in similar way

  • Field selection for plant parameters

    In plant parameters - in external procurement tab-i want to change field selection for Account assignment for non valuated materials field to optional,.Presently it is required field
    can sombeody tell me path

    Hi
    Go to SPRO>Production>Material Requirements Planning>Plant Parameters> Carry Out Overall Maintenance of Plant Parameters and execute.  (Transcation OPPQ)
    Select Maintain and give the plant
    Select External procurement Tab and select Unknown account assignment.
    But, you need account assignment for non-valuated material for external procurement.
    Hope it solves your issue.
    regards,
    Edited by: Raju DS on Dec 4, 2008 7:47 AM

  • Need for separate BAPI Structure for import parameters

    Hi All,
    I have a doubt regarding the logic behind declaring a separate BAPI structure for import paramters and use it.
    Let me explain you clearly,
    Whenever we pass an import parameter(like vendor number/sales order number) to an normal function module we declare it using either like/type referring to an existing dictionary structure field. but when the number of import parameters increase we may think of creating a single structure with all and use it for simplicity.
    But when it is the case with a BAPI, it is suggested that we create a structure even when we have single import parameter.
    for example.
    supposing that we create a normal function module to get the details of a given Vendor, then we declare the import parameter as below
    VENDORNO LIKE LFA1-LIFNR
    But <b>if we observe the BAPI_VENDOR_DISPLAY, We find that declaration for the same as
    VENDORNO like BAPIVENDOR_ID-VENDOR_NO,
    where BAPIVENDOR_ID is a separate BAPI sturcture created and assocaited only with Business object "Vendor".</b>
    I tried it by declaring as for a normal FM, even then it work fine.
    Now my question is,
    If SAP Suggests that we have a separate structure for all import parameters starting with name BAPI and use only those fields to reference with,
    what is the logic/reason behind asking so.
    I had created a BAPI with paramters referring to standard database fields like
    VENDORNO like LFA1-LIFNR and it is still working
    <b>I had also written interface programs using VB/ .NET to access the data from my own BAPI and standard BAPI's and both were working alike.</b>
    so anyone <b>please give me the reason/logic behind declaring a separate BAPI stuture for all the import parameters to be used in a method</b>.
    Thanks in advance,
    Lakshmi

    I would say that it really comes down to simplicity.   Think of it this way,  you are not an ABAPer, you must right a VB or a java program to call this BAPI from outside the system, you know nothing about R/3 or its data structures/tables.    Now that said,  think of what it would be like if all of the fields in the BAPI signature were like we find in the standard tables,  LIFNR, etc.  What is LIFNR, right?    Since we are ABAPers we know that it is Vendor, but for others,  they may not know.  This is why you will find the signature of a BAPI very descriptive, notice that all of the fields describe the field in english.  This is good for non-ABAPers.   To organize all of these fields that may be used in the BAPI interface,  it is good to put all of them in one defined structure,   that way they are all in one place, and can be referenced as such.    Again,  BAPIs are designed to be used by ABAPers and non-ABAPers, so simplicity is important.
    Regards,
    Rich Heilman

  • How does one pass import parameters to a report within a method?

    Hello all,
    Well how does one  pass import parameters to a report which is within a method ...end method.
    for example :
    method 123
    SUBMIT reportname using selection '1000'
    endmethod .
    Here we need to pass values into the selection screen and run the report for those values.
    The values are say 'ABC'   (  tablename "DEF" and field name "HIJ" ).
    I hope the question is clear, awaiting your response 
    Thanks and Regards,
    Sandeep.

    Go to SE24
    Parameters: Give the Parameter name, Typing method is "Type" is the domain type that u are selecting, say for e.g :  Parameter is "P_CONT" , its associated type "CHAR32" etc
    For Select Options:  Parameter name say "S_CUST", Type"importing". For this you need to give an associated type which must be created as "TABLE TYPE " in SE11. That table type needs to have a "LINE TYPE" .
    LINE TYPE is a Structure created with components "SIGN, OPTION, LOW & HIGH" for select-Options.
    NOTE: for a Table type related to Customer data fields "say KUNNR", the line type created must have the Component Type and data Type corresponding to the Data Element associated with "KUNNR" ;i.e: "CHAR" etc.
    See if this is clear to you or revert back in case of any Confusion.

  • Get Import Parameters of a Function Module

    Hi,
    Is there a way to find the import parameters and their Data Type of a Function Module in any Table??
    For example, i know i can find the name and the include of the Funtion Module in TFDIR. Is there anywhere i can find the list of Import Parameters and their Data Types??
    Thanks and Regards,
    Kaeyur

    you can use
    Data: lv_type type c.
    clear:lv_type.
    DESCRIBE FIELD p_bukrs TYPE lv_type.
    It will return C as its type C and p_bukrs is selection screen parameter.
    hope this helps.

  • How to call an eCATT programmatically with import parameters

    Hi there,
    I am using function module ECATT_EXECUTE to call test scripts from within ABAP test code, like below. Unfortunately, I am not able to pass my actual import parameter values. It seems that the interface does not provide a way to pass import parameters to the eCATT.
    Although posted in November, this is still an issue for me. Does anybody know an answer?
      call function 'ECATT_EXECUTE'
        exporting
          to_execute              = lt_script
          display_log             = space
          i_supress_output        = 'X'
        importing
          executed                = lt_executed
          logid                   = ls_logid
          trace_prot              = lt_trace
        exceptions
          nothing_to_do           = 1
          too_many_scripts_called = 2
          others                  = 3.
    Does anybody reading this have a solution?
    Thanks and regards,
    Rüdiger
    Edited by: Rüdiger Plantiko on Jan 17, 2008 3:05 PM
    Edited by: Rüdiger Plantiko on Jan 17, 2008 3:05 PM

    Hello Rüdiger,
    direct passover would be fine - well, I've come to get used to finding workarounds in SAP though. Maybe, the function module will support the missing parameters in some forthcoming release.
    Btw I switched over to tables ECTC_VAR / ECTC_DATA and pass obj_type = 'ECTC' to ECATT_EXECUTE, since test configurations can directly be executed.
    You don't happen to know what has to be done, if the call of ECATT_EXECUTE results in a dump? After correctly executing the test configuration. Looks like eCatt tries to put the resulting log to nowhere. Perhaps I have to initialize some kind of a log receiver first or set some option in the start profile? I passed DISPLAY_LOG = SPACE, and SUPPRESS_OUTPUT = 'X'.
    Dump was:
    Laufzeitfehler         OBJECTS_OBJREF_NOT_ASSIGNED
    Datum und Zeit         05.03.2008 17:37:00
    Zeile Quelltext
         1 METHOD http_send_and_receive .
         2
         3   DATA: l_errortext       TYPE string.
         4   DATA: l_http_subrc      TYPE sy-subrc.
         5 *----------------------------------------------------------------
         6
    >>>>>   im_http_client->request->set_data( data = im_request ).
         8
    Aktive Aufrufe/Ereignisse
    Nr.   Art          Programm                            Include                             Zeile
          Name
        6 METHOD       CL_HTTP_TESTZONE_RESULT=======CP    CL_HTTP_TESTZONE_RESULT=======CM00Q     7
          CL_HTTP_TESTZONE_RESULT=>HTTP_SEND_AND_RECEIVE
        5 METHOD       CL_HTTP_TESTZONE_RESULT=======CP    CL_HTTP_TESTZONE_RESULT=======CM00O    16
          CL_HTTP_TESTZONE_RESULT=>HTTP_REQUEST_NEWRESULTID
        4 METHOD       CL_HTTP_TESTZONE_RESULT=======CP    CL_HTTP_TESTZONE_RESULT=======CM00T    34
          CL_HTTP_TESTZONE_RESULT=>SEND_TO_RESULT_REPOSITORY
        3 METHOD       CL_APL_ECATT_LOG_TO_RESREP====CP    CL_APL_ECATT_LOG_TO_RESREP====CM001   400
          CL_APL_ECATT_LOG_TO_RESREP=>GET_LOG_DATA
        2 FUNCTION     SAPLECATT_EXECUTE                   LECATT_EXECUTEU01                     888
          ECATT_EXECUTE
        1 EVENT        ZDSD_SL_VIA_CATT                    ZDSD_SL_VIA_CATT                       26
          START-OF-SELECTION
    Regards + have a nice weekend,
    Matthias

  • The import parameters were not filled correctly

    Hi BW guru's
    I am working on BW 3.O AND USING A FLAT FILE. I was trying to create hierachy to a infoobject(SalesrepID-SREP). First i enabled the (with hierarchies) tab under the hierarchy tab of change characteristics of SalesrepID, and selected the Time dependent hierarchy structure RadioButtoon. Then Activated the info object. All the tables for hierarchies are generated. (BIC/HIO/SREP,BIC/KIO/SREP and BIC/IIO/SREP) when I right click the info object and try to create Hierarchy it is populating an information box saying that the, "The import parameters were not filled correctly". please kindly try to help me.
    Thanks in advance.

    Hi,
    Under the Hierarchy Tab, click on the external characteristics button and transfer your sales office and sales region from the left-->right window. Return to the InfoObject maintenance screen and activate your Infoobject.
    Right click on your infoobject and click on the "Create Hierarchy" option.
    Hope it helps
    Ravin

  • How to use Import parameters of a search help

    Hi,
    Could you please tell me how to use import & export parameters of a search help in the report.

    Hi,
    Import parameters are imported from the selection screen of the report into the search help and then these are used to query in the search help.
    For example
    case 1.
    parameters : p_carrid like sflight-carrid.
    parameters : p_connid like sflight-connid.
    the search help that is used in the above condition is
    SFLIGHT.
    And the selection method is SFLIGHT in this search help.
    ( to check which search help is used go to se11 display the table and put your cursor on the field and in the menu for goto--> search help.)
    so when you do an F4 on connid it looks for a field which is declared like SFLIGHT-CARRID ( and the value entered in it) since the SFLIGHT-CARRRID is an import parameter in the search help,  and queries the database where the value is equal to the p_carrid which is declared like SFLIGHT-CARRID and gets only data which is equal to carrid
    case 2.
    parameters : p_carrid like SCARR-carrid.
    parameters : p_connid like sflight-connid.
    In this case the system will fetch all the data.
    since there is no parameter for SFLIGHT-CARRID on the selection screen it would get all the data from SFLIGHT.

  • Advance select for source file in Sender File Adapter

    Hi
    I am trying to utilise the parameter 'Advance Selection for source file' on a sender file adapter to pick the file from multiple folders
    My problem is that this parameter that is listed on the SAP help is not getting in File accessing Parameters.
    I am running PI 7.02 (NW702_07_Rel)
    Service pack 07
    Has anyone come across this before?
    any suggestions on how to do this?

    Hi,
    In PI7.0 the property exists. I have used it previously. I think SP was 13.
    Regards,
    Nutan
    Edited by: nutan champia on Nov 24, 2011 10:42 AM

  • Automatically Selecting Values in Multiple Values Dropdown Parameters

    Hi,
    Is it possible to have parameter values automatically selected in a dropdown in an SSRS report?  I'm using SQL Server 2008 R2 Enterprise edition.  Basically what I have in mind is this:  The user wants to save his parameter selections in a
    table that will be available as a dropdown parameter of a report, call it
    ParamUserSelection.  ParamUserSelection is the first parameter of the report and other parameters depend on it.
    We have two other parameters called ParamCountry and
    ParamState.  These are dropdown text parameters that allow multiple values to be selected.  Populating the list is not a problem as I use a standard cascading parameter technique.  What I'm trying to do is the following:
    The user selects a value from ParamUserSelection, call it Selection1.  Selection1 is stored in a table and has all the values that should be selected in ParamCountry and ParamState.  In other words, it should tell these two subsequent parameters,
    what values should be selected in their respective dropdowns.  For example if the user selects Selection1 from ParamUserSelection, it reads the values in the database table and if it finds US and Canada for countries and CA, NY, ON for states, ParamCountry
    should be populated with all the countries available in the database but should have ONLY US and Canada as selected values and ParamState should be populated with all the states in the database but should have ONLY CA, NY and ON as selected values.
    If then I click on selection 2 and it has ParamCountry = US, ParamState = TX,OH in its database then again all countries and states should be in the dropdown but only US for ParamCountry and TX,OH for ParamState should be selected.
    Is this possible with SSRS?  I've tried using the Default Values tab with a dataset that returns all the selected values under Report Parameters Properties but this only works for the first time that I select ParamUserSelection.  It appears that
    if I change the value of ParamUserSelection again, the default values are not invoked.
    If this is possible, please tell me how to do this as I have been struggling for a day with it.

    Hi Comedian,
    According to your description, you have a report with three parameters (ParamUserSelection, ParamCountry, ParamState). The available value lists of ParamCountry and ParamState are based on the selection of a value for ParamUserSelection. Now you want to
    show all countries and states in their parameter dropdown list when selecting a user selection instead of only showing the cascading values. Right?
    In Reporting Service, when we want a parameter to show the cascading values, we only need to set the corresponding dataset and field for Default Values in this parameter. In this scenario, if we want to show all countries and states in their dropdown list,
    we just need to set another dataset for Available Values in those parameters so they can display all countries and states. We have tested your case in our local environment. Since you have done with the cascading parameters, we just give some part of steps
    and screenshots for your reference:
    We created two tables (dbo.Selection, dbo.states) based on your information.
    Create one more dataset (named dataset2) in your report, put text below into your query:
    select distinct Country from states
    Create another dataset (named dataset3), put text below into your query:
    select distinct State from states
    Go to your ParamCountry, in Available Values, select dataset2 and Country for dataset and field.
    Go to your ParamState, in Available Values, select dataset3 and State for dataset and field.
    Save and preview. It looks like below:
    Reference:
    Report Parameters (Report Builder and SSRS)
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou
      

  • Partial match for Value Mapping in Import Manager

    Hello Experts,
    We have a import map which is used to do mass insert of data into the main table. This is done as & when required by the end user.
    We have a qualified lookup field which has a flat lookup filed as the Non-Qualifier. This flat lookup field is refering to a Lookup Flat table, which has mulitple dispay fields like Code,Name, Status etc. (14 fields in total) where as only the Code is the unique field.
    We have only the unique field in our source file which we use for the import. Since we have only a part of the display fields in the source, the automap functionality in the Value maping section doesn't work. It becomes very tedious for the user to manually map all the values for this field.
    Is there any way by which we can convert the source or target values in the import map, so that we can map the values using the Automap feature?
    Your help & suggestion for alternate approach is highly appreciated.
    Thanks in advance.
    Regards,
    Uday
    P.S. We are using SAP MDM 5.5 SP6.

    Hi Uday,
    No need to enable remote key mapping for QLT. Please execute the below steps(stated with an example) -
    1.  Among all the fields in the referenced lookup table, identify the lookup fields and the tables they are looking up .
    For eg.If you have a lookup field as 'Country' as one of the fields, look up table will be 'Countries'
    2.For the identified lookup tables, set 'key mapping =Yes' in Console.
    For eg, For Country Lookup table ,set Key mapping to 'Yes'
    3.Import values into Lookup table (Import manager)/ Remote key update -
    In import manager, select source (local file) and destination as Countries flat table.This Table will be haing 2fields - Code and description.Clone the 'Code'field and map it to Remote key field in destination hierarchy.Map code and description to equivalent destination fields. Select 'Code' as matching field > Perform import into lookup table.
    Check if the records in countries table are updated with remote keys(in Data manager> right click on a record> select 'Edit key mappings' > view key mapping for the record)
    3.Import to Qualified table/Auto value mapping -
    Now, in the import map for qualified import , map the source field and destination field (of lookup type), all the values of this field will automatically map.
    Similarly, refresh remote keys mappings for all the lookup tables first and then you can see auto mappings of values happening for the lookup fields.
    Regards,
    Vinay M.S

  • Error-No value given for one or more required parameters when using oleDBDa

    Hello,
    I have this sql statement and it works well, the Crystal Report gives good result when I put concrete values like:
    string comstring = "SELECT NOVI.GBR as gbrnov, NOVI.AB as abnov, NALOG1.DATA as datanov, Min(NALOG1.POCKM) AS MinOfPOCKM, Max(NALOG1.KRAJKM) AS MaxOfKRAJKM, (Max(NALOG1.KRAJKM)-Min(NALOG1.POCKM)) AS RAZLIKA, Count(IIf(([MAGACIN.SIFRA]='0991000'),[MAGACIN.KOL],Null)) AS Gorivo, Avg(IIf(([MAGACIN.SIFRA]='0991000'),[MAGACIN.KOL],Null)/100) AS potrosgor100km, Sum(IIf(([MAGACIN.SIFRA]='0993050' Or [MAGACIN.SIFRA]='0993051'),[MAGACIN.KOL],Null)) AS Motmaslo, Sum(IIf(([MAGACIN.SIFRA]='0992201'),[MAGACIN.KOL],Null)) AS Addblue, ([Addblue]/[Gorivo])100 AS Addbluegor, Sum(IIf(([MAGACIN.SIFRA]='0999001'),[MAGACIN.KOL],Null)) AS Antifriz, NOVI.DATAP, NOVI.DATAS, IIf(([NOVI].[KM]<=([NOVI].[KMS1][NOVI].[KMS2])),'ZA SERVIS',(IIf(([NOVI].[KM]<=([NOVI].[KMP1][NOVI].[KMP2])),'PROVERKA',''))) AS Zabeleska FROM (NALOG1 INNER JOIN NOVI ON NALOG1.GBRV = NOVI.GBR) INNER JOIN MAGACIN ON NOVI.GBR = MAGACIN.GBR where (((NOVI.GBR)>='1001' And (NOVI.GBR)<='1080') AND ( ((NOVI.AB)='AK') OR ((NOVI.AB)='AK') ) AND ((NALOG1.DATA)<=#10/31/2011# and (NALOG1.DATA)>=#10/31/2011#) ) GROUP BY NOVI.GBR, NOVI.AB, NALOG1.DATA, ([Addblue]/[Gorivo])100, NOVI.DATAP, NOVI.DATAS, IIf(([NOVI].[KM]<=([NOVI].[KMS1][NOVI].[KMS2])),'ZA SERVIS',(IIf(([NOVI].[KM]<=([NOVI].[KMP1][NOVI].[KMP2])),'PROVERKA','')))";          
    but when I use code like this :
    string comstring = "SELECT NOVI.GBR as gbrnov, NOVI.AB as abnov, NALOG1.DATA as datanov, Min(NALOG1.POCKM) AS MinOfPOCKM, Max(NALOG1.KRAJKM) AS MaxOfKRAJKM, (Max(NALOG1.KRAJKM)-Min(NALOG1.POCKM)) AS RAZLIKA, Count(IIf(([MAGACIN.SIFRA]='0991000'),[MAGACIN.KOL],Null)) AS Gorivo, Avg(IIf(([MAGACIN.SIFRA]='0991000'),[MAGACIN.KOL],Null)/100) AS potrosgor100km, Sum(IIf(([MAGACIN.SIFRA]='0993050' Or [MAGACIN.SIFRA]='0993051'),[MAGACIN.KOL],Null)) AS Motmaslo, Sum(IIf(([MAGACIN.SIFRA]='0992201'),[MAGACIN.KOL],Null)) AS Addblue, ([Addblue]/[Gorivo])100 AS Addbluegor, Sum(IIf(([MAGACIN.SIFRA]='0999001'),[MAGACIN.KOL],Null)) AS Antifriz, NOVI.DATAP, NOVI.DATAS, IIf(([NOVI].[KM]<=([NOVI].[KMS1][NOVI].[KMS2])),'ZA SERVIS',(IIf(([NOVI].[KM]<=([NOVI].[KMP1][NOVI].[KMP2])),'PROVERKA',''))) AS Zabeleska FROM (NALOG1 INNER JOIN NOVI ON NALOG1.GBRV = NOVI.GBR) INNER JOIN MAGACIN ON NOVI.GBR = MAGACIN.GBR where (((NOVI.GBR)>=? And (NOVI.GBR)<=?) AND ( ((NOVI.AB)=?) OR ((NOVI.AB)=?) ) AND ((NALOG1.DATA)<=? and (NALOG1.DATA)>=?) ) GROUP BY NOVI.GBR, NOVI.AB, NALOG1.DATA, ([Addblue]/[Gorivo])100, NOVI.DATAP, NOVI.DATAS, IIf(([NOVI].[KM]<=([NOVI].[KMS1][NOVI].[KMS2])),'ZA SERVIS',(IIf(([NOVI].[KM]<=([NOVI].[KMP1][NOVI].[KMP2])),'PROVERKA','')))";
    Edited by: Don Williams on Nov 23, 2011 7:22 AM

    and the code after that:
    command.CommandText = comstring;
                if (radioButton4.Checked == true)
                    if (textBox1.Text == "")
                        button1.Enabled = false;
                        MessageBox.Show("Внесете гаражен број", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        textBox1.Focus();
                        command.Parameters.AddWithValue("@gbr1", textBox1.Text);
                        command.Parameters.AddWithValue("@gbr2", textBox1.Text);               
                else if (radioButton5.Checked == true)
                    command.Parameters.AddWithValue("@gbr1", "1001");
                    command.Parameters.AddWithValue("@gbr2", "1080");
                    button1.Enabled = true;
                    textBox1.Text = "";
                else if (radioButton6.Checked == true)
                    command.Parameters.AddWithValue("@gbr1", "1081");
                    command.Parameters.AddWithValue("@gbr2", "1149");
                    button1.Enabled = true;
                    textBox1.Text = "";
                else if (radioButton7.Checked == true)
                    command.Parameters.AddWithValue("@gbr1", "1001");
                    command.Parameters.AddWithValue("@gbr2", "1149");
                    button1.Enabled = true;
                    textBox1.Text = "";
                else
                    MessageBox.Show("Немате избрано гаражен број или тип на автобус.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    button1.Enabled = false;
                if (checkBox1.Checked == true && checkBox2.Checked==true)
                    command.Parameters.AddWithValue("@ab1", "AK");
                    command.Parameters.AddWithValue("@ab2", "GP");
                    button1.Enabled = true;
                else if ((checkBox1.Checked == true) && (checkBox2.Checked == false))
                    command.Parameters.AddWithValue("@ab1", "AK");
                    command.Parameters.AddWithValue("@ab2", "AK");
                    button1.Enabled = true;
                else if (checkBox2.Checked == true )
                    command.Parameters.AddWithValue("@ab1", "GP");
                    command.Parameters.AddWithValue("@ab2", "GP");
                    button1.Enabled = true;
                else
                    MessageBox.Show("Немате избрано автобаза.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    command.Parameters.AddWithValue("@ab1", "AK");
                    command.Parameters.AddWithValue("@ab2", "GP");
                    button1.Enabled = false;
                command.Parameters.AddWithValue("@data1", dateTimePicker1.Value.Date);
                command.Parameters.AddWithValue("@data2", dateTimePicker2.Value.Date);
                 DataSet2 dataSet2=new DataSet2();    
                 OleDbDataAdapter oleDBDataAdapter1 = new OleDbDataAdapter();
                oleDBDataAdapter1.SelectCommand=command;
                    dataSet2.Clear();
                    oleDBDataAdapter1.Fill(dataSet2,"Tabela");
                    if (dataSet2.Tabela.Count == 0)
                        MessageBox.Show("Nema podatoci za toj period");
                    ReportDocument cryRpt = new ReportDocument();
                    cryRpt.Load(@"C:\Potrosuvacka-Pregledi\Potrosuvacka-Pregledi\CrystalReport6.rpt");
                cryRpt.PrintOptions.PaperOrientation = CrystalDecisions.Shared.PaperOrientation.Landscape;
                    cryRpt.SetDataSource(dataSet2);
                    crystalReportViewer1.DisplayToolbar=true;
                crystalReportViewer1.ReportSource = cryRpt;                      
                crystalReportViewer1.Refresh();
                    conn.Close();
    I get an error:
    "No value given for one or more required parameters."
    Could anybody help me please?
    Thank you in advance.
    Edited by: nelpet06 on Nov 23, 2011 9:30 AM

  • Exporting and importing parameters

    Hi,
    Can any one explain how the exporting and imopting parameters work in case of function call.
    for example in the folowing code:
    CALL FUNCTION ‘DOWNLOAD’
         EXPORTING
              FILENAME     = <default file name>
              FILETYPE     = <default file type>
              MODE          = <create new or extend>
         IMPORTING
              FILESIZE     = <size of file in bytes>
         TABLES
              DATA_TAB     = <internal table to transfer>
         EXCEPTIONS. . . .
    Do we have to specify the importin parameters also in the program, and if yes what is the use of specifying them.
    Thanks,
    Dhiraj

    You need to fill only export parameter and tables parameter
    CALL FUNCTION ‘DOWNLOAD’
    EXPORTING
    FILENAME = <default file name> -> specify local file name
    FILETYPE = <default file type> 'ASC'
    MODE = <create new or extend> comment mode
    IMPORTING -> comment import parameters
    FILESIZE = <size of file in bytes> comment
    TABLES
    DATA_TAB = <internal table to transfer> -> give internal table
    EXCEPTIONS. . . . uncomment all exceptions
    this FM will download the data from internal table data to local file as like.txt or .xls
    Thanks
    Seshu

Maybe you are looking for

  • Reader X: MS Outlook 2010 - Error previewing in Reading-Pane

    'Adobe PDF Preview Handler' for MS Office 2010 cannot generate the PDF preivew. No problem with Reader 9.x. Windows XP SP3 with McAfee VirusScan Enterprise 8.7 Patch 4 (=no Reader X proteced mode). Reinstall - no change.

  • Will Not Burn DVD: Error code 0x8002006D

    Hello I have a 12" PowerBook G4 fitted with a SuperDrive running Tiger 10.4.11. My machine will still play & burn CD's it will still play DVD's but it will not burn DVD's. When trying to burn a DVD it comes up with following message: Sorry, the opera

  • Install New SD Card

    I'm replacing the 1GB card with a 16 GB card,  Whats the easiest way to transfer the data to the new card? Copy and paste everything via Windows Explorer? Backup and Restore via Desktop Manager? Device Switch Wizard via Desktop Manager? Or something

  • Access to iTunes account from Apple Store

    I preordered some music which will become available while I am traveling without my computer, where I store my iTunes content. I want to download this new music onto my iPod Classic during this time. Does anyone know if I can accomplish this from any

  • How Do I Customize the Key Combination to Cycle Through Windows in Reverse in all Applications?

    How do I customize the key combination to cycle through windows in reverse in all applications?  I want to be able to change the global setting for Command+~ (Cmd+Shft+`) to something more desireable.  I could NOT find a way to do this in Systems Pre