Restrict number of characters in table field for select statement.

SELECT * FROM table
                WHERE  column1  = z-column.
The field column1 is of  type char and size 20
The field z-column is of type char size 10.
how do we perform this select?
Anyone can guide me?
Edited by: Hadesfx on Sep 11, 2009 3:56 PM
Edited by: Hadesfx on Sep 11, 2009 3:59 PM

Hello,
In your OP did you mention this? Please be specific when you post the next time.
Can you please post your code?
I think you have to try a work around:
DATA:
RS_STOCKID TYPE SELOPT,
RT_STOCKID TYPE STANDARD TABLE OF SELOPT.
LOOP AT GT_ZB1PUT_STOCKTMP.
RS_STOCKID-SIGN = 'I'.
RS_STOCKID-OPTION = 'EQ'.
RS_STOCKID-LOW = GT_ZB1PUT_STOCKTMP-STOCKID.
APPEND RS_STOCKID TO RT_STOCKID.
CLEAR RS_STOCKID.
ENDLOOP.
You can use this RANGE table to SELECT data from the table.
SELECT * FROM zb1xxt_param
            FOR ALL ENTRIES IN gt_zb1put_stocktmp[]
            WHERE zzcode    = 'DEV036'
            AND   zzdomain  = 'SD'
            AND   zzdata    = 'INBOUND'
            AND   zzinput1  = 'STOCKID'
            AND   zzinput2  IN RT_STOCKID. "Use RT_STOCKID for SELECT'ing data
BR,
Suhas

Similar Messages

  • Problem accessing TABLE fields in SELECT statement

    Hi,
    We are currently using Oracle Database 10.2.0.2.0.
    In the following code, using a function to access TABLE fields works, but not when accessing the table fields directly (in the latter case, I get a no data found exception).
    Why is that?
    Thanks for your help.
    Olivier
    PS: I do have a lengthy explanation of why we would want to do that as well as the full packages, etc... But I didn't want to bore you to no end.
    I'll post it if required.
    CREATE OR REPLACE PACKAGE PA_TEST_DEVTBL AS
       TYPE TBL_ROLCODE IS TABLE OF LANROLE.ROLCODE%TYPE INDEX BY BINARY_INTEGER;
       TYPE TBL_ROLLABEL IS TABLE OF LANROLE.ROLLABEL%TYPE INDEX BY BINARY_INTEGER;
    end PA_TEST_DEVTBL;
    CREATE OR REPLACE PACKAGE BODY PA_TEST AS
       -- Array containing the selected data
       TblRolCode PA_TEST_DEVTBL.TBL_ROLCODE;
       TblRolLabel PA_TEST_DEVTBL.TBL_ROLLABEL;
       -- Functions created to retrieve each array data
       FUNCTION F_GET_ROLCODE( nIndex NUMBER ) RETURN LANROLE.ROLCODE%TYPE IS
       BEGIN
          RETURN TblRolCode( nIndex );
       END F_GET_ROLCODE;
       FUNCTION F_GET_ROLLABEL( nIndex NUMBER ) RETURN LANROLE.ROLLABEL%TYPE IS
       BEGIN
          RETURN TblRolLABEL( nIndex );
       END F_GET_ROLLABEL;
       PROCEDURE S_TEST (
    -- THIS DOESN'T WORK (ORA-01403: no data found)
    OPEN cReturn FOR
    SELECT TblRolCode( ROWNUM ),
    TblRolLabel( ROWNUM )
    FROM TABLE( CAST( tblRows AS T_TBL_NUMBER ) );
    -- BUT THIS WORKS !!!
    OPEN cReturn FOR
    SELECT F_GET_ROLCODE( ROWNUM ) AS ROLCODE,
    F_GET_ROLLABEL( ROWNUM ) AS ROLLABEL
    FROM TABLE( CAST( tblRows AS T_TBL_NUMBER ) );
    ..

    well it could be managed by simple HTML tags or simple javascript properties and events itself...
    All you have to do is encode URL and pass it as the request parameters to the next page.
    Checkout a simple example down below.
    MainTable.jsp:
    ============
    <table>
    <thead>
    <tr>
    </tr>
    </thead>
    <tbody>
    <c:forEach var="DTOBean" items="${request.dbList}">
      <tr>
         <td><c:out value="${DTOBean.rowId}"/></td>
         <td onClick="window.location.href='/testpage.jsp?col2='+escape('<c:out value="${DTOBean.col2}"/>')+'&col3='+escape('<c:out value="${DTOBean.col3}"/>'); " ><c:out value="${DTOBean.col1"/></td>
        <!-- or try with to work with simple hyperlink
          <td><a href="# " onclick="window.location.href='/testpage.jsp?col2='+escape('<c:out value="${DTOBean.col2}"/>')+'&col3='+escape('<c:out value="${DTOBean.col3}"/>');"><c:out value="${DTOBean.col1"/></a></td>
        -->
          <td><c:out value="${DTOBean.col2"/></td>
          <td><c:out value="${DTOBean.col3"/></td>
      </tr>
    </c:forEach>
    </tbody>
    </table>
    --------------------------------------------------testpage.jsp:
    ==========
    Column2 : <c:out value="${param.col2}"/>
    Column3 : <c:out value="${param.col3}"/>
    --------------------------------------------------Hope that might help.
    REGARDS,
    RaHuL

  • What is the table field for PO releaser in R/3 (4.7 Enterprise)?

    Hi Gurus out there:
    Do you know if there is a table field for PO releaser in R/3 (4.7 Enterprise)?
    We use for e.g. the transaction ME29N to release a PO and I haven't been able to find a DB table where the PO releaser is stored.
    In DB table EKKO I can find the fields FRGGR (Release group), FRGSX (Release strategy), FRGKE (Release Indicator), FRGZU (Release status) and FRGRL (Release Not Yet Completely Effected) but no information of the user who released the PO.
    Many thanks in advance.
    /hw

    Hi
    <b>Have you tried reading the details of the PO Releaser using the BAPIs ?</b>
    BAPI_PO_GETRELINFO
    BAPI_PO_GETITEMSREL
    BAPI_PO_GETITEMSREL            List Purchase Orders for Release (Approval): New as of 4.0A     
    BAPI_PO_GETRELINFO             Display Detailed Release (Approval) Information on Purchase Order
    BAPI_PO_RELEASE                Release Purchase Orders            
    BAPI_PO_RESET_RELEASE          Cancel Release of Purchase Orders  
    <u>Related link -></u>
    Re: How to fetch data from back end for PO?
    Hope this will help.
    Do let me know.
    Regards
    - Atul

  • Incomplete Control Deliveries add new table-field for Incompleteness Proced

    Incompletion Control for Deliveries add a new table-field for Incompleteness Procedure G (Delivery header)
    Hello,
    I'm trying to add a new field for Incompleteness Procedure G (Delivery header), but  when I try to customize the procedure G with new fields, I donu2019t find the field that I need  ModeOfTrnsprt-Border (EIKP-EXPVZ).
    Foreign Trade/Customs tables are not included like an option for new entries in the customizing of Incompleteness Procedure G, and Iu2019ve to prevent that users save the outbound delivery without entry a valid value for  EIKP-EXPVZ (EIKP-EXPVZ= ModeOfTrnsprt-Border).
    Otherwise, when users are creating the SD Invoice there is an error for create the Accounting document because Foreign Trade/Customs information is incomplete.
    So Iu2019d like to know If is possible to add a new tables ( and fields)  to use in the customizing for Incompleteness Procedure for Outbound Deliveries (procedure G).
    Thanks!!
    Edited by: Ariana Serrano Aguila on Sep 2, 2010 5:19 PM

    Hello,
    I'm trying to add a new field for Incompleteness Procedure G (Delivery header)
    , but when I try to customize the procedure G with new fields, I donu2019t find the
    field that I need ModeOfTrnsprt-Border (EIKP-EXPVZ).
    See as far as the table is concerned, the basic reason why it is not getting populated as SAP stores the possible values at the domain level. So i think the right approach to add the table would be to get access key for the domain and then add the new table name at domain level. Please reach out for help from ABAPer in this matter.
    You can also use User exit to met this requirement and the appropriate user exit will be as below:
    1.MV50AFZL
    2. MV50AFZ1
    Regards,
    Sarthak

  • Table field for PO releaser in R/3 (4.7 Enterprise)

    Hi Gurus out there:
    Do you know if there is a table field for PO releaser in R/3 (4.7 Enterprise)?
    We use for e.g. the transaction ME29N to release a PO and I haven't been able to find a DB table where the PO releaser is stored.
    In DB table EKKO I can find the fields FRGGR (Release group), FRGSX (Release strategy), FRGKE (Release Indicator), FRGZU (Release status) and FRGRL (Release Not Yet Completely Effected) but no information of the user who released the PO.
    Many thanks in advance.
    /hw

    Meanwhile I have found a solution to this problem:
    CONCATENATE sy-mandt <ekko-ebeln> INTO tabkey.
    SELECT SINGLE * FROM cdpos
    WHERE objectclas = 'EINKBELEG'
    AND objectid = <ekko-ebeln>
    AND tabname = 'EKKO'
    AND tabkey = tabkey
    AND fname = 'FRGKE'
    AND chngind = 'U'
    AND value_new = '1'. " PO has been released
    IF sy-subrc = 0.
    SELECT SINGLE username
    FROM cdhdr
    INTO po_releaser
    WHERE objectclas = 'EINKBELEG'
    AND objectid = oitab-ebeln
    AND changenr = cdpos-changenr.
    ENDIF.

  • TABLE/FIELD FOR SALES ORDER'S SHIP TO LOCATION

    Hi everyone,
    Does anyone tell me what is the related tables/fields for Sales Order's Ship To Location? Since I want to display the Ship To Location information in the Oracle Report in Oracle Apps R11i.
    I tried to use the following SQL select statement to retrieve the Ship to address:-
    -- SHIP TO LOCATION
    select a.address_id, c.customer_name, C.CUSTOMER_ID, A.SITE_USE_ID from ra_Site_uses_all a, ra_addresses_all b, ra_customers c
    where a.site_use_code = 'SHIP_TO' and
    a.status = 'A' and
         b.address_id = a.address_id and
         c.CUSTOMER_ID = b.CUSTOMER_ID and
         b.status = 'A' and
         c.customer_id in (select customer_id from ra_customers) and
         c.status = 'A' and
         c.customer_name like 'CLARION (H.K.)%'
    But I found that the data is BILL TO address. Can anyone help me? Thanks.

    Hi all, I managed to solve my problem. Here's the query in case someone need it. Thanks
    SELECT party.party_name "Send to" (SELECT party.party_name
    FROM hz_cust_site_uses_all bill_su,
    hz_cust_acct_sites_all bill_cas,
    hz_party_sites bill_ps,
    hz_locations bill_loc,
    hz_parties party,
    oe_order_headers_all h
    WHERE h.invoice_to_org_id = bill_su.site_use_id
    AND bill_su.cust_acct_site_id = bill_cas.cust_acct_site_id
    AND bill_cas.party_site_id = bill_ps.party_site_id
    AND bill_loc.location_id = bill_ps.location_id
    AND bill_cas.party_site_id = bill_ps.party_site_id
    AND bill_ps.party_id = party.party_id
    AND h.order_number = 'your_order_number') "Invoice to"
    FROM oe_order_headers_all h,
    hz_cust_site_uses_all ship_su,
    hz_cust_acct_sites_all ship_cas,
    hz_party_sites ship_ps,
    hz_locations ship_loc,
    hz_parties party
    WHERE h.ship_to_org_id = ship_su.site_use_id
    AND ship_cas.party_site_id = ship_ps.party_site_id
    AND ship_su.cust_acct_site_id = ship_cas.cust_acct_site_id
    AND ship_cas.party_site_id = ship_ps.party_site_id
    AND ship_ps.party_id = party.party_id
    AND ship_loc.location_id = ship_ps.location_id
    AND h.order_number = 'your_order_number';

  • Table Field for total value release in Contract agreements

    Hi Gurus,
    Please tell me the table field for release in contract agreements. It is showing a structure field RM06E-GSABW, which does not have any associated table.
    Please let me know if any other way to get the same information.
    Thanks,
    Shibaji.

    Hi Shibaji,
    you may try in the respective delivery LIPS-NETWR. Or check the where-used-list of data element NETWR.
    Regards,
    Clemens

  • Fields for Selection on selection screen - Data Dictionary

    Hi,
    I have an issue while selecting the required fields for selection on the Standard table.
    VBAK --> Settings > Fields for Selection> Select required fields and save it as a variant.
    It looks good for that day but it again changes to the standard selection fields on the selection screen.
    Is there any way that i can keep the Fields for selection on the selection screen ?
    Any suggestion will be appreciated!
    Regards,
    Kittu

    Hi Kittu,
    The SE16 tool generates Selection Screens automatically for the Table and chosen fields therein the user selects. Unfortunately the tool is User Independent, thus other users can change the fields for selection thus rendering any Variants created useless. This is because of internal numbering identifiers for fields instead of field names making up the variant. SE16 has always being regarded as a development tool hence its limited functionality.
    I however may suggest that you could utilise ABAP Queries instead by way of transaction SQ01/SQ02 or SQVi. These may offer you a better solution.
    Best of luck,
    Derrick Hurley
    ABAP Development Workbench
    SAP
    Edited by: Derrick Hurley on Mar 31, 2011 4:01 PM
    Edited by: Derrick Hurley on Mar 31, 2011 4:01 PM

  • How to display the selection screen fields for selected checkboxes

    Hi all,
             I have 7 checkboxes, for each check box we have some seletion screen fields.if i select first check box,i want to display first slection screen fields only.
    and if we select more than one check box how to display the selection screen fields for selected check boxes,please help me this
    Thanks
    sriman.

    hi,
    Try this code
    report z_13317_sdn2.
    tables : mara, marc, dd03l.
    parameters : p_chk1 as checkbox user-command ABC,
                 p_chk2 as checkbox user-command PQR,
                 p_chk3 as checkbox user-command XYZ.
    select-options : s_matnr for mara-matnr modif id A,
                     s_ersda for mara-ersda modif id A,
                     s_werks for marc-werks modif id B,
                     s_lvorm for marc-lvorm modif id B,
                     s_tab for dd03l-tabname modif id C.
    data: v_chk1,
          v_chk2,
          v_chk3.
    at selection-screen output.
      loop at screen.
        if screen-group1 = 'A' or
           screen-group1 = 'B' or
           screen-group1 = 'C'.
            screen-input = 0.
           modify screen.
        endif.
      endloop.
      loop at screen.
        if v_chk1 = 'X'.
          if screen-group1 = 'A'.
            screen-input = 1.
            modify screen.
          endif.
        endif.
        if v_chk2 = 'X'.
          if screen-group1 = 'B'.
            screen-input = 1.
            modify screen.
          endif.
        endif.
        if v_chk3 = 'X'.
          if screen-group1 = 'C'.
            screen-input = 1.
            modify screen.
          endif.
        endif.
      endloop.
    at selection-screen.
      if sy-ucomm = 'ABC'.
        if v_chk1 = ' '.
          v_chk1 = 'X'.
        else.
          v_chk1 = ' '.
        endif.
      endif.
      if sy-ucomm = 'PQR'.
        if v_chk2 = ' '.
          v_chk2 = 'X'.
        else.
          v_chk2 = ' '.
        endif.
      endif.
      if sy-ucomm = 'XYZ'.
        if v_chk3 = ' '.
          v_chk3 = 'X'.
        else.
          v_chk3 = ' '.
        endif.
      endif.
    Regards,
    Sailaja.

  • "vbuk" fields for selection

    Hi experts,
    we could check the status of the sales documents in VBUK table.
    if i want to check the status of the sales documents basing on sales organization. when i check the fields for selection " sales org" not avaiable.
    how to add sales org field in selection screen.
    please guide me how to go about it.
    Thanks in advance

    Hi,
    use SQVI (quick viewer) to join tables VBUK and VBAK (here you´ll find sales organization).
    Regards,
    JM

  • Field for selection-generic data source

    Hi All,
    I have created a generic datasource with 4 fields from VBPA table the fields are
    VBELN
    PARVW
    PERNER
    POSNR
    and set the delta based on VBELN.
    My client want all the fields for slection in RSA3.
    Now in RSA3 except VBLN all fields are available for selection.
    I tried to select the VBLN field in RSA6 there i can see the selection box is disabled.
    Could any one please let me know how i enable this field for selection
    Many thanks in advance and pls respond to this as it is very urgent
    Thanks
    S VR

    Hi..
    Check whether any one had collected this extractor in Transport.. which is why its in display mode...
    And also.. get into change mode in RSA6 for ur DS and then check if u can see that check box is enabled for u?
    Let us know the details..
    Thanks
    Hope this helps

  • How to use bind variable value for table name in select statement.

    Hi everyone,
    I am having tough time to use value of bind variable for table name in select statement. I tried &p37_table_name. ,
    :p37_table_name or v('p37_table_name) but none worked.
    Following is the sql for interactive report:
    select * from v('p37_table_name') where key_loc = :P37_KEY_LOC and
    to_char(inspection_dte,'mm/dd/yyyy') = :P37_INSP_DT AND :p37_column_name is not null ;
    I am setting value of p37_table_name in previous page which is atm_state_day_insp.
    Following is error msg:
    "Query cannot be parsed, please check the syntax of your query. (ORA-00933: SQL command not properly ended) "
    Any help would be higly appreciated.
    Raj

    Interestingly enough I always had the same impression that you had to use a function to do this but found out from someone else that all you need to do is change the radio button from Use Query-Specific Column Names and Validate Query to Use Generic Column Names (parse query at runtime only). Apex will substitute your bind variable for you at run-time (something you can't normally do in pl/sql without using dynamic sql)

  • How to get a Field for Selection in 8 Datasource

    Hello All,
    We have a scenario where in we need to change the Generated Export Datasource (8Z******) and check one more field for Selection, so that it appears in the Data Selection tab in InfoPackage.
    But I am not able to do that. I tried to change the transfer Structure for the same but to no luck. I also tried to change the Data Source in RSA6, but even that dint helped.
    In Ideal cases it should have taken all the Characteristic fields as Selection when the Export DS is generated, but for this particular case it took only 6 fields by default. I need to have one more field.
    Can anyone help me with this..??
    NOTE: We are working on 2004s.
    Regards
    Rohit Rakhan

    Hi,
    for Export DataSources, you can only use selections for Full-Update mode, when using the 3.x functionalities.
    But in 2004s, you can assign selections in your DTP.
    So the you'll export via export DataSource into the PSA and then perform selections via DTP onto the PSA-Data.
    hth
    Cheers
    Sven

  • Is it Possible to join 4 or more tables in a Select Statement?

    Hello guys,
    Can I do Inner Join 4 or 5 tables in a select statement?

    U HAVE  TO SERCH  FOR  KEY FIELD  FOR THAT . MEANS   HOW  TABELS  ARE RELATED EACH OTHE  FOR THIS  U  ALSO USE SQ02
    FOR  EXAMPLE
    SELECT        bkpf~belnr
                    bkpf~gjahr
                    bkpf~bukrs
                    bkpf~blart
                    bkpf~bldat
                    bkpf~budat
                    bkpf~usnam
                    bkpf~tcode
                    bkpf~xblnr
                    bsik~lifnr
                    bsik~bupla
                    bsik~secco
              INTO  CORRESPONDING FIELDS OF TABLE itab_pur
              FROM bkpf INNER JOIN bsik
              ON   bkpfbelnr = bsikbelnr
               and  bkpfbukrs = bsikbukrs
               WHERE    bkpf~bukrs  IN co_code
               AND      bkpf~budat  IN pos_dt
               AND      bkpf~tcode  IN t_code
               AND      bsik~secco  IN se_code.
      U CAN  ALSO ADD   MORE TABLE BASED  ON CONDITION

  • How to join THREE different tables into internal table using one select statement .

    How to join THREE different tables into internal table using one select statement .
    Hi experts,
    I would like to request your guidance in solving the problem of joining the data from three different database tables into one internal table
    Scenario:
    Database tables:
    SPFLI
    SFLIGHT
    SBOOK.
    Table Fields:
    SPFLI - CARRID CONNID COUNTRYFR CITYFRM COUNTRYTO CITYTO
    SFLIGHT - CARRID CONNID FLDATE SEATSMAX SEATSOCC SEATSMAX_C
    SEATSOCC_C SEATSMAX_F SEATSOCC_F
    SBOOK - CARRID CONNID CLASS
    MY INTERNAL TABLE IS IT_XX.
    Your help much appreciated.
    Thanks in advance.
    Pawan.

    Hi Pawan,
    please check below codes. hope it can help you.
    TYPES: BEGIN OF ty_xx,
            carrid     TYPE spfli-carrid   ,
            connid     TYPE spfli-connid   ,
            countryfr  TYPE spfli-countryfr,
            cityfrom   TYPE spfli-cityfrom  ,
            countryto  TYPE spfli-countryto,
            cityto     TYPE spfli-cityto   ,
            fldate     TYPE sflight-fldate ,
            seatsmax   TYPE sflight-seatsmax ,
            seatsocc   TYPE sflight-seatsocc ,
            seatsmax_b TYPE sflight-seatsmax_b,
            seatsocc_b TYPE sflight-seatsocc_b,
            seatsmax_f TYPE sflight-seatsmax_f,
            seatsocc_f TYPE sflight-seatsocc_f,
            class      TYPE sbook-class,
          END OF ty_xx,
          t_xx TYPE STANDARD TABLE OF ty_xx.
    DATA: it_xx TYPE t_xx.
    SELECT spfli~carrid
           spfli~connid
           spfli~countryfr
           spfli~cityfrom
           spfli~countryto
           spfli~cityto
           sflight~fldate
           sflight~seatsmax
           sflight~seatsocc
           sflight~seatsmax_b
           sflight~seatsocc_b
           sflight~seatsmax_f
           sflight~seatsocc_f
           sbook~class
      INTO TABLE it_xx
      FROM spfli INNER JOIN sflight
      ON spfli~carrid = sflight~carrid
      AND spfli~connid = sflight~connid
      INNER JOIN sbook
      ON spfli~carrid = sbook~carrid
      AND spfli~connid = sbook~connid.
    Thanks,
    Yawa

Maybe you are looking for

  • Sharing preferences bad???

    Hi; Something is up with file sharing on my computer, part of a home network of 5. I've always had file sharing turned 'on' on this computer and others could log in if they were adminstrators. Now, all of a sudden they can't log in any more. They get

  • Wacky Drag and Drop issue with JNLP

    I'm sure I'll have to be a bit more descriptive but I'll just throw this out and see if anyone has any suggestions. I've got a swing app which is an administration tool to a rules engine I have built. I distribute the app to users using JNLP 1.2. Her

  • QUERY EXPLAIN_PLAN

    Hello GURUS I am on 10.2.0.2.0. I am sorry for big query. It is running really slow. Also please look at the explain plan I am trying to fix the problem but still the same, runnig slow. THE SS_SKU_STORE_WEEK is big table with aroundf 1 million rows,

  • Extended Classic Scenario not creating backend PO

    Hi All We are just starting with SRM (Using SRM 5.0 SRM Server 5.5) and trying to decide to use Classic or Extended Classic. I can get the Classic working were an approved SC creates a backend PO without any problem. However when I switch on Extended

  • V Urgent : Debugging an RFC function Module in another R/3 system

    Hi All I have a function module in a R/3 system ( say WB1 ) and i am calling it from another R/3 system (say WD1) . Both have their RFC destinations set up as trusted system mutually . However when i try to debug that FM while in WD1 ( which basicall