'F4IF_INT_TABLE_VALUE_REQUEST' retfield is of type CHAR?

Hi.
For the function 'F4IF_INT_TABLE_VALUE_REQUEST', the import parameter <b>retfield</b> seems to be a char import parameter. However, when I try to use a char variable to provide the value for retfield, I encounter an error. Why is that so? Thanks.
DATA: CONCAT_RFIELD1(20) TYPE C  VALUE 'LOAD_ID'.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
       EXPORTING
            retfield    = CONCAT_RFIELD1
Error: The function module interface allows you to specify only fields of a particular type under "RETFIELD". The field "CONCAT_RFIELD1" specified here is a different field type

Hi
The Function Module that you specified provides an F4 help that returns the values that have selected in an internal table.
This FM(Function Module) is quite useful when you are programming your own F4 help for a field.
the following example may be of some help to you:
DATA: lf_repid LIKE sy-repid,
lf_dynnr LIKE sy-dynnr,
lf_dynprofield LIKE help_info-dynprofld,
lf_retfield LIKE dfies-fieldname.
MOVE sy-repid TO lf_repid.
MOVE sy-dynnr TO lf_dynnr.
MOVE 'PA_DPROF' TO lf_dynprofield.
MOVE 'PROFILNAME' TO lf_retfield.
PERFORM prepare_gt_value_tab.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = lf_retfield
dynpprog = lf_repid
dynpnr = lf_dynnr
dynprofield = lf_dynprofield
value_org = 'S'
TABLES
value_tab = it_value_tab
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Regards
Pavan

Similar Messages

  • How to sort a column of type CHAR

    Hi,
    I have a report for which the o/p is displayed in ALV grid format.There is one column in the O/p strcuture which is "No of days".Based on certain conditions,i need to display the value for some of the days as Negative e.g. " - 45".Becasuse of this,I have declared the field for the "No of days" of the type "CHAR".
    Now when i sort(using ALV grid SORT function) the list on basis of this column,it doesnt give me the correct o/p.
    CAN anyone tell me how do i handle this?I want the list to be sorted correctly on basis of the "No of days" column.
    \[removed by moderator\]
    Edited by: Jan Stallkamp on Dec 17, 2008 6:32 PM

    Hi,
    Amit,
    Apologies for violation of rule.
    All,
    For getting the negative sign in the front of the no,i.e. "-45",i had declared as CHAR.
    Is there any way we can get the o/p in the form "-45" and not "45-" as well as use the SORT functionality?
    BR,
    SRM Tech

  • Loading decimal  value to an infoobject of type char

    I have an extract structure with field timestamp, which is of type dec and length 15. Now i want to load this value to an infoobject in ODS. But this infoobject is of type char and length 18. when infopackage loading is scheduled it is giving the following error. Record 1 :InfoObject /BIC/IFITMSTMP does not contain alpa-conforming value 20061206084944.
    Is it because i tried to move a dec valu into a char field with a different length? If so  how will i load a decimal value of length 15 to a char of length 18. Can anyone please help me with this?
    Thanks in advance.

    if u r using BI7.0
    go to the datasource of the cube
    in the general info tab of the datasource
    there is a check box with PSA not typed
    check it
    if u check it all the values from the external source will be converted into character format irrespective of their data type

  • Loading a decimal value to an infoobject of type char

    I have an extract structure with field timestamp, which is of type dec and length 15. Now i want to load this value to an infoobject in ODS. But this infoobject is of type char and length 18. when infopackage loading is scheduled it is giving the following error. Record 1 :InfoObject /BIC/IFITMSTMP does not contain alpa-conforming value 20061206084944.
    Is it because i tried to move a dec valu into a char field with a different length? If so  how will i load a decimal value of length 15 to a char of length 18. Can anyone please help me with this?
    Thanks in advance.

    if u r using BI7.0
    go to the datasource of the cube
    in the general info tab of the datasource
    there is a check box with PSA not typed
    check it
    if u check it all the values from the external source will be converted into character format irrespective of their data type

  • Data type-Char?

    Hi experts,
    A simple query. Do the data type CHAR accepts the values like 8923, 452A, etc? while creating an infoobject.?
    Thanks in advance.
    Regards
    Dubbu

    Yes it accepts .
    for data consistency you have to maintain alfa conversion.
    Regards,
    Ramnaresh.

  • If DB Column java.sql.Types=CHAR = Workshop autogen EJB CMP Filed=Boolean

    Hi everybody<br>
    <p class="MsoNormal"><span lang="EN-US">When a user automatically
    creates/generates an Entity Bean via BEA Workshop EJB Project option: ‘<b>new
    Entity bean from database table</b>’ and DB Table Column is of type <b>CHAR</b>,
    Workshop creates a <b>@ejbgen:cmp-field</b> of Java type <b>Boolean</b>, NOT of
    <b>Character</b>!</span></p>
    <p class="MsoNormal"><span lang="EN-US">I completely agree that the developer
    must be acquainted with the Data Base and DB Tables as well and he can manually
    correct </span><span lang="EN-US" style="font-size: 10.0pt">SET & GET</span><span lang="EN-US">
    Boolean to Character in EJB source code view or he’ll receive an error if he
    tries to <b>set<i>FieldName</i></b><i>(String/Character) </i>in <b>ejb</b>
    methods.</span></p>
    <p class="MsoNormal"><span lang="EN-US">But suppose that a developer has
    urgently received an order to build an EJB Project for a thousand of DB Tables
    and he hasn’t been acquainted with all of them. He has created the EJBs via <b>
    ‘new -> Entity bean from database table’. </b>He has created some EJB Finders,
    for example a finder:  <b>ejbgen:finder Collection find<i>All</i>()</b>.
    (<i>Suppose he hasn’t used <b>group-name</b> finder property</i>)</span></p>
    <p class="MsoNormal"><span lang="EN-US">He has invoked <b>find<i>All</i>()</b>
    method and depends on the JDBC Driver used, he will receive an </span>
    <span lang="EN-US" style="font-size: 10.0pt">ERROR</span><span lang="EN-US">,
    printed within the Server start console <b>at least</b> OR the result after <b>
    get<i>FieldName</i></b>() will be '<b>false</b>', not an expected <i><b>char</b></i>
    symbol.</span></p>
    <p class="MsoNormal"><b><span lang="EN-US">Anxious conclusion: </span></b></p>
    <p class="MsoNormal"><span lang="EN-US">If<b>  </b>DB Column<b>  java.sql.Types
    = </b></span><span lang="EN-US" style="font-size: 10.0pt"><b>CHAR</b>    </span><span lang="EN-US">then</span><span lang="EN-US" style="font-size: 10.0pt">  
    </span><span lang="EN-US"><b>getJavaObjectType = Boolean </b> then corresponding
    EJB CMP Filed  will always be   <b>Boolean</b>  in BEA Workshop !</span></p>
    <p class="MsoNormal"><i><span lang="EN-US">Following description considers the
    </span><span lang="EN-US" style="font-size: 11.0pt">PROBLEM</span><span lang="EN-US">:</span></i></p>
    <p class="MsoNormal"><span lang="EN-US">Class<b>
    weblogic.jdbc.utils.schema.Column </b>from<b> weblogic.jar </b>and its method<b>
    String getJavaType() </b>has a <b>switch(getType())</b> with <b>case:</b></span></p>
    <p class="MsoNormal"><span lang="en-us"><b> if(this.getSize() == 1)<br>
        return "boolean"; <br>
    else<br>
        return "String";</b></span></p>
    <p class="MsoNormal"><span lang="en-us">and </span>
    <span lang="EN-US" style="font-size: 12.0pt; font-family: Times New Roman">
    another </span><span lang="en-us"> method <b>String getJavaObjectType() </b>
    {</span></p>
    <p class="MsoNormal"><b><span lang="en-us">String s = this.getJavaType();</span></b></p>
    <p class="MsoNormal"><b><span lang="en-us">...</span></b></p>
    <p class="MsoNormal"><b><span lang="en-us">    
    if(s.equals("boolean"))<br>
            return "Boolean";</span></b></p>
    <p class="MsoNormal"><span lang="en-us"><b>    
    if(s.equals("char"))<br>
            return "Character";</b></span></p>
    <p class="MsoNormal"><span lang="en-us"><b>... }<br>
    </b>but according to </span><span lang="EN-US"><b>switch(getType())</b> which
    has NOT  a<b> 'case' return char</b>, </span><span lang="en-us"><b>
    'Character' </b>will never be returned, so:</span></p>
    <p class="MsoNormal"><span lang="EN-US"><b>@ejbgen:cmp-field</b> of Java type <b>
    Character </b></span><span lang="en-us">will never be generated by Workshop.</span></p>
    <p class="MsoNormal" align="left"><span lang="EN-US">More often than not  I’ve
    ran into this little but disturbing problem, so I’ve corrected <b>
    weblogic.jdbc.utils.schema.Column.getJavaType switch case </b>as:</span></p>
    <p class="MsoNormal" style="text-indent:35.4pt"><b><span lang="EN-US">…</span></b></p>
    <p class="MsoNormal" style="text-indent:35.4pt"><b><span lang="EN-US">       
    case 1:     // '\001'  //</span><span lang="EN-US" style="font-size: 10.0pt">CHAR</span></b></p>
    <p class="MsoNormal" style="text-indent:35.4pt"><b><span lang="EN-US">
                if(this.getSize() == 1)</span></b></p>
    <p class="MsoNormal" style="text-indent:35.4pt"><b><span lang="EN-US">          
         return "char";  </span></b></p>
    <p class="MsoNormal" style="text-indent:35.4pt"><b><span lang="EN-US">…</span></b></p>
    <p class="MsoNormal" style="text-indent:35.4pt"><b><span lang="EN-US">private
    static final boolean </span><span lang="EN-US" style="font-size: 10.0pt">
    CHAR_TO_BOOLEAN</span><span lang="EN-US"> = false;     </span></b><span lang="EN-US">//as
    a field variable</span></p>
    <p class="MsoNormal" style="text-indent:35.4pt"><b><span lang="EN-US">…</span></b></p>
    <p class="MsoNormal" style="text-indent:35.4pt"> </p>
    <p class="MsoNormal" style="text-align:justify"><span lang="EN-US">Using this
    correction and precompiled class I’ve built and tested a lot of projects w/o
    problems so far.</span></p>
    <p>Best regards: George Moykin<p>
    P.S. I appologize to site Admins for posting the same topic in EJB forum, but it refers to EJBs too.

    Hi,<br>
    In your database, we have some columns of CHAR type and this is the decision of our DB architects. I understand the case ‘male’ or ‘female’, true or false, either; but only if I must choose between 2 variants. Our DB columns contain char symbols such as ‘:’, ‘;’,’-’ etc. and for some inner purposes our architects decided DB columns to be of type CHAR, not VARCHAR. In this case, the Workshop transformation ‘CHAR to BOOLEAN’ doesn’t do useful work. So, I’ve decided to modify some weblogic.jar classes (as described) and now I’m able to generate Entity EJB from DBMS Tables w/o manual intervention.<br>
    Best Regards

  • Wrong XML OraDbType code for database column type CHAR

    Hi there!
    I have a strange issue with the XML retrieved from an Oracle DB. I'm using OraDB11g and my problem is described next:
    When I create a table with a CHAR type columns and get the XML from a query the returns a cursor with the table rows, I get the supposed right OraDbType code 104:
    Table creation:
    create table AA_Table1
    ID number(2,0) not null,
    ColumnA         char(1)                    null,
    ColumnB         char(1)   default 'S'   not null,
    constraint PK_AA_Table1
    primary key ( ID )
    tablespace "X"
    storage
    compress for all operations
    and the returned XML:
    <?xml version="1.0" encoding="utf-16"?>
    <xs:schema id="o_ListaTable" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop">
    <xs:element name="o_ListTable" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
    <xs:complexType>
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="o_List" msprop:REFCursorName="REFCursor">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="ID" msprop:OraDbType="111" type="xs:short" minOccurs="0" />
    *<xs:element name="COLUMNA" msprop:OraDbType="104" type="xs:string" minOccurs="0" />*
    *<xs:element name="COLUMNB" msprop:OraDbType="104" type="xs:string" minOccurs="0" />*
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:choice>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    BUT...when I insert another column on the table, changing it, after that, I get a wrong OraDBType code on the returned XML for the new added column...
    Added new column:
    alter table AA_Table1 add ColumnC char(1) default 'S' not null;
    The returned XML is:
    <?xml version="1.0" encoding="utf-16"?>
    <xs:schema id="o_ListaTable" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop">
    <xs:element name="o_ListTable" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
    <xs:complexType>
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="o_List" msprop:REFCursorName="REFCursor">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="ID" msprop:OraDbType="111" type="xs:short" minOccurs="0" />
    <xs:element name="COLUMNA" msprop:OraDbType="104" type="xs:string" minOccurs="0" />
    <xs:element name="COLUMNB" msprop:OraDbType="104" type="xs:string" minOccurs="0" />
    *<xs:element name="COLUMNC" msprop:OraDbType="126" type="xs:string" minOccurs="0" />*
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:choice>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    My question is: why is this OraDbType code different? Check that the same column type CHAR(1) NOT NULL DEFAULT 'S' is created on table create and the OraDbType is ok, so I think this can be a bug...Because of this, I cannot do a right XML parser to convert CHAR(1) columns in other type I want, in this case, to convert it to .Net bool type. My parser now is ignoring the OraDbType code 126, because this is also the code used for nvarchar2, and I won't convert nvarchar2 to bool.
    How can I solve this problem?
    Some additional tests I've done:
    Have also inserted new columns nullable/not nullable and with default value:
    alter table AA_Table1 add ColumnD char(1);
    alter table AA_Table1 add ColumnE char(1) not null;
    alter table AA_Table1 add ColumnF char(1) default 'S';
    And the returned XML was:
    <?xml version="1.0" encoding="utf-16"?>
    <xs:schema id="o_ListTable" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop">
    <xs:element name="o_ListTable" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
    <xs:complexType>
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="o_Lista" msprop:REFCursorName="REFCursor">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="COLUMNA" msprop:OraDbType="104" type="xs:string" minOccurs="0" />
    <xs:element name="COLUMNB" msprop:OraDbType="104" type="xs:string" minOccurs="0" />
    <xs:element name="COLUMNC" msprop:OraDbType="126" type="xs:string" minOccurs="0" />
    *<xs:element name="COLUMND" msprop:OraDbType="104" type="xs:string" minOccurs="0" />*
    *<xs:element name="COLUMNE" msprop:OraDbType="104" type="xs:string" minOccurs="0" />*
    *<xs:element name="COLUMNF" msprop:OraDbType="104" type="xs:string" minOccurs="0" />*
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:choice>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    All OraDbTypes are right, except that one for the column not null and with default value. Any solution for this issue?
    If I change the type of the column that returns the wrong code (ColumnC) to CHAR(1) null default 'S' and then change it again to the original type CHAR(1) not null default 'S', I get the right ORaDbType code 104 as expcted and not the 126. This behaviour is strange - can this be an Oracle bug?
    I am using the following Oracle DLL and respective version:
    oci.dll (version 11.2.0.1)
    Oracle.DataAccess.dll (version 4.112.3.0)
    orannzsbb11.dll (version 11.0.0.1)
    oraocci11.dll (version 11.2.0.3)
    OraOps11w.dll (version 2.112.3.0)
    Edited by: 929091 on 23/Abr/2012 2:44

    Have you tried using minOccurs="1" ? Since the column is not null, it is guaranteed 1 value, correct?

  • List of characters not supported for a field search of type char

    Hi,
    I have a field of type char.
    When we create entries for that field in a table we use special characters like &, etc. When searched it is not supported and not displayed in results.
    I suppose it might be because SAP can support for characters of specific ASCII codes.
    If you have any list of the ASCII codes supported in search, kindly let me know.
    Thanks and Regards,
    Jaisish

    Hi Jaisish,
    as far as I know, there are two "special" characters that act as jokers in a field search
    +: standing for one character
    *: standing for zero or more characters
    You can search for these characters into the content of a field, if you "escape" them. The symbol for escaping is "#" (before the special character + or *).
    For example, if you search for "#*", this will search all entries with an asterisk in its content.
    I hope this helps. Kind regards,
    Alvaro

  • How can i validate input number into a Field of  type char in oracle form?

    hi.....
    can any one help me.....please...!!!?!!
    How can i validate input number into a Field of type char in oracle form?

    i have tried doing that, but still the field except numbersthere was an error in that code. it should have been
    var_num:=to_number(var_char);however, it appears that you want the entry NOT to be a number. if this is the case then try
    begin
      if to_number(:block.item) = 0 then null; end if;
      message('The entry cannot be numeric');
      raise form_trigger_failure
    exception
      when value_error then
       /* this is where you put the code you want to be run when the
          entry is non-numeric */
    end;

  • Operand data type char is invalid for sum operator

    can someone help me re-writing the following so I wont keep getting thie baopv ementioned error: here is the statement:
    RIGHT('0000000000'+REPLACE(CAST(SUM(PAID_AMT) AS VARCHAR),'.',''),14) AS TOT_NET_PAID
    +
    RIGHT('0000000000'+REPLACE(CAST(SUM(PAID_AMT)
    AS
    VARCHAR),'.',''),14)
    AS TOT_NET_PAID
    It keeps retuning he following error messages:
    Operand data type char is invalid for sum operator

    As Jingyang said, you cannot sum a non numeric field. Cast it to a numeric first (INT maybe?)
    + RIGHT('0000000000'+REPLACE(CAST(SUM(CAST(PAID_AMT AS INT)) AS VARCHAR),'.',''),14) AS TOT_NET_PAID
    Don't forget to mark helpful posts, and answers. It helps others to find relevant posts to the same question.

  • How to change a field of type CHAR of a database table to DATS

    Dear ABAP experts,
    I have a database table: ZLT_aztnew with fields M1, M2, K1, K2, A1, A2, P1, P2, S2, D1, D2,  STD, BES. All these fields are of type 'Character'.  except D2 which is of type DATS. The field D1 is date and is in format DD.MM.YYYY.
    I want to convert this field D1 to type DATS so that I can use a date range through 'selection option' to select other  data of other fields (M1, M2, K1, K2, A1, A2, P1, P2, S2, D1, STD, BES.) related to field D1 from the database table Zlt_aztnew.
    How should I introduce this change (CONVERSION OF D1 CHAR to DATS in the .AZT file upload code itself.
    Problem: If I define D1 as Type  DATS in database table ZLT_AZTNEW then the UPLOAD fails.
    The AZT file upload code is:
    Data  it_string   type stringtab.
    Data  lv_string    type string.
    DATA:  itab  TYPE STANDARD TABLE OF zlt_aztnew.
    DATA:  wa_tab    TYPE zlt_aztnew.
    DATA: file_str1 type string.
    Data: it_tab TYPE STANDARD TABLE OF file_table,
            lw_file LIKE LINE OF it_tab,
            gd_subrc TYPE i.
    SELECTION-SCREEN begin of block blk with frame title text-100.
      SELECTION-SCREEN SKIP 2.
        parameters : p_file like rlgrap-filename .
    SELECTION-SCREEN end of block blk.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    CALL METHOD cl_gui_frontend_services=>file_open_dialog
        EXPORTING
        window_title = 'Select only Text File'
        default_filename = '.azt'
        multiselection = 'X'
        CHANGING
        file_table = it_tab
        rc = gd_subrc.
    READ TABLE it_tab INTO lw_file INDEX 1.
       p_file = lw_file-FILENAME.
    Start-of-Selection.
      file_str1 = P_file.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename                      = file_str1
    *    filename                      = '\\10.10.1.92\Volume_1\_projekte\Zeiterfassung-SAP\test.azt'
      tables
        data_tab                      = it_string
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    LOOP AT it_string  INTO lv_string.
    clear wa_tab.
    SPLIT lv_string AT ';' INTO  wa_tab-M2   wa_tab-k2   wa_tab-A2   wa_tab-P2  wa_tab-S2   wa_tab-D1  wa_tab-STD  wa_tab-BES.
    Append wa_tab to itab.
    Write: sy-uline(120),
              / sy-vline,
                2 wa_tab-M2,
               11 sy-vline,
               13 wa_tab-k2,
               25 sy-vline,
               27 wa_tab-A2,
               32 sy-vline,
               34 wa_tab-P2,
               39 sy-vline,
               41 wa_tab-S2,
               46 sy-vline,
               48 wa_tab-D1,
               60 sy-vline,
               62 wa_tab-STD,
               72 sy-vline,
               74 wa_tab-BES,
              120 sy-vline.
    ENDLOOP.
    DATA: Answer.
    UPDATE zlt_aztnew From Table itab.
    * INSERT ZLT_aztnew From Table itab accepting duplicate keys.
    If sy-subrc NE 0.
    CALL FUNCTION 'POPUP_TO_CONFIRM'
      EXPORTING
       TITLEBAR                    = 'TITLE '
    *   DIAGNOSE_OBJECT             = ' '
        text_question               = 'Wollen Sie die vorhandenen Inhalte ändern'
       TEXT_BUTTON_1               = 'Ja'(001)
    *   ICON_BUTTON_1               = ' '
       TEXT_BUTTON_2               = 'Nein'(002)
    *   ICON_BUTTON_2               = ' '
       DEFAULT_BUTTON              = '1'
       DISPLAY_CANCEL_BUTTON       = 'X'
    *   USERDEFINED_F1_HELP         = ' '
    *   START_COLUMN                = 25
    *   START_ROW                   = 6
    *   POPUP_TYPE                  =
    *   IV_QUICKINFO_BUTTON_1       = ' '
    *   IV_QUICKINFO_BUTTON_2       = ' '
    IMPORTING
       answer                      = answer
    * TABLES
    *   PARAMETER                   =
    EXCEPTIONS
       TEXT_NOT_FOUND              = 1
       OTHERS                      = 2
    *IF sy-subrc <> 0.
    ** MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    **         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    *ENDIF.
    IF Answer = '1'.
    WRITE: / 'Die vorhandenen Inhalte war geändernt'.
    MODIFY zlt_aztnew From Table itab.
    ENDIF.
    ENDIF.
    TO introduce a date range and pull data from the database table Zlt_AZTNEW--> I wrote the BELOW code SEPARATELY,
    but after execution, the error I am getting is: Enter a valid Date (for example, 31.03.2014).
    TABLES:   ZLT_aztnew.
    TYPES:  Begin OF ty_AZTN,
             M2   TYPE Zlt_AZTNEW-M2,
             K2   TYPE Zlt_AZTNEW-K2,
             A2   TYPE Zlt_AZTNEW-A2,
             P2   TYPE Zlt_AZTNEW-P2,
             S2   TYPE Zlt_AZTNEW-S2,
             D1   TYPE Zlt_AZTNEW-D1,
             STD  TYPE Zlt_AZTNEW-STD,
             BES  TYPE Zlt_AZTNEW-BES,
           END OF ty_AZTN.
    DATA:   gv_datum  TYPE d.
    DATA:   it_aztn TYPE STANDARD TABLE OF ty_aztn with  header line.
    CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
      EXPORTING
        date_external                  = zlt_aztnew-D1
    *   ACCEPT_INITIAL_DATE            =
    IMPORTING
       DATE_INTERNAL                  = gv_datum
    * EXCEPTIONS
    *   DATE_EXTERNAL_IS_INVALID       = 1
    *   OTHERS                         = 2
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
           SELECT-OPTIONS: s_datum FOR gv_datum.
          INITIALIZATION.
            s_datum-low  = sy-datum.
            s_datum-high  = sy-datum.
            APPEND s_datum.
    ********** After this further code follows with "SELECT"  wherein I want to use the gv_datum as Where condition.
    SELECT   M2
                      K2
                      A2
                      P2
                      S2
                      D1
                      STD
                      BES
             FROM     ZLt_AZTNEW
             INTO     TABLE it_AZTN
             Where    D1 = gv_datum.
    Please provide me your valuable suggestion to correct any flaw in my code above.
    Looking forward for your reply.
    Best regards
    Chandan Kumar

    Dear Rama,
    Plz refer the following difference in naming conventions as compared to your suggestion:
    it_flat_file --> itab, (internal table for AZT fiel upload and split)
    ls_flat_file ---> wa_itab,
    Ztable --> Zlt_aztnew2,    (Dbase file)
    it_ztable ---> it_zlt_aztnew2, (internal table)
    ls_ztable --> wa_aztnew2,
    I wrote the following code but it is not working. Please also refer the attached screen shot of the database table : ZLT_AZTNEW2.
    Data  it_string   type stringtab.
    Data  lv_string   type string.
    DATA: file_str1 type string.
    Data: it_tab TYPE STANDARD TABLE OF file_table,
          lw_file LIKE LINE OF it_tab,
          gd_subrc TYPE i.
    TYPES: Begin of Ty_itab,
            M2  TYPE Char7,
            K2  TYPE Char3,
            A2  TYPE Char3,
            P2  TYPE Char3,
            S2  TYPE Char3,
            D1  TYPE Char8,
            STD TYPE Char8,
            BES TYPE Char80,
           END OF ty_itab.
    DATA: itab Type Standard Table of ty_itab,
          wa_itab Type ty_itab.
    DATA: it_zlt_aztnew2 type standard table of Zlt_aztnew2,
          wa_aztnew2     TYPE Zlt_aztnew2.
    SELECTION-SCREEN begin of block blk with frame title text-100.
      SELECTION-SCREEN SKIP 2.
        parameters : p_file like rlgrap-filename .
    SELECTION-SCREEN end of block blk.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CALL METHOD cl_gui_frontend_services=>file_open_dialog
        EXPORTING
        window_title = 'Select only Text File'
        default_filename = '.azt'
        multiselection = 'X'
        CHANGING
        file_table = it_tab
        rc = gd_subrc.
      READ TABLE it_tab INTO lw_file INDEX 1.
      p_file = lw_file-FILENAME.
    Start-of-Selection.
      file_str1 = P_file.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename                      = file_str1
    *    filename                      = '\\10.10.1.92\Volume_1\_projekte\Zeiterfassung-SAP\test.azt'
      tables
        data_tab                      = it_string
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    LOOP AT it_string  INTO lv_string.
      Clear wa_itab.
      SPLIT lv_string AT ';' INTO  wa_itab-M2   wa_itab-k2   wa_itab-A2   wa_itab-P2  wa_itab-S2         wa_itab-D1  wa_itab-STD  wa_itab-BES.
      append wa_itab to itab.
      Write: sy-uline(120),
              / sy-vline,
                2 wa_itab-M2,
               11 sy-vline,
               13 wa_itab-k2,
               25 sy-vline,
               27 wa_itab-A2,
               32 sy-vline,
               34 wa_itab-P2,
               39 sy-vline,
               41 wa_itab-S2,
               46 sy-vline,
               48 wa_itab-D1,
               60 sy-vline,
               62 wa_itab-STD,
               72 sy-vline,
               74 wa_itab-BES,
              120 sy-vline.
    ENDLOOP.
    LOOP at itab into wa_itab.
      CLEAR wa_aztnew2.
      wa_aztnew2-D1+0(4) = wa_itab+6(4).
      wa_aztnew2-D1+4(2) = wa_itab+3(2).
      wa_aztnew2-D1+6(2) = wa_itab+0(2).
    Append wa_aztnew2 to it_zlt_aztnew2.
    ENDLOOP.
    MODIFY Zlt_aztnew2 from table it_zlt_aztnew2.
    Looking forward for your suggestiojn.
    Regards
    Chandan

  • Dataelement of data type char but accepts only integers

    Hi Experts,
    I have a scenario where quantity field in output is editable and the user wants the quantity field printed without thousand separator. If i take a char field and display the field is editable then user may mistakenly type a,bcd...z/ special characters which it should not capture. Is there any char data type data element which accepts only integers. Because after that i need to save that value in z database table quantity field.
    Please share your suggestions.

    I have a scenario where quantity field in output is editable and the user wants the quantity field printed without thousand separator.
    I'm a bit lost with your statement, as you consider changing the data type it sounds like you have control over the program and thus most likely also over the forms (assuming that printing means sending some output to a printer). In that case I'd first consider keeping the quantity field as is and change the output logic (e.g. print program or form) so that the group (thousands) separator doesn't appear for that quantity field (and refrain from changing the field definition). (Similarly if it's just concerning the output of a field on the screen then an appropriate output mask/template for that screen field should be the right way to go.)

  • Difference between Data Type Char & VarChar

    Hi Experts,
    I a design document that I have, some of the Data Types are mentioned as CHAR(e.g.CHAR(4)), and a few others as VARCHAR(e.g.VARCHAR(20)), can you let me know what is the difference between the two.And how is such an object to be developed in BW seeing that we don't have a DataType called Varchar in BW?
    Thanks
    Aravind

    Hi
    The char is a fixed-length character data type, the varchar is a variable-length character data type.
    Because char is a fixed-length data type, the storage size of the char value is equal to the maximum size for this column. Because varchar is a variable-length data type, the storage size of the varchar value is the actual length of the data entered, not the maximum size for this column.
    You can use char when the data entries in a column are expected to be the same size.
    You can use varchar when the data entries in a column are expected to vary considerably in size.
    but that is no need in SAP BW, any how you are going to assign the length of the variable while creating...
    Thanks
    M Kalpana

  • Bex Report issue - transaction data of type Char not dispalyed complete

    Hi BI Expers ,
    I have one issue related to Bex reports here
    I have complete data loaded in DSO , there is one field Job Title which is having a length of 60 char . When I am executing the report in Bex Analyzer , the value for Job Title is getting truncated after 30 characters . Although full 60 chararacters are loaded in DSO  still I am not able to present them in reports .
    Can some one help here ,  whether this is Analyzer limitation or is there some setting to fix this issue .
    Regards
    Anurag

    Hi Anurag,
    Check the Output length of the object that is giving out put as 30 charecters.
    And check in Business Explorer tab option for BEx Description short, medium or High.
    Hope this helps.
    Veerendra.

  • Radix Sort for Type Chars

    I have a code for sorting Radix Sort of type Interger but im not sure how to modify it to sort Characters. This is my code for type Int:
    import java.util.ArrayList;
    import java.util.Iterator;
    public class RadixSort {
        private static final int RADIX = 10;
        private ArrayList[] buckets = new ArrayList[RADIX];
        public RadixSort() {
            for( int i = 0 ; i < RADIX; i++ ) {
                buckets[i] = new ArrayList();
            clearBuckets();
        private void clearBuckets() {
            for( int i = 0 ; i < RADIX; i++ ) {
                buckets.clear();
    private boolean distribute( Integer[] array, int position ) {
    // build the divisor
    int divisor = 1;
    while( position >= 1 ) {
    divisor *= RADIX;
    position--;
    boolean done = true;
    for( int i = 0 ; i < array.length; i++ ) {
    int val = (array[i].intValue()/divisor);
    if ( val != 0 ) done = false;
    int bin = val % RADIX;
    buckets[bin].add( array[ i ] );
    return done;
    private void collect( Integer[] array ) {
    int index = 0; // next available position in array
    for( int i = 0 ; i < RADIX; i++ ) {
    Iterator<Integer> it = buckets[i].iterator();
    while( it.hasNext() ) {
    array[ index ] = it.next();
    it.remove();
    index++;
    // what happens if this removed?
    if ( index >= array.length ) return;
    public void sort( Integer[] array ) {
    clearBuckets(); // is this necessary?
    int position = 0;
    boolean done;
    do {
    done = distribute( array, position );
    position++;
    collect( array );
    } while ( !done );

    As in the maximum size of a string?
    Do you mean characters or actual byte size?

Maybe you are looking for