Creating a Datetimepicker in screen painter

Hello guys,
Im new to using screen painter and I am trying to make a payroll add -on for SAP B1. The payroll application I have right now, I made in C# .NET. The forms are winforms and I want to make them again with screen painter using SAP B1 8.81 PL 4.
On the toolbox for screen painter, I do not see any datetimepicker that I can drag onto the form unlike in Visual Studio.
So how do I get to have a datetimepicker using screenpainter?

I got this answer online and it works for any who might need it
//add user date dataset
form.DataSources.UserDataSources.Add("UDDate", SAPbouiCOM.BoDataType.dtDATE);
oItem = form.Items.Item("datestart");
dateStart = oItem.Specific;
//Bind dateStart to User Datasource
dateStart.DataBind.SetBound(true, "", "UDDate");

Similar Messages

  • How to create a table in screen Painter ?

    Hi can anyone give me the procedure to create a table in screen painter layout?
    Thks

    Hi this is my code but still error...please suggest me the corrections..
    TABLES: ZONE.
    DATA: ITAB LIKE ZONE OCCURS 0 WITH HEADER LINE,
    WA LIKE ITAB.
    MY TABLE CONTROL NAME IS ZMATERIAL
    CONTROLS: ZMATERIAL TYPE TABLEVIEW USING SCREEN 100.
    CALL SCREEN 100.
    *&      Module  STATUS_0100  OUTPUT
          text
    MODULE STATUS_0100 OUTPUT.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
    loop at itab with control ZMATERIAL.
    module select_data.
    endloop.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE USER_COMMAND_0100 INPUT.
    loop at itab.
    endloop.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    WAITING FOR YOUR REPLY

  • How to create password field in screen painter

    hi all,
        i am designing login screen. in that i hv to create one input-output field as a password field. i.e when i enter the characters it will display in <b>*(star) format.</b>
         also is there any way to do the same using <b>parameters</b> statement in report? give me the Way or coding.
    thanks in advance,
    regards,
    Vinod.

    HI GOPI
       I TRY TO ENCRYPT FORMULA IN PASSWORD PROTECT.BUT ITS NOT WORK .ITS SUCCESSFUL COMPILE & WHEN I PUT PASSWORD ITS SHOWING WHAT I GIVEN THERE. SO I THINK IN MY CODING PART THERE IS SOME ERROR.CAN U HELP ME PLEASE.
    I BRIEFLY DESCRIBE.........
    HERE FOR LOGIN PURPOSE I USE MODULE POOL PROGRAM & THERE I CREATE TWO FIELD ONE FOR (USER_NAME & PASSWORD).THERE SHOWING TWO ERROR (1ERROR ONE) EVEN IF YOU GIVE WRONG USER & PASSWORD THEN LOGIN SUCCESSFUL AND (2 SECOND ONE) IF YOU GIVE PASSWORD IN PASSWORD FIELD THAT   LOOK LIKE (****) MEANS ENCRYPT.
    I ALSO SEND MY CODING CAN YOU CHECK PLEASE.
    REPORT  ZLOGIN_PRO MESSAGE-ID ZBABUN.
    TABLES: ZTABLE_LOGIN.
    data: itab like table of ztable_login with header line,
                  OK TYPE SY-UCOMM.
                     CALL SCREEN 100.
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE USER_COMMAND_0100 INPUT.
    CASE OK.
    WHEN 'LOGIN'.
        SELECT * FROM ZTABLE_LOGIN INTO TABLE ITAB.
            SELECT * FROM ZTABLE_LOGIN INTO TABLE ITAB WHERE PASSWORD = ZTABLE_LOGIN-PASSWORD.
      SELECT USER_NAME FROM ZTABLE_LOGIN INTO ITAB-USER_NAME.
       SELECT PASSWORD FROM ZTABLE_LOGIN INTO ITAB-PASSWORD.
    LOOP AT ZTABLE_LOGIN.
      if itab-user_name ca itab-password.
           message i006.
    ELSEIF SCREEN-GROUP1 = 'ZTABLE_LOGIN-PASSWORD'.
    SCREEN-INVISIBLE = '1'.
    MODIFY ZTABLE_LOGIN.
    CONTINUE.
           call transaction 'SBWP'.
         else.
         message e020.
         CLEAR  : ZTABLE_LOGIN-USER_NAME,ZTABLE_LOGIN-PASSWORD.
       endif.
    END LOOP.
    WHEN 'LOGOUT'.
    MESSAGE I007.
    LEAVE PROGRAM.
    WHEN 'CREATE'.
      CALL TRANSACTION 'ZLOGIN_NEW_USER'.
    ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  IN
    note: FIELD NAME OF USER_NAME = ZTABLE_LOGIN-USER_NAME
                                        PASSWORD = ZTABLE_LOGIN-PASSWORD
    PLEASE REPLAY ME.
    .I AM WAIT FOR UR RESULT.
    THANKS
    LAXMIKANTA.

  • How to increase formUID to a form created with screen painter

    Hi,
    I've got a problem with my form. I created a form with screen painter but i can't succeed to increase my UID form.
    For example, when i open my first form, the UID is always at FP_0.
    My script:
    private string FormUID = null;
      public FP_Form(int NumInstance_)
                this.NumInstance = NumInstance_;
    this.FormUID = "FP" + NumInstance.ToString();
                load();
              oDBDataSource = oForm.DataSources.DBDataSources.Add(DBDataSourceTable);
              SBO_Application.ItemEvent += new SAPbouiCOM._IApplicationEvents_ItemEventEventHandler(SBO_Application_ItemEvent);
    private void SBO_Application_ItemEvent(string _FormUID, ref SAPbouiCOM.ItemEvent pVal, out bool BubbleEvent)
                BubbleEvent = true;
                try
    if (_FormUID == this.FormUID) //here "_FormUID" is increased but "this.FormUID" is still = FP_0
                        switch (pVal.EventType)// selon le type d'action executée
                            case SAPbouiCOM.BoEventTypes.et_FORM_LOAD:
                                if (pVal.BeforeAction == true)
                                    SAPbouiCOM.ComboBox List_reseau = (SAPbouiCOM.ComboBox)oForm.Items.Item("5").Specific;
                                    List_reseau.ValidValues.Add("1", "test");
                               break;
                           case ...
                              break;
    Please help.
    Regards,
    Zakia.

    Hi J.
    The answer is yes You just have to give your form a unique id.
    1) Give your form in screen painter a name like BTWO_DYNAMIC_UID (just plain text).
    2) Make sure your <i>FormType</i> and <i>appformnumber</i> have a unique number (i.e. 2000060001). You can do this in the xml source.
    3) By loading your document replace the BTWO_DYNAMIC_UID with an unique id. I have a counter that's a member of my class and increase that number to get a unique id (BTWO_F_1, BTWO_F_2 etc)
    I have added a code sample, SBOApplication is my SAP application object and mFormNumber is a member (integer) of my class.
    <i>Succes d'r mee, en als 't nie lukt hoor ik het wel... ;)</i>
    <b>Code (C#):</b>
    // New xml document
    XmlDocument oXmlDoc = new XmlDocument();
    private Form LoadUniqueForm(string AMyFile)
      // Define your path to
      sPath = @"Forms" + AMyFile;
      // Load the form
      oXmlDoc.Load(sPath);
      // Replace the string with an unique id
      mFormNumber++;
      string sXML = oXmlDoc.InnerXml.Replace("BTWO_DYNAMIC_UID", "BTWO_F_" + mFormNumber.ToString());
      // load the XML file in SAP
      SBOApplication.LoadBatchActions(ref sXML);
      // Return the form
      return SBOApplication.Forms.Item("BTWO_F_" + mFormNumber.ToString());

  • Coding in form created in screen painter

    I have created a form in screen painter.How can I do coding in this form.I have added a save button in the form.How can I fire the click event on this button.The file created has extension srf and it can not be opened in asp.net.

    Hi Dilip,
    Although the file has a srf file extension it is actually an XML file. You can use this file to create an instance of your form through code. In the UI API there is a Application object. This object has a method called LoadBatchActions which takes one parameter which is your srf file (ie the path and filename). Calling this method will create a form in the active UI based on your srf file. You can then create an instance of the Form object in the UI API and use this to manipulate your form through code.
    I also recommend you look at the SDK learning material here on the SDN and also look at the samples that come with the SDK.
    Kind Regards,
    Owen
    P.S. Please note that you've posted your question in the application forum for SAP Business One. This forum is for discussions on the application functionality of SBO and not the SDK. Instead, please post queries about screen painter and other development questions here:
    SAP Business One SDK
    Thanks

  • Load form created by screen painter

    hello every one,
    i've a problem. What are the steps to be followed to load a form created by screen painter?  might i have any  sample code In order to understand the various phases? thank a lot

    hi
    lorenzo pelati
      first u   create  a  form in   screen painter , nd after save this form , when  u save this form than this fom  extation is  .srf file,   after that  convert this file  to  .xml
      file ,  and after call  this form to   our application ,
    follow this code.........................................
    in this code  newpa.xml     is a one form xml file.
    in this code   SBOFormEditor_13  is a screen painter  form id,
      private void LoadFromXML( ref string FileName ) {
            System.Xml.XmlDocument oXmlDoc = null;
            oXmlDoc = new System.Xml.XmlDocument();
            // load the content of the XML File
            string sPath = null;
            sPath = System.IO.Directory.GetParent( Application.StartupPath ).ToString();     
              sPath = System.IO.Directory.GetParent( sPath ).ToString();
              oXmlDoc.Load( sPath + "
    " + FileName );
            // load the form to the SBO application in one batch
              string sXML = oXmlDoc.InnerXml.ToString();
            SBO_Application.LoadBatchActions(ref sXML);
        private void SaveAsXML( ref SAPbouiCOM.Form Form ) {
            System.Xml.XmlDocument oXmlDoc = null;
            string sXmlString = null;
            oXmlDoc = new System.Xml.XmlDocument();
            // get the form as an XML string
            sXmlString = Form.GetAsXML();
            // load the form's XML string to the
            // XML document object
            oXmlDoc.LoadXml( sXmlString );
            string sPath = null;
            sPath = System.IO.Directory.GetParent( Application.StartupPath ).ToString();
            SBO_Application.MessageBox("sahe ha " + sPath, 1, "OK", "", "");
            // save the XML Document
            oXmlDoc.Save( ( sPath + @"\newpa.xml" ) );
      public   call form() {
            SetApplication();
            string transTemp0 = "newpa.xml";
            LoadFromXML( ref transTemp0 );
                    oForm = SBO_Application.Forms.Item("SBOFormEditor_13");
            // Show the loaded Form
            oForm.Visible = true;
            SaveAsXML( ref oForm );
       fallow this code .

  • Background color change option for box in screen painter

    have created a box in screen painter . is there any option to change the back ground color of this box.
    please help

    No, you can not change the background color of your screen painter box.

  • Report  and SAP-SCRIPT  &  SCREEN PAINTER

    Hi all ,
      I need some help.
    1)How to transport sap-script.
    2) print program of sap script are client-dependent or client-independent.
    3)Database tables ( on se11)  are client-dependent or client-independent. ( is sy-mandt will make dependent or independent)
    4) how to create select-option on screen painter or with module pool programming.
    5)performance tuning for ABAP report.
    points for all answers assured.
    thanks.

    Ihave some notes on transporting sapscript for earlier version of SAP. 
    The steps may vary based on your version and Suppport PAckages levels. 
    In the future your version and platform detials will help in a quicker response.
    Summary of sapscript EXPORT / IMPORT process.
    Steps to export Layout Sets (sapscript)
    Log on the Source system and client
    This may have to be client 000 and then again in the client in which you do developement.
    Note that sapscript is client dependent
    SE38 and execute program RSTXR3TR
    Tranport number: DS1K9#####
    Mode field: EXPORT
    File system: Server -  radio button
    The dataset name: /usr/sap/trans/data/DS1K9#####.layoutsets
    CHECK the Display dataset contents checkbox
    Execute
    Steps to import Layout Sets (sapscript)
    Log on the target system and client.  This may have to be client 000 and then in the client in which you test, or ultimatly production.
    SE38 and execute program RSTXR3TR
    Tranport number: DS1K9#####
    Mode field: IMPORT
    The dataset name: /usr/sap/trans/data/DS1K9#####.layoutsets
    CHECK the Display dataset contents checkbox
    Execute
    Note: when importing into Production, the export does not need to be performed. 
    Therefore only the import protion is required once the sapscript has been exported from Development.

  • Column order in screen painter

    Hello all,
    After creating a form in screen painter the column are not showing in the order they are shown in screen painter.
    I checked the .srf file and the order of the columns is correct, but when SAP B1 opens the form the matrix has the order of the columns all mixed up.
    Any ideias?
    Thanks in advance.

    Hi,
    Your question belongs to SDK forum.  You may search that forum first.  If there is no similar question with answer, post it there.
    Thanks,
    Gordon

  • Image in Screen Painter

    How can i place an in image in the screen painter?

    Hi, first checkout whether your picture is present in your server or not.
    i am pasteing a code where i have taken sap enjoy pictur which is present default.
    Please see that your custom container name when u create for picture in screen painter will be PICTURE_CONTAINER1.
    Copy paste this code....
    In TOP declarations....
    TYPES pict_line(256) TYPE c.
    DATA :init,
    container TYPE REF TO cl_gui_custom_container,
         editor    TYPE REF TO cl_gui_textedit,
    picture   TYPE REF TO cl_gui_picture,
    pict_tab TYPE TABLE OF pict_line,
    url(255) TYPE c.
    in PBO
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'ZTECH'.
    SET TITLEBAR 'SELECT'.
      IF init is initial.
        init = 'X'.
        CREATE OBJECT:
               container  EXPORTING container_name = 'PICTURE_CONTAINER1',
               picture    EXPORTING parent = container.
      ENDIF.
      IMPORT pict_tab = pict_tab FROM DATABASE abtree(pi) ID 'ENJOY'.
      CALL FUNCTION 'DP_CREATE_URL'
        EXPORTING
          type    = 'IMAGE'
          subtype = 'GIF'
        TABLES
          data    = pict_tab
        CHANGING
          url     = url.
      CALL METHOD picture->load_picture_from_url
        EXPORTING
          url = url.
      CALL METHOD picture->set_display_mode
        EXPORTING
          display_mode = picture->display_mode_fit_center.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    Hope this helps.
    Thks

  • Calculator in Screen painter

    Can any one send me the program to create a calculator in screen painter.

    Hi,
    Check the Function module FITRV_CALCULATOR.
    Using this you can get the idea of creating your own calculator.
    Regards,
    Sesh

  • Subscreen in Screen Painter

    Hi Friends,
    I have created a layout in screen painter using Tabstrip with wizard which is having Tabstrip control with four tabs. 
    Now I want to attach to table to each tab,so that I can input some data and save in the table.
    I request you to kindly guide me as to how to do the same.
    TIA.
    Regards,
    Mark K

    Hi
      Insert subscreens in 4 tabs and give names to those subscreens, and create these 4 screens and change the attributes of these screens to subscreen, and call them in main screen like this.
    process before output.
    MODULE STATUS_1000.
    call subscreen: <subscreen area1> including sy-repid s_no, -> <b>Screen no variable</b>
                             <subscreen area2> including sy-repid s_no,
    process after input.
      module user_command_1000.
    call subscreen : <subscreen area1>,<subscreen area2>.
    In the main screen code the program somewhat like this.
    *& Module pool       ZHTABSTRIP_CONTROL                                *
    program  zhtabstrip_control                      .
    tables : lfa1,kna1,mara,vbak.
    data : begin of itab occurs 0,
             lifnr like lfa1-lifnr,
             name1 like lfa1-name1,
             kunnr like kna1-kunnr,
             land1 like kna1-land1,
             matnr like mara-matnr,
             ersda like mara-ersda,
             ernam like mara-ernam,
             vbeln like vbak-vbeln,
             erdat like vbak-erdat,
             erzet like vbak-erzet,
           end of itab.
    controls : tabstrip type tabstrip.
    data: s_no like sy-dynnr value 100. -> <b>screen no which u r calling for the subscreen.</b>
    *&      Module  USER_COMMAND_1000  INPUT
          text
    module user_command_1000 input.
      case sy-ucomm.
        when 'VEND'.
         s_no = 100.
         tabstrip-activetab = 'VEND'.
        when 'CUST'.
         s_no = 200.
         tabstrip-activetab = 'CUST'.
        when 'MAT'.
         s_no = 300.
         tabstrip-activetab = 'MAT'.
        when 'SD'.
         s_no = 400.
         tabstrip-activetab = 'SD'.
        when 'EXIT'.
         leave program.
      endcase.
    endmodule.                 " USER_COMMAND_1000  INPUT
    *&      Module  STATUS_0100  OUTPUT
          text
    module status_0100 output.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
    select * from lfa1 into corresponding fields of table itab.
    read table itab index 3.
      lfa1-lifnr = itab-lifnr.
      lfa1-name1 = itab-name1.
    refresh itab.
    endmodule.                 " STATUS_0100  OUTPUT
    *&      Module  STATUS_0200  OUTPUT
          text
    module status_0200 output.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
    refresh itab.
    select * from kna1 into corresponding fields of table itab.
    read table itab index 1.
      kna1-kunnr = itab-kunnr.
      kna1-land1 = itab-land1.
    endmodule.                 " STATUS_0200  OUTPUT
    *&      Module  STATUS_0300  OUTPUT
          text
    module status_0300 output.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
    refresh itab.
    select * from mara into corresponding fields of table itab.
    read table itab index 5.
      mara-matnr = itab-matnr.
      mara-ersda = itab-ersda.
      mara-ernam = itab-ernam.
    endmodule.                 " STATUS_0300  OUTPUT
    *&      Module  STATUS_0400  OUTPUT
          text
    module status_0400 output.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
    refresh itab.
    select * from vbak into corresponding fields of table itab.
    read table itab index 7.
      vbak-vbeln = itab-vbeln.
      vbak-erdat = itab-erdat.
      vbak-erzet = itab-erzet.
    endmodule.
    Hope this code will give you some idea.
    Regards
    Haritha.

  • Editor in screen Painter

    hello friends,
    i hv created text editor in screen painter. when i write some lines in this editor and click on save button. then this text saves temproraly in table. when click on display this text will sees in editor again. upto this it is ok.
    but when i run this program again next time, and when i click again on display button i cant get that saved text again. why this happens?
    if i want to save this text permenantly then wht's the procedure.
    please help me guys.
    b'cuz this is an very imp matter for me.
    replay as soon as possible.
    thanks in advance.
    regards,
    Vinod.

    no u can not save such long data into a table, the solution for this is to create the header-tdname related to the key fields in ur ztable.
    like ur ztable has fields f1(key) f2 f3 f4...
    now move the value of field f1(key) to header-tdname, so that it can be related to ur ztable field and u can get the same data when u try to retrieve some where else.
    <b>Hope this is clear.</b>
    Regards
    - Gopi

  • Radio button in screen painter

    if we create number of Radio buttons in the screen painter using the drag and drop , then should we group up all the radio buttons , if so pls let me know how to group up all the radio buttons .
    I created 3 radio buttons using drag and drop in screen painter . I dont know to group them up . I used these radio buttons in my ABAP prog . while i executed all the radio buttons are checked . I think i need some help...

    hi...
    I am also facing a similar problem.....I have created two raidbuttons using screen painter......and I need to group them......I tried to select the radiobuttons and group them....but the define grouping option is greyed out....kindly assist..
    Regards,
    Gayatree
    Edited by: gayatree.b on Jun 18, 2010 1:36 PM
    Edited by: gayatree.b on Jun 18, 2010 1:36 PM

  • Folder Creation by Screen Painter

    Hi All,
            I created a form through Screen Painter which contains 5 folder. I set Pane =1,Pane=2 etc in all five folder and set from Pane and To pane for each Item as 1:1, 2:2 etc.In the Preview mode it shows all item in the corresponding folder. When I run the same form in Debug mode, Sometime it shows only folder not its items. To view items in the folder, i have to open .srf form in screen painter and re run it in debug mode.
    Please suggest me a solution.
    Thanks in advance,
    BBN

    Hi
    Try setting the form PaneLevel in Code like this
                If pVal.Before_Action = True Then
                    Select Case pVal.EventType
                        Case SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED
                                Case "Folder1"
                                    oForm.PaneLevel = 1
                                Case "Folder2"
                                    oForm.PaneLevel = 2
                            End Select
                    End Select
                End If
    hope it helps

Maybe you are looking for

  • ASA 5505 - Cannot ping outside natted interface

    Hello, I have a Cisco ASA 5505, the problem is I am not able to ping to outside natted interface (ip: 172.88.188.123 and 124 and 125) from inside network Could someone help me to resolve this? I have looked for ASA documentation through the internet

  • Having trouble with the way the drop down menus work.

    Clicking on the heading/icon makes the drop-down visible for a second or two, then either they vanish altogether, or leave a ghost outline. Moving along the headings, sometimes they displays correctly, sometimes they appear and vanish, sometimes they

  • Customer clearing using FB1D

    hi , how to find a customer with open items  in FBL5N transaction..after doing the recording for first screen of FB1D its giving error no open items found.i tried using breakpoint in F124_MERGE to fill the BDC DATA. Thanks &Regards, Malathi.

  • MM Price Difference Account

    Hi, Can anyone tell me the treatement of MM price difference account in Controlling. According to me we need to create it as a cost element and capture to one cost center to track the price difference account and allocate it to production cost center

  • Modifying output generated by java.util.logging.Logger

    Hi I am using SimpleFormatter class to generate log file. the output looks like following Mar 13, 2009 3:24:42 AM HostHandler readParameters FINE: Starting to read input parameters I want it to print only "Starting to read input parameters". I called