Using same bind variable multiple times in Dynamic sql

Hi;
I have a query which uses same variable multiple times, is there a way I could use only one time that variable and it will take multiple times.
Query is;
execute immediate 'SELECT count(*) FROM x WHERE MONTH_ID = :VOMNTH_ID
UNION
SELECT count(*) FROM Y WHERE MONTH_ID = :VOMNTH_ID
union
SELECT count(*) FROM z WHERE MONTH_ID = :VOMNTH_ID ' using month1,month1,month1
What I want Just supply month1 only once.
Your help is appreciated.
VKM

the way suggested by Nigel worksI'm not sure what you intend to use the resultset for but remember that UNION will remove duplicates from the result set and could possibly sort it too. Even if that were not the case (for example if you used UNION ALL) Oracle does not specifically guarantee the order of resultsets.
If you are expecting the first row to contain the first count (and so on) then you might not get the answer you are expecting.
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
SQL> SELECT 3 n
  2  FROM   dual
  3  UNION
  4  SELECT 2 n
  5  FROM   dual
  6  UNION
  7  SELECT 1 n
  8  FROM   dual;
         N
         1
         2
         3
SQL> SELECT 1 n
  2  FROM   dual
  3  UNION
  4  SELECT 2 n
  5  FROM   dual
  6  UNION
  7  SELECT 2 n
  8  FROM   dual;
         N
         1
         2
SQL>

Similar Messages

  • Using bind variables (in & out) with dynamic sql

    I got a table that holds pl/sql code snippets to do validations on a set of data. what the code basically does is receiving a ID and returning a number of errors found.
    To execute the code I use dynamic sql with two bind variables.
    When the codes consists of a simpel query, it works like a charm, for example with this code:
    BEGIN
       SELECT COUNT (1)
       INTO :1
       FROM articles atl
       WHERE ATL.CSE_ID = :2 AND cgp_id IS NULL;
    END;however when I get to some more complex validations that need to do calculations or execute multiple queries, I'm running into trouble.
    I've boiled the problem down into this:
    DECLARE
       counter   NUMBER;
       my_id     NUMBER := 61;
    BEGIN
       EXECUTE IMMEDIATE ('
          declare
             some_var number;
          begin
          select 1 into some_var from dual
          where :2 = 61;
          :1 := :2;
          end;
          USING OUT counter, IN my_id;
       DBMS_OUTPUT.put_line (counter || '-' || my_id);
    END;this code doesn't really make any sense, but it's just to show you what the problem is. When I execute this code, I get the error
    ORA-6537 OUT bind variable bound to an IN position
    The error doesn't seem to make sense, :2 is the only IN bind variable, and it's only used in a where clause.
    As soon as I remove that where clause , the code will work again (giving me 61-61, in case you liked to know).
    Any idea whats going wrong? Am I just using the bind variables in a way you're not supposed to use them?
    I'm using Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit

    Correction. With execute immediate binding is by position, but binds do not need to be repeated. So my statement above is incorrect..
    You need to bind it once only - but bind by position. And the bind must match how the bind variable is used.
    If the bind variable never assigns a value in the code, bind as IN.
    If the bind variable assigns a value in the code, bind as OUT.
    If the bind variable assigns a value and is used a variable in any other statement in the code, bind as IN OUT.
    E.g.
    SQL> create or replace procedure FooProc is
      2          cnt     number;
      3          id      number := 61;
      4  begin
      5          execute immediate
      6  'declare
      7          n       number;
      8  begin
      9          select
    10                  1 into n
    11          from dual
    12          where :var1 = 61;       --// var1 is used as IN
    13 
    14          :var2 := n * :var1;     --// var2 is used as OUT and var1 as IN
    15          :var2 := -1 * :var2;    --// var2 is used as OUT and IN
    16  end;
    17  '
    18          using
    19                  in out id, in out cnt;  --// must reflect usage above
    20 
    21          DBMS_OUTPUT.put_line ( 'cnt='||cnt || ' id=' || id);
    22  end;
    23  /
    Procedure created.
    SQL>
    SQL> exec FooProc
    cnt=-61 id=61
    PL/SQL procedure successfully completed.
    SQL>

  • Namedquery using same table field multiple times with the use of a label

    Hi all,
    i'm having some trouble with a namedquery. I'm trying to
    use the following namedquery in Toplink to retrive some
    data out of a database.
    select proj.id
    , proj.code
    , proj.name
    , proj.budget
    , proj.status
    , proj.startdate
    , proj.enddate
    , proj.mdr_id projleader_id
    , med_leader.name projleader
    , proj.mdr_id_valt_onder promanager_id
    , med_promanager.name promanager
    , proj.mdr_id_is_account_from accmanager_id
    , med_accmanager.name accmanager
    from uur_projecten proj
    , uur_medewerkers med_leader
    , uur_medewerkers med_promanager
    , uur_medewerkers med_accmanager
    where ( #p_name is not null or #p_search_string is not null )
    and med_leader.id = proj.mdr_id
    and ( proj.mdr_id = nvl( #p_name, proj.mdr_id )
    or proj.mdr_id_valt_onder = nvl( #p_name, proj.mdr_id )
    or proj.mdr_id_is_account_van = nvl( #p_name, proj.mdr_id ))
    and (( #p_status is not null
    and substr( proj.status, 1, 1 ) = upper( #p_status ))
    or ( #p_status is null ))
    and ( upper( proj.code ) like upper( '%' || #p_search_string || '%' )
    or upper( proj.name ) like upper( '%' || #p_search_string || '%' ))
    and med_promanager.id = proj.mdr_id_valt_onder
    and med_accmanager.id = proj.mdr_id_is_account_van
    order by decode( substr( proj.status, 1, 1 )
    , 'A', 2, 'T', 3, 'F', 4, 1 ), proj.code desc
    As you all can see the table ‘uur_medewerkers’ is been used trice to
    determine the name for the corresponding ID. I have a Java class with
    the fields for the results and created a Toplink descriptor to map
    the fields to the database fields.
    The problem is that for the 'projleader', 'promanager' and 'accmanager'
    fields the results are null. The reason is probably that Toplink doesn't
    recognize the fields because of the label for the tables.
    Is there a way to make this work?
    Greets, René

    Post Author: quafto
    CA Forum: .NET
    Your query is not too clear so I'll do my best to answer it broadly.
    You mentioned that you have a .NET web application where your users enter data on one screen and then may retrieve it on another. If the data is written in real time to a database then you can create a standard Crystal Report by adding multiple tables. The tables should be linked together using the primary and foreign keys in order to optimize the database query and give you a speedy report. Using unlinked tables is not recommended and requires the report engine to index the tables (it is quite slow).
    You also mentioned you have a "PropID" to be used in a WHERE clause. This is a great place to use a parameter in your report. This parameter can then be used in your record selection formula inside Crystal Reports. The report engine will actually create the WHERE clause for you based on the parameter value. This is helpful because it allows you to simply concentrate on your code rather than keeping track of SQL queries.
    Now, what Crystal does not do well with is uncertainty. When you design a report with X number of tables the report engine expects X number of tables to be available at processing time. You should not surprise the print engine with more or less tables because you could end up with processing errors or incorrect data. You may need to design multiple reports for specific circumstances.
    Regarding the group expert question. I'm not sure how you would/could use the group expert to group a table? A table is a collection of fields and cannot be compared to another table without a complex algorithm. The group expert is used to group and sort records based on a field in the report. Have a look at the group expert section of the help file for more information.
    Hopefully my comments have given you a few ideas.

  • How to find out if a SQL is using a bind variable or not?

    In order to make a SQL use consistent execution plan, I want to create a profile for a SQL. But I need to know if a SQL is using bind variable or not to create a profile for all the same SQLs except the literal value. How can I do that?
    Thanks in advance

    You can tell if an SQL statement uses a bind variable by looking at the SQL statement.
    If you look in the program that submits the SQL statement you can see how it constructs, prepares, and executes the statement.
    If you are just looking at the SQL in the shared pool then depending on how the statement is written and the setting of database parameters like cursor sharing then it can be more difficult but if you see a constant (actual value) that is a constant. A bind variable would appear as a name in the where clause where that name does not exist any of the tables referenced in the query. Note it is technically possible to create pl/sql variables with the same name as columns in the query but that is poor coding and leads to issues.
    Note - To Oracle two versions of the otherwise same query where one has a constant and the other has a bind variable are not the same query and often produce different plans. This is a common error made by developers new to Oracle when using explain plan. To explain a query that uses bind variables place a ":" in front of the variable name in the SQL submitted to explain plan.
    HTH -- Mark D Powell --

  • Can't create multiple dependent LOVs from the same bind variable

    Hi all,
    I'm having difficulty creating multiple dependent LOVs from queries based on the same bind variable in my JSF application (JDev 10.1.3.1). Basically I have a static LOV in a af:selectOneChoice component from which users select a value which then becomes the bind variable value for two separate queries that generate two different dependent LOV. Having developed the code along the lines of Steve Muench 's blog (http://radio.weblogs.com/0118231/2006/04/03.html#a685), the first dependent LOV works really well. The first dynamic LOV gets refreshed whenever the list from the static LOV changes, and I can execute other queries based on the values selected.
    The problem arises when I want to create the second dynamic/dependent LOV that has the same bind variable based on the same selected value from the static LOV. Here I would also like the functionality whereby the second dynamic LOV is also refreshed after the selected value in the static LOV changes. Thinking that all I had to do was replicate the methodology used in creating the first dependent LOV, I created the second iterator, invokeAction and other binding components in the PageDef. The executable section now looks like the following:
    <iterator id="SelectStaticQueryViewObjIterator"
                  Binds="SelectStaticQueryViewObj" RangeSize="-1"
                  DataControl="DMSApplicationModule1DataControl"/>
    <invokeAction id="refreshDynamicQuery1BindParameter"
                  Binds="ExecuteWithParams1" Refresh="prepareModel"
                  RefreshCondition="#{empty requestScope.VariableChanged}"/>
    <iterator id="SelectDynamicQuery1ViewObjIterator"
                  Binds="SelectDynamicQuery1ViewObj" RangeSize="-1"
                  DataControl="DMSApplicationModule1DataControl"/>
    <invokeAction id="refreshDynamicQuery2BindParameter"
                  Binds="ExecuteWithParams2" Refresh="prepareModel"
                  RefreshCondition="#{empty requestScope.VariableChanged}"/>
    <iterator id="SelectDynamicQuery2ViewObjIterator"
                  Binds="SelectDynamicQuery2ViewObj" RangeSize="-1"
                  DataControl="DMSApplicationModule1DataControl"/>I now have a problem whereby everytime I change the value of the static LOV, multiple HTML components for the same ADF component are being generated (the LOVs are refreshed via PPR). The surprising thing is that this duplicating behaviour applies to all ADF components listed after the first dynamic LOV in the *.jspx source. For example, I have a <af:outputText="Test Text"/> component created after the first dynamic LOV. Each time the value in the static LOV changes, a duplicate HTML component is created. This also applies to the 'related' second dynamic LOV which is bound to a af:selectOneChoice component - multiple dropdown lists are created. I've checked with the browser's Page Source and there are actually multiple html components being generated with their own unique ADF-generated IDs. I've tried all different options for the Referesh and RefreshCondition attibutes in the second invokeAction element but nothing seems to eliminate this issue.
    Any suggestions about how I might create multiple dependent LOVs from the same bind variable that get refreshed when the selected value changes would be greatly appreciated.
    Thanks
    George

    Hi all,
    Just updating the thread on how I've overcome this issue. As it stood the manner in which I was trying to solve my use case, as described above, was creating an absolute mess. Then with a blank sheet of paper I quickly realised that a much simpler solution would be to create a whole series of master-detail VOs and build my components around them. Thankfully I haven't had any issues going down this path as yet.
    Cheers
    George

  • Re: Running the same (Forte) application multiple times -for different

    Hi
    We had the same problem - how to deploy a number of identical applications, using each their own db.
    (for training).
    The solution we used is to wrap the entire application into different applications by using a very small
    module called KURSUS01, KURSUS02 etc, that did nothing but call the start procedure of the main app.
    Then in the dbsession connect, we made a call appname to get the application name, and appended the
    first 8 chars to the dbname. Thus our dbnames now points to logicals name: rdbdataKURSUS01, rdbdataKURSUS02 etc.
    All this allows us to deploy the identical apps in the same env, or change one version, and run both the old
    and new program on the same pc and server at the same time (eg. KURSUS01 and KURSUS02).
    I also think this is a kludge - but it works nicely!
    Jens Chr
    KAD/Denmark
    -----Original Message-----
    From: Haben, Dirk <[email protected]>
    To: 'Soapbox Forte Users' <[email protected]>
    Date: 15. januar 1999 09:41
    Subject: Running the same (Forte) application multiple times - for different business clients.
    Hi All
    We have a number of different business clients all willing to use our
    application.
    The (forte) application is to run on our machines etc for these (business)
    clients.
    All (business) clients will have their data kept in separate Oracle DBs
    (instance).
    The problem now is that the entire (forte) application is written using
    DBSessions.
    Now, depending on what business client needs to be serviced (so to speak) we
    need to attach to the right DB - or use the "right" SO.
    The two options we can think of are:
    Option1:
    Programatic change to somehow "know" what (business) client (DB) I'm talking
    about and then use the right DB.
    Pro:
    Only one forte environment to maintain
    Can run multiple (business) clients on same PC at the same time
    Con:
    Requires many program changes
    bending O-O rules(?)
    can't dynamically name SOs so can it be done at all? (ResourceMGRs maybe?)
    Option2:
    Use separate environments! One for each business client.
    Pro:
    More defined separation of app and data,
    SLA-easy
    Con:
    Maintain "n" number of environments
    Can only run the application for one environment (business client) at a time
    on one PC - Big Negative here!
    Not knowing any feasible solution to option 1 (without much code changes and
    developer moaning) I would go for option two; as I have already worked on
    multi-environment setups on VMS back at the Hydro (hi guys).
    I would appreciate any comments from anyone who has solved this problem.
    How, Why Pro Con etc.
    TIA,
    Dirk Haben
    Perth, WA
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    Hi
    We had the same problem - how to deploy a number of identical applications, using each their own db.
    (for training).
    The solution we used is to wrap the entire application into different applications by using a very small
    module called KURSUS01, KURSUS02 etc, that did nothing but call the start procedure of the main app.
    Then in the dbsession connect, we made a call appname to get the application name, and appended the
    first 8 chars to the dbname. Thus our dbnames now points to logicals name: rdbdataKURSUS01, rdbdataKURSUS02 etc.
    All this allows us to deploy the identical apps in the same env, or change one version, and run both the old
    and new program on the same pc and server at the same time (eg. KURSUS01 and KURSUS02).
    I also think this is a kludge - but it works nicely!
    Jens Chr
    KAD/Denmark
    -----Original Message-----
    From: Haben, Dirk <[email protected]>
    To: 'Soapbox Forte Users' <[email protected]>
    Date: 15. januar 1999 09:41
    Subject: Running the same (Forte) application multiple times - for different business clients.
    Hi All
    We have a number of different business clients all willing to use our
    application.
    The (forte) application is to run on our machines etc for these (business)
    clients.
    All (business) clients will have their data kept in separate Oracle DBs
    (instance).
    The problem now is that the entire (forte) application is written using
    DBSessions.
    Now, depending on what business client needs to be serviced (so to speak) we
    need to attach to the right DB - or use the "right" SO.
    The two options we can think of are:
    Option1:
    Programatic change to somehow "know" what (business) client (DB) I'm talking
    about and then use the right DB.
    Pro:
    Only one forte environment to maintain
    Can run multiple (business) clients on same PC at the same time
    Con:
    Requires many program changes
    bending O-O rules(?)
    can't dynamically name SOs so can it be done at all? (ResourceMGRs maybe?)
    Option2:
    Use separate environments! One for each business client.
    Pro:
    More defined separation of app and data,
    SLA-easy
    Con:
    Maintain "n" number of environments
    Can only run the application for one environment (business client) at a time
    on one PC - Big Negative here!
    Not knowing any feasible solution to option 1 (without much code changes and
    developer moaning) I would go for option two; as I have already worked on
    multi-environment setups on VMS back at the Hydro (hi guys).
    I would appreciate any comments from anyone who has solved this problem.
    How, Why Pro Con etc.
    TIA,
    Dirk Haben
    Perth, WA
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • Same parameter multiple times in Execute SQL Task

    Hi all,
    i have a fairly long parametrized query that needs to be run within an Execute SQL task. It has only 2 unique parameters, but these need to be used multiple within that query. The connection is OLEDB.
    ill simplify my requirement by making up an arbitrary T-SQL "where" clause that will illustrate what i need:
    where
    x = @param1
    and y = @param1
    and z > @param2
    and w > @param2
    moving this into an SSIS execute SQL task will require the following:
    where
    x = ?
    and y = ?
    and z > ?
    and w > ?
    I know i need to specify 4 parameters and remap the same variables multiple times.. like so:
    User:aram1   -> 0
    User:aram1   -> 1
    User:aram2   -> 2
    User:aram2   -> 3
    isnt there a better way? i ask this because in my real task i have 2 params, each is reused 4 and 5 times respectively and it seems stupid to repeat params like this.

    @ _proffy_
    you can pass the same variable or value as parameter multiple times sql task.
    follow the steps below.
    1) type the sql query with parameters in SQL statement tab of sql task editor
    2. in the parameter mapping, select the variables.
      you can select the same variables more than once.
     give the parameter name as 0,1,2,3..... based on variables you require.
    do not forget to chooose the appropriate Datatype.
    ex:
    select * from table1
    where a= ?
    and b=?
    and c= ?
    parameters:
    Var name               param Name
    user::Var1               0   
    user::Var1               1
    user::Var2               2
    so the value becomes a=var1, b= var1 and c= var2

  • Can I have the same printer installed multiple times under different names?

    On WIndows I have the same printer installed multiple times
    All using the same driver
    I have a Canon printer that has a rear tray and a bottom tray
    So, I will have one printer that prints to the rear and the other to the bottom
    Other printers (the same one) will be set so that they print in high quality and in duplex for example
    I'll name the printers 1.Canon 2.Canon 3.Canon etc
    So, when I go to print, I just hit a number on the keyboard and the printer I want is selected
    Can I do the same on my laptop?
    Thanks
    Omar

    Back Up - that's in case things go wrong.
    In the case you cite:
    You have
    Mother
    Mother Maiden Name
    as Faces, right?
    In the Corkboard view click on Mother Maiden Name and delete the 'Maiden Name'.
    It will disappear and all the photos will be in the Mother face.
    Note that 'Mother' and 'Mother ' (that is, with a trailing space) are not the same.
    You can  also just edit the name 'Mother Maiden Name' to 'Mother'
    As for photos staying in manual sort, I can only say that mine do. But as I've no idea what troubleshooting steps you've used.
    Regards
    TD

  • Firefox making same GET call multiple times

    Firefox is making the same AJAX call multiple times for a single event when it should really do it once. Actually, with each single click the number of calls multiplies. I have tested the application using Chromium and Eclipse's internal browser and I have no problems.
    I removed all add-ons and started Firefox in safe-mode, but the problem persists.
    Please advise,
    Arthur Nobrega

    Hi Arthur, do you have a page available that demonstrates this problem? If so, please post a link. Perhaps your test doesn't actually need to make a network request: for example, perhaps it could add a message to the page indicating that the relevant section of code was triggered.
    Since this site focuses on end user support, you might also consider taking this question to a more developer-oriented forum such as the unofficial [http://forums.mozillazine.org/viewforum.php?f=25 mozillaZine Web Development board], or to StackExchange.

  • Deploying same WAR file multiple times

    I am attempting to deploy the same WAR file with different parameters [Differnt
    data sources, etc.] Has anyone deployed the exact same war file multiple times?
    I know one way to do this is to rename the war file, is there a way other than
    this without EAR it up?

    you edit your html file to embed multiple copies of your swf.
    it's generally easier to control the layout if you use swfobject (but you can just copy the code published by flash pro) to embed the swf.

  • Embed same SWF file multiple times in Flash file

    I want to include the same SWF file multiple times in the same flash file. I have a plain box that is clear, that becomes visible when clicked. I want to create a grid of them (about 50+). If I copy the layers and actions, they interfere with each other so I want to embed multiple SWF files into one file and then save it to embed in an interactive PDF. If I save one square and embed it into the PDF multiple times, the file becomes too big to work. How can I embed interactive SWF files over and over into 1 SWF file? I don't have a ton of knowledge with Flash....

    you edit your html file to embed multiple copies of your swf.
    it's generally easier to control the layout if you use swfobject (but you can just copy the code published by flash pro) to embed the swf.

  • Bapi_po_create1 is giving same system messages  multiple time in the joblog

    Hi Experts,
    Bapi_po_create1 is giving same system messages multiple times in the job log when we ran the program in the background
    can u plz suggest how to prevent these multiple appearances of same messages.
    I am pasting the code below whn i ran this program in backgorund job log is having the messages.
    Date       Time     Message text                                                                 Message class Message no. Message type
    08/06/2009 08:11:53 Job started                                                                       00           516          S
    08/06/2009 08:11:53 Step 001 started (program ZZZTEST, variant &0000000000008, user ID BREDDY)        00           550          S
    08/06/2009 08:11:54 Commitment plan contains no account assignment data                              MECP          020          S
    08/06/2009 08:11:54 Commitment plan contains no account assignment data                              MECP          020          S
    08/06/2009 08:11:54 Status "Initial Block" of material 20111 does not allow external procurement      ME           053          E
    08/06/2009 08:11:54 Status "Initial Block" of material 20111 does not allow external procurement      ME           053          E
    08/06/2009 08:11:54 Source not included in list despite source list requirement                       06           722          E
    08/06/2009 08:11:55 Pricing/euro: Attention: Euro Customizing not maintained                          VH           777          S
    08/06/2009 08:11:55 Pricing/euro: Attention: Euro Customizing not maintained                          VH           777          S
    08/06/2009 08:11:55 Status "Initial Block" of material 20111 does not allow external procurement      ME           053          E
    08/06/2009 08:11:55 Purchase order still contains faulty items                                       MEPO          000          E
    08/06/2009 08:11:55 Job finished                                                                      00           517          S
    Edited by: bhavani prasad kotharu on Aug 6, 2009 3:09 PM

    HERE IS THE CODE OF THE PROGRAM, WE R JUST PASSING SOME PO DATA TO THE BAPI_PO_CREATE1,ON RUNNING THIS PROGRAM IN BACKGROUND SAME SYSTEM MESSAGES ARE APPEARED MULTIPLE TIMES,----
    REPORT zzztest.
    DATA :    lwa_bapimepoheader TYPE bapimepoheader
             ,lwa_bapimepoheaderx TYPE bapimepoheaderx
             ,li_bapimepoitem TYPE STANDARD TABLE OF bapimepoitem
             ,lwa_bapimepoitem TYPE  bapimepoitem
             ,li_bapimepoitemx TYPE STANDARD TABLE OF bapimepoitemx
             ,lwa_bapimepoitemx TYPE bapimepoitemx
             ,li_conditions TYPE STANDARD TABLE OF komv
             ,li_return TYPE STANDARD TABLE OF bapiret2
             , n TYPE c
    PARAMETERS: p1 TYPE c AS CHECKBOX.
    IF p1 = 'X'.
      lwa_bapimepoheader-doc_type = 'NB'.
      lwa_bapimepoheader-purch_org = 'NA00'.
      lwa_bapimepoheader-pur_group = 'C02'.
      lwa_bapimepoheaderx-doc_type = 'X'.
      lwa_bapimepoheaderx-purch_org = 'X'.
      lwa_bapimepoheaderx-pur_group = 'X'.
      lwa_bapimepoitem-po_item = '10'.
      lwa_bapimepoitem-material = '000000000000020111'.
      lwa_bapimepoitem-plant = 'CA01'.
      lwa_bapimepoitem-vend_mat = '1000'.
      lwa_bapimepoitem-quantity = '10'.
      lwa_bapimepoitem-orderpr_un = 'M'.
      lwa_bapimepoitem-no_more_gr = 'K'.
      lwa_bapimepoitem-agreement = '4600000095'.
      lwa_bapimepoitem-agmt_item = '10'.
      lwa_bapimepoitem-pricedate = 'X'.
      lwa_bapimepoitem-price_date = '20071030'.
      lwa_bapimepoitem-no_rounding = 'X'.
      APPEND lwa_bapimepoitem TO li_bapimepoitem.
      lwa_bapimepoitemx-po_item = '10'.
      lwa_bapimepoitemx-po_itemx = 'X'.
      lwa_bapimepoitemx-po_itemx = 'X'.
      lwa_bapimepoitemx-material = 'X'.
      lwa_bapimepoitemx-plant = 'X'.
      lwa_bapimepoitemx-quantity = 'X'.
      lwa_bapimepoitemx-po_unit = 'X'.
      lwa_bapimepoitemx-orderpr_un = 'X'.
      lwa_bapimepoitemx-acctasscat = 'X'.
      lwa_bapimepoitemx-agreement = 'X'.
      lwa_bapimepoitemx-agmt_item = 'X'.
      lwa_bapimepoitemx-pricedate = 'X'.
      lwa_bapimepoitemx-price_date = 'X'.
      lwa_bapimepoitemx-preq_no = 'X'.
      lwa_bapimepoitemx-preq_item = 'X'.
      lwa_bapimepoitemx-no_rounding = 'X'.
      APPEND lwa_bapimepoitemx TO li_bapimepoitemx.
    DATA: lo_msg_handler  TYPE REF TO cl_message_handler_mm.
      CALL METHOD cl_message_handler_mm=>get_handler
        IMPORTING
          ex_handler = lo_msg_handler.
      lo_msg_handler->remove_all( ).
      lo_msg_handler->cleanup( ).
      CALL FUNCTION 'BAPI_PO_CREATE1' "in background task
           EXPORTING
             poheader   = lwa_bapimepoheader
             poheaderx  = lwa_bapimepoheaderx
             testrun    = 'X'
           NO_MESSAGING = c_x
           NO_MESSAGE_REQ = c_x
             no_authority = 'X'
           IMPORTING
             expheader  = lwa_bapimepoheader
           TABLES
             return     = li_return
             poitem     = li_bapimepoitem
             poitemx    = li_bapimepoitemx
             conditions = li_conditions.
    ENDIF.
    Edited by: bhavani prasad kotharu on Aug 6, 2009 3:38 PM

  • TS2755 keep receiving the same text message multiple times, at the same time of the night. How can I stop this?Thabnks

    Hi
    I keep on receiving the same text message multiple times and at around the same time each night. Any idea how I can stop this happening? The text messages are originating from to separate Saudi Arabian mobile numbers. Both these people are listed in my contacts so do you think if I delete their names it might stop the texts coming htrough each night?
    Cheers

    Deleting the people from your contacts will not stop the messages. Have you tried talking to the people and finding out if they're sending you messages? You could try contacting your carrier and finding out what blocking services they offer. However, theat would block all messages from those people.

  • How to use the bind variable in custom.pll

    Hi,
    How to use the bind variable in custom.pll.Its through error.
    any one gem me.
    very urgent.
    M.Soundrapandian.

    Hello,
    Please, ask this kind of questions in the e-business forum.
    Francois

  • How to use a bind variable in an IN clause

    I am trying to use a bind variable in an IN clause where the column is a varchar2 type. Something like:
    select *
    from test
    where test_column in (:bindVariable)I have tried assigning the bind variable comma separated strings (eg. test,test,test) and comma separated strings with quotes (eg. 'test','test','test'). Neither of these work. Does anyone know the correct way to do this?
    Thanks in advance.

    http://tkyte.blogspot.com/2006/06/varying-in-lists.html
    Presents many options.

Maybe you are looking for

  • Nano keeps turning itself off and on again (only to apple)

    So I went to charge my nano and when I did so it froze, so I reset it and ever since it wont come on properly, it gets to the apple screen (no backlight) then the backlight comes on, then EVERYTHING goes blank and then it starts again. (this behaviou

  • Credit Management - T Code VKM1,2,3,4.

    Hi All , I have issue in Credit management - VKM1 Transaction . The value in field " credit value in thousand (VBKRED-KWKKD)" is showding value in Thousand . We need to populate the values in this field same as that of "Credit Value VBKRED - KWKKC".T

  • Sim Card not recognised carrier help!!!!

    I have an iPhone from Apple as a replacement for my o2 iphone 3GS as there was an error with the silent button. I was using it fine and then yesterday I turned the phone on and found the connect to itunes logo. After connecting to itunes it is tellin

  • SSRS report email Scheduling omit zero record

    Is that a way to omit zero record for SSRS report email scheduling? That means if zero record happened it shouldn't trigger emailing.

  • %EC-SP-5-CANNOT_BUNDLE2 - Switch incorrectly sees port in Dynamic Trunking Mode

    Take this configuration on a 6500 with 2 WS-X6716-10-GE modules installed. interface Port-channel1 description Switch02:Po1 switchport switchport trunk encapsulation dot1q switchport mode trunk switchport nonegotiate interface TenGigabitEthernet1/1 d