How to Initialize Items on Form

Hi Everyone,
I have created a form in screen painter with 2 items as editBox. Form is able to load but I want to initialize one item by current Date and other item from data table i.e. field prid should have a document no and field prdate should display current date OR user should enter '-t' then current date should display.
How to achieve this functionality. (SBO 2005B)
Regards
OP Sharma

Hi Lakshman / Mongi,
It is still not working. Maybe I missing something. Here is the code I am using:
        LoadFromXML("Purchase_requistion.srf")  ' Form load successfully
        oForm = SBO_Application.Forms.Item("opsPR")   'Form UID
        'Initialize the Item on the form : uid="reqDt" ,type = it_edit 
        oForm.Items.Item("reqDt").Specific.String = DateTime.Now.Date.ToString()
        oForm.Visible = True
It is still displaying blank item i.e. Request Date. (I want it exactly as displaying in all SBO form like Sales Order etc, default is today date and format should be mm/dd/yyyy as per format defined in SBO)
Please help.
Regards
OP Sharma

Similar Messages

  • How to control item between Form mode change

    Hi Experts
    I am using B1DE to do something like some item's enable status will be changed following the Form mode change.
    For instance, add a new matrix into system form, if changing the Form mode to Find, I want to disable this matrix, if changing to Add mode, the matrix should be enable.
    Do you how how to do this?
    Thanks
    Tim

    Hi,
    You need to capture Menu Event in your code and can make matrix either editable or non editable.
    Sub MenuEvent(ByRef pVal As SAPbouiCOM.MenuEvent, ByRef BubbleEvent As Boolean)
            Try
                Dim oForm As SAPbouiCOM.Form = objMain.objApplication.Forms.ActiveForm
                If pVal.BeforeAction = False Then
                    If pVal.MenuUID = "1281" Then                // For Find Mode
                        //make matrix editable or non editable
                    End If
                End If
            Catch ex As Exception
                objMain.objApplication.StatusBar.SetText(ex.Message)
            End Try
        End Sub
    regards:
    Sandy

  • How to add a column in Item Master form with chooselist

    Hi Experts
    I add a column in Item Master Form in Stock Data Tab. In this column I want to add Choose list. For this I use AfterFormLoad event. It gives Error "Matrix Line Exist" . My code is given below
    If pVal.FormType = "150" Then
                    form = B1Connections.theAppl.Forms.GetForm(150, pVal.FormTypeCount)
                    form.PaneLevel = 3
                    oItem = form.Items.Item("28")
                    oMatrix = oItem.Specific
                    Dim chooseObj As ChooseListClass
                    chooseObj = New ChooseListClass
                    chooseObj.AddChooseFromListBinCode(form.UniqueID)
                    oColumns = oMatrix.Columns
                    oColumn = oColumns.Add("BINCODE", BoFormItemTypes.it_EDIT)
                    oColumn.Width = 100
                    oColumn.DataBind.SetBound(True, "OITW", "U_BINCODE")
                    oColumn.TitleObject.Caption = "Def BinCode"
                    oColumn.Editable = True
                    oColumn.ChooseFromListUID = "CFL5"
                    oColumn.ChooseFromListAlias = "U_BinCode"
                    oColumn = oColumns.Item("U_BINCODE")
                    oColumn.Visible = False
                End If
    please give your suggestion
    Regards
    Jitender

    Hi Noor
    Thanks for reply
    I tried your suggestion but problem still there. I am using after form load event. Here matrix has 9 lines (all warehouse). If remove the line then how can I reload warehouse data. Can you suggest in more detail.
    my code is given below
    form = B1Connections.theAppl.Forms.GetForm(150, pVal.FormTypeCount)
                    form.PaneLevel = 3
                    oItem = form.Items.Item("28")
                    oMatrix = oItem.Specific
                    MsgBox(oMatrix.RowCount)
                    oMatrix.DeleteRow(1)
                    Dim chooseObj As ChooseListClass
                    chooseObj = New ChooseListClass
                    chooseObj.AddChooseFromListBinCode(form.UniqueID)
                    oColumns = oMatrix.Columns
                    oColumn = oColumns.Add("BINCODE", BoFormItemTypes.it_EDIT)
                    oColumn.Width = 100
                    oColumn.DataBind.SetBound(True, "OITW", "U_BINCODE")
                    oColumn.TitleObject.Caption = "Def BinCode"
                    oColumn.Editable = True
                    oColumn.ChooseFromListUID = "CFL5"
                    oColumn.ChooseFromListAlias = "U_BinCode"
                    oColumn = oColumns.Item("U_BINCODE")
                    oColumn.Visible = False
                    oMatrix.AddRow(1)
    Thanks
    Waiting for reply
    Regards
    Jitender

  • How to populate the LOV with warehouse item in Item Roles form

    Hi
    Any one please tell me can we populate the list of values for warehouse items in the item roles form, if so please let me know how to do it.
    Navigation
    Go to OPM Inventory Control
    Go to Workflow
    Go to Item Roles
    Opens a window Item Role Relation.
    When I click on the LOV tab of Warehouse Item, it says list of values contains no entries.
    Thanks in Advance
    Prem.

    This applies for Release 11 or before. (Not for R12)
    Warehouse items are the OPM Items. When you define new item there is field warehouse item and by default it gets populated with the same item name. You can manually changed it to previously defined item name.

  • How to assign NULL value to an ITEM in Forms Personalization?

    Hi,
    how to assign NULL value to an ITEM in Forms Personalization?
    please suggest me.
    Thanks

    I don't know what your form personalization does and maybe I misunderstand you ...
    Try
    :item_name := null;

  • How to hide a folder in item master form?

    Dear members,
    I have to hide a folder named properties and remarks in item master form?
    I have tried by setting the visible property as false through sdk coding.Its working fine but when i use navigation button these above mentioned tabs appear for a moment and then disappear.
    I want these to not to be visible in any of the events like navigation and find.
    please do help me in this regard.
    Regards,
    Venkatesh.R

    Hi,
    thats a pitty!
    i tried this many times with every item except Folders.
    looks like you can't move 1 Folder alone when they are grouped
    iam sorry - i don't see a other solution than Petr's way now - catch the click / itempressed event and
    set bubbleevent to false
    lg David

  • How to initialize an adf component before a page loads

    Hi all
    I use JDeveloper 11.1.2.2.0
    I have two pages:
    first page has a link to a second page
    <af:document title="first.jspx" id="d1">
      <af:form id="f1">
        <af:commandLink text="Page 2" id="cl1" action="goToSecondPage" actionListener="#{Bean.handleLinkActionEvent}"/>
      </af:form>
    </af:document>and the second page has an inputText component:
    <af:document title="second.jspx" id="d1">
      <af:form id="f1">
        <af:inputText label="Text" id="it1" binding="#{Bean.inputText}" readOnly="true"/>
      </af:form>
    </af:document>First I load first.jspx and than I click the link. This event is handled in handleLinkActionEvent() method, in which I want to set a value to the inputText component of the second page. But I can't do it, because as expected I get NullPointerException.
    So the question is how to initialize an adf component before a page loads?
    Evgeny Michuk
    Edited by: Evgeny Michuk on Oct 4, 2012 11:30 PM

    Thanks a lot for your replies and links, it gives me some new knowledges.
    I got your approach and achieved the aim for the described situation with tag <f:setPropertyActionListener>:
    <af:commandLink text="Page 2" id="cl1" action="goToSecondPage"
                           actionListener="#{Bean.handleLinkActionEvent}" binding="#{Bean.firstPageLink}">
      <f:setPropertyActionListener target="#{pageFlowScope.text}" value="Hello, World!"/>
    </af:commandLink>and for the inputText component I set the value:
    <af:inputText label="Text" id="it1"  binding="#{Bean.inputText}"
                                  readOnly="true" value="#{pageFlowScope.text}"/>I used request scoped managed bean and it is shared for both pages.
    I understand that I can set a value of some attribute for managed bean
    and use it to set a value for inputText component of the second page,
    but as I understand it is almost the same way as usage of tag <f:setPropertyActionListener>.
    In my real situation on the second page I have a dynamic table, and it's field is read only.
    Structure of this table depends on a link clicked on the first page.
    So I define components for table columns in runtime, it may be outputText, inputDate, goLink and some others.
    And I have to get table through the UIComponent binding to set columns.
    Certainly I can define all needed components for all columns
    and render it according to the column types
    <af:table value="#{Bean.collectionModel}" var="row" id="t1" binding="#{Bean.mainTable}">
       <af:forEach items="#{Bean.columnDescriptionList}" var="column">
          <af:column headerText="#{column.caption}" id="c1">
             <af:outputText value="#{row[column.fieldName]}" id="ot1" rendered="#{column.type == '1'}"/>
             <af:inputDate value="#{row[column.fieldName]}" id="ot2" rendered="#{column.type == '2'}"/>
             <af:selectBooleanCheckbox id="sbc1" selected="#{row[column.fieldName] == '1'}" rendered="#{column.type == 'n'}"/>
          </af:column>
       </af:forEach>
    </af:table>but I think it is not very good.
    Have you any idea?
    P.S. I hope I clearly explained my situation =)
    Evgeny Michuk

  • How to initialize

    I am working on this JSP page (modifying from Servlet), and I need to initialize "item".
    item is located where it indicates
    CatalogItem item;
    I believe I need to indicate this public class called "Catalog" (on the bottom).
    How do I go about doing this?
    Thank you for your feedback.
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@page import="coreservlets.*"%>
    <%@page import="java.io.*" %>
    <%@page import="javax.servlet.*" %>
    <%@page import="javax.servlet.http.*" %>
    /// Private Methods
    <%!
        private CatalogItem[] items;
        private String[] itemIDs;
        private String title;
    %>
    <%
        if (items == null) {
          response.sendError(response.SC_NOT_FOUND,
                             "Missing Items.");
          return;
        response.setContentType("text/html");
        String docType =
          "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 " +
          "Transitional//EN\">\n";
        out.println(docType +
                    "<HTML>\n" +
                    "<HEAD><TITLE>" + title + "</TITLE></HEAD>\n" +
                    "<BODY BGCOLOR=\"#FDF5E6\">\n" +
                    "<H1 ALIGN=\"CENTER\">" + title + "</H1>");
        CatalogItem item;
        for(int i=0; i<items.length; i++)
          out.println("<HR>");
          item = items;
    if (item == null) {
    out.println("<FONT COLOR=\"RED\">" +
    "Unknown item ID " + itemIDs[i] +
    "</FONT>");
    } else
    out.println();
    String formURL =
    "/mseku9_proj/Cart.jsp";
    formURL = response.encodeURL(formURL);
    out.println
    ("<FORM ACTION=\"" + formURL + "\">\n" +
    "<INPUT TYPE=\"HIDDEN\" NAME=\"itemID\" " +
    " VALUE=\"" + item.getItemID() + "\">\n" +
    "<H2>" + item.getShortDescription() +
    " ($" + item.getCost() + ")</H2>\n" +
    item.getLongDescription() + "\n" +
    "<P>\n<CENTER>\n" +
    "<INPUT TYPE=\"SUBMIT\" " +
    "VALUE=\"Add to Shopping Cart\">\n" +
    "</CENTER>\n<P>\n</FORM>");
    %>
    public class Catalog {
    // This would come from a database in real life.
    // We use a static table for ease of testing and deployment.
    // See JDBC chapters for info on using databases in
    // servlets and JSP pages.
    private static CatalogItem[] items =
    { new CatalogItem
    ("hall001",
    "<I>Core Servlets and JavaServer Pages " +
    "2nd Edition</I> (Volume 1)" +
    " by Marty Hall and Larry Brown",
    "The definitive reference on servlets " +
    "and JSP from Prentice Hall and \n" +
    "Sun Microsystems Press.<P>Nominated for " +
    "the Nobel Prize in Literature.",
    39.95),};
    public static CatalogItem getItem(String itemID) {
    CatalogItem item;
    if (itemID == null) {
    return(null);
    for(int i=0; i<items.length; i++) {
    item = items;
    if (itemID.equals(item.getItemID())) {
    return(item);
    return(null);
    }> 

    There is also this class (I believe it does all the functions)..
    How do I incorporate all together to initialize "item" at the JSP?
    Thanks.
    public class CatalogItem {
      private String itemID;
      private String shortDescription;
      private String longDescription;
      private double cost;
      public CatalogItem(String itemID, String shortDescription,
                         String longDescription, double cost) {
        setItemID(itemID);
        setShortDescription(shortDescription);
        setLongDescription(longDescription);
        setCost(cost);
      public String getItemID() {
        return(itemID);
      protected void setItemID(String itemID) {
        this.itemID = itemID;
      public String getShortDescription() {
        return(shortDescription);
      protected void setShortDescription(String shortDescription) {
        this.shortDescription = shortDescription;
      public String getLongDescription() {
        return(longDescription);
      protected void setLongDescription(String longDescription) {
        this.longDescription = longDescription;
      public double getCost() {
        return(cost);
      protected void setCost(double cost) {
        this.cost = cost;
    }

  • How to download PDF output forms to presentation server without display

    Hi All,
    My requirement is to download the Sales Order forms and save it in local system.
    I have created a custom program where I am passing a range of Sales Order no, Partner Function, Output type and Application as my input in selection screen.
    Logic:
    I am calling my Sales Order Abodeform using the FM: 'FP_FUNCTION_MODULE_NAME' and thereby I got the function module name of my form.
    Then I am calling the FM:
    Input to the FM:  
      ls_outputparams-nodialog = abap_true.
      ls_outputparams-authority = 'X'.
      ls_outputparams-getpdf = 'X'.
      ls_outputparams-dest = 'LP03'.
      ls_outputparams-nopreview = abap_true.
      ls_outputparams-reqimm = abap_true.
      CALL FUNCTION 'FP_JOB_OPEN' 
        CHANGING
          ie_outputparams = ls_outputparams
        EXCEPTIONS
          cancel          = 1
          usage_error     = 2
          system_error    = 3
          internal_error  = 4
          OTHERS          = 5.
    followed by,  CALL FUNCTION (FM name)
         EXPORTING
          archive_index        = toa_dara
          archive_parameters   = arc_params
          control_parameters   = ls_control_param
          mail_recipient       = ls_recipient
          mail_sender          = ls_sender
          output_options       = ls_output_param
          user_settings         = ' '
          is_nast                 = nast
          is_vbdka               = vbdka
          is_addres             = addr_key
        IMPORTING
          document_output_info = document_output_info
          job_output_info      = job_output_info
          job_output_options   = job_output_options
        TABLES
          it_vbdpa             = tvbdpa    "Item information
          it_vbdpau            = tvbdpau   "Subitem numbers
          it_vedpa             = tkomservp  "Contract Item Validity
          it_vedka             = tkomservh  "Contract Header Validity
          it_vedpn             = tkomservpn "Contract Item Cancellation Data
          it_vedkn             = tkomservhn "Contract Header Cancellation DA
        EXCEPTIONS
          formatting_error     = 1
          internal_error       = 2
          send_error           = 3
          user_canceled        = 4
          OTHERS               = 5.
    then ,  CALL FUNCTION 'FP_JOB_CLOSE'
        IMPORTING
          e_result       = ls_result
        EXCEPTIONS
          usage_error    = 1
          system_error   = 2
          internal_error = 3
          OTHERS         = 4.
    then i am using the below FM to get the OTF data if any available.
    CALL FUNCTION 'CONVERT_OTF'
        EXPORTING
          format                = 'PDF'
        IMPORTING
          bin_filesize          = lv_binfilesize
          bin_file              = lv_bin_file
        TABLES
          otf                   = ls_output_info-otfdata-> i am not sure which data to pass here. i am getting sy-subrc value as 4.
          lines                 = lt_lines
        EXCEPTIONS
          err_max_linewidth     = 1
          err_format            = 2
          err_conv_not_possible = 3
          err_bad_otf           = 4
          OTHERS                = 5.
    Now I dont no how to link the PDF forms to below method.
    CALL METHOD cl_gui_frontend_services=>gui_download
        EXPORTING
          bin_filesize = v_size
          filename     = D://x.pdf
          filetype     =   'BIN'
        CHANGING
          data_tab     = lt_pdf.
    Because in smartforms, we will convert the OTF output to PDF and that value is passed to GUI_DOWNLOAD FM as input (lt_pdf) , whereas in adobeforms the output itself is in PDF so i dont how to retreive the values from adobeforms and pass it to the above FM, so that I can save 'N' no. of sales order outputs in one PDF file.
    Kindly help me out in this.
    Thanks & Regards,
    Karthikeyan G.

    Hi Vishnu,
    I read the GUI_DOWNLOAD FM documentation, if I am trying to download binary type of file, It is mandatory to pass file size.
    In my case, since I am having PDF file, so i don't no how to get the size of the pdf file.
    As you said, if i use Convert_OTF FM, i don't have data to pass to the OTF and LINES tables.
    I am having values of PDF in xstring format in ls_output1-pdf, which i got using the below FM.
    CALL FUNCTION lv_funcname (FM name)
        EXPORTING
          /1bcdwb/docparams  = ls_docparams
          is_vbdka           = vbdka
        IMPORTING
          /1bcdwb/formoutput = ls_output1
        EXCEPTIONS
          usage_error        = 1
          system_error       = 2
          internal_error     = 3
          OTHERS             = 4.
    Kindly tell me what values i need to pass to the FM you mentioned in order to get the size of the file.
    Thanks & Regards,
    Karthikeyan G.
    But still I am not sure, how the pdf output is coming for single input whereas if i give in a range, its failing. In single input, i am not giving binary file size still the output is coming.. but for range its not. Kindly help me out in this.

  • How do I use one form field to enter data into another form field?

    Does anyone know how I can code a form so that when I select
    a name in one drop-down form field, I can ensure that the person's
    e-mail address will appear in another text field?
    Thanks.

    Thanks Roel,
    I remember that I tried to define multiple DML. but it did not work for Apex gets confused.... which items belongs to which table...
    instead-of-triggers (to process the inserts/updates/deletes) Can you pls, elaborate more on this solution ... ?
    Regards,
    Fateh..

  • MM: Purchase requisition line Items - How many line items can we use

    Hi all,
    1. Purchase requisition Line items  (How many line items can we use?), is there any restrictions.
    2. While creating PO with only one tax code for the related PR to input Tax code (without selecting  line Items).
    Regards,
    Sudheer

    Hi
    There is no limitation for number of items in PR.
    Tax code is always applicable for individual item only.It cannot be selected form the whole PO.
    Regards
    Dev

  • How to use image in forms

    i m create a form, drag & drop image item into form canvas.
    i want display image on image item, how to do.
    please tell me step by step with example.

    Hello
    here is a sample code example
    http://sheikyerbouti.developpez.com/tutoforms10g/tutoforms10g.htm
    Re: saving an image from form into database
    Hope it helps...
    Regards,
    Abdetu...
    Edited by: Abdetu on Feb 27, 2011 11:47 PM

  • Urgent: how to run report from forms runtime

    hi
    can anybody tell me how to call reports in forms through menu
    i just forgot how to call...
    exact menu item code!!
    rgds,

    Dear
    if u are using client server then use this code
    Run_Product(REPORTS, 'd:\emp.rep', ASYNCHRONOUS, RUNTIME,
    FILESYSTEM, 'x', NULL);
    if u r wsing web then use this code
    Web.Show_Document('/reports/rwservlet?server=myrepserv&report=test.rdf&userid=scott/tiger@mydb&desformat=pdf&destype=c
    ache&paramform=yes', '_blank');
    M Rizwan

  • How can I make a form show complex composite data?

    How can I make a form show complex composite data?
    We would like a form to display the following information:
    Employee Names as the columns, 1 row for each calendar day, and each item in the block containing the total sales amount (and other information) for that employee for that day.
    This would require the block to function as a (composite) crosstab report.
    Here is an example:
    We have employees: Jane, John, Jim, and Janice
    We would like to see their total sales for the following days: 5/1 .. 5/5
    Jane John Jim Janice
    5/1 50 8 10 3 30 5 20 7
    5/2 40 7 60 8 10 2 30 4
    5/3 20 3 50 8 70 9 50 9
    5/4 51 8 40 7 40 8 50 8
    5/5 10 1 20 2 90 10 10 2
    We have a table with records of each day, for each employee, and their sales for that day.
    There is a possibility our list of employees can change as well as the number of days.
    Anyone tried doing anything like this with a form? We don't want to just embed a report because we would like to include other data as well besides what is mentioned above and we would like them to be able to change some of that data. Thanks in advance for any help.
    null

    I have a VERY similar problem where I want to have this matrix on the form with six days worth of data (three columns for each day) for my data table. I have done as Momen has suggested and created a view (using SQLPLUS):
    create table weekdays (weekday varchar2(3), date_x date);
    drop view employee_absences_v;
    create view employee_absences_v as
    select weekday,
    absence_date,
    hours,
    absence_code_lvid,
    adjustment_status_lvid
    from employee_absences ea, weekdays wd;
    that hopefully provides a row for each day of the week for my data table. The view is created OK but I'm not sure how to get it into the form properly. Also, I am using the form to CREATE rows in the data table not just SELECT and DISPLAY and there may or may not be a row of data for a corresponding day which is going to be a problem for me using this view method, I think. Let me know how this goes and if you get your form to work and how? Momen, your method appeals to me but it's not 100% clear how to get it to work in a form?
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Tina Radosta ():
    We tried to create the view (not with Designer because we don't have that). We were not successful in creating a view with a matrix. We would greatly appreciate your help.
    Thanks in advance,
    Tina<HR></BLOCKQUOTE>
    null

  • Header and Item table - Form Design Question

    Hi All,
    I have a header table and Item table. For every record in the header table I have multiple records in the item table. I want to have a adobe form in the following way
    1. A new page starts for every record in the header table and Items in the item table for this header record can span multiple pages with the same header information.
    2. When all the items are displayed for that particular header record, a new page should start for the next header record.
    I created one internal table in the following way
    Header_field1 Header_field2 Item_table(with all the items for this header record)
    Header_field1 Header_field2 Item_table(with all the items for this header record)
    I am not sure how to use a table for this scenario (Should It be a nested table?).
    Please provide me some ideas.
    Thanks,
    Ganesh.

    Hi Balasubramani,
    I made some changes and have the following now. Can you please let me know how I can achieve page break for every BP_NUMBER.
    I have a nested table like the one below.
    Main table u2013 Has header and Items information. Every header record has some header information like BP number, name and all line items for that BP in a nested table .
    IT_HEADER:
    BP_NUMBER     BP_NAME           IT_ITEMS(Items table)
    BP_NUMBER     BP_NAME           IT_ITEMS
    BP_NUMBER     BP_NAME           IT_ITEMS
    To display this information I created the following
    Subform1 u2013 overflow u2013bound to $record.IT_HEADER.DATA[*] u2013 (Repeat sub form for
    |                                             each data item)
    |->Header sub form u2013 Positioned
    |     |
    |     |-> Text Field u2013 bound to BP_NUMBER
    |
    |
    |->Item sub form -
         |     
         |->Item Table u2013 bound to IT_ITEMS
              |
              |->Data u2013 bound to IT_ITEMS.DATA[*] u2013(Repeat row for each data item)
    In the output BP number in the first record of IT_HEADER gets displayed and then all the Item records in IT_ITEMS for that BP get displayed. This is repeated all the records in IT_HEADER which is perfectly fine.
    Please provide me some suggestions to solve the following issues I am having
    1.     I need a page break between records of IT_HEADER. I want the new subform1 for the next header record to start in a new page. I tried conditional break option, on the only field BP number in header sub form. I have two master pages and two body pages. All the above information is in master page 2 and body page 2.  I am also not sure what to select in the TO section of the conditional break screen.
    2.     When there is an overflow in IT_ITEMS I need the Header sub form to be shown in the next page too.
    Thanks,
    Ganesh.

Maybe you are looking for