Skip to Content
author's profile photo Former Member
Former Member

date in BSP

How do I incorporate the functionality of selecting date into Input box, which would be then accessed by the OOabap code and posted to Database.

Eg: There would be a icon beside the input box, when the user clicks it a calender for the present month would pop-up, and then the user would be able to select the date.

PSEUDO-Code would be really usefull.

Thanks..

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Feb 02, 2007 at 08:16 AM

    Hi

    just put this htmlb-extension into the layout of your bsp-application.

    <htmlb:inputField  id="date" value="<%= lv_date%>" type="DATE" showHelp="TRUE" />

    The importing attribute for showing a help-button which shows you the calendar is "showHelp".

    And now you can pass the variable "lv_date" in your OnInputProcessing eventhandler...

    Sometimes you have to convert this date into the "SAP-DATE", use this function:

    capture it from your html-site:

    DATA: field_date(10) TYPE c.
    field_date = request->get_form_field( 'date' ).

    and then convert it into internal format:

          
          CALL FUNCTION 'CONVERT_DATE_TO_INTERN_FORMAT'
                    EXPORTING  DATUM = field_date
                               DTYPE = 'DATS'
                    IMPORTING  IDATE = your_wa-date_var.

    regards.

    steffen

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 02, 2007 at 08:34 AM

    Hi,

    You can also directly define a work area of ur db table type and get the date field as

    wa-dbdate = date.

    Here date is input field id which u have given in layout and dbdate is date field of database.

    and then insert/append/modify db from work area.

    Regards,

    Sneha.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.