Checking for the condition types using case statement

hi folks,
I have a lot of condition types that I have to check for and I am using case statement to do that. The code goes like this.
case wac-kschl.
        when 'ZRAT' OR 'ZAGR' OR 'ZRCR' OR
              'Y098' OR 'Y007' OR 'ZREW' OR 'Y106'        OR 'ZTSR' OR 'Y127' OR 'Y125' OR 'Y126' OR 'Y124' OR 'Y157' OR 'Y092' OR 'Y085' OR 'Y090' OR 'ZMZD'
OR 'Y215' OR 'Y214' OR 'Y111' OR 'ZC$D' OR 'ZAUD'.
up till here it is working on errors and when I add few more condition types to the case statement it is throwing the error.
I have to check for all the condition types out here.
How can I correct it? Is there a better way to do it?
thanks
Santhosh

Hi Santhosh,
I think that your CASE statement has a flaw. The line length of one of the lines is too large. You need to insert a carriage-return to shorten it (or press the button 'Pretty Printer').
The code would look nicer like this:[code]  CASE wac-kschl.
    WHEN 'ZRAT' OR 'ZAGR' OR 'ZRCR' OR 'Y098' OR 'Y007' OR 'ZREW'
      OR 'Y106' OR 'ZTSR' OR 'Y127' OR 'Y125' OR 'Y126' OR 'Y124'
      OR 'Y157' OR 'Y092' OR 'Y085' OR 'Y090' OR 'ZMZD' OR 'Y215'
      OR 'Y214' OR 'Y111' OR 'ZC$D' OR 'ZAUD' OR 'Z001' OR 'Z002'
      OR 'Z003' OR 'Z004' OR 'Z005' OR 'Z006' OR 'Z007' OR 'Z008'
      OR 'Z009' OR 'Z010' OR 'Z011' OR 'Z012' OR 'Z013' OR 'Z014'.
    Do your thing here
      WRITE: / 'OK'.
    WHEN OTHERS.
      WRITE: / 'NOT OK'.
  ENDCASE.[/code]If this will not work for you, you could try a different approach:[code]* Local definition
  DATA:
    var_list(1024).
Build variable string for checking
  CONCATENATE 'ZRAT ZAGR ZRCR Y098'
              'Y007 ZREW Y106 ZTSR'
              'Y127 Y125 Y126 Y124'
              'Y157 Y092 Y085 Y090'
              'ZMZD Y215 Y214 Y111'
              'ZC$D ZAUD'
         INTO var_list
    SEPARATED BY space.
Check if the correct value is supplied
  IF var_list CS wac-kschl.
  Do your thing here
    WRITE: / 'OK'.
  ENDIF.[/code]Hope this helps you a bit.
Regards,
Rob.

Similar Messages

  • Conditional Filters using case statements

    Hello,
    I have a table view which displays Total Quota and Theatre Quota. Against the Total Quota, there are 2 values - Rollover Revenue and Theatre Revenue. Against the Theatre Quota, there is only Theatre Revenue.
    What I want to accomplish is to display only the Rollover Revenue Aggregated Quarterly number whenever there is a Total Quota number and not display the Theatre Revenue number
    In the table view,
    Year Name     Quarter Name     Quarter Name Sort     Person Region     Quota Name     Quarterly Quota     Credit Amount     QTD Attainment     Credit Type Name
    YEAR-2012     QTR-1-2012     QTR-1-2012     750     Total Quota     6,128,500     5,492,081     89.62%     Rollover Revenue Aggregated Quarterly
                   750          6,128,500     5,344,000     87.20%     Theatre Revenue
         QTR-2-2012     QTR-2-2012     750     Total Quota     5,922,500     5,890,264     99.46%     Rollover Revenue Aggregated Quarterly
                   750          5,922,500     6,120,000     103.33%     Theatre Revenue
         QTR-3-2012     QTR-3-2012     750     Total Quota     5,716,500     0     0.00%     
         QTR-4-2012     QTR-4-2012     750     Total Quota     5,510,500     0     0.00%     
    I used an example in the following link:
    http://oraclebizint.wordpress.com/2008/02/06/oracle-bi-ee-101332-conditional-filters-using-case-statements-in-filters/
    and applied the example in my scenario:
    CASE WHEN Quota."Quota Name" = 'Total Quota' THEN "Credit Type"."Credit Type Name" ELSE 'Dummy' END != 'Theatre Revenue'
    I still get duplicate rows.
    Thanks.

    Could you suggest any solutions for this problem where I can conditionally hide the number only for a certain type of data and not for all type of data?
    Thanks.

  • In sales order for the condition type MWST, **Tax code** is displaying wron

    Hi
    In sales order for the condition type MWST, *Tax code* is displaying wrongly at header level i.e. FF instead of AO (under account determination tab)
    AO tax is 0% but for FF it is 19%
    I have checked with the Access sequence it is picking access 08 correctly according to this it should show AO in tax code field for MWST but it is not so..
    There is a manual change for tax classification for material master in va02 initially it was blank now it is changed to ' 0 ' is any way influencing....?
    Even if I consider material tax classification and customer tax code  should not be FF because  tax code  FF is not maintained for the combination of access sequences for condition type MWST
    Please help me.
    Rajendra Prasad

    Dear Rajendra,
    There is a manual change for tax classification for material master in va02 initially it was blank now it is changed to ' 0 ' is any way influencing....?
    Definitely material Tax classification will influence to determine the Tax code.
    -->So Make sure that customer and material master having proper tax classification indicator.
    -->Have you Update the price after changing the tax classification in the sales order.by going to item dat -->condition tab then click on Update push button bottom of the conditions screen.
    -->Once again the check the condition record maintanence also for your MWST access sequence.
    I hope this will help you,
    Regards,
    Murali.

  • Tax value is not picked up correctly for the condition type in SO creation

    Hi All,
    I have a issue in Picking up Tax value correctly for the condition type in SO Creation.
    Actual Issue:
    When creating the sales order manually,
    tax value is picked up correctly for one condition type: ISS3.
    When the Sales Order is created via Idoc using the function module 'idoc_input_orders', tax value is not picked for same condition type: ISS3.
    We need to find out why the value for the condition type 'ISS3' is not picked in this way!
    Can anybody solve this issue!
    What can be the reason which is stopping picking up tax value for condition type: ISS3 when Sales Order is created via F.M 'IDOC_INPUT_ORDERS'! While it picked up the same while creating Sales Order manuallly.
    Thanks in advance.
    Thanks,
    Deep.

    Hi All,
    Can anybody give the solution for above posted issue!
    Working:
    When creating the sales order manually,
    tax value is picked up correctly for the condition type ISS3.
    Actual Issue:
    When the Order is created via Idoc using the function module 'idoc_input_orders',
    tax value is not picked .
    I need to find out why the value for the condition type 'ISS3' is not picked.
    I have debugged the issue from WE19 but upto Conditions tab it is picking up tax value but then it is becoming zero again it remains zero after saving SO.
    But Manually tax value is picked up for condition type ISS3 and remains same after saving order.
    I have debugged it several times fro WE19 but not able to find route cause for the issue.
    What can be the issue over here!
    Can anybody give me solution for the same!
    Thanks in advance.
    Thanks,
    Deep.

  • Tax not calculated in MIRO for the condition type JVCD

    Hi,
    We made some new different tax code and attached with JVCD , its calculating in PO but in MIRO calculation part not done but for other condition type ,JVRD,JVRN system calculating well...
    Please tell me some way why not system calculating in case of JVCD and JVCN for capital case..
    Thanks in Advance,
    Dharmveer

    Hi,
    We totally agreed with you and already we checked our configuration part is OK.Actually we want to map some process where we captured excise in GR but no need to take credit i.e. to post the excise in J1IEX,so we do not have to post our cenvat/modvat entry in MIRO but we need to calculate VAT whether it is deductible or non deductible.So far this thing is concerned,we made separate tax code which we use at time of MIRO posting and in configuration we did not attached the tax code in logitics-basic excise -assign to company code. Because once we attached here , system asking to make to pass furst RG part2 entry then it allows to post MIRO entry which we do not want .So please understand this scenario is different and we got the success for JVRN/JVRD for VAT but getting issue in case of capital VAT where system does not calculate tax for JVCN/JVCD .....where we want to process MIRO without posting J1IEX..
    Please thing and analyse ..give some helping response..
    Thanks,
    Dharmveer

  • Dates in the condition record maintenance for the condition type?

    Hi,
    Condition type has the following dates when maintaining the condition record,
    Valid from date:
    Valid on :
    Please ellaborate on the  above dates?
    Thanks

    Dear Rajiv
    Valid from date:-   The date from which the said condition type is applicable.  For example, in VK11, if you changed (let us assume PR00 changed to Rs.250 from 200) a condition with a date as  01-06-08 in the above field, only from 1st of June'08, whatever sale orders you generated, revised value of Rs.250 will flow in the respective sale orders.  Whatever created b4 1st June'08 will be having Rs.200.
    Valid on :-  As in the above case, if you input a date as 30-05-08 for the above condition type, system will populate Rs.200/- and if you input 01-06-08, it will propose Rs.250/-.
    Hope this explanation is suffice for you to understand the difference between the two fields.
    thanks
    G. Lakshmipathi

  • HOw to check for the Child Elements USing only SAX Parsr?

    HI Guyz,
    How to check whether there are any Child Elements in an XML file using ONLY SAX parser ??? I have a requirement of checking first whether there is any Child Elements exists for a Element or not and based on that I have to take certain actions. Can anyone suggest me How to do that ???
    Thanx
    KK

    Since SAX is event controlled, you wont know if there's a child element unless you actually bump into it with the Parser. You'll simply get another startElement event after your current one.
    /Tom

  • Sap note doubt (105621 - Authorization check for the condition )

    Hi experts,
    I am wondering if this note takes effect also in Mm transactions.
    Does anyone have experience with this?
    Thanks!!
    Artur.

    Hi Artur,
    I guess you should post in service market place instead SDN....
    Arpan

  • Condition type used for invoice list

    Hello Gurus,
            following condition type used for invoice list, why do they exit in invoice list:
             RL00    MW15.  LR00    RD01

    Hi,
    Please go through the below document
    When you work with invoice lists, you need to be familiar with the following concepts:
    Prerequisites for invoice lists
    Relationship to Pricing
    Structure of an Invoice List
    Changing header and item data
    Integration with financial accounting (FI)
    Prerequisites
    You can only process invoice lists if the following prerequisite data is defined by your system administrator in Customizing for Sales:
    Condition type RL00 (factoring discount) must be maintained and, if required, also the condition type MW15.
    An invoice list type must be assigned to each billing type that you want to process in invoice lists. The standard version of the SAP R/3 System includes two types of invoice lists: LR for invoices and debit memos, LG for credit memos.
    Copying requirements must be defined (for example, the payer, terms of payment and other fields that must be identical in the documents to be included in the invoice list)
    In addition, before you process an invoice list, you must maintain the following master data:
    A customer calendar must be defined, specifying the time intervals or dates on which invoice lists are to be processed.
    The customer calendar must be entered in the Billing Sales Area view of the customer master record.
    Pricing condition records for the condition type RL00 and, if necessary, (e.g. in Germany) the condition type MW15 must be maintained.
    Output condition records for condition types LR00 and RD01 must be created.
    Relationship to Pricing
    The system processes factoring discounts in invoice lists in exactly the same way as other kinds of pricing elements. The data for the factoring discount is stored in condition records. Controlling during document processing is carried out via condition types, pricing procedures and access sequences. This control data is defined in Customizing for Sales by your system administrator.
    For further information, see  Conditions and Pricing.
    Structure of an Invoice List
    An invoice list represents an individual billing document. It consists of a document header and document items. Each item represents a billing document that you have included in the invoice list. The header contains an overview of summary information, such as the net value of all documents in the invoice list, the value of the factoring discount, details of taxes, and so on. It also contains information on partners and output.
    Changing Header and Item Data
    You can change some of the header data - for example, the billing date - when you process the invoice list. You can change an item - either an individual or collective invoice - and display document details. However, you cannot change any data in individual billing documents once they are part of an invoice list.
    It is possible, however, to make certain global changes to output in all items in an invoice list.
    For further information on output, see  Communication in Sales and Distribution Processing.
    Integration With Financial Accounting (FI)
    The documents that you want to combine within an invoice list must already have been billed and forwarded to Financial Accounting. Here the billing documents intended for an invoice list are blocked for normal dunning transactions.
    The dunning block on FI documents is lifted as soon as you create an invoice list and transfer it to FI . The system then calculates the new dunning date for the invoice on the basis of the invoice list date.
    In addition, the system enters invoice list numbers in the FI documents as reference numbers. Invoice list numbers can then be entered for incoming payments.
    When you save the invoice list, the system automatically creates an accounting document for the factoring discount and possible taxes and posts it to the corresponding G/L account in FI.
    Regards,
    Murthy

  • Condition type used for scrap

    hi,
    what is the condition type used for scrap in Standard SAP.?Assured points
    Best regards,
    R.Srinivasan

    Dear Srinivasan
    Follow the below process:-
    1)  Go to V/06, either copy the standard or create a new by naming ZTCS and maintain the following:-
    -  Cond. class::::::::::A
    -  Calculat.type::::::::A
    -  Access seq.::::::::::K004
    -  Manual entries:::::::D
    -  Item Condition:::::::X
    -  Text DetPrc::::::::::04
    2)  Again in V/06, create one more condition type (say ZECT) for Edu.Cess on TCS for which the same values can be maintained as like ZTCS
    3)  Go to OV34, create an Account key for TCS, say ZTC and ZET for Edu.Cess
    4)  Go to VK11, input the condition type ZTCS and maintain the required TCS percentage (the combination which you can maintain is for Sales Org / Dis.Channel / Material or as per the requirement demands you).   Similarly, you have to maintain the required percentage for Edu.Cess also in VK11
    5)  Now go to V/08, create a new pricing procedure exclusively for scrap sales and maintain these two condition types there with respective Account Keys
    thanks
    G. Lakshmipathi

  • To change vendor no for condition types using BAPI_PO_CHANGE

    Hii,
    how to change vendor no for certain condition types using BAPI_PO_CHANGE.
    Is it possible .
    Any parameter is there.
    Plz help urgent
    Title edited by: Alvaro Tejada Galindo on Jun 12, 2008 5:23 PM

    Hi,
       It is possible.
    wa_pocond-vendor_no = wa_konv-lifnr.
    wa_pocondx-vendor_no = 'X'.
       wa_pocond-condition_no = wa_konv-knumv.
        wa_pocond-itm_number = wa_konv-kposn.
        wa_pocond-cond_type = wa_konv-kschl.
        wa_pocondx-condition_no = wa_konv-knumv.
        wa_pocondx-itm_number = wa_konv-kposn.
        wa_pocondx-cond_type = 'X'.
        wa_pocondx-change_id = 'U'.
        APPEND wa_pocondx TO it_pocondx.
        CALL FUNCTION 'BAPI_PO_CHANGE'
          EXPORTING
            purchaseorder                = wa_konv-ebeln
          POHEADER                     =
          POHEADERX                    =
          POADDRVENDOR                 =
          TESTRUN                      =
          MEMORY_UNCOMPLETE            =
          MEMORY_COMPLETE              =
          POEXPIMPHEADER               =
          POEXPIMPHEADERX              =
          VERSIONS                     =
          NO_MESSAGING                 =
          NO_MESSAGE_REQ               =
          NO_AUTHORITY                 =
          NO_PRICE_FROM_PO             =
        IMPORTING
          EXPHEADER                    =
          EXPPOEXPIMPHEADER            =
         TABLES
           return                       = it_return
           poitem                       = it_poitem
           poitemx                      = it_poitemx
          POADDRDELIVERY               =
          POSCHEDULE                   =
          POSCHEDULEX                  =
          POACCOUNT                    =
          POACCOUNTPROFITSEGMENT       =
          POACCOUNTX                   =
          POCONDHEADER                 =
          POCONDHEADERX                =
           pocond                       = it_pocond
           pocondx                      = it_pocondx
          POLIMITS                     =
          POCONTRACTLIMITS             =
          POSERVICES                   =
          POSRVACCESSVALUES            =
          POSERVICESTEXT               =
          EXTENSIONIN                  =
          EXTENSIONOUT                 =
          POEXPIMPITEM                 =
          POEXPIMPITEMX                =
          POTEXTHEADER                 =
          POTEXTITEM                   =
          ALLVERSIONS                  =
          POPARTNER                    =
          POCOMPONENTS                 =
          POCOMPONENTSX                =
          POSHIPPING                   =
          POSHIPPINGX                  =
          POSHIPPINGEXP                =
          POHISTORY                    =
          POHISTORY_TOTALS             =
          POCONFIRMATION               =
        COMMIT WORK AND WAIT.

  • Where to Authorization check for the plant while creating outbound delivery

    Hi Experts,
    For outbound delivery , the standard program is not doing the authorization check .
    Can i use BADI       *LE_SHP_DELIVERY_PROC *        and the method :     DELIVERY_FINAL_CHECK
    To write Authority-check statement ,
    If the particular is not authorized for any of the plants of the items in the outbound delivery i will throw a error message
    Can i use as above?
    And if i use it has to apply only for outbound delivery?Because for inbound delivery also the same BADI is getting triggered?
    Please suggest.
    Regards
    Ramakrishna L

    Hi,
    Yes you can use the said BAdi and the method if it is triggerd before the SAVE of the Outbound Delivery Order to do the Authorisation Check. In case the code is triggered for all the orders and you want only to restrict for the Outbound Delivery, then check for the Delivery Type (LFART) from the Delivery Header table for only the Outbound Delivery Order.
    Thanks,
    Susanth Swain

  • Condition Types used in a particular country

    Hi Experts,
    I am trying to pull a report of changes made to the condition types using VK13. Before doing this, I would like to know what are the condition types used for a particular country. How can I find out the condition types used for a particular country. Please advise.

    Hi Murukan,
    As above said we will not maintain condition record for country,until we select the country in our access sequence.
    You know the changes made to condition type by the table CDHDR and CDPOS
    go to SE16N give the table CDHDR there in TCODE filed give VK12 you will get all changed information regarding that and get the
    value in filed CDHDR - OBJECTID pass the same into CDOPS - OBJECTID you can get specific record information.
    Check and revert
    Regards
    Ram

  • Which table i can use to find out the condition type in PO item ?

    Hello, erveryone. Which table i can use to find out the condition type in PO item ? Thank you.
    Xinzhou.

    hi
    The Table name used to find the Tax Values are
    KOMV: Pricing Communications-Condition Record
    KONV: Conditions (Transaction Data)
    From the above tables you can refer the fields below.
    KAWRT
    KBETR
    for excise check table J_1IEXCHDR for header
    J_1IEXCDTL for item excise
    Fetch the corresponding records based on the field
    KNTYP
    regards
    kunal

  • Selecting the best Price for a condition type but only for some customers

    Hi All,
    I have this situation where we have condition type ZPPR (COPY OF PR00) with 5-6 Condtion tables.
    in Access sequence for ZPPR, we have Exclusion Indicator set for all the conditiona tables so if first price is found, it doesn't search for others.
    Now I have a requirement that we should search for all the condition records and choose the lowest price. But this should happen for only a certain type of customers and not for everybody.
    Spefically we have:
    1. Contract Price
    2. Plant/Material price
    Normally, if contract price is found, it doesn't look for Plant/Mat price but we want to offer our customers(some of them) an option where they could choose the lower of the two price. We set both the prices every day based on some inputs.
    Regards,
    Luke
    Edited by: Lukesh Singla on Dec 21, 2011 8:49 PM

    Hi Luke,
    We have multiple option for this implementation:
    Option 1: If possible based on access sequence. Not sure if this is suitable considering you mentioned that ZPPR has 5-6 access sequence.
    1) Store Contract price in condition type ZPPR and store  Plant / Material Price in new condition type say, ZPPX.
    2) Have separate pricing procedure and determine them based on customer type. In first pricing process XXXX01, configure Condition exclusion with the setting that ZPPX should be deactivated if ZPPR is present, condition exclusion procedure D (exclusive) . In second pricing procedure XXXX02, configure condition exclusion with the setting that compare ZPPX and ZPPR and activate best condition type for the customer by using condition exclusion procedure C (Best condition between two exclusion groups ).
    Option 2:
    1) Copy  ZPPR and its access sequence to a new condition type and access sequence say ZPPX without checking exclusion indicator in the access sequence. In the condition type control for condition type ZPPX >> Master data section >> Reference Condition type = ZPPR so that master data records  need not be duplicated.
    2a) Assign the current procedure to the set of customers which should get the first price. Create a new procedure with condition type ZPPX instead of ZPPR keeping other parameters similar and assign the new procedure to other set of customers who should get the best price.
    OR
    2b) if 2a is difficult in terms of future  maintenance, add condition type ZPPX in the same procedure and create 2 new pricing requirement validating the customer segments and assign them to respective condition type in procedure ZPPR and ZPPX.
    3) Maintain condition exclusion for condition type ZPPX with B ( Best condition within Condition type).
    Hopefully it helps. Let me know if you need any other help in implementation of the solution.
    Regards,
    Naveen Aggarwal

Maybe you are looking for

  • Sound lag when playing games

    Hi, My Z1 compact has sound issues when playing games. There is a noticable sound lag of about a second (not much but is quite annoying), not only on newer games but also on the older ones, Angry Birds for example.  My recorded videos or YouTube don'

  • Free good for a month

    Hi Gurus, Is it possible to give free goods for a period of one month to all customers?? then how? thanks for replying.. harish

  • Multiple Plants in a single SC

    Hello SRM Experts, We working with an SRM 5.0 system - classic scenario. We like to create a SC with two Positions with different plants. The plants and storage locations are correct maintained for the materials in Backend System, but we got followin

  • Editing Image In CS5 32/64 from Elements 9 Still doesn't work!  Why?

    Ever since upgrading from Elements 5 (which worked fine with the various versions of CS5 fine for years) to v7, v8, and for the past 6 months v9 - I cannot reliably use the Edit in Photoshop command from the organizer in elements!!!!!!!!!!!!! I end u

  • Saving scanned documents?

    I consistently save scanned documents into my folders.  With this new Adobe Reader I use ctrl-shift-save to open and save the document.  Before, each time I used ctrl-shift-save it would open up the same folder.  Now it takes me back to the beginning