Non-capital letters in selection criteria

hi,
in infopackage, in selection criteria I want to choose 'j' but not 'J' but system changes it to capital letter in IDoc.
Does somebody knows how to deal with this?
Regards,
Andrzej

hi,
your code was almost ok. I used this:
data: l_idx like sy-tabix.
          read table l_t_range with key
               fieldname = 'VBTYP_N'.
          l_idx = sy-tabix.
         DELETE l_t_range
         WHERE fieldname = 'VBTYP_N'.
          L_t_RANGE-SIGN = 'I'.
          L_t_RANGE-OPTION = 'EQ'.
          L_t_RANGE-LOW = 'h'.
         append l_t_range.
          modify l_t_range index l_idx.
          p_subrc = 0.
thanks
Andrzej
Message was edited by: Aksik

Similar Messages

  • How to convert capital letters to non-capital letters?

    Does anyone know how to do this? Currently, I have a small Widget in Dashboard that I found that does this perfectly, however, its too annoying to have to convert it and then copy & paste it into a Text application (ie. Page or Word).
    I was hoping, no let me rephrase, dreaming that Pages could do so, but I don't think it does; so I was hoping someone can tell me if they know of any programs that I can use that does just that.
    Some great features that I would like, but not necessary, is:
    1) that it allows you to export directly into any applicaiton (ie, Pages or Word)
    2) the ability to convert from non-capital letters (sentences, paragraphs and even pages in bulk) to capital letters.
    Anyone? I would appreciate any feedback, good or bad. Thanks!

    Hi DennisG
    This initially seemed odd to me too.
    I think it is because Pages retains the original Unicode character and regards capitalization as a formatting change - not a change to the character code itself. To illustrate, type the sentence "Dinner is booked for Dennis and Ian on Friday afternoon at 1pm." into Pages. You will notice that as you toggle between All Caps and None for the Capitalization setting, the appropriate case is preserved for things like proper nouns and the start of the sentence. Not a big deal for one sentence but imagine you had hundreds or thousands of sentences that you wanted in the same style and wished to experiment with presenting them in capitals!
    Pages isn't alone in doing this. Microsoft Word on Windows behaves the same way if you select the All caps check box in the Font dialog. Word provides a separate Change Case ... menu option that seems to permanently convert the actual characters instead of their appearance.
    I think it would be useful for Pages to have a similar feature and suggest that Vito submits feedback in the normal manner.
    iMac 17" Flat Panel (OS X 10.4.8)    

  • Script to replace small caps that are typed as capital letters with non-capital letters (A = a, B = b, etc...)

    I'm looking for a way to replace small caps that are typed as capitals by their normal equivalent.
    I've got a text that contains a lot of names which should all be set in small caps.
    In fact they are, but because capital letters are used for first letters they don't scale.
    Short: I would like to be able to look for A, B, C... (in small caps) and replace them with (a, b, c...) in small caps in one go.
    (compare two arrays?? -> is this possible in indesign scripting)

    Hi,
    Actually, it works only with OpenType fonts and - in this case - can be managed by UI find...change feature.
    With other type of font we need a real change of contents (another keyboard hit).
    It could be done with this code (activeDocument is a target):
    -- works for Open Type as well --
    // For Latin Basic (ASCII from 65 to 90)
    // changes a "cap" letter to a "small" letter
    // if Capitalization.SMALL_CAPS is applied to
    app.findGrepPreferences = app.findGrepPreferences = null;
    app.findGrepPreferences.findWhat = "\\u";
    app.findGrepPreferences.capitalization = Capitalization.SMALL_CAPS;
    var
      mSTART = 65, // ASCII number for "A"
      Mstart = 97, // ASCII number for "a"
      mDiff = 0,
      mTarget = app.activeDocument,
      mFound = mTarget.findGrep(),
      len = mFound.length, cString;
    while (len-->0) {
      cString = mFound[len].contents;
      mDiff = cString.charCodeAt(0) - mSTART;
      if (mDiff > -1 && mDiff < 26)
      mFound[len].contents = String.fromCharCode( Mstart + mDiff );
    app.findGrepPreferences = app.findGrepPreferences = null;
    Jarek

  • Change LO Cockpit Initialization Selection Criteria

    We would like to use the 2LIS_12_VCITM DataSource at our organization to report on delivery information.  I am encountering a problem because I would only like to Initialize data pertaining to specific shipping points. 
    The statistical setup does not contain shipping point or any other field I can use to exclude the data I do not want.  If I am forced to do the setup for all data and filter in the update rules my volume & runtime will be unnecessarily large.
    Is there any way to add additional fields to the selection screen ( OLI8BW ) ?
    Thank you!

    Unfortunately none of the delivered selection criteria for the Statistical Setup will eliminate the documents we don't want to include.
    The delivered options are:
    Archiving Session (N/A)
    Sales Org (Doesn't Differentiate as needed)
    Company Code (Doesn't Differentiate as needed)
    Sales Doc # (No specific range that matches requirements)
    Any other suggestions that would allow me to add another field to the selection options?

  • Edit PSA results in CAPITAL letters

    We import data from non-SAP systems and occasionally they contain erroneous data.  We edit the PSA to make the correction and then reload.  Unfortunately we have encountered a side-effect - the character string fields are all converted to capital letters (even though lowercase is allowed).
    Any suggestions on preventing this would be appreciated.
    Ian.

    Hi Ian,
    you can try the following in the start routine of your transfer rules:
    data: l_allowedchar type rsallowchar,
          l_allchar(200) type c,
          l_uppercase type syabcde,
          l_lowercase(26) type c,
          l_strlen type i,
          l_replchar type c value space,
          l_count type i,
          l_index type i.
    select single allowchar into l_allowchar
    from rsallowedchar.
    l_uppercase = sy-abcde.
    translate l_uppercase to upper case.
    l_lowercase = sy-abcde.
    translate l_lowercase to lower case.
    concatenate l_allowedchar l_uppercase l_lowercase '0123456789' into l_allchar.
    loop at datapak into l_s_datapak_line.
    l_index = sy-tabix.
    now, for each field you want to check
    if l_s_datapak_line-<field name> cn l_allchar.
    the field doesn't contain only allowed chars
    l_strlen = strlen(l_s_datapak_line-<field name>.
    l_count = 0.
    do l_strlen times.
    l_count = l_count + 1.
    if l_s_datapak_line-<field name>+l_count(1) na l_allchar.
      l_s_datapak_line-<field name>+l_count(1) = l_replchar.
    endif.
    enddo.
    endif.
    modify datapak from l_s_datapak_line index l_index.
    endloop.
    Please check it carefully, I was writing this just from memory without any abab syntax check ....
    But in general it will replace not allowed characters with space.
    Hope this helps!
    regards
    Siggi

  • Checking for capital letters

    Post Author: billwelsh
    CA Forum: General
    I have a name and address table in an Oracle database (26,000) entries. I would like to produce a simple report printing any records that have the first name,middle name or surname that have been entered as all capitol letters. Any ideas. Should I create a custom function isUpper() if so how do I do this.
    Mant thanks for your help

    Post Author: SKodidine
    CA Forum: General
    1.  File | Report Options | Uncheck the box next to 'Database Server is Case-Insensitive'
    2. For your selection criteria type in:
    ({DATABASE.LNAME} = ucase({DATABASE.LNAME})
    or
    {DATABASE.FNAME} = ucase({DATABASE.FNAME})
    or
    {DATABASE.MNAME} = ucase({DATABASE.MNAME}));
    This should give you only those records where the Last or First or Middle Name is all caps.  The only thing to watch out for would be hyphens in the name.  It might not be a problem but test it.

  • Suppress Printing of Selection Criteria page

    Hi Experts,
    Long shot - is there any way to suppress the printing of the first page summarising the Selection Criteria on printing Management Reports etc?
    Thanks

    You can set the preliminary page to a print layout, that is set (in Document Properties/Page Form / Printer ) to a non-printing printer.
    (There are five preliminary page in the layout designer document type list.)

  • Capital letters issue with 'like'

    Hello
    Maybe it is simple but I cant find solution for this.
    For example I have table pets with column name
    "name" | "category"
    1. Tomcat | cat
    2. tomy | cat
    3. toM | cat
    4. tim | cat
    5. tOmi | cat
    query
    select name from pets where name like '%to%'
    results will give me
    2. tomy
    3. toM
    but i want as results all names wit 'to' no matter if it has capital letters or not
    1. Tomcat
    2. tomy
    3. toM
    5. tOmi
    How should i write this query ?
    please help

    Hi,
    Salski wrote:
    but I also have to remember to convert entered string in inputtext to uppercase as well
    someString.toUpperCase()You can also do that on the back-end, if that's better for you:
    select  name
    from    pets
    where   UPPER (name) like '%' || UPPER (someString) || '%'
    Thanks all for respondGlad to help!

  • My text tool is all in capital letters even though caps lock is off.

    My text tool is all in capital letters even though the caps lock button is off. Also I cannot click on the set fond style button. What seems to be the problem?

    Hi Neale --
    I am having the exact same issue, and it's a problem with any & all fonts I've tried. Of course, my keyboard's CAPS LOCK feature is OFF -- and I've tried many different font styles, nearly all of which allow for standard, non-ALL-CAPS usage.
    I'm intending to use Century Gothic for the work I'm doing right now, but it's been an ongoing issue for at least a few weeks -- but I know I never had an issue with this before recently.  (Note that I typically don't use or need the text tool for most of the photo editing work that I do w/PSE, so I'm not sure how long this has been an issue.)
    In addition, I would like to access other font-setting-related features, like kerning, character spacing, small caps, & other adjustments, etc. -- but I don't see ANYWHERE within the program (or on this forum...or online) how to adjust these relatively standard settings.
    Please help

  • Extraction ignores selection criteria

    I am extracting data from Infotypes in R/3.  I only want the current record, i.e., the one whose ENDDA equals infinity, i.e., 12/31/9999. So given thousands of employee records, I only want to extract one per employee.
    In the Selection tab of the infoPackage, I enter a range that covers around 100 employees, for test purposes; and in the field entitled ENDDA, I enter 12/31/9999.
    When I specify these selection criteria in RSA3 as a test in the source system, I get exactly what I specified, my 100 or so records, each one with ENDDA = 12/31/9999.
    But when I run the extraction in BW, it pulls in almost 900 records, with every record for each employee. 
    What can I do to exclude the non-infinity records??
    And why are these records pulled when selection criteria does not specify them?

    Thanks guys for the answers, but I have indeed tried every way possible to enter these selection values, in the first field for ENDDA, and in both the ‘from’ and ‘to’ fields.
    Also, I tried entering 99991231, but hitting the ‘Check’ button reverts it back to the proper format of 12/31/9999; I did check the debugger option while testing it in RSA3, and indeed internally ‘ENDDA’ has the value ‘99991231’.
    I tried starting the infoObject with no PERNR values, with only the infinity date as selection, but the job bombed. Why does it work in RSA3, but not when invoked with an RFC? From BW ?
    I have tried every way possible, and I still get a boatload of records for each employee, when all I want is the one with an infinity date of 12/31/9999.

  • Momentarily stops working when shift key is used to type in capital Letters

    I've been using Firefox for an year, when ever I try to use shift key to google something or type something in capital letters firefox momentarily stops and resumes after 45-60 seconds..!
    I'm using the latest version of firefox 23.0.1 but, the problem still persists.

    Hello,
    Try disabling graphics hardware acceleration. Since this feature was added to Firefox, it has gradually improved, but there still are a few glitches.
    You might need to restart Firefox in order for this to take effect, so save all work first (e.g., mail you are composing, online documents you're editing, etc.).
    Then perform these steps:
    *Click the orange Firefox button at the top left, then select the "Options" button, or, if there is no Firefox button at the top, go to Tools > Options.
    *In the Firefox options window click the ''Advanced'' tab, then select "General".
    *In the settings list, you should find the ''Use hardware acceleration when available'' checkbox. Uncheck this checkbox.
    *Now, restart Firefox and see if the problems persist.
    Additionally, please check for updates for your graphics driver by following the steps mentioned in the following Knowledge base articles:
    * [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]]
    * [[Upgrade your graphics drivers to use hardware acceleration and WebGL]]
    Did this fix your problems? Please report back to us!
    Thank you.

  • Iphoto shows two photo libraries with the same name, one in small letters the other in all capital letters. they both open the same library and the only one in my computer. How do delete the capital letrs one as the one in the pictures folder is in

    In my  iPhoto application when I select switch libraries It shows 2 libraries with the same name, but one has the name is in Capital letters.
    They both open the same library which is in the Pictures folder. This is the only library I can see and the name is not in capital letters?
    How do I get rid of the one in capital letters

    What is your iPhoto version?
    when I select switch libraries It shows 2 libraries with the same name, but one has the name is in Capital letters.
    In the Library Chooser Panel look for the pathes to the two duplicate libraries. You will see the location of the libraries in the path bar at the bottom of the window when you select one of the libraries. Does it show both libraries in the same folder?

  • Selection Criteria With Plant , And Reading File

    Guys,
    I have a selection criteria with fields SAP Plant, and a filepath to read a file. File will be containing fields like legacy plant,material, date,description etc as records. Upon user executes after giving the SAP Plants (which has low and high limit ie select-option) and filepath.
    The program should first convert the SAP Plants to Legacy Plants and Read only those file contents where the legacy plant in file matches the converted legacy plants and other non matching plant file records ignored. Please suggest and gimme a sample code.
    Shawn

    Hi Shawn,
    Naimesh i think this would help shawn, i have given u a sample code who to work around in a easy way.Guys comment on the program if u feel something i miss
    Report Z_File_Example.
    Type:Begin of ty_tab1
               zlegacy_plant type zplant-zlegacy_plant
            End of ty_tab1.
    Type : Begin of ty_tab2
    include fields similar to input file     
                   legacy_plant(4) type c ,
                   no type mara-matnr,
                   descripion type mara-mkty,
              End of ty_tab2.
    Data : out_tab1 type standard table of ty_tab1,
              wa1 type ty_tab1.
    Data : out_tab2 type standard table of ty_tab2,
              wa2 type ty_tab2.
    Select-options : s_plant like mara-werks.
    AT SELECTION-SCREEN ON END OF S_PLANT.
       LOOP AT S_PLANT.
    Select query  takes both the lower limit and high in where condition to select 
    legacy plant from the table and populate the Work area and later to internal table.
    Conversion of SAP Plant to  Legacy Plant
          Select ZLegacy_Plant
              into corresponding fields of wa1
          from Zplant where werks in S_plant
         append wa1 to out_tab1
    ENDLOOP.
    ***After reading a file using ws_upload , which gives an output in say out_tab2(internal table)
    Call WS_UPLOAD
    ****We can iterate through the out_tab2 (shown below)
    loop at out_tab2 into wa2 where legacy_plant in wa1-zlegacy_plant
       Process those records as u want
    end loop.
    Thanks

  • Selection Criteria addition-Not working

    Hi!
    I have this report wherein I need to add two fields VBAP-Kunnr and knvv-konda in the selection screen so that I can do my drill down or search criteria based upon these two selections also apart from the existing ones, but unfortunately I am unable to get throiugh this and somehow putting this two selections in the selection criteria its not taking any effect or its just actinga  dummy selection and I am unale to drill down my report based upon those. Can anyone have a look and let me know what could be the problem please. Help would be highly appreciated.
    Thanks
    *& Include ZSD_PFGENERATETOP Report ZSD_PFGENERATE
    REPORT zsd_pfgenerate LINE-SIZE 170 LINE-COUNT 65.
    TABLES: lips, likp, vbap, vbak, vbrp, vbpa, vbrk.
    CONSTANTS: cns_vgtyp TYPE vbrp-vgtyp VALUE 'J',
    cns_intyp TYPE vbrk-vbtyp VALUE 'M',
    cns_vkorg TYPE vbak-vkorg VALUE 'CA01',
    cns_vkorg_US type vbak-vkorg value 'US01', "DEVK903521
    cns_parsh TYPE vbpa-parvw VALUE 'WE',
    cns_parsp TYPE vbpa-parvw VALUE 'AG',
    cns_parre type vbpa-parvw value 'RE', "bill-to
    cns_auzwp TYPE vbak-auart VALUE 'ZWP',
    cns_auzct TYPE vbak-auart VALUE 'ZCT',
    cns_auzif TYPE vbak-auart VALUE 'ZIF',
    cns_auztm TYPE vbak-auart VALUE 'ZTM',
    cns_fkff TYPE vbrk-fkart VALUE 'ZFF5',
    cns_fkos TYPE vbrk-fkart VALUE 'ZOF5',
    cns_upd(1) TYPE c VALUE 'S',
    cns_mode(1) TYPE c VALUE 'N'.
    Internal Tables and Work Areas
    DATA: BEGIN OF it_vbpos OCCURS 0,
    werks TYPE vbap-werks,
    audat TYPE vbak-audat,
    auart TYPE vbak-auart,
    kunag TYPE vbak-kunnr,
    name1_ag TYPE kna1-name1,
    kunsh TYPE likp-kunnr,
    name1_sh TYPE kna1-name1,
    vbeln TYPE vbak-vbeln,
    posnr TYPE vbap-posnr,
    vbdel TYPE likp-vbeln,
    psdel TYPE lips-posnr,
    kunre type kunre, "Bill-to Party
    name1_re type kna1-name1, "Bill-to Party Name
    END OF it_vbpos,
    BEGIN OF it_vbpos_temp OCCURS 0,
    vgbel TYPE lips-vgbel,
    vgpos TYPE lips-vgpos,
    vbeln TYPE vbak-vbeln,
    posnr TYPE vbap-posnr,
    END OF it_vbpos_temp,
    BEGIN OF it_report OCCURS 0,
    werks TYPE vbap-werks,
    vbeln TYPE vbak-vbeln,
    vbdel TYPE likp-vbeln,
    audat TYPE vbak-audat,
    auart TYPE vbak-auart,
    name1_ag TYPE kna1-name1,
    name1_sh TYPE kna1-name1,
    name1_re type kna1-name1, "Bill-to Party Name
    mark(1) TYPE c,
    END OF it_report,
    BEGIN OF it_vbeln OCCURS 0,
    vbeln TYPE vbak-vbeln,
    END OF it_vbeln,
    wa_vbeln LIKE LINE OF it_vbeln,
    wa_vbpos LIKE LINE OF it_vbpos,
    wa_report LIKE LINE OF it_report,
    wa_sel LIKE LINE OF it_report.
    DATA: it_vbrp type table of vbrp,
    it_vbrk type table of vbrk.
    BDC Variables
    DATA: BEGIN OF bdc_tab OCCURS 0.
    INCLUDE STRUCTURE bdcdata.
    DATA: END OF bdc_tab.
    DATA: wa_bdc LIKE LINE OF bdc_tab,
    it_bdcmess TYPE TABLE OF bdcmsgcoll.
    *& Selection-Screen definition
    SELECTION-SCREEN BEGIN OF BLOCK block2 WITH FRAME TITLE text-002.
    PARAMETERS: p_rdff TYPE c RADIOBUTTON GROUP rad1 DEFAULT 'X',
    p_rdos TYPE c RADIOBUTTON GROUP rad1.
    SELECTION-SCREEN END OF BLOCK block2.
    SELECTION-SCREEN BEGIN OF BLOCK block0 WITH FRAME TITLE text-000.
    SELECT-OPTIONS: s_werks FOR vbap-werks OBLIGATORY NO INTERVALS,
    s_auart FOR vbak-auart,
    s_kunag FOR vbak-kunnr, "Sold-to Party
    s_kunnr FOR likp-kunnr, "Ship-to Party
    s_kunre for vbak-kunnr, "Bill to Party
    s_vdatu FOR vbak-vdatu OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK block0.
    SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE text-001.
    PARAMETERS: p_vgbel TYPE vbak-vgbel.
    SELECTION-SCREEN END OF BLOCK block1.
    selection-screen begin of block block3 with frame title text-003.
    parameters: p_billed RADIOBUTTON GROUP r1,
    p_delvd RADIOBUTTON GROUP r1 default 'X',
    p_all RADIOBUTTON GROUP r1.
    selection-screen end of block block3.
    *& Include ZSD_PFGENERATEE01
    START-OF-SELECTION.
    PERFORM read_report.
    END-OF-SELECTION.
    SET PF-STATUS 'STAT1000'.
    IF it_vbpos[] IS INITIAL.
    MESSAGE s999(z001) WITH 'No Data Selected for this criteria'.
    ELSE.
    PERFORM show_report.
    ENDIF.
    *& List Events
    AT USER-COMMAND.
    CASE sy-ucomm.
    WHEN 'SELE'.
    LOOP AT it_report INTO wa_report.
    wa_report-mark = 'X'.
    MODIFY it_report FROM wa_report.
    ENDLOOP.
    PERFORM show_report.
    WHEN 'DSEL'.
    LOOP AT it_report INTO wa_report.
    wa_report-mark = ''.
    MODIFY it_report FROM wa_report.
    ENDLOOP.
    PERFORM show_report.
    ENDCASE.
    AT LINE-SELECTION.
    DO.
    READ LINE sy-index FIELD VALUE wa_report-mark wa_report-vbeln
    wa_report-vbdel.
    IF sy-subrc NE 0.
    EXIT.
    ELSE.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    input = wa_report-vbeln
    IMPORTING
    output = wa_report-vbeln.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    input = wa_report-vbdel
    IMPORTING
    output = wa_report-vbdel.
    READ TABLE it_report INTO wa_sel
    WITH KEY vbeln = wa_report-vbeln.
    IF sy-subrc EQ 0.
    wa_sel-mark = wa_report-mark.
    MODIFY it_report FROM wa_sel INDEX sy-tabix.
    ENDIF.
    ENDIF.
    ENDDO.
    REFRESH: it_vbeln.
    LOOP AT it_report INTO wa_report WHERE mark EQ 'X'.
    CASE 'X'.
    WHEN p_rdff.
    wa_vbeln = wa_report-vbdel.
    WHEN p_rdos.
    wa_vbeln = wa_report-vbeln.
    ENDCASE.
    APPEND wa_vbeln TO it_vbeln.
    ENDLOOP.
    SORT it_vbeln BY vbeln.
    DELETE ADJACENT DUPLICATES FROM it_vbeln.
    IF NOT it_vbeln[] IS INITIAL.
    PERFORM process_vf01.
    ENDIF.
    *& Include ZSD_PFGENERATEF01
    *& Form read_report
    Routine to read applicable orders from database
    FORM read_report.
    DATA: lwa_lips TYPE lips,
    lc_vbeln TYPE vbrk-vbeln.
    Retrieve sales orders based on selection criteria where billing doc has not been
    created for the delivery yet
    REFRESH: it_vbeln, it_vbpos, it_report.
    Select into table based on Onsite/Fixed Facility
    CASE 'X'.
    WHEN p_rdff.
    changed for performance reasons (i.e. time-out)
    k~vgbel is not in it_vbpos but was in select statment ?
    SELECT vbap~werks vbak~audat vbak~auart vbak~kunnr AS kunag
    vbak~vbeln vbap~posnr
    INTO CORRESPONDING FIELDS OF TABLE it_vbpos
    FROM vbak INNER JOIN vbap
    ON vbak~mandt = vbap~mandt
    AND vbak~vbeln = vbap~vbeln
    WHERE vbap~werks IN s_werks
    AND vbak~vdatu IN s_vdatu
    AND vbak~vkorg in (cns_vkorg,cns_vkorg_US)
    AND vbap~oid_ship IN s_kunnr
    AND vbak~kunnr IN s_kunag
    AND vbak~auart IN s_auart
    AND ( vbak~auart = 'ZWP' or vbak~auart = 'ZIF' or
    vbak~auart = 'ZCT' or vbak~auart = 'ZTM' or
    vbak~auart = 'ZOIL' ).
    IF SY-SUBRC = 0.
    SELECT vgbel vgpos vbeln posnr FROM lips
    INTO CORRESPONDING FIELDS OF TABLE it_vbpos_temp
    FOR ALL ENTRIES IN it_vbpos
    WHERE vgbel = it_vbpos-vbeln
    AND vgpos = it_vbpos-posnr
    %_hints oracle 'index ("LIPS" "LIPS~Z01")'.
    SORT it_vbpos_temp by vgbel vgpos.
    LOOP AT it_vbpos.
    READ TABLE it_vbpos_temp
    WITH KEY vgbel = it_vbpos-vbeln vgpos = it_vbpos-posnr
    BINARY SEARCH.
    IF SY-SUBRC = 0.
    it_vbpos-vbdel = it_vbpos_temp-vbeln.
    it_vbpos-psdel = it_vbpos_temp-posnr.
    modify it_vbpos.
    ENDIF.
    ENDLOOP.
    ENDIF.
    WHEN p_rdos.
    SELECT k~vbeln p~posnr k~kunnr AS kunag k~audat k~auart p~werks k~vgbel
    INTO CORRESPONDING FIELDS OF TABLE it_vbpos
    FROM vbak AS k INNER JOIN vbap AS p ON k~vbeln = p~vbeln
    WHERE p~werks IN s_werks AND k~vdatu IN s_vdatu AND
    k~vkorg in (cns_vkorg,cns_vkorg_US) AND "DEVK903521
    k~vgbel EQ p_vgbel AND
    k~kunnr IN s_kunag AND k~auart IN s_auart AND
    p~oid_ship IN s_kunnr.
    ENDCASE.
    Determine if delivery has been billed out, if not can create PF Invoice - CHANGED
    LOOP AT it_vbpos INTO wa_vbpos.
    Check Ship-to in
    SELECT SINGLE kunnr INTO wa_vbpos-kunsh FROM vbpa
    WHERE parvw EQ cns_parsh AND vbeln EQ wa_vbpos-vbeln.
    IF sy-subrc NE 0.
    DELETE TABLE it_vbpos FROM wa_vbpos.
    CONTINUE.
    ENDIF.
    Check for Bill-to
    select single kunnr into wa_vbpos-kunre from vbpa
    where parvw eq cns_parre and vbeln eq wa_vbpos-vbeln
    and kunnr in s_kunre.
    IF sy-subrc NE 0.
    DELETE TABLE it_vbpos FROM wa_vbpos.
    CONTINUE.
    ENDIF.
    Get Partner Texts
    SELECT SINGLE name1 INTO wa_vbpos-name1_ag FROM kna1
    WHERE kunnr EQ wa_vbpos-kunag.
    SELECT SINGLE name1 INTO wa_vbpos-name1_sh FROM kna1
    WHERE kunnr EQ wa_vbpos-kunsh.
    SELECT SINGLE name1 INTO wa_vbpos-name1_re FROM kna1
    WHERE kunnr EQ wa_vbpos-kunre.
    CASE 'X'.
    WHEN p_rdff.
    IF p_delvd = 'X'.
    optimized for performance reasons i.e. time-out
    Check if delivery has been billed out
    SELECT SINGLE k~vbeln INTO lc_vbeln
    FROM vbrp AS p INNER JOIN vbrk AS k ON p~vbeln = k~vbeln
    WHERE p~vgtyp EQ cns_vgtyp AND p~vgbel EQ wa_vbpos-vbdel AND
    p~vgpos EQ wa_vbpos-psdel AND k~vbtyp EQ cns_intyp AND
    k~fksto NE 'X'.
    refresh: it_vbrp, it_vbrk.
    select vbeln from vbrp
    into corresponding fields of table it_vbrp
    where vgtyp = cns_vgtyp and vgbel = wa_vbpos-vbdel
    and vgpos = wa_vbpos-psdel
    %_hints oracle 'index ("VBRP" "VBRP~Z01")'.
    if sy-subrc = 0.
    sort it_vbrp by vbeln.
    delete adjacent duplicates from it_vbrp comparing vbeln.
    select vbeln from vbrk
    into corresponding fields of table it_vbrk
    for all entries in it_vbrp
    where vbeln = it_vbrp-vbeln
    and vbtyp = cns_intyp and fksto 'X'.
    IF sy-subrc EQ 0.
    DELETE TABLE it_vbpos FROM wa_vbpos.
    CONTINUE.
    ENDIF.
    endif.
    ELSEIF p_billed = 'X'.
    Check if delivery hasn't been billed out
    SELECT SINGLE k~vbeln INTO lc_vbeln
    FROM vbrp AS p INNER JOIN vbrk AS k ON p~vbeln = k~vbeln
    WHERE p~vgtyp EQ cns_vgtyp AND p~vgbel EQ wa_vbpos-vbdel AND
    p~vgpos EQ wa_vbpos-psdel AND k~vbtyp EQ cns_intyp AND
    k~fksto NE 'X'.
    refresh: it_vbrp, it_vbrk.
    select vbeln from vbrp
    into corresponding fields of table it_vbrp
    where vgtyp = cns_vgtyp and vgbel = wa_vbpos-vbdel
    and vgpos = wa_vbpos-psdel
    %_hints oracle 'index ("VBRP" "VBRP~Z01")'.
    if sy-subrc = 0.
    sort it_vbrp by vbeln.
    delete adjacent duplicates from it_vbrp comparing vbeln.
    select vbeln from vbrk
    into corresponding fields of table it_vbrk
    for all entries in it_vbrp
    where vbeln = it_vbrp-vbeln
    and vbtyp = cns_intyp and fksto 'X'.
    IF sy-subrc NE 0.
    DELETE TABLE it_vbpos FROM wa_vbpos.
    CONTINUE.
    ENDIF.
    endif.
    ENDIF.
    WHEN p_rdos.
    IF p_delvd = 'X'.
    Check if order has been billed out
    SELECT SINGLE * FROM vbrp
    WHERE vbeln EQ wa_vbpos-vbeln AND
    vgpos EQ wa_vbpos-posnr.
    IF sy-subrc EQ 0.
    DELETE TABLE it_vbpos FROM wa_vbpos.
    CONTINUE.
    ENDIF.
    ELSEIF p_billed = 'X'.
    Check if delivery hasn't been billed out
    SELECT SINGLE k~vbeln INTO lc_vbeln
    FROM vbrp AS p INNER JOIN vbrk AS k ON pvbeln = kvbeln
    WHERE pvgtyp EQ cns_vgtyp AND pvgbel EQ wa_vbpos-vbdel AND
    pvgpos EQ wa_vbpos-psdel AND kvbtyp EQ cns_intyp AND
    k~fksto NE 'X'.
    refresh: it_vbrp, it_vbrk.
    select vbeln from vbrp
    into corresponding fields of table it_vbrp
    where vgtyp = cns_vgtyp and vgbel = wa_vbpos-vbdel
    and vgpos = wa_vbpos-psdel
    %_hints oracle 'index ("VBRP" "VBRP~Z01")'.
    if sy-subrc = 0.
    sort it_vbrp by vbeln.
    delete adjacent duplicates from it_vbrp comparing vbeln.
    select vbeln from vbrk
    into corresponding fields of table it_vbrk
    for all entries in it_vbrp
    where vbeln = it_vbrp-vbeln
    and vbtyp = cns_intyp and fksto 'X'.
    IF sy-subrc NE 0.
    DELETE TABLE it_vbpos FROM wa_vbpos.
    CONTINUE.
    ENDIF.
    endif.
    ENDIF.
    ENDCASE.
    MOVE-CORRESPONDING wa_vbpos TO wa_report.
    APPEND wa_report TO it_report.
    MODIFY it_vbpos FROM wa_vbpos.
    ENDLOOP.
    if 'onsite field summary', then process by release sales orders
    IF p_rdos = 'X'.
    sort it_report by vbeln.
    delete adjacent duplicates from it_report comparing vbeln.
    else.
    SORT it_report BY werks name1_ag name1_sh vbeln.
    DELETE ADJACENT DUPLICATES FROM it_report.
    endif.
    SORT it_report BY name1_sh werks name1_ag vbeln.
    ENDFORM. " read_report
    *& Form process_vf01
    Call transaction VF01 and fill screen table with order values
    FORM process_vf01.
    DATA: ln_index(2) TYPE n,
    lc_field(20) TYPE c,
    lc_fkart TYPE vbrk-fkart,
    li_lines TYPE i,
    lc_msgtxt(99) TYPE c,
    lwa_bdcoptions TYPE ctu_params,
    lwa_mess LIKE LINE OF it_bdcmess.
    REFRESH: it_bdcmess.
    lwa_bdcoptions-dismode = cns_mode.
    lwa_bdcoptions-updmode = cns_upd.
    CASE 'X'.
    WHEN p_rdff.
    lc_fkart = cns_fkff.
    WHEN p_rdos.
    lc_fkart = cns_fkos.
    ENDCASE.
    REFRESH: bdc_tab.
    PERFORM update_bdc USING: 'X' 'SAPMV60A' '0102',
    ' ' 'BDC_CURSOR' 'RV60A-FKART',
    ' ' 'RV60A-FKART' lc_fkart,
    ' ' 'BDC_OKCODE' '/00'.
    LOOP AT it_vbeln INTO wa_vbeln.
    ln_index = sy-tabix.
    Up to the second delivery of the BDC add the Delivery to the screen, after that click the More Documents for every entry. logic changed for DEVK902353
    CASE ln_index.
    WHEN 1.
    CONCATENATE 'KOMFK-VBELN' '(' ln_index ')' INTO lc_field.
    PERFORM update_bdc USING: ' ' lc_field wa_vbeln.
    WHEN 2 OR 3.
    IF p_rdos 'X'.
    CONCATENATE 'KOMFK-VBELN' '(' ln_index ')' INTO lc_field.
    PERFORM update_bdc USING: ' ' lc_field wa_vbeln,
    'X' 'SAPMV60A' '0102',
    ' ' 'BDC_OKCODE' 'FKAN'..
    ELSE.
    CONCATENATE 'KOMFK-VBELN' '(' ln_index ')' INTO lc_field.
    PERFORM update_bdc USING: ' ' lc_field wa_vbeln.
    ENDIF.
    WHEN OTHERS.
    If p_rdos 'X'.
    CONCATENATE 'KOMFK-VBELN' '(2)' INTO lc_field.
    PERFORM update_bdc USING: ' ' lc_field wa_vbeln,
    'X' 'SAPMV60A' '0102',
    ' ' 'BDC_OKCODE' 'FKAN'.
    endif.
    ENDCASE.
    ENDLOOP.
    VF01 will go to a different screen if only one line selected
    DESCRIBE TABLE it_vbeln LINES li_lines.
    IF li_lines EQ 1.
    PERFORM update_bdc USING: 'X' 'SAPMV60A' '0104',
    ' ' 'BDC_OKCODE' '=SICH'.
    ELSE.
    PERFORM update_bdc USING: 'X' 'SAPMV60A' '0102',
    ' ' 'BDC_OKCODE' '=SICH'.
    ENDIF.
    CALL TRANSACTION 'VF01' USING bdc_tab OPTIONS FROM lwa_bdcoptions
    MESSAGES INTO it_bdcmess.
    WRITE: / 'BDC Messages:'.
    SKIP.
    LOOP AT it_bdcmess INTO lwa_mess.
    CALL FUNCTION 'RH_MESSAGE_GET'
    EXPORTING
    arbgb = 'VF'
    msgnr = lwa_mess-msgnr
    msgv1 = lwa_mess-msgv1
    msgv2 = lwa_mess-msgv2
    msgv3 = lwa_mess-msgv3
    msgv4 = lwa_mess-msgv4
    IMPORTING
    msgtext = lc_msgtxt
    EXCEPTIONS
    message_not_found = 1
    OTHERS = 2.
    WRITE: /5 lc_msgtxt.
    ENDLOOP.
    ENDFORM. " process_vf01
    form update_bdc *
    subroutine to add the data to the bdc table for trans. vf01 *
    FORM update_bdc USING dynpro field content.
    CLEAR bdc_tab.
    IF dynpro EQ 'X'.
    bdc_tab-program = field.
    bdc_tab-dynpro = content.
    bdc_tab-dynbegin = 'X'.
    ELSE.
    bdc_tab-fnam = field.
    bdc_tab-fval = content.
    ENDIF.
    APPEND bdc_tab.
    ENDFORM. "UPDATE_BDC
    *& Form show_report
    Report to Display Available Orders on Screen
    FORM show_report .
    DATA: l_idx TYPE i.
    WRITE: / 'Available Orders/Deliveries for Plant:'.
    LOOP AT s_werks.
    WRITE: s_werks-low.
    ENDLOOP.
    SKIP.
    FORMAT INTENSIFIED ON COLOR COL_HEADING.
    WRITE: /5 text-h01, text-h02.
    CASE 'X'.
    WHEN p_rdff.
    WRITE: text-h06.
    ENDCASE.
    WRITE: text-h03, text-h04, text-h05, text-h07,
    / sy-uline.
    FORMAT INTENSIFIED OFF COLOR OFF.
    l_idx = 0.
    LOOP AT it_report INTO wa_report.
    IF l_idx EQ 0.
    FORMAT COLOR COL_NORMAL INTENSIFIED ON.
    l_idx = 1.
    ELSE.
    FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
    l_idx = 0.
    ENDIF.
    WRITE: / wa_report-mark AS CHECKBOX,
    wa_report-auart UNDER text-h01,
    wa_report-vbeln UNDER text-h02.
    CASE 'X'.
    WHEN p_rdff.
    WRITE: wa_report-vbdel UNDER text-h06.
    ENDCASE.
    WRITE: wa_report-audat UNDER text-h03,
    wa_report-name1_ag UNDER text-h04,
    wa_report-name1_sh UNDER text-h05,
    wa_report-name1_re under text-h07.
    HIDE: wa_report-mark, wa_report-vbeln, wa_report-vbdel.
    ENDLOOP.
    ENDFORM. " show_report
    Thanks for your kind help.
    Aarav.

    Hi, Anne-Marie;
    You may be running into a common issue that is docuemented here:
    [SelectionFormula|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233303334333833393335%7D.do]
    Regards,
    Jonathan
    Edited by: Jonathan Parminter on Mar 16, 2009 8:03 AM

  • Report for Sales and purchase tax (selection criteria-Tax code)

    Hi
    I have one query for sales tax details which gives me detail for all A/R invoices and taxes involved in it. But i want that while executing query system should ask tax code and gives detail of tax amount in front of item and invoice according to tax code selected.
    The query is:
    SELECT M.DocNum AS 'Inv.No ', M.DocDate as 'Date', M.CardName as 'Customer Name',L.Dscription,L.Quantity,L.Price, (Select Sum(LineTotal) FROM INV1 L Where L.DocEntry=M.DocEntry) as 'Base Amt.(Rs.)', (SELECT Avg(TaxRate) FROM INV4 where statype=1 and DocEntry=M.DocEntry) as ' VAT % ', (SELECT Sum(TaxSum) FROM INV4 where statype=1 and DocEntry=M.DocEntry) as ' VAT (Rs.) ', (SELECT Avg(TaxRate) FROM INV4 where statype=4 and DocEntry=M.DocEntry) as ' CST % ', (SELECT Sum(TaxSum) FROM INV4 where statype=4 and DocEntry=M.DocEntry) as ' CST (Rs.) ', (SELECT Avg(TaxRate) FROM INV4 where statype=7 and DocEntry=M.DocEntry) as ' TAXEXEMPT % ', (SELECT Sum(TaxSum) FROM INV4 where statype=7 and DocEntry=M.DocEntry) as ' TAXEXEMPT ', (SELECT Avg(TaxRate) FROM INV4 where statype=8 and DocEntry=M.DocEntry) as ' VAT% ', (SELECT Sum(TaxSum) FROM INV4 where statype=8 and DocEntry=M.DocEntry) as 'VAT12.5 ', (SELECT Avg(TaxRate) FROM INV4 where statype=9 and DocEntry=M.DocEntry) as ' CST 2% ', (SELECT Sum(TaxSum) FROM INV4 where statype=9 and DocEntry=M.DocEntry) as ' CST @2 ', (SELECT Avg(TaxRate) FROM INV4 where statype=11 and DocEntry=M.DocEntry) as ' CENVCST % ', (SELECT Sum(TaxSum) FROM INV4 where statype=11 and DocEntry=M.DocEntry) as ' CENVCST ', (SELECT Avg(TaxRate) FROM INV4 where statype=-90 and DocEntry=M.DocEntry) as ' BED % ', (SELECT Sum(TaxSum) FROM INV4 where statype=-90 and DocEntry=M.DocEntry) as ' BED ', (SELECT Avg(TaxRate) FROM INV4 where statype=-60 and DocEntry=M.DocEntry) as ' Cess% ', (SELECT Sum(TaxSum) FROM INV4 where statype=-60 and DocEntry=M.DocEntry) as ' Cess ', (SELECT Avg(TaxRate) FROM INV4 where statype=-55 and DocEntry=M.DocEntry) as ' HCess % ', (SELECT Sum(TaxSum) FROM INV4 where statype=-55 and DocEntry=M.DocEntry) as ' Hcess ', L.LineTotal as 'Row Total (Rs.)',M.DocTotal as 'Doc Total' FROM OINV M LEFT OUTER JOIN INV1 L on L.DocEntry=M.DocEntry LEFT OUTER JOIN INV4 T on T.DocEntry=L.DocEntry and L.LineNum=T.LineNum LEFT OUTER JOIN INV5 J ON M.DocEntry = J.AbsEntry LEFT OUTER JOIN INV3 Q ON M.DocEntry = Q.DocEntry WHERE (M.DocDate >= '[%0]' AND M.DocDate <= '[%1]') AND TargetType ! = 14 GROUP BY M.DocNum,M.DocDate,M.CardName,M.NumAtCard,M.DocEntry,M.DiscSum,M.WTSum,L.Dscription,L.Quantity,L.Price,L.LineTotal,M.DocTotal ORDER BY M.DocNum,M.DocDate,M.CardName,M.NumAtCard,M.DocEntry,M.DiscSum,M.WTSum,L.Dscription,L.Quantity,L.Price,L.LineTotal,M.DocTotal
    I want 2 queries which asks tax code during selection criteria for both cases sales and purchase.

    Hi Malhotra,
    Try this,
    1st remove the FROM/TO Doc. Date where Condition in your Query report.
    AND add the below where condition in your Query report.
    WHERE statype = '[%0]'
    OR
    Try this Query Report.
    SELECT
    M.DocNum as 'A/R Invoice No.',
    M.DocDate as 'Inv. Date',
    M.CardCode as 'Customer Code',
    M.CardName as 'Customer Name',
    M.NumAtCard as 'Bill No. & Date',
    ISNULL(L.ItemCode,'Service Item') as 'Item Code',
    L.Dscription,
    L.Quantity,
    L.LineTotal,
    L.TaxCode,
    L.[VatSum],
    M.WTSum AS 'TDS (Rs.)',
    M.DocTotal as 'Total (Rs.)'
    FROM OINV M
    LEFT OUTER JOIN INV1 L on L.DocEntry=M.DocEntry
    LEFT OUTER JOIN INV4 T on T.DocEntry=L.DocEntry and L.LineNum=T.LineNum
    LEFT OUTER JOIN INV5 J ON M.DocEntry = J.AbsEntry
    LEFT OUTER JOIN INV3 Q ON M.DocEntry = Q.DocEntry
    WHERE
    (M.DocDate >= '[%0]' AND M.DocDate <= '[%1]')
    AND
    L.TaxCode='[%2]'
    GROUP BY
    M.DocNum,M.DocDate,M.CardCode,M.CardName,M.NumAtCard,L.ItemCode,L.Dscription,L.Quantity,
    L.LineTotal,M.DocEntry,M.[DiscSum],L.TaxCode,L.[VatSum],M.WTSum,M.DocTotal
    ORDER BY
    M.DocNum,M.DocDate,M.CardCode,M.CardName,M.NumAtCard,L.ItemCode,L.Dscription,L.Quantity,
    L.LineTotal,M.DocEntry,M.[DiscSum],L.TaxCode,L.[VatSum],M.WTSum,M.DocTotal
    Regards,
    Madhan.

Maybe you are looking for