Is it possible to display a date as (DD-MON-YYYY) in excel output using excel template in xml publisher

Is it possible to display a date as (DD-MON-YYYY) in excel output using excel template in xml publisher where date should be displayed as date only not string.

I've tried to use hierarchy node variables, but it seems like you can't specify a attribute of the hierarchy such as level.  So with the WBS hierarchy, if you create a hierarchy node variable, you specify the WBS value to select (If I understand this correctly).  I wish I could instead specify "give me all the WBS nodes that happen to have the value of the level attribute greater or equal to 3.  If I understand Juergens post, he is saying make security access so that only certain WBS levels can be returned in the query.  I suppose we can try that, but that would then preclude getting the level 1 and 2 in the future if the authorization is global.

Similar Messages

  • Display as Date Picker (DD-MON-YYYY)

    Hi everyone,
    can you please help me:
    I want to change an item as Display as Date Picker (DD.MM.YYYY). I cannot find this mask.
    Can you help me to change or can you tell me, where i could find an example?
    Tahnk you and best regards
    Siegwin

    Note that changing the format of a Date Picker does not change the default database input/output date format. Meaning, the NLS_DATE_FORMAT (the default format used when selecting from, or writing to, the Oracle database) does not change when the date picker is changed.
    The date picker format used should match the date format of the application. Meaning that if you retrieve a date from the database into a text field and it found to be in the YYYY-MM-DD format, then the date picker used should be in the YYYY-MM-DD format and if the date retrieved from the database is in the format DD-MON-RR then the Date Picker used should also be in that format.
    The date picker is there to allow dates to be chosen from a calendar in a particular “text” format.
    So, set your date picker to match your NLS DATE FORMAT setting.
    Now, if you want to change the default input/output date format (which is likely your desired effect), then you want to start looking at the NLS settings in your database, the NLS settings in your DAD (reference Marvel.conf), and the NLS settings as they are affected by your Web browser Regional Settings (i.e. Language, territory). If this is the case, refer to the following postings:
    HTMLDB - HOWTO Work with Dates
    Re: HTMLDB - HOWTO Work with Dates
    HTMLDB - HOWTO Work with Dates
    HTMLDB - HOWTO Work with Dates
    YYYY-MM-DD Format for Canada and ISO
    YYYY-MM-DD Format for Canada and ISO

  • How to display no data found in RTF template ? XML Publisher

    Hi
       I have xml file, how to display no data found in RTF template ? XML Publisher ?
    This is the XML File
    <?xml version="1.0" encoding="UTF-8"?>
    <INVALIDSERIALPRODUCT>
    <P_ORG_CODE></P_ORG_CODE><P_DATE_RANGE_FROM></P_DATE_RANGE_FROM><P_DATE_RANGE_TO></P_DATE_RANGE_TO><P_ITEM_NUMBER>VIR</P_ITEM_NUMBER><P_LOT_NUMBER></P_LOT_NUMBER><P_RMA_NUMBER_FROM></P_RMA_NUMBER_FROM><P_RMA_NUMBER_TO></P_RMA_NUMBER_TO><P_CUSTOMER_NAME></P_CUSTOMER_NAME><P_EMAIL></P_EMAIL>
    <G_SNQ>
    <USER_NAME>NSAWHNEY</USER_NAME>
    <G_SN>
    <ITEM_NUMBER>VIR823010</ITEM_NUMBER>
    <DESCRIPTION/>
    <LOT_NUMBER>Viread 245mg,Korea</LOT_NUMBER>
    <SERIAL_NUMBER>000000000004</SERIAL_NUMBER>
    <RMA_NUMBER>8200000106</RMA_NUMBER>
    <CUSTOMER_NAME>Yuhan Corporation Korea</CUSTOMER_NAME>
    <COUNTERFEIT_CHECK_DATE>2014-07-11T05:13:05.000-07:00</COUNTERFEIT_CHECK_DATE>
    <REASON>Serial number and lot combination not valid in Axway Track-n-Trace.</REASON>
    </G_SN>
    <G_SN>
    <ITEM_NUMBER>VIR823010</ITEM_NUMBER>
    <DESCRIPTION/>
    <LOT_NUMBER>Viread 245mg,Korea</LOT_NUMBER>
    <SERIAL_NUMBER>000000000004</SERIAL_NUMBER>
    <RMA_NUMBER>8200000106</RMA_NUMBER>
    <CUSTOMER_NAME>Yuhan Corporation Korea</CUSTOMER_NAME>
    <COUNTERFEIT_CHECK_DATE>2014-07-11T05:52:23.000-07:00</COUNTERFEIT_CHECK_DATE>
    <REASON>Serial number and lot combination not valid in Axway Track-n-Trace.</REASON>
    </G_SN>
    <G_SN>
    <ITEM_NUMBER>VIR823010</ITEM_NUMBER>
    <DESCRIPTION/>
    <LOT_NUMBER>Viread 245mg,Korea</LOT_NUMBER>
    <SERIAL_NUMBER>000000000016</SERIAL_NUMBER>
    <RMA_NUMBER>8200000106</RMA_NUMBER>
    <CUSTOMER_NAME>Yuhan Corporation Korea</CUSTOMER_NAME>
    <COUNTERFEIT_CHECK_DATE>2014-07-11T05:53:06.000-07:00</COUNTERFEIT_CHECK_DATE>
    <REASON>Serial number and lot combination not valid in Axway Track-n-Trace.</REASON>
    </G_SN>
    <G_SN>
    <ITEM_NUMBER>VIR823010</ITEM_NUMBER>
    <DESCRIPTION/>
    <LOT_NUMBER>Viread 245mg,Korea</LOT_NUMBER>
    <SERIAL_NUMBER>011000000011</SERIAL_NUMBER>
    <RMA_NUMBER>8200000106</RMA_NUMBER>
    <CUSTOMER_NAME>Yuhan Corporation Korea</CUSTOMER_NAME>
    <COUNTERFEIT_CHECK_DATE>2014-07-11T06:09:16.000-07:00</COUNTERFEIT_CHECK_DATE>
    <REASON>Serial number does not exist in Axway Track-n-Trace</REASON>
    </G_SN>
    <G_SN>
    <ITEM_NUMBER>VIR823010</ITEM_NUMBER>
    <DESCRIPTION/>
    <LOT_NUMBER>Viread 245mg,Korea</LOT_NUMBER>
    <SERIAL_NUMBER>000000000021</SERIAL_NUMBER>
    <RMA_NUMBER>8200000106</RMA_NUMBER>
    <CUSTOMER_NAME>Yuhan Corporation Korea</CUSTOMER_NAME>
    <COUNTERFEIT_CHECK_DATE>2014-07-11T06:11:09.000-07:00</COUNTERFEIT_CHECK_DATE>
    <REASON>Serial number and lot combination not valid in Axway Track-n-Trace.</REASON>
    </G_SN>
    <G_SN>
    <ITEM_NUMBER>VIR823010</ITEM_NUMBER>
    <DESCRIPTION/>
    <LOT_NUMBER>Viread 245mg,Korea</LOT_NUMBER>
    <SERIAL_NUMBER>000000000001</SERIAL_NUMBER>
    <RMA_NUMBER>8200000066</RMA_NUMBER>
    <CUSTOMER_NAME>Yuhan Corporation Korea</CUSTOMER_NAME>
    <COUNTERFEIT_CHECK_DATE>2014-07-11T06:46:04.000-07:00</COUNTERFEIT_CHECK_DATE>
    <REASON>Serial number and lot combination not valid in Axway Track-n-Trace.</REASON>
    </G_SN>
    <G_SN>
    <ITEM_NUMBER>VIR823010</ITEM_NUMBER>
    <DESCRIPTION/>
    <LOT_NUMBER>Viread 245mg,Korea</LOT_NUMBER>
    <SERIAL_NUMBER>000000000001</SERIAL_NUMBER>
    <RMA_NUMBER>8200000066</RMA_NUMBER>
    <CUSTOMER_NAME>Yuhan Corporation Korea</CUSTOMER_NAME>
    <COUNTERFEIT_CHECK_DATE>2014-07-11T07:08:21.000-07:00</COUNTERFEIT_CHECK_DATE>
    <REASON>Serial number and lot combination not valid in Axway Track-n-Trace.</REASON>
    </G_SN>
    <G_SN>
    <ITEM_NUMBER>VIR823010</ITEM_NUMBER>
    <DESCRIPTION/>
    <LOT_NUMBER>Viread 245mg,Korea</LOT_NUMBER>
    <SERIAL_NUMBER>00000000004 </SERIAL_NUMBER>
    <RMA_NUMBER>8200000066</RMA_NUMBER>
    <CUSTOMER_NAME>Yuhan Corporation Korea</CUSTOMER_NAME>
    <COUNTERFEIT_CHECK_DATE>2014-07-11T07:13:05.000-07:00</COUNTERFEIT_CHECK_DATE>
    <REASON>Unknow Error </REASON>
    </G_SN>
    <G_SN>
    <ITEM_NUMBER>VIR823010</ITEM_NUMBER>
    <DESCRIPTION/>
    <LOT_NUMBER>Viread 245mg,Korea</LOT_NUMBER>
    <SERIAL_NUMBER>000000000011</SERIAL_NUMBER>
    <RMA_NUMBER>8200000101</RMA_NUMBER>
    <CUSTOMER_NAME>Yuhan Corporation Korea</CUSTOMER_NAME>
    <COUNTERFEIT_CHECK_DATE>2014-07-11T19:32:00.000-07:00</COUNTERFEIT_CHECK_DATE>
    <REASON>Serial number and lot combination not valid in Axway Track-n-Trace.</REASON>
    </G_SN>
    <G_SN>
    <ITEM_NUMBER>VIR823010</ITEM_NUMBER>
    <DESCRIPTION/>
    <LOT_NUMBER>Viread 245mg,Korea</LOT_NUMBER>
    <SERIAL_NUMBER>000000000004</SERIAL_NUMBER>
    <RMA_NUMBER>8200000107</RMA_NUMBER>
    <CUSTOMER_NAME>Yuhan Corporation Korea</CUSTOMER_NAME>
    <COUNTERFEIT_CHECK_DATE>2014-07-14T02:49:40.000-07:00</COUNTERFEIT_CHECK_DATE>
    <REASON>Serial number and lot combination not valid in Axway Track-n-Trace.</REASON>
    </G_SN>
    <G_SN>
    <ITEM_NUMBER>VIR823010</ITEM_NUMBER>
    <DESCRIPTION/>
    <LOT_NUMBER>Viread 245mg,Korea</LOT_NUMBER>
    <SERIAL_NUMBER>000000000092</SERIAL_NUMBER>
    <RMA_NUMBER>8200000109</RMA_NUMBER>
    <CUSTOMER_NAME>Yuhan Corporation Korea</CUSTOMER_NAME>
    <COUNTERFEIT_CHECK_DATE>2014-07-14T07:52:22.000-07:00</COUNTERFEIT_CHECK_DATE>
    <REASON>Serial number and lot combination not valid in Axway Track-n-Trace.</REASON>
    </G_SN>
    <G_SN>
    <ITEM_NUMBER>VIR823010</ITEM_NUMBER>
    <DESCRIPTION/>
    <LOT_NUMBER>Viread 245mg,Korea</LOT_NUMBER>
    <SERIAL_NUMBER>000000000031</SERIAL_NUMBER>
    <RMA_NUMBER>8200000109</RMA_NUMBER>
    <CUSTOMER_NAME>Yuhan Corporation Korea</CUSTOMER_NAME>
    <COUNTERFEIT_CHECK_DATE>2014-07-15T02:24:27.000-07:00</COUNTERFEIT_CHECK_DATE>
    <REASON>Serial number and lot combination not valid in Axway Track-n-Trace.</REASON>
    </G_SN>
    <G_SN>
    <ITEM_NUMBER>VIR823010</ITEM_NUMBER>
    <DESCRIPTION/>
    <LOT_NUMBER>Viread 245mg,Korea</LOT_NUMBER>
    <SERIAL_NUMBER>000000000034</SERIAL_NUMBER>
    <RMA_NUMBER>8200000109</RMA_NUMBER>
    <CUSTOMER_NAME>Yuhan Corporation Korea</CUSTOMER_NAME>
    <COUNTERFEIT_CHECK_DATE>2014-07-15T02:30:28.000-07:00</COUNTERFEIT_CHECK_DATE>
    <REASON>Catchall fault scope has been executed</REASON>
    </G_SN>
    <G_SN>
    <ITEM_NUMBER>VIR823010</ITEM_NUMBER>
    <DESCRIPTION/>
    <LOT_NUMBER>Viread 245mg,Korea</LOT_NUMBER>
    <SERIAL_NUMBER>000000000010</SERIAL_NUMBER>
    <RMA_NUMBER>8200000114</RMA_NUMBER>
    <CUSTOMER_NAME>Yuhan Corporation Korea</CUSTOMER_NAME>
    <COUNTERFEIT_CHECK_DATE>2014-07-15T03:36:18.000-07:00</COUNTERFEIT_CHECK_DATE>
    <REASON>Serial number and lot combination not valid in Axway Track-n-Trace.</REASON>
    </G_SN>
    <G_SN>
    <ITEM_NUMBER>VIR823010</ITEM_NUMBER>
    <DESCRIPTION/>
    <LOT_NUMBER>Viread 245mg,Korea</LOT_NUMBER>
    <SERIAL_NUMBER>000000000158</SERIAL_NUMBER>
    <RMA_NUMBER>8200000114</RMA_NUMBER>
    <CUSTOMER_NAME>Yuhan Corporation Korea</CUSTOMER_NAME>
    <COUNTERFEIT_CHECK_DATE>2014-07-15T04:19:48.000-07:00</COUNTERFEIT_CHECK_DATE>
    <REASON>Serial number and lot combination not valid in Axway Track-n-Trace.</REASON>
    </G_SN>
    </G_SNQ>
    </INVALIDSERIALPRODUCT>
    thanks
    nks

    This is the General XML forum.
    The homepage description says :
    Discussion of the general XML language, standards (XSLT, XQuery, XMLSchema, etc.) and application management issues, suggestions and tips.
    The BI Publisher forum is here :BI Publisher
    So please mark this post as answered and ask again over there.

  • How to display date in dd-mon-yyyy hh:mm am/pm format

    Hi,
    I want to display date in dd-mon-yyyy hh:mm format in OA Page. Can any body pls give me sample code that i can write in the controller.
    Regards,
    Ram

    The date format in OAF Pages is controlled by profile ICX: Date format mask.This profile can be set at site as well as user level for the individual users to set the Date format.
    But I would advice not to go for setting different profile values at user level, because i remember some old threads, where seeded Oracle pages fail, as code their is not generalised to handle date formats.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Problem with data template in XML publisher

    When I create data template in xml publisher and save it, I get next message:
    dbase:
    Failed to save data.
    Error occurred when creating xml data.
    undefined
    NaN
    NaN
    dbase is a database server
    JDBC connection name:asu_fox
    JDBC connection URL: jdbc:oracle:thin:@dbase:1521:ora03
    Text in data template:
    <?xml version="1.0" encoding="UTF-8"?>
    <dataTemplate name="data_report_2" description="data template for reports 2 and 10"
    dataSourceRef="asu_fox" version="1.0">
    <dataQuery>
         <sqlStatement name="Q1">
              <![CDATA[select kol_pl,kol_sv,trud_pl,trud_sv,nom_per_p,kod_polu_p,p_v,kod_tmc,liter,kol_skl,nom_per,shifr_dse,shifr_izd,kod_polu,kod_post,trud,kol_m,tip_rin,kod_op,kod_op0,order1,n_val,shifr_usel_val,sum_trud_val,sum_trud_val_sv from reporter.t_plan_report_2]]>
         </sqlStatement>
    </dataQuery>
    <dataStructure>
         <group name="group_all" source="Q1">
              <element name="kol_pl_l" value="kol_pl"/>
              <element name="kol_sv_l" value="kol_sv"/>
              <element name="trud_pl_l" value="trud_pl"/>
              <element name="trud_sv_l" value="trud_sv"/>
              <element name="nom_per_p_l" value="nom_per_p"/>
              <element name="kod_polu_p_l" value="kod_polu_p"/>
              <element name="p_v_l" value="p_v"/>
              <element name="kod_tmc_l" value="kod_tmc"/>
              <element name="liter_l" value="liter"/>
              <element name="nom_per_l" value="nom_per"/>
              <element name="shifr_dse_l" value="shifr_dse"/>
              <element name="shifr_izd_l" value="shifr_izd"/>
              <element name="kod_polu_l" value="kod_polu"/>
              <element name="kod_post_l" value="kod_post"/>
              <element name="trud_l" value="trud"/>
              <element name="kol_m_l" value="kol_m"/>
              <element name="tip_rin_l" value="tip_rin"/>
              <element name="kod_op_l" value="kod_op"/>
              <element name="kod_op0_l" value="kod_op0"/>
              <element name="order1_l" value="order1"/>
              <element name="n_val_l" value="n_val"/>
              <element name="shifr_usel_val_l" value="shifr_usel_val"/>
              <element name="sum_trud_val_l" value="sum_trud_val"/>
              <element name="sum_trud_val_sv_l" value="sum_trud_val_sv"/>
         </group>
    </dataStructure>
    </dataTemplate>
    I get this error with different data templates.
    Help me, please.
    Vladimir

    Hi Vladimir
    Can you test the data template posted here. http://static7.userland.com/oracle/gems/leslieStuddard/EMPLOYEES.xml
    It needs to connect to the sample scott schema, hopefully you have it installed?
    Let me know if you get the same error.
    thanks
    Tim

  • How to Insert date in 'DD/MM/YYYY' format in oracle using stored procedure?

    Hi
    How to Insert date in 'DD/MM/YYYY' format in oracle using stored procedure?
    This is my Input data.
    11/25/2007.
    By using below query, it is inserted into database.
    sql>Insert into tblname values(to_date('11/25/2007','MM/DD/YYYY'));
    But using stored procedure, the same query is not running.
    It shows error like
    ORA-01843: not a valid month ORA-06512: at line 1
    Procedure:
    create or replace procedure Date_Test(datejoin in DATE) is
    begin
    insert into datetest values(to_date(datejoin,'MM/DD/YYYY'));
    end Date_Test;
    I had used 'nls_date_language = american' also.
    Prcodeure is created but not worked in jsp. The same error is thrown.
    Pls provide a solution

    This might help you....
    SQL> Create Table DateTest(col1 Date);
    Table created.
    Elapsed: 00:00:00.00
    SQL> create or replace procedure Date_Test(datejoin in DATE) is
    2 begin
    3 insert into datetest values(to_date(datejoin,'MM/DD/YYYY'));
    4 end ;
    5 /
    Procedure created.
    Elapsed: 00:00:00.00
    SQL> exec Date_Test('11/25/2007');
    BEGIN Date_Test('11/25/2007'); END;
    ERROR at line 1:
    ORA-01843: not a valid month
    ORA-06512: at line 1
    Elapsed: 00:00:00.00
    SQL> exec Date_Test(To_Date('11/25/2007','mm/dd/yyyy'));
    BEGIN Date_Test(To_Date('11/25/2007','mm/dd/yyyy')); END;
    ERROR at line 1:
    ORA-01843: not a valid month
    ORA-06512: at "CTBATCH.DATE_TEST", line 3
    ORA-06512: at line 1
    Elapsed: 00:00:00.00
    SQL> create or replace procedure Date_Test(datejoin in DATE) is
    2 begin
    3 insert into datetest values(datejoin);
    4 end ;
    5 /
    Procedure created.
    Elapsed: 00:00:00.00
    SQL> exec Date_Test(To_Date('11/25/2007','mm/dd/yyyy'));
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.00
    SQL> Select * from DateTest;
    COL1
    25-NOV-07
    Elapsed: 00:00:00.00
    SQL> create or replace procedure Date_Test(datejoin in VarChar2) is
    2 begin
    3 insert into datetest values(to_date(datejoin,'mm/dd/yyyy'));
    4 end ;
    5 /
    Procedure created.
    Elapsed: 00:00:00.00
    SQL> exec Date_Test('11/25/2007');
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.00
    SQL> select * from DateTest;
    COL1
    25-NOV-07
    25-NOV-07
    Elapsed: 00:00:00.00
    SQL>

  • How to convert date  into dd mon yyyy format

    hi all,
    i have a problem in date format i am using date like below .
    <%java.util.Date date = new java.util.Date();%>
    i am inserting date into a table and its storing like this
    insert into tablename (d_date) values (date)
    and its inserting date like below
    Sun Oct 19 09:05:45 GMT+03:00 2003
    i want to fetch date in dd mon yyyy format.
    with this format i want to make a select query.i struck with the format conversion.
    how to do this.
    any comments please.
    any help

    hi all,
    i understand now where i am wrong.
    the below code is not working why because in my server where i am executing code the regional setting month value is in arabic.
    i executed the same code in a different server where date and time jones are english its working fine.
    All the problem is in regional setting and not the jsp code.
    <%
    String whtEverDateFormatYouWAnt = "dd MMM yy";
    String str = new SimpleDateFormat(whtEverDateFormatYouWAnt).format(new SimpleDateFormat("EEE MMM dd HH:mm:ss vvv yyyy").parse("Sun Oct 19 09:05:45 GMT+03:00 2003"));
    out.print(str);
    %>
    Thanks a lot for the excellent solution.
    Thanks again.

  • Need regular expression for oracle date format 'DD-MON-YYYY'

    Hi,
    Can anybody tell me the regular expression to validate date in 'DD-MON-YYYY'.
    My concept is i have a table with just two columns item_name and item_date
    Both fields are varchar2 and i want to fetch those records from this table which have valid date format('DD-MON-YYYY').

    If it must be a regexp, this is a starter for you, note it carries the caveats mentioned by both posters above and in the linked thread
    mkr02@ORA11GMK> with data as (select '10-jan-2012' dt from dual
      2  union all select '10-111-2012' from dual
      3  union all select 'mm-jan-2012' from dual
      4  union all select '10-jan-12' from dual)
      5  select
      6  dt,
      7  case when regexp_like(dt,'[[:digit:]]{2}-[[:alpha:]]{3}-[[:digit:]]{4}','i') then 1 else 0 end chk
      8  from data
      9  /
    DT                 CHK
    10-jan-2012          1
    10-111-2012          0
    mm-jan-2012          0
    10-jan-12            0It will not validate content, only string format.
    And to emphasis the points made in the linked thread - dates in text columns is poor design. Always.

  • Display header for excel output using FM GUI_DOWNLOAD

    Good morning experts,
                     I've been exporting my output in excel using the FM GUI_DOWNLOAD.  The problem is, my header is not displaying.  Kindly check what I've done wrong.  Below is how I declared my header.
    DATA: BEGIN OF header OCCURS 0,
            head1(15),
            head2(15),
          END OF header.
    *&      FORM USER_COMMAND
          COMMAND for ALV Grid Buttons
    FORM user_command USING r_ucomm LIKE sy-ucomm
                      rs_selfield TYPE slis_selfield.
    PERFORM write_header.
    CASE r_ucomm.
      WHEN 'XCEL'.
        CONCATENATE: 'C:\' fname sy-datum INTO fname.
        CONCATENATE: fname '.XLS' INTO FILENAME.
        CALL FUNCTION 'GUI_DOWNLOAD'
          EXPORTING
            FILENAME = FILENAME
            WRITE_FIELD_SEPARATOR = 'X'
          TABLES
            DATA_TAB = jtab
            FIELDNAMES = header
          EXCEPTIONS
            FILE_WRITE_ERROR        = 1
            NO_BATCH                = 2
            GUI_REFUSE_FILETRANSFER = 3
            INVALID_TYPE            = 4
            NO_AUTHORITY            = 5
            UNKNOWN_ERROR           = 6
            HEADER_NOT_ALLOWED      = 7
            SEPARATOR_NOT_ALLOWED   = 8
            FILESIZE_NOT_ALLOWED    = 9
            HEADER_TOO_LONG         = 10
            DP_ERROR_CREATE         = 11
            DP_ERROR_SEND           = 12
            DP_ERROR_WRITE          = 13
            UNKNOWN_DP_ERROR        = 14
            ACCESS_DENIED           = 15
            DP_OUT_OF_MEMORY        = 16
            DISK_FULL               = 17
            DP_TIMEOUT              = 18
            FILE_NOT_FOUND          = 19
            DATAPROVIDER_EXCEPTION = 20
            CONTROL_FLUSH_ERROR = 21
            OTHERS = 22.
          IF sy-subrc <> 0.
            MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ELSEIF sy-subrc = 0.
            MESSAGE S000(38) WITH 'File ' fname 'saved in Drive C.'.
          ENDIF.
    ENDCASE.
    ENDFORM.
    *&      Form  write_header
          text
    -->  p1        text
    <--  p2        text
    FORM write_header.
    DATA: ctr(2) TYPE p.
    DO 6 TIMES.
      ADD 1 TO ctr.
      CASE ctr.
        WHEN 1. header-head1 = 'EMPLOYEE'.
                header-head2 = '   NO   '.
        WHEN 2. header-head1 = 'EMPLOYEE'.
                header-head2 = '  NAME  '.
        WHEN 3. header-head1 = 'LOAN'.
                header-head2 = 'TYPE'.
        WHEN 4. header-head1 = 'APPROVAL'.
                header-head2 = '  DATE  '.
        WHEN 5. header-head1 = 'LOAN'.
                header-head2 = 'CODE'.
        WHEN 6. header-head1 = '   MONTHLY  '.
                header-head2 = 'AMORTIZATION'.
      ENDCASE.
      APPEND header.
      CLEAR: header.
    Please help me.  All helpful advice will be rewarded points.  Thanks a lot.

    Follow this Example. You can do it in the below manner
    You need not add HEADER1 HEADER2 to the internal table. You can just declare one field like below and append all the header columns to the internal table HEADER
    data : begin of IT_HEADING occurs 0,
             TEXT(15),
           end of IT_HEADING.
        IT_HEADING-TEXT = 'Company Code'.
        append IT_HEADING.
        IT_HEADING-TEXT = 'PO Number'.
        append IT_HEADING.
        IT_HEADING-TEXT = 'PO Line Item'.
        append IT_HEADING.
        IT_HEADING-TEXT = 'SO Number'.
        append IT_HEADING.
        IT_HEADING-TEXT = 'SO Line Item'.
        append IT_HEADING.
        IT_HEADING-TEXT = 'PO Quantity'.
        append IT_HEADING.
        IT_HEADING-TEXT = 'PO Unit'.
        append IT_HEADING.
        IT_HEADING-TEXT = 'PO Amount'.
        append IT_HEADING.
        IT_HEADING-TEXT = 'PO Currency'.
        append IT_HEADING.
        IT_HEADING-TEXT = 'Job Number'.
        append IT_HEADING.
        IT_HEADING-TEXT = 'SO Quantity'.
        append IT_HEADING.
        IT_HEADING-TEXT = 'SO Unit'.
        append IT_HEADING.
        IT_HEADING-TEXT = 'SO Amount'.
        append IT_HEADING.
        IT_HEADING-TEXT = 'SO Currency'.
        append IT_HEADING.
        move P_FNAME to L_FNAME.
        call function 'GUI_DOWNLOAD'
          exporting
            FILENAME                = L_FNAME
            FILETYPE                = 'DAT'
          tables
            DATA_TAB                = IT_FINAL
            FIELDNAMES              = IT_HEADING
          exceptions
            FILE_WRITE_ERROR        = 1
            NO_BATCH                = 2
            GUI_REFUSE_FILETRANSFER = 3
            INVALID_TYPE            = 4
            NO_AUTHORITY            = 5
            UNKNOWN_ERROR           = 6
            HEADER_NOT_ALLOWED      = 7
            SEPARATOR_NOT_ALLOWED   = 8
            FILESIZE_NOT_ALLOWED    = 9
            HEADER_TOO_LONG         = 10
            DP_ERROR_CREATE         = 11
            DP_ERROR_SEND           = 12
            DP_ERROR_WRITE          = 13
            UNKNOWN_DP_ERROR        = 14
            ACCESS_DENIED           = 15
            DP_OUT_OF_MEMORY        = 16
            DISK_FULL               = 17
            DP_TIMEOUT              = 18
            FILE_NOT_FOUND          = 19
            DATAPROVIDER_EXCEPTION  = 20
            CONTROL_FLUSH_ERROR     = 21
            others                  = 22.
        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
    Gopi

  • Convert varchar2 field into date formatted: DD-MON-YYYY

    Thanks in advance for anyone's help on this matter as I know it takes your time and expertise. I am pretty new to SQL but learning my way through it just have an issue with a text to date field conversion. It is an Oracle 10g database and I am writing in SQL. There is a field called Demand which is formatted in varchar2 format of ddmmyy. There is also a field that is formatted as a date called Payment which is formatted as DD-MON-YYYY.
    Essentially I need to do a simple Payment >= Demand, however as you can see that is some issue with that being a varchar2 field. Does anyone know if it is possible to do that type of expression against those two fields. Was thinking about possibly converting the varchar2 to a date but not sure how to get to that DD-MON-YYYY format.
    Also there are situations where this Demand field will often times be null as it would have never recieved any outbound correspondence in the past and would not have a date at all.
    Thanks
    Edited by: user10860766 on Aug 18, 2009 8:14 AM
    Edited by: user10860766 on Aug 18, 2009 8:19 AM

    Hi,
    It's hard to detect bad dates in pure SQL, especially if you need to be precise about when February 29 is valid.
    It's easy with a user-define function, like the one in [this thread|http://forums.oracle.com/forums/thread.jspa?messageID=3669932&#3669932].
    Edited by: Frank Kulash on Aug 18, 2009 3:50 PM
    To create a stand-alone function:
    CREATE OR REPLACE FUNCTION     to_dt
    (     in_txt          IN     VARCHAR2                    -- to be converted
    ,     in_fmt_txt     IN     VARCHAR2     DEFAULT     'DD-MON-YYYY'     -- optional format
    ,     in_err_dt     IN     DATE          DEFAULT     NULL
    RETURN DATE
    DETERMINISTIC
    AS
    BEGIN
         -- Try to convert in_txt to a DATE.  If it works, fine.
         RETURN     TO_DATE (in_txt, in_fmt_txt);
    EXCEPTION     -- If TO_DATE caused an error, then this is not a valid DATE: return in_err_dt
         WHEN OTHERS
         THEN
              RETURN in_err_dt;
    END     to_dt
    /To use it:
    SELECT  primary_key  -- and/or other columns to identify the row
    ,       demand
    FROM    table_x
    WHERE   demand          IS NOT NULL
    AND     to_dt ( demand
               , 'DDMMYY'
               )          IS NULL;

  • Is it possible to display external data in SAP B1 Grid?

    Hi,
    If the data reside in SAP B1 DB, it is normal. But if I have some data outside of SAP B1, for example in our old ERP system which is also a MS SQL db. Can I display it a SAP B1's grid? Reading external data shouldn't be a problem, but can I display it in a standard SAP B1 grid? I checked Grid object all method or properties, seems no way to load an external data source or manually create column and rows. Any idea?
    Thanks,
    Lan

    Hi Gordon,
    Thanks for your reply. Can you describe more detail about how to map an UDF to other DB? I check the UDF management menu, I didn't see any menu which allows me to link to external DB. The only similar option is you can set a linked table for the UDF, but that only applies to the UDO table inside SAP B1 DB.  Also, UDF is just a field and usually my external data is a query which returns me rows with mutiple columns. I tried the UDO table, nothing can be found to allow me connecting to an external DB.
    Thanks,
    Lan

  • Is it possible to display a tag at the selection screen in the output.

    Hi all,
       When you go to se38 and in the program editor screen, at the bottom right end of the screen you find a value called NUM and when you place your cursor on that it displays a tag that says "Num Lock Mode. Double click to toggle."
       My query is, when i execute a report it takes me to the output screen that has a parameter, here i want to display a tag, say "enter the record as it is in the database". Is it possible to have such an option.
       If you'll are wondering why I'm looking for such an option it is just to make a report that can be understood by many.
    P.S: Not only on the NUM field the tag is available. Even on tools like activate display and so on.
    Regards,
    Narayanan Chandran.

    If it's a report program, use a comment in the selcetion screen for information of the user as shown below.
    * Information
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-003.
    SELECTION-SCREEN COMMENT /1(60) text-004. "Text containing the information message
    SELECTION-SCREEN END OF BLOCK b1.
    If you are using a module pool, you can create a tooltip for the element as suggested.

  • Displaying the date in dd/mm/yyyy format

    Hi,
      In VC 7.1, Whenever the user selects the date from the calender it is displayed in mm/dd/yyyy format .but i want it to be displayed in dd/mm/yyyy format.please help me.
    Regards,
    Priya
    Edited by: priya on Oct 7, 2008 11:01 AM

    Hi
    Try using the DSTR Dynamic Expression function. Add a string field to your form or table and format it using the DSTR function.
    It should look something like "=DSTR(@CREAT_DATE,"DD/MM/YYYY")"
    You can find more information about date conversion functions in the [Date and Time Functions help page|http://help.sap.com/saphelp_nw70/helpdata/en/2b/6c37121f28462a8710c0c7493506dd/frameset.htm]
    Regards,
       Shai

  • How to display the data in row wise in smartform

    Hi,
        I have to make a modification a smartform of poprinting and i want to display the row wise . At present it is displaying the  
        column wise. Actually there is a text which i want to display the data row wise.
        It is possible to display the data in row wise of the text .
    Edited by: nav009 on Oct 8, 2009 10:39 AM

    Hello ,
    I  assume that your requiremen is related to smartform.the below is the solution i suggest.
    As per my understanding of your requirement ,It's clear that as of now there is some description field which is also getting displayed along with other PO fields.
    However you would like to display the description field in a new line since the length of this field is longer than other fields as a result the data is getting scattered .
    Therefore one better option could be: since the whole data from PO would be in a loop you can display all other fields in one line type of the table as per the intial requirement and you display the description line alone in a new line type wth the desired length so that data would not be scattered and no data loss would happen.
    I assume you are aware of creating of line types for table.
    Thanks
    M.Naveen.

  • How to display table data without  using ALV  and table element.

    Hi,
            Its possible to display table data without using ALV  and table element.
           Every time i am fetching data based on (customer,status) fields and displaying these data in my output using alv
           (every time i am fetching single row data ),
           But problem is alv occupying more space in the output , i want to display data part only i dont want field names,
           settings and header data etc..things.
          Give solution to  display data part..
    Regards,
    Rakhi.

    Hi,
    Does you mean that you need ALV without default Function Toolbar...? If this is the case, the easy solution would have been to use Table Element rather. But, if you need to use ALV only without Function Toolbar, you can do away with that as well.
    In that case, after calling GET_MODEL, you need to add few more lines of codes to achieve your goal. Those lines are --
      DATA LV_VALUE TYPE REF TO CL_SALV_WD_CONFIG_TABLE.
        LV_VALUE = LO_INTERFACECONTROLLER->GET_MODEL(
    * Standard Filter Function setting to FALSE
        LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_SORT_COMPLEX_ALLOWED( ABAP_FALSE ).
        LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_FILTER_COMPLEX_ALLOWED( ABAP_FALSE ).
        LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_FILTER_FILTERLINE_ALLOWED( ABAP_FALSE ).
        LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_DISPLAY_SETTINGS_ALLOWED( ABAP_FALSE ).
        LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_VIEW_LIST_ALLOWED( ABAP_FALSE ).
        LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_SORT_HEADERCLICK_ALLOWED( ABAP_FALSE ).
        LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_HIERARCHY_ALLOWED( ABAP_FALSE ).
    * Standard Filter Function setting to FALSE Ends
    Here as you can easily notice that LV_VALUE is instantiated on CL_SALV_WD_CONFIG_TABLE. Now, using this LV_VALUE, you set standard functions as False to dis-allow their display.
    Hope this answers your query.
    Thanks.
    Kumar Saurav.

Maybe you are looking for