Field ranges

Hi Gurus!
In my program I ahve a selection screen which allows us to enter data and then
on executing the program it inserst or updates or shows data already exists .
There are 3 field sin the selection screen which allows a numberic value
which can be put there and insert that into the table which it uploads.
These there fields have a range of between 0-10, 00-99, and 00-zz, so
any values in between the range showuld only get inserted bewteen these range .
But when I put anything beyond this range its till inserts it into the table
which is wrong. Should I specify the range for all these fields in my selection
or initialize thos e field with the numbers or teher is something els
ethat I need to do.
selection-screen  begin of block 3 with frame title text-003. " DLS.
parameters:
  pa_zlsd      type zsds_uwi-zlsd modif id g1,      " Location SubDivision.
  pa_zsec      type zsds_uwi-zsec modif id g1,      " Section.
  pa_ztwp      type zsds_uwi-ztwp modif id g1,      " Township.
  pa_zrang    type zsds_uwi-zrange modif id g1,     " Range.
  pa_zmeri     type zsds_uwi-zmeridian modif id g1. " Meridian.
selection-screen  end of block 3.
start-of-selection.
  if pa_dls = cl_abap_typedescr=>true.
    select single * from zwell_dls where
      bukrs     = pa_bukrs and
      land1     = pa_land1 and
      regio     = pa_regio and
      zss       = '1'      and
      zle       = pa_zle   and
      zlsd      = pa_zlsd  and
      zsec      = pa_zsec  and
      ztwp      = pa_ztwp  and
      zrange    = pa_zrang and
      zmeridian = pa_zmeri and
      zevent    = pa_zeven and
      ztype     = 'W'.
Thanks
Aarav

Thanks it works but one thing has stopped , there are two radiobuttons which controil a third selection screen , when first is selected a particluar selection screen comes and when second another comes into play , unfortunatley the second one is  onmot popping out at all and gives me the error messhe for the second insted.
PARAMETERS:
  pa_bukrs TYPE bukrs DEFAULT '1000',
  pa_land1 TYPE kna1-land1 DEFAULT 'CA' OBLIGATORY,         " Land1.
  pa_regio TYPE kna1-regio DEFAULT 'AB' OBLIGATORY, " Region.
  pa_zle      TYPE zdt_zle DEFAULT '00' OBLIGATORY, " Location Exception Code.
  pa_zeven    TYPE zsds_uwi-zevent DEFAULT '00'.    " Event Sequence.
SELECTION-SCREEN  END OF BLOCK 1.
SELECTION-SCREEN  BEGIN OF BLOCK 2 WITH FRAME TITLE text-002. " Mode.
PARAMETERS:
  pa_dls TYPE c RADIOBUTTON GROUP g1
  DEFAULT 'X' USER-COMMAND shift,               " DLS
  pa_nts TYPE c RADIOBUTTON GROUP g1.           " NTS
SELECTION-SCREEN  END OF BLOCK 2.
SELECTION-SCREEN  BEGIN OF BLOCK 3 WITH FRAME TITLE text-003. " DLS.
PARAMETERS:
  pa_zlsd      TYPE zsds_uwi-zlsd MODIF ID g1,      " Location SubDivision.
  pa_zsec      TYPE zsds_uwi-zsec MODIF ID g1,      " Section.
  pa_ztwp      TYPE zsds_uwi-ztwp MODIF ID g1,      " Township.
  pa_zrang    TYPE zsds_uwi-zrange MODIF ID g1,     " Range.
  pa_zmeri     TYPE zsds_uwi-zmeridian MODIF ID g1. " Meridian.
SELECTION-SCREEN  END OF BLOCK 3.
SELECTION-SCREEN  BEGIN OF BLOCK 4 WITH FRAME TITLE text-004. " NTS.
PARAMETERS:
  pa_zqu       TYPE zsds_uwi-zqu   MODIF ID g2 ,   " Quarter Unit.
  pa_zunit     TYPE zsds_uwi-zunit MODIF ID g2 ,   " Unit.
  pa_zbloc    TYPE zsds_uwi-zblock MODIF ID g2,    " Block.
  pa_zshee    TYPE zsds_uwi-zsheet MODIF ID g2,    " Sheet.
  pa_zmusu    TYPE zsds_uwi-zmusub MODIF ID g2,    " Map Unit Subdivision.
  pa_zmaps     TYPE zsds_uwi-zmapsheet MODIF ID g2.
SELECTION-SCREEN  END OF BLOCK 4.
AT SELECTION-SCREEN OUTPUT.
*-Screen grouping for DLS/NTS
  IF pa_dls = 'X'.
    LOOP AT SCREEN.
      CHECK screen-group1 = 'G2'.
      screen-active = 0.
      MODIFY SCREEN.
    ENDLOOP.
  ELSE.
    LOOP AT SCREEN.
      CHECK screen-group2 = 'G1'.
      screen-active = 0.
      MODIFY SCREEN.
    ENDLOOP.
  ENDIF.
AT SELECTION-SCREEN.
* Check whether region entered is applicable for the survey system selected.
  IF pa_dls = 'X'.
    IF pa_regio NE 'AB' AND pa_regio NE 'MB'
    AND pa_regio NE 'SK' AND pa_regio NE 'BC'.
      MESSAGE e010(zsd).
    ENDIF.
    if pa_zlsd not between 00 and 16 .
      message e044(zsd) .
    elseif pa_zsec not between  00 and 36.
      message e045(zsd) .
    elseif pa_ztwp not between 000 and 126.
      message e046(zsd) .
    elseif pa_zrang  not between 00 and 34.
      message e047(zsd) .
    elseif pa_zmeri not between 00 and 06.
      message e048(zsd) .
    endif.
*endif.
*endif.
  ELSE.
    IF pa_regio NE 'BC'.
      MESSAGE e008(zsd).
    ENDIF.
     if pa_zqu not between 'A' and 'D'.
        message e049(zsd).
      elseif pa_zunit not between 0001 and 126.
        message e050(zsd).
      elseif pa_zbloc not between 'A' and 'L'.
        message e051(zsd).
      elseif pa_zshee not between 001 and 100.
        message e052(zsd).
      elseif pa_zmusu not between 'A' and 'P'.
        message e053(zsd).
      elseif pa_zmaps not between 01 and 16.
        message e054(zsd).
*endif.
*endif.
endif.
  ENDIF.
Thanks

Similar Messages

  • Values from field range

    how to obtain all values in field range of domain?

    Hello,
    YOu can find those values in table DD07L
    Regards
    Naimesh

  • How to restrict field range in selection screen in adhoc report

    Hi Experts,
    I have created one adhoc report in which i have to restrict region values range when i searched for particular company code.is it possible to restrict in adhoc report.
    For example when i searched for particular company code US the values in region gets restricted automatically to US country itself.
    Thanks&Regards,
    narasimha.

    Hi,
    how to restrict  region list to particular company code in Adhoc report.Could you please explain it in brief .
    Regards,
    narasimha.

  • Custom Date field range

    Hi
    I have 3 date fields in my view.
    what i need is
    for example
    My First date field i am selecting 1st January 2008
    Second date field i am selecting 10th January 2008
    in my third date field calendar should enable only in between that 2 dates.remaining dates are disable.
    How to dothis? pls reply ASAP.
    regards,
    Gobinath

    Hi,
    I dont think it is possible, just go through the following link
    [Disabling dates in the past]
    Regards
    Raghu

  • Error adding custom field in POWL

    Hi all,
    I've added a custom field in POWL for SC.
    The problem is when I fill this custom field and push the search button an error is displayed:
    "Last query refresh failed due to internal errors; contact your admin."
    I've seen there is a short dump in st22. SAPSQL_INVALID_FIELDNAME
    I've seen that the select statement is being built dynamically (include LBBP_PDF80).
    Within the conditions of the where clause is adding a line with the correct value but is adding another senseless line .
    In the custom fields range is always adding a line like this; LOW = space OPTION = CP.
    I don't know why. The problem is in the form GETLIST_CUF_ADD_LINE.
    If I delete this second condition in debug mode is working fine.
    I've tried to find some OSS note but I couldn't find any...
    This are the steps I've followed to add the custom field in POWL:
    - Add the field to structure /SAPSRM/S_SEARCHFIELDS. (with the same name that it have in st. INCL_EEW_PD_HEADER_CSF_SC )
    - Add the field in view /SAPSRM/V_SRC_CR.
    - Add the field in DB criteria in the transaction /SAPSRM/POWL_CUST.
    - Use the report POWL_D01 for refresh the query.
    Do you know what can be the problem?
    Thanks in advance.

    Which version of SRM are you using ?
    Pls. check the attached note, which describes the similar problem :
    [Note 1555113 - Dump occurs when searching for customer fields|https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1555113]

  • FM parameters with RANGES

    Hi!
    I would like to create an FM in SE37. I would like to pass a RANGE to it, as an Import or Tables parameter.
    As a result, I would like to retrieve also a RANGE, as an Exporting or Table parameter.
    Unfortunately I don't know, what kind of TYPE do I have to use for ranges in the paramteres?
    Thank you
    Tamá

    as mentioned in the table section put the parameter there with like
    for many fields range structures already exist like
    BUKR_RANGE
    AUFNR_RANG
    TYPE_KOKRS_RANGE
    search in se11 for structures which contain you're fieldname to find if its already there otherwise define a new structure where the low and high field reference to you're field
    I made for instance an catst status structure for this
    name structure: zcats_status_range
    component  type component
    SIGN     SIGN_RANGE
    OPTION     OPT_RANGE
    LOW     CATSSTATUS
    HIGH     CATSSTATUS
    reward if usefull ofcourse
    arthur
    Message was edited by:
            A. de Smidt

  • 'Components' table field for TCODE - 'COOIS'

    Could any one help from which table the following fields are pulled from for the standard transaction ‘COOIS’? For ‘Component’ in List selection field.
    Requirement Quantity
    Quantity Withdrawn
    Requirement Date
    Thanks

    If you are just looking for the table and field names, you can park your cursor on the field in question and hit F1.  So for instance, if you parked your cursor on the Required Date field range and hit F1, you would see this information:
    IOOPCOMP-BDTER ==  Required Date

  • How to Created custom report for Ship not Billed (SD/FI)?

    Hi all,
    I am anticipating  to write some abap reports..Here is one of them..
    Anyone can help  me with writing a Report , how to do 'Custom Report for shipped not Billed(SD/FI)' ..But since I am new to Abap , if you wish to reply, please use a little more detail and simple explanation, step by step so I can understand what is the idea, how it can be acheived...what kind of report should be used , techniques, tables etc...:)
    Appreciate your help!
    Regards,
    Boby

    Hi Boby,
    You need to create custom transaction to achive these results.
    you will have selection-screen ,it would be :
    Date : Here date would be mandatory  - Ranges Option
    Customer  - Optional field - Ranges
    Order #  Sales Order (Optional) Ranges
    Invoice #  - Invoice # (Optional) Ranges
    You will get the data based on ur selection-screen criteria ...
    First you will have customer order details from diffrent table
    VBAK,
    VBAP,
    LIKP
    LIPS
    VBRK,
    VBRP
    KNA1,
    VBFA Tables ( See the my sample program )
    Output would be :
    Customer #   Custome Name    Order #   Delivery #   Invoice #   Netpr, Netquantity ,
    Check the condition  whether invoice table has VBRK-RFBSK  = ''.
    See the my sample program : This is sales report by monthly..
    REPORT ZFDSALES_REPORT no standard page heading
                           message-id zwave.
    Data Declaration Part
    TYPE-POOLS
    type-pools : slis.
    Tables
    tables : VBAK,
             VBAP.
    Internal table for VBAK Table
    data : begin of i_vbak occurs 0,
           vbeln like vbak-vbeln,
           bstnk like vbak-bstnk,
           vdatu like vbak-vdatu,
           end of i_vbak.
    Internal table for VBAP and MATNR
    data : begin of i_vbap occurs 0,
           vbeln like vbap-vbeln,
           matnr like vbap-matnr,
           kdmat like vbap-kdmat,
           kwmeng like vbap-kwmeng,
           netpr like vbap-netpr,
           maktx like makt-maktx,
           end of i_vbap.
    Internal tables
    data : begin of i_sales occurs 0,
           vdatu like vbak-vdatu,
           bstnk like vbak-bstnk,
           matnr like vbap-matnr,
           maktx like makt-maktx,
           kdmat like vbap-kdmat,
           kwmeng like vbap-kwmeng,
           netpr  like vbap-netpr,
           end of i_sales.
    Variable for ALV
    data : v_repid like sy-repid,
           gt_fieldcat    type slis_t_fieldcat_alv.
    Selection-screen
    selection-screen : begin of block blk with frame title text-001.
    select-options : s_vbeln for vbak-vbeln,
                     s_erdat for vbak-erdat,
                     s_ernam for vbak-ernam,
                     s_vdatu for vbak-vdatu obligatory,
                     s_BSTNK for vbak-BSTNK,
                     s_KUNNR for vbak-kunnr,
                     s_matnr for vbap-matnr,
                     s_KDMAT for vbap-KDMAT.
    selection-screen : end of block blk.
    Initilization
    initialization.
      v_repid = sy-repid.
    S T A R T  -  O F  -  S E L E C T I O N ****************
    start-of-selection.
    Get the data from VBAK and VBAP Tables
      perform get_vbak_vbap.
    E N D  -  O F  -  S E L E C T I O N *****************
    end-of-selection.
    Display the data
      perform dispolay_data.
    *&      Form  get_vbak_vbap
          Get the data from VBAK and VBAP Table
    FORM get_vbak_vbap.
    Get the data from VBAK Table
      select vbeln bstnk vdatu from vbak into table i_vbak
                         where vbeln in s_vbeln
                         and   bstnk in s_bstnk
                         and   vdatu in s_vdatu
                         and   kunnr in s_kunnr
                         and   erdat in s_erdat
                         and   ernam in s_ernam.
      if sy-subrc ne 0.
        message e000(zwave) with 'No data found for given selection'.
      endif.
    Get the data from VBAP Table
      select avbeln amatnr akdmat akwmeng a~netpr
             b~maktx into table i_vbap
             from vbap as a inner join makt as b on bmatnr = amatnr
             for all entries in i_vbak
             where a~vbeln in s_vbeln
             and   a~kdmat in s_kdmat
             and   a~abgru = space
             and   a~matnr in s_matnr
             and   a~matnr ne '000000000000009999'
             and   a~matnr ne '000000000000004444'
             and   a~matnr ne '000000000000008888'
             and   a~matnr ne '000000000000001111'
             and   a~werks = '1000'
             and   b~spras = 'E'
             and   a~vbeln = i_vbak-vbeln.
      if sy-subrc ne 0.
        message e000(zwave) with 'No data found for given selection'.
      endif.
      sort i_vbak by vbeln.
      sort i_vbap by vbeln matnr.
      loop at i_vbap.
        read table i_vbak with key vbeln = i_vbap-vbeln
                                binary search.
        if sy-subrc eq 0.
          i_sales-bstnk = i_vbak-bstnk.
          i_sales-vdatu = i_vbak-vdatu.
          i_sales-matnr = i_vbap-matnr.
          i_sales-kdmat = i_vbap-kdmat.
          i_sales-maktx = i_vbap-maktx.
          i_sales-netpr = i_vbap-netpr.
          i_sales-kwmeng = i_vbap-kwmeng.
          append i_sales.
        else.
          continue.
        endif.
        clear : i_sales,
                i_vbap,
                i_vbak.
      endloop.
      sort i_sales by vdatu bstnk matnr.
      refresh : i_vbap,
                i_vbak.
    ENDFORM.                    " get_vbak_vbap
    *&      Form  dispolay_data
          Display the data
    FORM dispolay_data.
    Fill the Fiedlcat
      PERFORM fieldcat_init  using gt_fieldcat[].
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                =
      I_BUFFER_ACTIVE                   = ' '
          I_CALLBACK_PROGRAM                = v_repid
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = ' '
      I_CALLBACK_TOP_OF_PAGE            = ' '
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
      IS_LAYOUT                         =
          IT_FIELDCAT                       = gt_fieldcat[]
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
      IT_EVENTS                         =
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      IT_ALV_GRAPHICS                   =
      IT_ADD_FIELDCAT                   =
      IT_HYPERLINK                      =
      I_HTML_HEIGHT_TOP                 =
      I_HTML_HEIGHT_END                 =
      IT_EXCEPT_QINFO                   =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
        TABLES
          T_OUTTAB                          = i_sales
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
      OTHERS                            = 2
    ENDFORM.                    " dispolay_data
    *&      Form  fieldcat_init
          text
         -->P_GT_FIELDCAT[]  text
    FORM fieldcat_init USING  e01_lt_fieldcat type slis_t_fieldcat_alv.
      DATA: LS_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    Delivery Date
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'VDATU'.
      LS_FIELDCAT-OUTPUTLEN    = 12.
      LS_FIELDCAT-TABNAME    = 'I_SALES'.
      ls_fieldcat-seltext_L = 'Delivery Date'.
      APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
    Purchase Order #Material Description
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'BSTNK'.
      LS_FIELDCAT-OUTPUTLEN    = 25.
      LS_FIELDCAT-TABNAME    = 'I_SALES'.
      ls_fieldcat-seltext_L = 'Purchase Order #'.
      APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
    Material
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-REF_FIELDNAME    = 'MATNR'.
      LS_FIELDCAT-REF_TABNAME    = 'MARA'.
      LS_FIELDCAT-FIELDNAME    = 'MATNR'.
      LS_FIELDCAT-TABNAME    = 'I_SALES'.
      ls_fieldcat-seltext_L = 'Material #'.
      ls_fieldcat-seltext_M = 'Material #'.
      ls_fieldcat-seltext_S = 'Material #'.
      APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
    Material Description
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'MAKTX'.
      LS_FIELDCAT-OUTPUTLEN    = 40.
      LS_FIELDCAT-TABNAME    = 'I_SALES'.
      ls_fieldcat-seltext_L = 'Material Description'.
      APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
    Customer Material #
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'KDMAT'.
      LS_FIELDCAT-OUTPUTLEN    = 35.
      LS_FIELDCAT-TABNAME    = 'I_SALES'.
      ls_fieldcat-seltext_L = 'Customer material no.'.
      APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
    Quantity
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'KWMENG'.
      LS_FIELDCAT-OUTPUTLEN    = 15.
      LS_FIELDCAT-TABNAME    = 'I_SALES'.
      ls_fieldcat-seltext_L = 'Quantity'.
      APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
    Net Price
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'NETPR'.
      LS_FIELDCAT-OUTPUTLEN    = 15.
      LS_FIELDCAT-TABNAME    = 'I_SALES'.
      ls_fieldcat-seltext_L = 'Net Price'.
      APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
    ENDFORM.                    " fieldcat_init
    Reward Points if it is helpful
    Thanks
    Seshu

  • Master Data transfer from SAP R/3 to SAP GTS

    HI,
    Master data like customer master  is transferred  fro R/3 to GTS.  Any customer master in R/3 has many fields like company code, sales area, shipping conditions etc.
    Shipping conditions and other fields are not defined in GTS. So how come  when the customer master which is copied into SAP GTS is not  giving any error since certain fields like shipping conditions are not there in GTS. I mean there are certain validation in R/3 for a customer . So how come these validations are being done in SAP GTS ??
    regards

    Customer/vendor the fields which is passed to GTS from ECC can be found in - (/SAPSLL/MENU_LEGAL - SAP Compliance Management (SPL Screening) - Logistics (Simulation of SPL - Check general address). Here you can see all the details captured for Business Partner in GTS. You can also see the entire field range at (/nbp)
    When you transfer a Customer master record to GTS, in GTS an internal BP number is created to map the stated fields based on number range logic etc as per requirement. The BP's are created in GTS as per the partner role in GTS and also can be retrived using partner role. At document level the validations happen w.r.t to partner functions mapped and created as per the feeder system.

  • Really blank cells...

     I have a strange problem in my excel data. I don't know if I can upload a sample workbook, in the meantime I try to describe the problem.
    In my database I have a column (formatted as text) with many blank cells. The problem is that, for unknown reasons, some of these "blank" cells are not really blank. At the moment, there are 1004 records total (this is not important, it's just
    to use actual figures): if I filter with the regular excel filter (the one on top of the column), selecting all values EXCEPT blanks, I get 374 records selected. If I use the function COUNTA, I get 395 records; if I use the function COUNTBLANK I get 630 records.
    Since 395+630 is 1025 and the records are only 1004, this makes little sense to me: some records are counted twice, once with the blanks and once with the non-blanks. 
    I noticed the problem because the pivot table based on the database and  counting the non-blank records related to that column was giving the wrong results as well (I KNOW that 374 records is correct). Comparing the results of the filtering and of the
    pivot, I was able to isolate the "wrong" records: canceling the cell contents in the column in these records, the pivot table and the functions give the correct results. In those cells there seems to be something, but I don't know what that is:
    1) if I apply the function CODE to one of those cells, I get #VALUE?;
    2) If I apply the function LEN, I get 0 (zero)
    I assume that this means that there is absolutely nothing there.: so what are COUNTA and the pivot table counting?
    I apologize if I am not being clear: this problem is driving me crazy, because the pivot table are the basis of all statistics I need on the database. Thanks in advance for any suggestion
    Robert, Italy

    OK, in the meantime I discovered something else. Let me try to explain. The user of my amateur VBA code can select to add a new entry or to modify an existing entry, via user forms. In the second case, the user form if filled with the contents of the selected
    record fields, the user changes what is needed and the contents of the user form fields are written back to the database. Now, suppose that the field in the database corresponding to the column I mentioned in my post is empty. It is (correctly) NOT counted
    by the pivot table. Now the user changes something else in the form (NOT that field, that remains blank): when the data are written back to the database and the pivot is refreshed, voilà: wrong number, one item more counted. Canceling the field in the database,
    the pivot count is back to normal. 
    What I did was to apply your suggestion to the database field (range of 1 cell only) right after having written it back to the database:
    .Cells(rowno, 24) = Me.TextBox4
    .Cells(rowno, 24) = Application.Clean(.Cells(rowno, 24))
    Unfortunately, it does not work. The pivot table gives the wrong result. BUT the only way I found to "solve" the problem is to clear the cell with clearcontents, equivalent of Cancel in VBA:
    .Cells(rowno, 24) = Me.TextBox4
    If Len(.Cells(rowno, 24)) = 0 Then .Cells(rowno, 24).ClearContents
    This works, but it does not make any sense to me: What am I clearing if there is nothing there? Or what is there is a kind of ghost, of zero length but that is detected by pivot and COUNTA? 
    Add two other mysteries:
    1) the field is counted by COUNTBLANK AND COUNTA: so is it blank or not?
    2) if the user adds a new entry and leaves that field blank, nothing strange happens.
    For the moment, i'll stick with this correction, but not understanding what is going on makes me unconfortable. Thank you for your attention.

  • Unable to fetch records from database with huge selection screen

    Hi all,
    I have 20 fields from selection screen.
    I have a z table with these 20 fields .
    Now with the values entered in the selection screen i have to fetch the records from the z table.
    All fields in the selection screen are not mandatory, the user may or may not enter the values.
    I have to fetch the records based on the values entered.
    I wrote a select with where condtion to all those 20 fields. but its not retreving the records.
    All the fields in the selection screeen are parameters.
    Could you help me on this, please. I wrote in the where conditon with field1 = value AND field 2 = value.. etc... field20 = value.
    Please guys help me out.
    KV.
    Edited by: Nithin Kumar on Mar 18, 2008 8:48 AM

    Guys,
    I have a problem with the select query.
    as i said i have 20 fields, ranges are working for few fields.
    But i have couple of fields as descriptions. So i have to fetch the records for pattenr as well.
    Means, user can enter in the description............. like    "ab". So in the description if there is anything   with 'ab' it should fetch.
    it works with a LIKE statement with % symbols.
    but it doenst work with   ranges and patterns in same select. I mean the below is not working.
      SELECT  *
             FROM crmd_orderadm_h
             INTO table itab
             WHERE object_id IN r_obj AND
                   process_type IN r_pro AND
                   description LIKE s_des.
    r_obj, r_pro are ranges  and s_des is the pattern, ex: %ab%.              so in this case how it has to be done... could you please help me on this.. the other fields could be blank( r_obj and r_pro).. 
    kindly help me out......
    KV

  • In Abap Class, Rage declaration

    Hi,
    How to declare field range in Abap Class and select statement of inner join
    Thanks and Regards,
    Prabhakar Dharmala

    Try this way
    class lcl_range definition.
      public section.
        types:
          t_matnr  type range of dmatnr.
        class-methods:
          r_matnr  importing v_matnr  type t_matnr,
    endclass.

  • How to create form or tabbed template and import excel data

    Hi there
    I am wanting to know how I can create a rather comprehensive template that will be copied a number of times on the same page but each time will include different data from an excel spreadsheet.
    The template will need to include quite a bit of layout and placement of text and images. The fields range from data type including names, phone number, email, prices, description and address.  See attached image below of what I am wanting to acheive.
    I'm just not quite sure how to set this up as a form/template in indesign and what the best and fastest way would be.
    There will be about 6-8 blocks to a page.
    Any ideas would greatly be appreciated.
    Thanks

    You need Data Merge
    OPENS VIDEO
    http://www.theindesigner.com/podcasts/tid43_theindesigner_43.mp4
    http://www.theindesigner.com/blog/episode-43-data-merge-video

  • Need a dificult script can't to it myself.

    Hello,
    I try to keep it short.
    We have a new idea for a customer of ours. Don't know if it's possible and I hope there is someone that's want to try it and give it a go. I can work it out on paper altough my applescript / programmer skills want do the job.
    We will work with an excel file. We want to keep it simple for our customer.
    They have (more or less) 60 diffferent leaflets and from 100 to 200 agencies.
    We would like to print all leaflets for 1 agency from 1 line in excel.
    Normally 1 person will get the orders from all agencies (central) and will write it down in excel.
    Once a week we will get the database for printing.
    But in this case I can't print unless there is a automated procces that fix the database like I need it.
    I first run a applescript for converting the database to tab delimit and unicode check.
    So it will be an TXT file TAB delimited unicode MAC starting this script.
    So the database must have in the beginning the basic customer information. Such as company name, street, delivery adresse,...
    From A to N is the agency information. This information must be copied on every line.
    From colum O the database will have the PROD1-PROD2-PROD3
    We will have 70 PROD at start
    So it's from colum O to CF the PRODUCTS.
    UNder PROD they will write the quantaty the need of this leaflet.
    Important : Now i write zero for visibilaty but zero need to be a blank field.(for printing software)
    So this is the tricky part : The script needs to duplicate the records in a new database AND
    it needs to begin with PROD 1 to PROD 70 AND may only copie the quantaty of PROD1 then leave the other PRODUCTS quantaties blank and go on. Please See example.
    Customer info - PROD1 - PROD 2 - PROD 3
    Customer 1 - 5-6-2
    Customer 2 - 0-3-5
    Customer 200
    MUST BECOME:
    Customer info - PROD1 - PROD 2 - PROD 3
    Customer 1 - 5-0-0
    Customer 1 - 5-0-0
    Customer 1 - 5-0-0
    Customer 1 - 5-0-0
    Customer 1 - 5-0-0
    Customer 1 - 0-6-0
    Customer 1 - 0-6-0
    Customer 1 - 0-6-0
    Customer 1 - 0-6-0
    Customer 1 - 0-6-0
    Customer 1 - 0-6-0
    Customer 1 - 0-0-2
    Customer 1 - 0-6-2
    Customer 2 - 0-3-0
    Customer 2 - 0-3-0
    Customer 2 - 0-3-0
    Customer 2 - 0-0-5
    Customer 2 - 0-0-5
    Customer 2 - 0-0-5
    Customer 2 - 0-0-5
    Customer 2 - 0-0-5
    want to give it a try?
    Many thanks in advance.

    Hello Colin,
    Ah, I didn't take the field names' line into consideration...
    Here's the revised code to handle it (hopefully). I assumed the field names' line is the 1st line of the input file and the rest are data lines.
    Also in my previous code, customerRange and quantityRange are being set to {1, 1} and {2, 6} respectively to process the reduced sample data. However, according to your original description of input data, they should be changed as follows:
    property customerRange : {1, 14} -- field range for customer info (e.g. {1, 14} for A..N)
    property quantityRange : {15, 84} -- field range for quantities {e.g. {15, 84} for O..CF)
    Hope this may help,
    Hiroto
    -- SCRIPT
      v0.2
        Modified such that
         - it treats the 1st line (field names line) in the input text file properly.
         - it now preserves the empty lines in the input text file.
      Usage:
        Set the following four properties to fit your need and run the script.
        property fp : "HFS:path:to:input:file"
        property fp1 : "HFS:path:to:output:file"
        property customerRange : {1, 14} -- field range for customer info (e.g. {1, 14} for A..N)
        property quantityRange : {15, 84} -- field range for quantities {e.g. {15, 84} for O..CF)
        It will
         - read the input text file (assumed in UTF-8, currently),
         - convert text to array,
         - expand each record according to given fields' ranges,
         - convert processed array back to text,
         - write (or overwrite) output text file (in UTF-8, currently).
    E.g. (customerRange = {1, 1}, quantityRange = {2, 6})
    INPUT TEXT (tab delimited)
    Field Names (Column Title) Line
    Customer1  0  5  1  0  0
    Customer2  2  0  0  0  1
    Customer3  0  0  0  0  0
    Customer4  1  1  0  0  3
    Customer5  0  0  4  0  0
    OUTPUT TEXT (tab delimited)
    Field Names (Column Title) Line
    Customer1    5      
    Customer1    5      
    Customer1    5      
    Customer1    5      
    Customer1    5      
    Customer1      1    
    Customer2  2        
    Customer2  2        
    Customer2          1
    Customer4  1        
    Customer4    1      
    Customer4          3
    Customer4          3
    Customer4          3
    Customer5      4    
    Customer5      4    
    Customer5      4    
    Customer5      4    
    main()
    on main()
    script o
    -- input file path
    property fp : "HFS:path:to:input:file" -- #
    -- output file path
    property fp1 : "HFS:path:to:output:file" -- #
    -- field ranges
    property customerRange : {1, 14} -- # field range for customer info (e.g. {1, 14} for A..N)
    property quantityRange : {15, 84} -- # field range for quantities {e.g. {15, 84} for O..CF)
    -- working lists
    property aa : {} -- original array
    property dd : {} -- original quantity list
    property ee : {} -- modified array (expanded quantity lists)
    property ee0 : {}
    property ee1 : {}
    local c1, c2, d1, d2, c, t, t1
    -- (0) preparation
    set {c1, c2} to customerRange
    set {d1, d2} to quantityRange
    -- make empty data list (ee0)
    repeat with i from d1 to d2
    set end of my ee0 to ""
    end repeat
    -- (1) read input file (text of paragraphs of tab delimited values)
    set t to read file fp as «class utf8» -- UTF-8
    --set t to read file fp as Unicode text -- UTF-16
    --set t to read file fp -- plain text (in System's primary encoding)
    -- (2) convert text to 2d array
    set my aa to text2array(t, tab)
    -- (3) process each record
    set end of my ee to my aa's item 1 -- get the 1st record that is field names record
    set aa to my aa's rest -- exclude the 1st record from subsequent processing
    repeat with a in my aa -- for each record entry
    set a to a's contents
    if a is {""} then -- ignore empty record (i.e. empty line in input text if any)
    set end of my ee to a -- just leave the empty record alone
    else
    set c to a's items c1 thru c2 -- customer info parts
    set my dd to a's items d1 thru d2 -- quantities
    repeat with i from 1 to count my dd -- for each quantity entry
    set d to my dd's item i as number
    if d > 0 then
    copy my ee0 to my ee1 -- make copy of empty data list
    set my ee1's item i to d
    repeat d times
    set end of my ee to (c & ee1)
    end repeat
    end if
    end repeat
    end if
    end repeat
    -- (4) convert 2d array to text
    set t1 to array2text(my ee, tab, return)
    -- (5) write output file (text of paragraphs of tab delimited values)
    writeData(fp1, t1, {_append:false, _class:«class utf8»}) -- UTF-8
    --writeData(fp1, t1, {_append:false, _class:Unicode text}) -- UTF-16BE
    --writeData(fp1, t1, {_append:false, _class:string}) -- plain text (in System's primary encoding)
    -- (*) for test
    --return {t, t1}
    return t1
    end script
    tell o to run
    end main
    on text2array(t, cdelim) -- v1.1, with column delimiter as parameter
      text t: text of which paragrahps consist of values delimited by cdelim. e.g. (Let cdelim = tab)
        "11  12
         21  22
         31  32"
      string cdelim : column delimiter
      return list: two dimentional array. e.g. {{11, 12}, {21, 22}, {31, 32}}
    script o
    property aa : t's paragraphs
    property xx : {}
    property astid : a reference to AppleScript's text item delimiters
    local astid0
    try
    set astid0 to astid's contents
    set astid's contents to {cdelim}
    repeat with a in my aa
    set end of my xx to (a's text items)
    end repeat
    set astid's contents to astid0
    on error errs number errn
    set astid's contents to astid0
    error "text2array(): " & errs number errn
    end try
    return my xx's contents
    end script
    tell o to run
    end text2array
    on array2text(dd, cdelim, rdelim) -- v1.1, with column delimiter and row delimiter as parameter
      list dd: two dimentional array. e.g. {{11, 12}, {21, 22}, {31, 32}}
      string cdelim : column delimiter
      string rdelim : row delimiter (e.g. CR, LF, CRLF, etc)
      return string : paragraphs of items delimited by cdelim.
      e.g.
      (Let cdelim = tab, rdelim = CR)
        "11  12
         21  22
         31  32"
      i.e.
        11 [tab] 12 [CR]
        21 [tab] 22 [CR]
        31 [tab] 32 [CR]
    script o
    property aa : dd's contents
    property xx : {}
    property astid : a reference to AppleScript's text item delimiters
    local t, astid0
    try
    set astid0 to astid's contents
    set astid's contents to {cdelim}
    repeat with a in my aa
    set end of my xx to ("" & a)
    end repeat
    set astid's contents to {rdelim}
    set t to "" & my xx
    set astid's contents to astid0
    on error errs number errn
    set astid's contents to astid0
    error "array2text(): " & errs number errn
    end try
    return t
    end script
    tell o to run
    end array2text
    on writeData(fp, x, {append:append, class:class})
      text fp: output file path
      data x: anything to be written to output file
      boolean _append: true to append data, false to replace data
      type class _class: type class as which the data is written (_class = "" indicates x's class as is)
    local a
    try
    open for access (file fp) with write permission
    set a to fp as alias
    if not _append then set eof a to 0
    if _class = "" then
    write x to a starting at eof
    else
    write x to a as _class starting at eof
    end if
    close access a
    on error errs number errn
    try
    close access file fp
    on error --
    end try
    error "writeData(): " & errs number errn
    end try
    end writeData
    -- END OF SCRIPT
    Message was edited by: Hiroto

  • Retaining changes and format  of  imported excel data.. please help.

    Is there some kind of secret that Im mising out on that will allow me to make changes to the data in the excel cell range in which I import to an InDesign document?
    It was working fine, until I had to add a line of data to the import field range, and now it asks me every time I open the InDesign file to apply changes.. And now when I update said imported data, it comes up as little red dots, and I have to change all of the cell parameters to get the text to show.
    Obviously this is very annoying, and Im hoping there is an easy solution. Im thinking it must involve re-linking the data in the InDesign file, and I must be doing something wrong not to be able to get it to keep the changes I've made and the format it is in so that I do not have to the "red dot" fix every day.
    Hopefully Ive explained this well enough.. Im dying for some help :)
    Thanks in advance
    J

    Im not sure I want it to not keep the link..
    I'll explain what Im using InDesign for, maybe it will help..
    I use it to update daily information (numbers/data) for a publication. I update and save all of the info in the Excel files that contain the data, and then I use InDesign to place all of the data together in a file (which I then turn into a PDF).
    All of the other data that Im pulling into the InDesign file from the same excel file do not go all screwy and give me red dots, only the one box of info that Ive had to add a line of data to.. and like I say, now it updates and pulls into InDesign as different font size and red dots.
    If I turn of that link option like you say, will my daily info still update and pull into the InDesign file?
    Again, thanks for your help.
    J

Maybe you are looking for

  • Can I switch my phone number between two lines(not just between phones)?

    I have 4 months left on my current plan. I would like to take advantage of current holiday sales to get the droid razr for cheap. I am considering adding an additional line to my plan to get the upgrade. The problem with this is that I either have to

  • Settings for enabling message security tab in message display tool

    Hi Experts, We have a scenario where we are sending data by applying web service security using SOAP receiver communication channel . I want to check message security log along with audit log in message display tool in RWB. Can anybody know what are

  • My IPad2 is stuck in landscape mode. How do I unlock it?

    My IPad2 is locked in landscape mode. I've tried: 1) going to settings, and checking the "slide button for the lock", but it doesn't work (when i check it, the check stays there but when I try the slide, it still operates the audio/mute in the audio/

  • Querying CHAR columns with character length semantics unreliable

    Hi again, It appears that there is a bug in the JDBC drivers whereby it is highly unlikely that the values of CHAR columns that use character length semantics can be accurately queried using ResultSet.getString(). Instead, the drivers return the valu

  • Order-to-Cash Process Design

    Hello Gurus,          what is Order-to-Cash Process Design ?  where can I get related information about that? Many thanks, Frank Zhang