Change a query variant using a program for APD

Hello everyone,
Some background:
We have a complex reporting based on calculated key figures (CKF). However, the business rules do change over time, and the formulas for CKF get outdated. So the business meaning of CKF remains the same, but the way it gets calculated - changes.
Yesterday CKF "A" = B + C
Today CKF "A" = B + D - F
Since the customer requires reporting for the former periods, maintaining several CKF of the same business meaning but calculated differently for each period becomes a problem.
Instead of having several versions of CKF "A", we decided to use APD, to periodically run the query with valid CKF, save the query results to transactional ods, then move it to another infocube. Now we will have the infocube with figures and dates, and the customer needs to maintain just one CKF "A".
After trying this out we've encountered following issue:
Since the query will run periodically we must use a time period filter (in fact - variable on a time characteristic - APD is not working with filter) to select CKF valid for this month for example.
The query in APD can work with variables only via query variants.
Now, the question is how to change the query variant automatically?
We can not force the customer to create new query variants each month for dozens of reports.
We plan to integrate APD in the process chain (although we haven't check how it works), where the query variant will be changed using a program.
so please advice:
1) is there any function module to change query variants in the background
2) which tables contain the query variant, so we can change it using abap
3) may be you can suggest other options to make it work
thank you
Message was edited by:
        Northern

Hi,
here it is.
write this code in SE38.
REPORT  ZDATE_CAL..
DATA: itab_tvarvc like tvarvc,
      l_date like sy-datum,
      l_monthyear_low type /BI0/OICALMONTH,
      l_monthyear_high type /BI0/OICALMONTH,
      l_day(2) type c,
      l_month(2) type c,
      l_year(4) type c,
      l_mandt(3) TYPE c VALUE '010',
      l_type(1) type c VALUE 'S',
      l_numb(4) type N value '0000'.
      l_day = sy-datum+6(2).
      l_month = sy-datum+4(2).
      l_year = sy-datum+0(4).
      concatenate l_day l_month l_year into l_date.
      concatenate '01' l_year into l_monthyear_low.
      concatenate l_month l_year into l_monthyear_high.
variable for current month interval
itab_tvarvc-mandt = l_mandt.
itab_tvarvc-name  = 'ZDATE_INV'.
itab_tvarvc-type  = l_type.
itab_tvarvc-numb  = l_numb.
itab_tvarvc-sign  = 'I'.
itab_tvarvc-opti  = 'BT'.
itab_tvarvc-low   = l_monthyear_low.
itab_tvarvc-high  = l_monthyear_high.
update TVARVC from itab_tvarvc.
This code will always maintain the entry for the variable 'ZDATE_INV' as range from the start of month till current month.
you can modify it store anything yuou want.
Now when creating the variant by clicking the create variant option when running the query.
you have the option in the "selection variable" column here you will find only TVARVC table as option select it and then in "name of variable" use the Z variable you have just created.
This will automatically pick the current value for the variant for that variable.
So anytime the variant is used in any of the scheduling it will pick the inout from here.
make sure that the variable for time interval is of same type as that of the entry in the TVARVC table.
That if it is of type calmonth then TVARVC table should have variable entry of type calmonth.
thanks

Similar Messages

  • User program for APD export

    How would I find a ABAP function/method for displaying a BW infoobject, like cost center (/BI0/HCOSTCENTER), for a user selection screen in a group/hierarchy format? Similar to BEx hierarchy selection for node level. Are there any example programs for doing this? I'm setting up an Analysis Process Design export transaction program for a user to export data as needed and they need to dynamically select the hierarchy group for cost center and cost element to change a query variant for the APD to use.

    I don't believe anyone has done this before. At least I can't find any content on replicating BEx hierarchy selection screens from an ABAP function.
    I did however complete the user called APD process via custom ABAP transaction code. It did required a special user role to execute an APD process w/o having access to the APD app itself.

  • How to use BAPI Program for change workcenter in co02?

    Hi  Abapers.
           Anybody please tell me how to change the workcenter in CO02 using BAPI Programe.
          Please give me sample of this.
           I will give urs reward of points.
    Thanks
    Regards,
    S.Muthu.

    Hi,
    Use the Function module CR_WORKCENTER_UPDATE
    for workcenter change.
    It is an update function module so you have to call it in update mode with a COMMIT statement to trigger it.
    CALL FUNCTION CR_WORKCENTER_UPDATE IN UPDATE TASK
    exporting...
    imporing..
    COMMIT WORK.
    Note: only after the commit statement the function module will be called in update mode.
    Regards,
    Raj.

  • How to transport Query variant used in APD

    Hello Experts,
    I have created 2 query variants for a query in Development system. And, these variants are being used in APD. Now, when APD is transported to next system, query variants does not exist in next system, so cannot execute APD.
    Please let me know how can i transport the query variants.
    Note: Gone through SDN, and found, query variants can be transported through some tables.
    Please let me any other possibile sloutions for the same.
    Thanks
    Lavanya

    Hi Lavanya,
    To the best of my  knowledge, you cannot transport query variants. You have to manually create them in each system. The reason being, when you try to create variants through RSRT -> Query Variants, you are basically trying to create variants for a temporary program generated during run time!
    These run time programs do not have TADIR entries (not transportable) and hence any sub elements (like variants) created on these programs are not transportable as well.
    Actually you can export variants.Please follow the below steps:
    1. Go To TCode SE38.
    2. Execute "RSTRANSP".
    3. Input your program name.
    4. Input your variant name ie. "Z**** ".
    5. Execute.
    6. Click on continue.
    7. You should be able to create a new transport at this point.
    Hope It Helps,
    Thanks,
    Amit Kr.

  • Change product attributes by using BOL program

    Hi every one,
    I am very new to BOL program. Can any one help me out how to change the product attributes by using BOL program. How to find the relations in BOL program?
    Thanks in advance.

    Hi Rams
    All the components that are seen in genil_model_browser would be defined in spro under the following path:
    Customer Relationship Management ->CRM Cross-Application Components->Generic Interaction Layer/Object Layer->Basic Settings
    If you are looking for the product master, here you can find the component 'PROD'.
    Now goto tx genil_model_browser and enter component PROD. In here, under Root Object 'Product', you can see all the relations.
    Hope the above info helps.
    Regards
    Nisha

  • Change of Costing Variant in Marking Allowance for CK24 price update

    Dear All,
    In CK24, price updation previously i had selected one costing variant for one particular material and released the standard price. Now, I am trying to do price update for a different material for which I used different costing variant for doing  the material cost estimate. Now when I am going to Marking Allowance in CK24 for that particular company code the previous costing variant is only displaying. But now for the current material that is not the costing variant for which i need price updation. It is just displaying the old costing variant.
    Please let me know how to change the costing variant for the same period.
    Regards
    Srikanth

    Hi Srikanth,
    1. IMG: Logistics - General, Retail Pricing
    Define list variant and assign items
                  Enhance or create a new list variant with list field VKP01
    2. IMG: Logistics - General, Retail Pricing
    Texts for list fields
                  Adjust the text for the list field, for example, PP old
    3. Define a new SD condition type ZEKA, for example as a copy of VKP0 (Transaction V/06)
                  You can create this new condition either as a separate condition or if it is always determined together with, for example VKP0, you can define it as a condition supplement of VKP0. You achieve this by not assigning an access sequence to ZEKA but including it in the condition supplement schema (schema VKP000 in the standard system) instead. In addition, assign the supplement schema of the main condition (master data subscreen, for example schema VKP000). The main condition must be contained in the calculation schema used so that the condition supplements can be found.
    4. Insert the new condition type ZEKA in the sales price calculation schema (Transaction V/08)
                  Enhance the schema (assignment per pricing type) with the new condition ZEKA. In the standard system, we deliver schema WWS001 and WWS002. You can insert ZEKA at the end of the schema as a statistical condition.
    5. IMG: Logistics - General, Retail Pricing
    Control - control per list field, allowed costing levels
                  For the sales price calculation schema used, you must set control parameters for the list fields EKPNN and VKP01.
    List field EKPNN: In the lower subscreen (Saving list fields in master conditions) enter the new condition type ZEKA (application V). If the new condition type has an access sequence, that is, it is not used as a condition supplement, then you must specify in screen 'Allowed pricing levels' the condition tables in which ZEKA should be stored.
    List field VKP01: In the mid subscreen (Transport calculating schema data for list field), specify ZEKA as SP condition type.
    Note: if you want to send ZEKA for example in the assortment list as a condition, then you must also enhance the schema for calculating the sales price (VKP001, VKP002 or VKP003 in the standard system) with ZEKA.
    If still not working ping me,
    Regards,
    Srinivas Muthyala

  • Diary of my painful attempts to use a program for which I have the license

    Hi: I will summarize my painful experience with Excelsius 2008 in the following diary
    4-2011:
    Excelsius 2008 is working OK in the computer where it is installed.
    (5 months pass by)
    9-2011:
    Excelsius 2008 shows that there is  a "mising or inactive" license and it does not run.
    We contact SAP to get information on how to solve this issue.
    Many emails go back and forth. Next goes an excerpt of one of them:
    10-11-2011:
    "I have tried to reinstall and then run the update.  I still receive the same error message.  I went into control panel> add/remove programs>xcelsius 2008 to try and repair it and I receive the same error message.  Its strange that even when I try to remove it the program I receive the error message.  Help?"
    10-20-2011:
    I am trying to reinstall my Excelsius 2008. The program is looking for a file called "xcelsius.msi" but it doesnot locate it. I direct the path to the place where the file is located. The program tells me that is not the one I am supposed to find.
    I cannot unistall the program. I cannot use it either.
    10-21-2011:
    I try to install the program from scratch in another computer following instructions given by SAP.
    The program asks for key code activation. Enter the 26 characters string of data and program says that activation key code is not valid.
    Try replacing the 0 for O, in all possible combinations, same message is displayed.
    I need to use Xcelsius 2008 for my work, I have a valid license, and the program is not working.
    Can anybody help??
    Thank you,
    extremely unhappy customer

    Maiko,
    I'm confess I'm still trying to get a handle on your problem. You do a fantastic job of describing it ... but I'm just trying to picture it accurately in my head.
    I think, were I in your shoes, I'd begin by looking at what the debug page has to say for the specific destination in which you're interested in fixing. In other words, I'm not clear on where, exactly, this destination points ...
    Destination illinois.edu.1945806043
    Is that your site, or the division within your site that you want to fix? "Normally", you do not need to specify a site handle to get to your site within your transfer CGI ... if you say "uillinois.edu", it's enough to transfer your users to iTunes U ... but every site still has a handle, and you could, if you wanted to, actually specify it in your transfer CGI. For example, this:
    Destination uic.edu.1139051993
    is for my entire site ... it's my site handle. Whereas this:
    Destination uic.edu.1991288441
    is for a division within my site ... but it's impossible to tell the difference between "site" and "division" from just the handle (I mean, if I didn't say "this is a site" and "this is a division", there'd be no way for you to know). So when I look at your creds and permissions on your debug page, I can't quite tell if they give you download access for your site, or for the specific division you want to fix. If you could open the debug page with your division as destination (or confirm that that's what we're looking at), it'd rule out some things.

  • Query plan changes when query is used in CREATE TABLE AS

    We've puzzled by the fact that EXPLAIN PLAN gives a much different output for a SELECT statement than it does when the same statement is used for CREATE TABLE . . . AS SELECT.
    The bad part is that the CREATE TABLE version performs very badly, and that's what we want the query for.
    Why does this happen? Is there a difference (from the database's point of view) between retrieving a set of rows to display to the user and putting that same set into a new table? Doesn't this make it harder to diagnose and fix query performance problems?
    Here's our query:
    create table query_test AS
    select term, parentTerm, apidb.tab_to_string(cast(collect(trim(to_char(internal)))
                       as apidb.varchartab), ', ') as internal
                 from (
                     select distinct ga.organism as term,
                                     ga.species as parentTerm,
                                     tn.taxon_id as internal
                     from apidb.GeneAttributes ga, SRES.TaxonName tn, sres.Taxon t,
                          dots.AaSequence aas, dots.SecondaryStructure ss
                     where ga.organism = tn.name
               and tn.taxon_id = t.taxon_id
                       and t.taxon_id = aas.taxon_id
       and aas.aa_sequence_id = ss.aa_sequence_id
               and t.rank != 'species'
               union
                     select distinct ga.species as term,
                       '' as parentTerm,
                                     ts.taxon_id as internal
                     from apidb.GeneAttributes ga, SRES.TaxonName tn, apidb.taxonSpecies ts,
                          dots.aasequence aas, dots.SecondaryStructure ss
                     where ga.organism = tn.name
                      and tn.taxon_id = ts.taxon_id
                      and ts.taxon_id = aas.taxon_id
                     and aas.aa_sequence_id = ss.aa_sequence_id
       group by term,parentTerm;Without the CREATE TABLE, the plan looks like this:
    | Id  | Operation                             | Name                      | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |
    |   0 | CREATE TABLE STATEMENT                |                           |  2911 |  5986K|       | 18840   (1)| 00:03:47 |
    |   1 |  LOAD AS SELECT                       | QUERY_TEST                |       |       |       |            |          |
    |   2 |   VIEW                                |                           |  2911 |  5986K|       | 18669   (1)| 00:03:45 |
    |   3 |    SORT GROUP BY                      |                           |  2911 |   332K|       | 18660   (1)| 00:03:44 |
    |   4 |     VIEW                              |                           |  2911 |   332K|       | 18659   (1)| 00:03:44 |
    |   5 |      SORT UNIQUE                      |                           |  2911 |   292K|       | 18659   (6)| 00:03:44 |
    |   6 |       UNION-ALL                       |                           |       |       |       |            |          |
    |*  7 |        HASH JOIN                      |                           |  2907 |   292K|  2160K| 17762   (1)| 00:03:34 |
    |   8 |         TABLE ACCESS FULL             | GENEATTRIBUTES10650       | 40957 |  1679K|       |   795   (1)| 00:00:10 |
    |*  9 |         HASH JOIN                     |                           | 53794 |  3204K|  1552K| 16675   (1)| 00:03:21 |
    |* 10 |          HASH JOIN                    |                           | 37802 |  1107K|       | 12326   (1)| 00:02:28 |
    |* 11 |           HASH JOIN                   |                           | 37945 |   629K|       | 10874   (1)| 00:02:11 |
    |  12 |            INDEX FAST FULL SCAN       | SECONDARYSTRUCTURE_REVIX9 | 37945 |   222K|       |    33   (0)| 00:00:01 |
    |  13 |            INDEX FAST FULL SCAN       | AASEQUENCEIMP_REVIX6      |  7886K|    82M|       | 10816   (1)| 00:02:10 |
    |* 14 |           TABLE ACCESS FULL           | TAXON                     |   514K|  6530K|       |  1450   (1)| 00:00:18 |
    |  15 |          TABLE ACCESS FULL            | TAXONNAME                 |   760K|    22M|       |  2721   (1)| 00:00:33 |
    |* 16 |        HASH JOIN                      |                           |     4 |   380 |       |   886   (1)| 00:00:11 |
    |  17 |         NESTED LOOPS                  |                           |   730 | 64970 |       |   852   (1)| 00:00:11 |
    |* 18 |          HASH JOIN                    |                           |     1 |    78 |       |   847   (1)| 00:00:11 |
    |  19 |           NESTED LOOPS                |                           |       |       |       |            |          |
    |  20 |            NESTED LOOPS               |                           |    17 |   612 |       |    51   (0)| 00:00:01 |
    |  21 |             TABLE ACCESS FULL         | TAXONSPECIES10646         |    12 |    60 |       |     3   (0)| 00:00:01 |
    |* 22 |             INDEX RANGE SCAN          | TAXONNAME_IND01           |     1 |       |       |     2   (0)| 00:00:01 |
    |  23 |            TABLE ACCESS BY INDEX ROWID| TAXONNAME                 |     1 |    31 |       |     4   (0)| 00:00:01 |
    |  24 |           TABLE ACCESS FULL           | GENEATTRIBUTES10650       | 40957 |  1679K|       |   795   (1)| 00:00:10 |
    |* 25 |          INDEX RANGE SCAN             | AASEQUENCEIMP_REVIX6      |   768 |  8448 |       |     5   (0)| 00:00:01 |
    |  26 |         INDEX FAST FULL SCAN          | SECONDARYSTRUCTURE_REVIX9 | 37945 |   222K|       |    33   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       7 - access("GA"."ORGANISM"="TN"."NAME")
       9 - access("TN"."TAXON_ID"="T"."TAXON_ID")
      10 - access("T"."TAXON_ID"="TAXON_ID")
      11 - access("AA_SEQUENCE_ID"="SS"."AA_SEQUENCE_ID")
      14 - filter("T"."RANK"<>'species')
      16 - access("AA_SEQUENCE_ID"="SS"."AA_SEQUENCE_ID")
      18 - access("GA"."ORGANISM"="TN"."NAME")
      22 - access("TN"."TAXON_ID"="TS"."TAXON_ID")
      25 - access("TS"."TAXON_ID"="TAXON_ID")
    46 rows selected.With the CREATE TABLE, the plan for the SELECT alone looks like this:
    | Id  | Operation                           | Name                      | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT                    |                           |     2 |   234 |  1786   (1)| 00:00:22 |
    |   1 |  SORT GROUP BY                      |                           |     2 |   234 |  1786   (1)| 00:00:22 |
    |   2 |   VIEW                              |                           |     2 |   234 |  1785   (1)| 00:00:22 |
    |   3 |    SORT UNIQUE                      |                           |     2 |   198 |  1785  (48)| 00:00:22 |
    |   4 |     UNION-ALL                       |                           |       |       |            |          |
    |*  5 |      HASH JOIN                      |                           |     1 |   103 |   949   (1)| 00:00:12 |
    |   6 |       NESTED LOOPS                  |                           |   199 | 19303 |   915   (1)| 00:00:11 |
    |   7 |        NESTED LOOPS                 |                           |    13 |  1118 |   850   (1)| 00:00:11 |
    |   8 |         NESTED LOOPS                |                           |    13 |   949 |   824   (1)| 00:00:10 |
    |   9 |          VIEW                       | VW_DTP_E387155E           |    13 |   546 |   797   (1)| 00:00:10 |
    |  10 |           HASH UNIQUE               |                           |    13 |   546 |   797   (1)| 00:00:10 |
    |  11 |            TABLE ACCESS FULL        | GENEATTRIBUTES10650       | 40957 |  1679K|   795   (1)| 00:00:10 |
    |  12 |          TABLE ACCESS BY INDEX ROWID| TAXONNAME                 |     1 |    31 |     3   (0)| 00:00:01 |
    |* 13 |           INDEX RANGE SCAN          | TAXONNAME_IND02           |     1 |       |     2   (0)| 00:00:01 |
    |* 14 |         TABLE ACCESS BY INDEX ROWID | TAXON                     |     1 |    13 |     2   (0)| 00:00:01 |
    |* 15 |          INDEX UNIQUE SCAN          | PK_TAXON                  |     1 |       |     1   (0)| 00:00:01 |
    |* 16 |        INDEX RANGE SCAN             | AASEQUENCEIMP_REVIX6      |    15 |   165 |     5   (0)| 00:00:01 |
    |  17 |       INDEX FAST FULL SCAN          | SECONDARYSTRUCTURE_REVIX9 | 37945 |   222K|    33   (0)| 00:00:01 |
    |  18 |      NESTED LOOPS                   |                           |     1 |    95 |   834   (1)| 00:00:11 |
    |  19 |       NESTED LOOPS                  |                           |     1 |    89 |   833   (1)| 00:00:10 |
    |* 20 |        HASH JOIN                    |                           |     1 |    78 |   828   (1)| 00:00:10 |
    |  21 |         NESTED LOOPS                |                           |       |       |            |          |
    |  22 |          NESTED LOOPS               |                           |    13 |   949 |   824   (1)| 00:00:10 |
    |  23 |           VIEW                      | VW_DTP_2AAE9FCE           |    13 |   546 |   797   (1)| 00:00:10 |
    |  24 |            HASH UNIQUE              |                           |    13 |   546 |   797   (1)| 00:00:10 |
    |  25 |             TABLE ACCESS FULL       | GENEATTRIBUTES10650       | 40957 |  1679K|   795   (1)| 00:00:10 |
    |* 26 |           INDEX RANGE SCAN          | TAXONNAME_IND02           |     1 |       |     2   (0)| 00:00:01 |
    |  27 |          TABLE ACCESS BY INDEX ROWID| TAXONNAME                 |     1 |    31 |     3   (0)| 00:00:01 |
    |  28 |         TABLE ACCESS FULL           | TAXONSPECIES10646         |    12 |    60 |     3   (0)| 00:00:01 |
    |* 29 |        INDEX RANGE SCAN             | AASEQUENCEIMP_REVIX6      |   768 |  8448 |     5   (0)| 00:00:01 |
    |* 30 |       INDEX RANGE SCAN              | SECONDARYSTRUCTURE_REVIX9 |     1 |     6 |     1   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       5 - access("AA_SEQUENCE_ID"="SS"."AA_SEQUENCE_ID")
      13 - access("ITEM_1"="TN"."NAME")
      14 - filter("T"."RANK"<>'species')
      15 - access("TN"."TAXON_ID"="T"."TAXON_ID")
      16 - access("T"."TAXON_ID"="TAXON_ID")
      20 - access("TN"."TAXON_ID"="TS"."TAXON_ID")
      26 - access("ITEM_1"="TN"."NAME")
      29 - access("TS"."TAXON_ID"="TAXON_ID")
      30 - access("AA_SEQUENCE_ID"="SS"."AA_SEQUENCE_ID")
    50 rows selected.Edited by: JohnI on Jul 18, 2011 2:19 PM
    Edited by: JohnI on Jul 18, 2011 2:28 PM

    Charles Hooper wrote a series of blog entries on a similar topic some time ago: http://hoopercharles.wordpress.com/2010/12/15/select-statement-is-fast-insert-into-using-the-select-statement-is-brutally-slow-1/ (including a lot of useful comments) and two following articles. I have to confess that I did not read the posts again - but I think you will find some good ideas how to analyze the problem.
    Regards
    Martin Preiss

  • Is it possible to change the address in the replacement program for the ipod nano 1G?

    I 'm already sign up in the replacement program of the ipod nano 6G and the emply box has already been send. But later, I noticed that the address wasn't complet. So my question is if and how I could change my address.

    There currently isn't any contact information or support from Apple in regards to this specific replacement scheme. I know it's quite frustrating, but Apple have not offered the best customer care in this situation. My only other piece of advice would be to go to an Apple store if possible. Speak to somebody and explain your situation..they may be kind enough to call through for you.
    I am positive that there is not any means to contact Apple via an online form or by email.

  • Changes are not reflecting using af:resource for adding CSS

    Hi,
    I am trying to add new CSS file(say the name as customNew.css) to page template using af:resource tag, the changes are not reflected. Instead I see(using firebug) that, styles coming from different CSS file(say the name as customOld.css ) which configured on trinidad-config.xml and trinidad-skins.xml files.
    I was under the impression that, the new CSS file(customNew.css) will override the old css (customOld.css). So, CSS added using af:resource tag will not override any other CSS ???
    Any help will be appreciated
    Thanks,
    San.

    Hi,
    if you bring CSS to the browser through af:resource then this is not overriding any skinning definition. Skins can only changed in trinidad-config.xml file (which also can be done at runtime). Just adding a CSS file to af:resource wont do the trick here.
    Frank

  • HOW TO WRITE QUERY OR PL/SQL PROGRAM FOR THIS

    I HAVE TABLE X
    SELECT ENO FROM X
    ENO
    123
    423
    332
    562
    678
    986
    621
    WHEN I RUN PL/SQL PROGRAM I WILL PASS PARAMETER
    FOR EXAMPLE LIKE 134
    I NEED OUTPUT LIKE
    134 EXIST OUTPUT
    123
    423
    332
    562
    621
    134 NOT EXIST OUTPUT
    678
    986
    Regards
    Dev

    This?
    <tested in TOAD>
    SQL> accept my_parm
    old: with t as (
    select '123' eno from dual union all
    select '423' from dual union all
    select '332' from dual union all
    select '562' from dual union all
    select '678' from dual union all
    select '986' from dual union all
    select '621' from dual )
    select eno || ' ' || output_type results
    from (
    select to_char(&&my_parm) eno, 'EXIST OUTPUT' output_type, 1 output_id
    from dual union all
    select null eno, null output_type, 3 output_id
    from dual union all
    select to_char(&&my_parm) eno, 'NOT EXIST OUTPUT' output_type, 4 output_id
    from dual union all
    select
    eno,
    null,
    case when regexp_instr(eno,'[' || &&my_parm || ']') >0
    then 2
    else 5
    end output_id
    from t
    order by output_id, eno
    new: with t as (
       select '123' eno from dual union all
       select '423' from dual union all
       select '332' from dual union all
       select '562' from dual union all
       select '678' from dual union all
       select '986' from dual union all
       select '621' from dual )
    select eno || ' ' || output_type results
    from (
       select to_char(134) eno, 'EXIST OUTPUT' output_type, 1 output_id
       from dual union all
       select null eno, null output_type, 3 output_id
       from dual union all
       select to_char(134) eno, 'NOT EXIST OUTPUT' output_type, 4 output_id
       from dual union all
       select  
          eno,
          null,
          case when regexp_instr(eno,'[' || 134 || ']') >0
             then 2
             else 5
          end output_id
       from t
    order by output_id, eno
    SQL> with t as (
       select '123' eno from dual union all
       select '423' from dual union all
       select '332' from dual union all
       select '562' from dual union all
       select '678' from dual union all
       select '986' from dual union all
       select '621' from dual )
    select eno || ' ' || output_type results
    from (
       select to_char(134) eno, 'EXIST OUTPUT' output_type, 1 output_id
       from dual union all
       select null eno, null output_type, 3 output_id
       from dual union all
       select to_char(134) eno, 'NOT EXIST OUTPUT' output_type, 4 output_id
       from dual union all
       select  
          eno,
          null,
          case when regexp_instr(eno,'[' || 134 || ']') >0
             then 2
             else 5
          end output_id
       from t
    order by output_id, eno
    RESULTS            
    134 EXIST OUTPUT   
    123                
    332                
    423                
    621                
    134 NOT EXIST OUTPUT
    562                
    678                
    986                
    10 rows selected.Message was edited by:
    MScallion

  • Need use exit / program for IDOCextension -ARTMAS05

    Hi ,
         I need User Exit / Progarm to pouplate the valuse of ZEE fields of extended ARTMAS05.
    Regards
    Sri

    Hi SriRAM,
    Please have a look at below User Exits:
    -ACCID001 EXIT_SAPLACC1_021 IDoc ACPJOU: Userexit for GL posting in accounting document11. ARTMAS
    -ACCID002 EXIT_SAPLACC2_020 IDoc ACPJOU: Userexit Userexit for GL posting header in accounting document
    -ACCID002 EXIT_SAPLACC2_021 IDoc ACPJOU: Userexit Userexit for GL posting line in accounting document75.
    Also check Below BADIs
    ARTMAS_BAPI_EXTEND Influence Inbound Processing for Material-BAPI
    ARTMAS_DATA_ENRICH Enrichment of ALE Change Pointers for ARTMAS IDocs
    For more information refer [link|http://www.erpgenie.com/abaptips/index2.php?option=com_content&do_pdf=1&id=302]
    Hope this helps!
    Regards
    Shital

  • How do i install mySQL on my macbook air,please i need the assistance urgently,because i need to use the program for my course.

    how do i install mySQL on my macbook air.please i need urgent assistance,as it would help me do my course work.
    regarde garabella.

    Call AppleCare and ask them to send you a replacement set. They will charge you a nominal fee for shipping and handling.
    Allan

  • Hello.  MAC - Android.  Is there such a thing as using a program for my MAC Notebook Pro that I'm also able to use on my android phone?

    Thank you sooo much ahead of time.  Specifically I'm looking for a good finance app like iBank 4 that I could also access on my android phone.  Please and thank you for any help you can share.

    The only way to do that is find an application that has been written for two different systems.  The operating systems of the MacBook Pro and Android are not the same and apps will not run on both of them.

  • Calculate Withholding taxes for VEndor Invoices using ABAP program.

    Hi All,
    I have to upload Vendor Invoices using FB60/Fb01 tcodes. I am able to post the Invoices using FB01/Fb60
    but I have to calculate extended withholding taxes also using this program for the Invoices.
    Is it possible to upload vendor Invoices and calculate withholding taxes using Program?
    If yes,
    Does anyone has any idea how do you calculate extended withholding taxes using any BAPI's?
    I have used these two BAPI's
    BAPI_ACC_DOCUMENT_POST
    BAPI_acc_invoice_receipt_post
    they are working fine but without withholding tax.
    This is a requirement for country India.
    Regards,
    Sushil

    Hi,
    Imho, you need to get (meaning, extract into separate fields) the different supplier types from Table1 first. Your key for Table1 is the vendor no, which is also the key in Table2 (or the key for Table2 is Vendor no & Type).
    For better performance, better select multiple/all required entries from Table1 instead of doing a select endselect.
    Depending on the format of the vendortypes in Table1, put them in a new itab (for our purpose named Table1New where vendor no & type are the only 2 fields. For example, if the type length is fixed to 2 chars, or divided by space,... use your coding accordingly.
    Next step is to select all vendor no's in Table2 which you have selected in Table1. If in Table2, the vendor no is the only key (and the all vendor types are filled in a single record), then loop check the vendor types from Table1New against the types in Table2.
    If the key of Table2 is vendor no & vendor type, then do a read table for the key.
    The logic in pseudo-code:
    Select from Table1 into table. If you'd like to limit the selection size, add package size statement.
         extract the vendor types in to itab Table1New.
         Select the vendor & types from Table2 by using the for all entries option (better performance).
         loop at Table1New
              check in Table2:
                   if the unique key is vendor no: check all fields for the vendor type from Table1New
                   if the unique key combo is vendor no & type: check by using a read table.
              If not found => add entry to Table2
         endloop.
    endselect Table1 (when using package size)
    I guess the most difficult step is to extract the types from Table1 into separate fields, all the rest seems straight forward. Please keep in mind the itab type definitions for a better performance.
    Good luck!
    Best regards,
    Zhou

Maybe you are looking for

  • How can I move email foldes to a disk?

    I have some old emails in an email folder that I need to save. I would like to transfer them to a disk. How do I do this? Or, can I?

  • Creating Ringtones

    Ok so the idea of paying twice for a song to make it a ringtone it aganizing enough and quite frankly bs. but when i buy a song and itunes says that it can no longer be made into a ringtone i get pretty ****** off. how do i know what songs can an can

  • Lost my iphone and erased through Icloud. now i have found it

    I have erased the backups from Itunes. Found my iphone, but have not powered it up yet because the erase is still pending on Icloud. How can I delete the erase that I have set so that I do not lose all my stuff on my phone.

  • How do i create a directory in powershell

    How do i create a directory in power shell

  • Query related to Internal Table

    Hi ,       I have a small query related to internal table , can we dump millions of records to an internal . The actual requirment is like i need to develop a report in BI side where i have to dump records into an internal table  from PSA tables with