2 list in one form

what is the method to list 2 list boxes in one form

how 2 insert a data in a list without loosing the end data??

Similar Messages

  • Combine two lists in one form (1 to Many relation)

    I have two list instances. I have a custom form on which I would like to show two lists and add more button to let user select to add more child records and save which should save in both the lists. And again when user pull the item from main list it should
    display the child list items as well. Can someone point me good link to achieve this.
    Thanks,
    Alex

    Hi,
    According to your description, my understanding is that you want to display two lists in a form and add item to both lists when clicking a button, also
    you want to display items in child list when searching items from main list.
    If that is the case, there is a possible solution is that you can create a custom web part with two Gridviews bind with the lists data and a button. When
    you click button, you can add list items to both grid in code behind. And, when you search the items from main gridview , you can query the list items value in child list using CAML Query to display the items in child list.
    Here are some detailed code demos for your reference:
    Create a custom web part:
    http://msdn.microsoft.com/en-us/library/ee231519.aspx
    Add or update list items using C#:
    http://msdn.microsoft.com/en-us/library/office/ee539976(v=office.14).aspx
    Query list item using CAML Query:
    http://msdn.microsoft.com/en-us/library/office/ee534956(v=office.14).aspx
    Bind SharePoint list data to GridView:
    http://sharepoint.kerenapura.com/2013/09/display-sharepoint-list-data-gridview/
    Best regards
    Zhengyu Guo
    TechNet Community Support

  • How to submit InfoPath form data to multiple SharePoint lists at one time?

    Hi,
    I'm looking for a way to submit certain data in InfoPath form to separate SharePoint lists at the same time. I have a form that has two views with many data in them. I want to keep these data in separate SharePoint list besides keeping them in the XML. I know that you can submit to a form library using SharePoint document library data connection, but I'm not sure if you can use several data connections for submitting data to multiple SharePoint lists. Is it only possible to do using code? If yes, can anyone show a sample. I have never coded in InfoPath, though I used C# a lot in .Net.
    Thank you!Regards,
    R.D.M.

    This is an old thread but I tripped over a codeless method to do this with OOB InfoPath 2010 and SP 2010. 
    Assuming your main InfoPath form is published to a document library with the promoted fields that you want to see.
      Publish your form to a new document library to capture the secondary data fields that you want separated out.
    Using the Publishing Wizard do the following:
    Go to – File then Publish
    Select SharePoint Server “ Publish form to a SharePoint Library”
    Enter location of your SharePoint or InfoPath Forms Services Site: 
    accept the default in this field from the first published event
    Next screen, keep the default or change it, Form Library, Site Content Type or Admin Approved
    Next screen, What do you want to do?
    Create a new form library
    Add new document library name and description
    Next screen, Remove all promoted fields not applicable to the new library and add all of the ones you want to see data for.
    Click Next and Publish
    Come back into the form: If you don’t have buttons added directly to the form to submit or update, add them.
    Create a new Action rule on the button
    Label the rule to keep it straight
    Condition, occurs when button clicked
    Add action, Submit data
    Use data connection to the second library created
    Create a second new Action rule on the same button
    Label the rule to keep it straight
    Condition, occurs when button clicked
    Add action, Submit data
    Use original data connection to the library
    Then you can add another action to close the form or do whatever you need.
    Republish the form to both libraries to set the template for both.
    File – Publish – SharePoint Server
    Select Secondary library from drop down follow the rest of the prompts
    Follow step 5a again, select Primary library from drop down, Add back in all of the promoted fields needed for the primary library and follow the prompts.
    DOCUMENT YOUR FORM WELL FOR MAINTENANCE
    Special considerations, your primary library needs a unique ID to reference in your secondary library.
    Your secondary library will need a unique ID that is not related to the primary if you are going to store multiple records for a single primary library reference. 
    Example: One form, multiple updates.

  • Multiple select list for one field in form

    Friends,
    I have a form , which is having many fields. One of the field are day/date. In this field i have to take 3 dropdown lists. like one for date, one for day and another for year. I have created three lov's for the day,date and year but for the field day/date i am able to apply only one lov. Any way so that i can display all the three lov for one field
    example
    day/date: day -- (dropdown list)
    date -- (dropdown list)
    year -- (dropdown list)
    thanks in advance
    adi
    Edited by: Adi's on Feb 16, 2010 11:46 PM
    Edited by: Adi's on Feb 16, 2010 11:47 PM
    Edited by: Adi's on Feb 16, 2010 11:52 PM

    nope, I just gave u an example to combime day , date and year fields in one select list, it does not matter whether they are in one table or multiple table and you dont require to create any tables for this, I assumed your lov for day / date / year are dynamic not static.
    Regards,
    Shijesh

  • I have date type list field in sharepoint list and i have created one form in sharepoint webpage.

    Hi All,
    i have date type list field in sharepoint list and i have created one form in sharepoint webpage.
    Now i want to save that field from shareepoint webpage, its declared "t1.text" but its showing error.
    How can i save this field?

    Hi AnilKarthink, 
    I wrote a Technet Wiki article on saving data to the various SharePoint fields. You can view it here: http://social.technet.microsoft.com/wiki/contents/articles/21801.sharepoint-a-complete-guide-to-getting-and-setting-fields-using-c.aspx
    Regards, Matthew
    MCPD | MCITP
    My Blog
    View
    Matthew Yarlett's profile
    See my webpart on the TechNet Gallery that allows administrative users to upload, crop and format user profile photos. Check it out here:
    Upload and Crop User Profile Photos

  • How to get a values from one form to another form

    Hi All,
    I am using oracle forms 10g.
    I have created two forms. First form named as Hotel reservation req and second form named as Hotel Res Summary.
    I the first form i have one field named Requisition_number and I have one button and when i press the button in the first form the summary form is called and it need to bring all the data regarding that requisition_number in first form.
    I have written a query in when button pressed Like this
    declare
    :Global.V_REQ_NO := :XXMBHOTRESREQ_DB.REQUISITION_NO
    type r_cursor is ref cursor;
    c_XXMBHIS r_cursor;
    V_xxmbht XXMB_DOMHTRS_REQ%rowtype;
    begin
    open c_xxmbhis for select * from XXMB_DOMHTRS_REQ where requisition_number=:Global.V_REQ_NO
    loop
    fetch c_xxmbhis into v_xxmbht;
    exit when c_xxmbhis%notfound;
    --dbms_output.put_line (V_XXMBHT.REQUISITION_NUMBER);
    end loop;
    close c_XXMBHIS;
    end;
    And how to refer this to the calling form.
    But now the form is opening and record is not querying can any one correct me where i went wrong.
    Thanks & Regards
    Srikkanth
    Edited by: Srikkanth.M on Aug 19, 2011 6:43 PM

    I the first form i have one field named Requisition_number and I have one button and when i press the button in the first form the summary form is called and it need to bring all the data regarding that requisition_number in first form.If more than 1/4 of your Forms will need the REQUISITION_NUMBER then using a GLOBAL variable makes scense. However, if it is only your Hotel Reservation and Hotel Res Summary forms that will use the REQUISITION_NUMBER then use a Parameter List instead. Global variables are always of type CHAR so you could encounter conversion errors if you don't explicitly cast the value to the correct data type. Parameter object can be of type CHAR, NUMBER and DATE and offer greater flexibility. If you need an example of how to use a parameter list, open the Forms Help system, go to the Search tab and search on "Creating a Parameter List." This article give a brief overview and a list of all the built-ins associated with Parameter Lists. You will need to create a Parameter object in your Hotel Req Summary form to catch the parameter passed via the Parameter List. Then you will need to write code to do something with the value passed (usually in the When-New-Form-Instance trigger).
    Craig...

  • How do I copy a list from one site to another that has a column that appends changes to existing text?

    I want to move a list from one SharePoint site to another, within the same collection. I have created a template and included the content but the column that is selected to append changes to existing text, has not copied in all cases, although it has for
    some items.
    I have a limited knowledge so won't be able to implement any solutions that require the use of code.

    Hi,
    According to your post, my understanding is that you wanted to copy a list from one site to another that has a column that appends changes to existing text.
    I recommend to use the custom workflow activity  Copy List Item Extended Activityto
    copy list items and files cross site.
    You can do this with codeless SharePoint Designer workflows as long as you can install the
    Codeplex Custom SharePoint Designer Workflow Activities. 
    These activities are also built-in to SPD2010.
    To install the custom activities, please follow the steps as below:
    Download the solution file form
    Useful Sharepoint Designer Custom Workflow Activities
    Copy the wps file to the Disk C.
    Open the SharePoint 2010 Management Shell.
    Run the command: add spsolution c:\ dp.sharepoint.workflow.wsp
    Open the Center Administration, click System Setting->Manage Farm Solution-> dp.sharepoint.workflow.wsp->Deploy to one or more Web Application.
    Open the SharePoint designer, add action from Custom Actions.
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Reg: Combining two display lists into one list

    Dear All,
    i want to combine two display lists into one display list. Please give the idea for this one issue.
    *****************dispaly list 1 starting here*********************
    *&      Form  F_006_DISPLAY_LIST
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM F_006_DISPLAY_LIST.
    *  TABLES : LFA1 .
      DATA : V_DEBIT_TOTAL TYPE P DECIMALS 2 ,
             V_CREDIT_TOTAL TYPE P DECIMALS 2 ,
             V_CLOSE_BAL TYPE P DECIMALS 2 .
      DATA : V_CNT TYPE I .
      SORT ITAB_OPG BY LIFNR.
      LOOP AT ITAB_OPG.
        NEW-PAGE.
    * Displaying Vendor Name
        SELECT SINGLE NAME1 FROM LFA1 INTO LFA1-NAME1 WHERE
                                                 LIFNR EQ ITAB_OPG-LIFNR .
        FORMAT COLOR COL_POSITIVE INTENSIFIED ON.
        WRITE:/2 'Vendor Code:' ,
                 ITAB_OPG-LIFNR  ,
              40 LFA1-NAME1 .
        CLEAR : LFA1 .
        WRITE :/(190) SY-ULINE .
    * Displaying Opening Balance
        FORMAT COLOR COL_NEGATIVE INTENSIFIED ON .
        READ TABLE ITAB_OPG WITH KEY LIFNR = ITAB_OPG-LIFNR .
        IF ITAB_OPG-BAL LE 0 .
          WRITE :/2 'Opening Balance for Period' , (4) S_MONAT-LOW , ':' ,
                  171(18) ITAB_OPG-BAL .
        ELSE.
          WRITE :/2 'Opening Balance for Period' , (4) S_MONAT-LOW , ':' ,
                  151(18) ITAB_OPG-BAL .
        ENDIF.
        WRITE :/(190) SY-ULINE .
    * Displaying Line Items
        LOOP AT ITAB_DISPLAY WHERE LIFNR EQ ITAB_OPG-LIFNR.
          V_CNT = SY-TABIX MOD 2.
          IF V_CNT EQ 0.
            FORMAT COLOR COL_NORMAL INTENSIFIED ON.
          ELSE.
            FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
          ENDIF.
    * Selecting Bank Name and Cheque Number
          SELECT SINGLE CHECT HBKID INTO (PAYR-CHECT , PAYR-HBKID)
                               FROM PAYR WHERE
                        ZBUKR EQ P_BUKRS AND
                        VBLNR EQ ITAB_DISPLAY-BELNR AND
                        LIFNR EQ ITAB_DISPLAY-LIFNR .
          SELECT SINGLE BANKS BANKL INTO (T012-BANKS , T012-BANKL) FROM
                 T012 WHERE BUKRS EQ P_BUKRS AND
                            HBKID EQ PAYR-HBKID.
          SELECT SINGLE BANKA INTO BNKA-BANKA FROM BNKA WHERE
                            BANKS EQ T012-BANKS AND
                            BANKL EQ T012-BANKL .
          WRITE :/2 ITAB_DISPLAY-BUDAT ,
                 14 ITAB_DISPLAY-BELNR ,
                 26 ITAB_DISPLAY-BLDAT ,
                 40 ITAB_DISPLAY-XBLNR ,
                 58(16) PAYR-CHECT ,
                 75 BNKA-BANKA ,
                105(40) ITAB_DISPLAY-SGTXT ,
                146(4) ITAB_DISPLAY-BLART .
    * Determinig Debit or Credit
          IF ITAB_DISPLAY-SHKZG EQ 'S'.
            V_DEBIT_TOTAL = V_DEBIT_TOTAL + ITAB_DISPLAY-DMBTR.
            WRITE:151(18)  ITAB_DISPLAY-DMBTR ,
                  171(18)  SPACE .
          ELSEIF ITAB_DISPLAY-SHKZG EQ 'H'.
            V_CREDIT_TOTAL = V_CREDIT_TOTAL + ITAB_DISPLAY-DMBTR.
            WRITE:151(18) SPACE ,
                  171(18)  ITAB_DISPLAY-DMBTR .
          ENDIF.
          CLEAR : T012 , BNKA , PAYR .
        ENDLOOP.
        FORMAT COLOR COL_TOTAL INTENSIFIED ON.
        WRITE:/(190) SY-ULINE.
    * Displaying Debit and Credit Totals
        WRITE:/125 TEXT-001 ,
           151(18) V_DEBIT_TOTAL ,
           171(18) V_CREDIT_TOTAL .
        WRITE:/(190) SY-ULINE.
    * Displaying the Closing Balance
        FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
        V_CLOSE_BAL = ITAB_OPG-BAL + V_DEBIT_TOTAL - V_CREDIT_TOTAL .
        IF V_CLOSE_BAL GT 0.
          WRITE:/122 TEXT-002 ,
             151(18) V_CLOSE_BAL NO-SIGN.  " D00K909674
        ELSEIF V_CLOSE_BAL LE 0.
          WRITE:/122 TEXT-002 ,
             171(18) V_CLOSE_BAL NO-SIGN.  " D00K909674
        ENDIF.
        CLEAR : V_CLOSE_BAL.
      ENDLOOP.
    ENDFORM.                               " F_006_DISPLAY_LIST
    *****************dispaly list 1 ending here*********************
    *****************dispaly list 2 starting here*********************
    *&      Form  F_006_DISPLAY_LIST1
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM F_006_DISPLAY_LIST1 .
    TABLES : KNA1 .
      DATA : V_DEBIT_TOTAL1 TYPE P DECIMALS 2 ,
             V_CREDIT_TOTAL1 TYPE P DECIMALS 2 ,
             V_CLOSE_BAL1 TYPE P DECIMALS 2 .
      DATA : V_CNT1 TYPE I .
      SORT ITAB_OPG1 BY KUNNR.
      LOOP AT ITAB_OPG1.
        NEW-PAGE.
    * Displaying Vendor Name
        SELECT SINGLE NAME1 FROM KNA1 INTO KNA1-NAME1 WHERE
                                                 KUNNR EQ ITAB_OPG1-KUNNR .
        FORMAT COLOR COL_POSITIVE INTENSIFIED ON.
        WRITE:/2 'Customer Code:' ,
                 ITAB_OPG1-KUNNR  ,
              40 KNA1-NAME1 .
        CLEAR : KNA1 .
        WRITE :/(190) SY-ULINE .
    * Displaying Opening Balance
        FORMAT COLOR COL_NEGATIVE INTENSIFIED ON .
        READ TABLE ITAB_OPG1 WITH KEY KUNNR = ITAB_OPG1-KUNNR .
        IF ITAB_OPG1-BAL1 LE 0 .
          WRITE :/2 'Opening Balance for Period' , (4) S_MONAT-LOW , ':' ,
                  171(18) ITAB_OPG1-BAL1 .
        ELSE.
          WRITE :/2 'Opening Balance for Period' , (4) S_MONAT-LOW , ':' ,
                  151(18) ITAB_OPG1-BAL1 .
        ENDIF.
        WRITE :/(190) SY-ULINE .
    * Displaying Line Items
        LOOP AT ITAB_DISPLAY1 WHERE KUNNR EQ ITAB_OPG1-KUNNR.
          V_CNT1 = SY-TABIX MOD 2.
          IF V_CNT1 EQ 0.
            FORMAT COLOR COL_NORMAL INTENSIFIED ON.
          ELSE.
            FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
          ENDIF.
    * Selecting Bank Name and Cheque Number
          SELECT SINGLE CHECT HBKID INTO (PAYR-CHECT , PAYR-HBKID)
                               FROM PAYR WHERE
                        ZBUKR EQ P_BUKRS AND
                        VBLNR EQ ITAB_DISPLAY1-BELNR AND
                        KUNNR EQ ITAB_DISPLAY1-KUNNR .
          SELECT SINGLE BANKS BANKL INTO (T012-BANKS , T012-BANKL) FROM
                 T012 WHERE BUKRS EQ P_BUKRS AND
                            HBKID EQ PAYR-HBKID.
          SELECT SINGLE BANKA INTO BNKA-BANKA FROM BNKA WHERE
                            BANKS EQ T012-BANKS AND
                            BANKL EQ T012-BANKL .
          WRITE :/2 ITAB_DISPLAY1-BUDAT ,
                 14 ITAB_DISPLAY1-BELNR ,
                 26 ITAB_DISPLAY1-BLDAT ,
                 40 ITAB_DISPLAY1-XBLNR ,
                 58(16) PAYR-CHECT ,
                 75 BNKA-BANKA ,
                105(40) ITAB_DISPLAY1-SGTXT ,
                146(4) ITAB_DISPLAY1-BLART .
    * Determinig Debit or Credit
          IF ITAB_DISPLAY1-SHKZG EQ 'S'.
            V_DEBIT_TOTAL1 = V_DEBIT_TOTAL1 + ITAB_DISPLAY1-DMBTR.
            WRITE:151(18)  ITAB_DISPLAY1-DMBTR ,
                  171(18)  SPACE .
          ELSEIF ITAB_DISPLAY1-SHKZG EQ 'H'.
            V_CREDIT_TOTAL1 = V_CREDIT_TOTAL1 + ITAB_DISPLAY1-DMBTR.
            WRITE:151(18) SPACE ,
                  171(18)  ITAB_DISPLAY1-DMBTR .
          ENDIF.
          CLEAR : T012 , BNKA , PAYR .
        ENDLOOP.
        FORMAT COLOR COL_TOTAL INTENSIFIED ON.
        WRITE:/(190) SY-ULINE.
    * Displaying Debit and Credit Totals
        WRITE:/125 TEXT-001 ,
           151(18) V_DEBIT_TOTAL1,
           171(18) V_CREDIT_TOTAL1 .
        WRITE:/(190) SY-ULINE.
    * Displaying the Closing Balance
        FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
        V_CLOSE_BAL1 = ITAB_OPG1-BAL1 + V_DEBIT_TOTAL1 - V_CREDIT_TOTAL1 .
        IF V_CLOSE_BAL1 GT 0.
          WRITE:/122 TEXT-002 ,
             151(18) V_CLOSE_BAL1 NO-SIGN.  " D00K909674
        ELSEIF V_CLOSE_BAL1 LE 0.
          WRITE:/122 TEXT-002 ,
             171(18) V_CLOSE_BAL1 NO-SIGN.  " D00K909674
        ENDIF.
        CLEAR : V_CLOSE_BAL1.
      ENDLOOP.
    ENDFORM.                    " F_006_DISPLAY_LIST1
    *****************dispaly list 2 ending here*********************
    Thanks,
    Sankar M

    Hi,
    Can you post it as two halves ?
    Regards,
    Swarna Munukoti

  • Multiple records from one form

    Hi everyone,
    I am creating a sign-up form for users of a website - i need
    them to select from a number of categories that they want to be
    listed in. i am using a series of check boxes for them to select
    the categories. What i want to do is create a separate record in my
    MySQL DB for each check box that is ticked that contains the user
    ID and the category ID. is there a way to do this from just one
    form?

    dhewuidhjklhdwidh wrote:
    > I am creating a sign-up form for users of a website - i
    need them to select
    > from a number of categories that they want to be listed
    in. i am using a series
    > of check boxes for them to select the categories. What i
    want to do is create a
    > separate record in my MySQL DB for each check box that
    is ticked that contains
    > the user ID and the category ID. is there a way to do
    this from just one form?
    You can save them in a SET column. A SET column type allows
    you to store
    up to 64 predefined values in a single column.
    Create the checkbox group as an array by adding square
    brackets to the
    end of the name value like this:
    <input type="checkbox" name="category[]" value="catA"
    />
    <input type="checkbox" name="category[]" value="catB"
    />
    <input type="checkbox" name="category[]" value="catC"
    />
    To insert the values in a SET column, use implode() to create
    a
    comma-separated string:
    if (isset($_POST['category'])) {
    $_POST['category'] = implode(',', $_POST['category']);
    else {
    $_POST['category'] = '';
    More about the SET column type here:
    http://dev.mysql.com/doc/refman/5.0/en/set.html
    David Powers, Adobe Community Expert
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • Two select lists in tabular form

    I have two Select Lists which one of them depends on the another -the second one's query depends on the first one's - .....
    This operation can be done in a form or a page, but how it could be done in a tabular form???
    Saad

    The simple answer is that to the best of my knowledge, it cannot be done because of how the tabular form works. If I understand it correctly, Tabular forms are populated completely at page load and cannot post back from items inside the form in order to refresh a list of values on the second select list. If you want to do this, you will need to build the form as a "Form and Report" page type where you have links in your report that populate a regular page form. Just tell it to put the form and the report on the same page them add a hidden page item that you set to 1 or 0 to display the form and setup the form processing so it is button tied instead of unconditional (You may have to duplicate auto processing processes).
    The complex answer....there probably is a way to do this using AJAX as AJAX is good at this kind of stuff and every field in the tabular form has an HTML id of some kind....but I am not well versed enough in AJAX to give you a straight answer as to how to accomplish it. I used AJAX to do something similar to what your talking about but it was with regular page items (using a select list to populate a shuttle without a post back) and not items in a tabular form.

  • Visual Composer - dynamic entry list in a form

    Hi everybody,
    I have a question about Visual Composer (NW7.1).
    My goal is it to create a dynamic form within VC iView. As data source I want to use (reads) values from a customizing table and displayed them in a drop down menu. After selecting a drop down value, all its elements shall be presented dynamic in a form. My question is if VC is supporting that technically or not. I have tried different approaches but it is not working.
    Does anybody have some suggestions???
    For example:
    To show all customer data in a form, I set a reference in my customizing table that refers to my KNA1 table. If I want to show all suppliers data, I want to refer to my customizing with a reference to table LFA1. The form should display all the elements of KNA1 or LFA1. Is something like that technically possible?? HELP!
    Thank you for your help in advance.

    Hi Anja,
    you understood me correct. However this was just an example.
    1. Having some drop down list to select an entry.
    --> in this drop down list there should be master data objects e.g. customers, suppliers, ...
    2. Depending on the entry you like to display a form either filled with values of KNA1 table or LFA1 table.
    --> If I choose customers all information should be displayed in the form. If I choose suppliers all supplier's information should be displayed in the form.
    My task and my goal is it to use a customizing table in which I save SAP BI InfoObject. In my drop down menu I want to be able to select one of these object (e.g. customer master data). In the next step there should be a dynamic list for my form. That means if I change my object by selecting another drop down item - it will be automatically change the list entries from my new object
    How can I do that?
    Thank you so much.
    Tom

  • Data not transfering from one form to another

    I have designed two forms in which i want to transfer data from one form to another which contains lot of fields.Process starts wid filling the first form(form1) from the workspace and all the data from dat form will be transfered to next level user who is having form2.Both forms contains two pages each.I tried with the SETVALUE ACTIVITY after designing two forms but its showing error.

    No am not using any xml schema .i have designed the two forms with the same fileds and field names.what cpould be the problem.After submitting the task from the start process it is going to the next user level but the form is getting added twice in the to do list of that user and data is not getting bound.If u want i can sned u my lca files or forms.

  • 2 alv-lists in one batch job

    How can I create 2 ALV-lists in one batch job
    with fm REUSE_ALV_LIST_DISPLAY ?
    kind regards
    Andreas

    Try this...
    * In SELECTION-SCREEN area, define type of email and recepient.
    PARAMETERS: p_email  TYPE somlreci1-receiver,   "Name of Shared Distribution List
                p_rectyp TYPE so_escape.    "Type C for Shared Distribution List
    * In body of program, call 1st alv grid, send the spool to the recepient, call 2nd alv grid, send the spool to the recepient.
        PERFORM 03display_data.
        PERFORM send_spool_2_user USING sy-spono.
        PERFORM 04display_data.
        PERFORM send_spool_2_user USING sy-spono.
    * Form to sent the spool to the recepient.
    FORM send_spool_2_user  USING    p_spono.
      spool_number = p_spono.
      IF sy-batch = x AND spool_number IS NOT INITIAL.
        IF p_email IS NOT INITIAL
        AND p_rectyp IS NOT INITIAL.
    *PARAMETERS: p_email  TYPE somlreci1-receiver DEFAULT 'ZDALLEN',
    *            p_rectyp type so_escape  DEFAULT 'C'.
          PERFORM set_spool_title_name.
          PERFORM build_txt_data_table.
          PERFORM populate_email_message_body.
    * Send file by email as .txt speadsheet
          PERFORM send_file_as_email_attachment
            TABLES it_message
                   it_attach
            USING p_email
                  v_spl_title                         "Title of Email
                  'ALI'                                             "File Format (ALI=List)
                  v_spl_name                  "File Name (Can't see how this is used)
                  v_spl_name                  "Description on Attachment max 12 characters
            CHANGING gd_error
                  gd_reciever.
    * Instructs mail send program for SAPCONNECT to send email(rsconn01)
          PERFORM initiate_mail_execute_program.
        ENDIF.
      ENDIF.
    ENDFORM.                    " send_spool_2_user
    *& Form SEND_FILE_AS_EMAIL_ATTACHMENT
    * Send email
    FORM send_file_as_email_attachment TABLES pit_message
    pit_attach
    USING p_email
    p_mtitle
    p_format
    p_filename
    p_attdescription
    p_sender_address
    p_sender_addres_type
    CHANGING p_error
    p_reciever.
      DATA: ld_error TYPE sy-subrc,
      ld_reciever TYPE sy-subrc,
      ld_mtitle LIKE sodocchgi1-obj_descr,
      ld_email LIKE somlreci1-receiver,
      ld_format TYPE so_obj_tp ,
      ld_attdescription TYPE so_obj_nam ,
      ld_attfilename TYPE so_obj_des ,
      ld_sender_address LIKE soextreci1-receiver,
      ld_sender_address_type LIKE soextreci1-adr_typ,
      ld_receiver LIKE sy-subrc.
      ld_email = p_email.
      ld_mtitle = p_mtitle.
      ld_format = p_format.
      ld_attdescription = p_attdescription.
      ld_attfilename = p_filename.
      ld_sender_address = p_sender_address.
      ld_sender_address_type = p_sender_addres_type.
    * Fill the document data.
      w_doc_data-doc_size = 1.
    * Populate the subject/generic message attributes
      w_doc_data-obj_langu = sy-langu.
      w_doc_data-obj_name = 'SAPRPT'.
      w_doc_data-obj_descr = ld_mtitle .
      w_doc_data-sensitivty = 'F'.
    * Fill the document data and get size of attachment
      CLEAR w_doc_data.
      READ TABLE it_attach INDEX w_cnt.
      w_doc_data-doc_size =
      ( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
      w_doc_data-obj_langu = sy-langu.
      w_doc_data-obj_name = 'SAPRPT'.
      w_doc_data-obj_descr = ld_mtitle.
      w_doc_data-sensitivty = 'F'.
      CLEAR t_attachment.
      REFRESH t_attachment.
      t_attachment[] = pit_attach[].
    * Describe the body of the message
      CLEAR t_packing_list.
      REFRESH t_packing_list.
      t_packing_list-transf_bin = space.
      t_packing_list-head_start = 1.
      t_packing_list-head_num = 0.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE it_message LINES t_packing_list-body_num.
      t_packing_list-doc_type = 'RAW'.
      APPEND t_packing_list.
    * Create attachment notification
      t_packing_list-transf_bin = 'X'.
      t_packing_list-head_start = 1.
      t_packing_list-head_num = 1.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
      t_packing_list-doc_type = ld_format.
      t_packing_list-obj_descr = ld_attdescription.
      t_packing_list-obj_name = ld_attfilename.
      t_packing_list-doc_size = t_packing_list-body_num * 255.
      APPEND t_packing_list.
    * Add the recipients email address
      CLEAR t_receivers.
      REFRESH t_receivers.
      t_receivers-receiver = ld_email.
      t_receivers-rec_type = 'C'.
      t_receivers-com_type = '   '.
      t_receivers-notif_del = ' '.
      t_receivers-notif_ndel = ' '.
      APPEND t_receivers.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
        EXPORTING
          document_data              = w_doc_data
          put_in_outbox              = 'X'
          sender_address             = ld_sender_address
          sender_address_type        = ld_sender_address_type
          commit_work                = 'X'
        IMPORTING
          sent_to_all                = w_sent_all
        TABLES
          packing_list               = t_packing_list
          contents_bin               = t_attachment
          contents_txt               = it_message
          receivers                  = t_receivers
        EXCEPTIONS
          too_many_receivers         = 1
          document_not_sent          = 2
          document_type_not_exist    = 3
          operation_no_authorization = 4
          parameter_error            = 5
          x_error                    = 6
          enqueue_error              = 7
          OTHERS                     = 8.
    * Populate zerror return code
      ld_error = sy-subrc.
    * Populate zreceiver return code
      LOOP AT t_receivers.
        ld_receiver = t_receivers-retrn_code.
      ENDLOOP.
    ENDFORM.                    "SEND_FILE_AS_EMAIL_ATTACHMENT
    *& Form INITIATE_MAIL_EXECUTE_PROGRAM
    * Instructs mail send program for SAPCONNECT to send email.
    FORM initiate_mail_execute_program.
      WAIT UP TO 2 SECONDS.
      SUBMIT rsconn01 WITH mode = 'INT'
      WITH output = 'X'
      AND RETURN.
    ENDFORM. " INITIATE_MAIL_EXECUTE_PROGRAM
    Edited by: Deborah Allen on May 11, 2010 12:36 AM

  • Is it better to create ONE form, for 25 different forms?

    We have a Telco Application (in Forms 10g) which has about 200 Forms which are called from the main menu. Out of that 200 forms about *25* are "file upload" type forms (shown below).
    http://www.freeimagehosting.net/alg6q
    As you can see this is small form. The functionality is as follows:
    *(a.)* Select a text file (which has data in tabular format) from the client PC.
    When file is selected, it is also copied to a directory in the DB server machine. File Name will show the full path of the file in the client machine.
    *(b.)* When user presses Load button, form calls a stored packaged procedure. In that we create a EXTERNAL table mapped to the file in the db directory and read the contents to a temporary table in the DB.
    *(c.)* When user presses Process button, the temporary table is read and our Telco tables are updated using this data.
    *(d.)* You can view the error records and correct records discovered while processing, with the View File option. This will display 2 Oracle reports.
    *(e.)* You can delete the temporary table contents using the Delete Temporary option.
    This story goes like this: Our application is in Forms 10g. Now, we want to upgrade this application to 11g Forms. One problem we encountered was the FileUploader bean which we use in the above forms. This does not work in 11g. Solution was found in using WebUtil. Now, we have to modify all 25 Forms (obviously).
    Now here comes the real important part: Our Managers think that in the future also we might have to do upgrade to these 25 forms (due to future problems/upgrades with WebUtil and so on) and they want us to create ONE form for the 25 forms. So, in that ONE form,
    (a.) We have a list box at the top where uses selects which upload function he wants.
    (b.) Then, the file is selected (and transferred to the DB directory).
    (c.) Now when the users presses Load button, we have to execute the load packaged procedure for the selected load file option.
    (d.) When he presses Process button we have to run the program unit for the selected file upload function.
    (e.) When user presses the View File button, he has to show the correct records and invalid records (found after processing) in 2 reports. The reports differ from function to function.
    (f.) He can delete the records in the temporary table using Delete Temp button.
    Is this is good idea?? My initial study tells me that it is not a good idea since we have one form with too much functionality. What are pros and cons of this approach and what is the best solution??
    Edited by: user12240205 on Jun 25, 2012 1:16 AM

    So the forms are completely different, and yet you are asked to stuff them all together into one form? What sense would that make? That's like pulling forms which are using text_io together just because when text_io is changed you simply would need to edit one form. Well of course you would have to. On the other hand there is a pile of code necessary to seperate the parts you glued together in the first place plus the effort of pulling all those forms together plus the effort of adding stuff to one "part" of the form.
    Also think about version control: you'd create more frequent conflicts in putting those forms together when different developers edit different parts of the form. Conflicts causes work as developers are forced to merge more often plus developers can make errors when merging their changes. Also the log of your version control system becomes quite useless as it always will be the xyz form which is changed. If you would want to know what did change you would have to read the log messages carefully of each revission (given the fact that developers wrote them carefully) or do diffs between revisions instead of...looking at what files changed.
    And all that just because the only thing they have in common is that they are using webutil?!? Do your managers keep their Blue Socks and their Blue Cars in the same drawer because they are blue?
    If the issue here is that you need to edit many forms and this might cause errors then you should take a look at the JDAPI, because this would be the tool to do changes in forms in batch. The forms migration assistant can also be configured to change one built-in into another, and you wouldn't have to write one line of java code. But stuffing forms together because they use the same built-ins...I'd say no, but of course this is just my opinioin ;)
    btw.:
    When you say API, u mean a PLL, right???Not only, by API I meant Application programming interface; this might be a package in a library, a whole pll file, a database package, a java class, or a combination of all those.
    cheers

  • Multiple Response Sheets for one form

    Hello,
    Can anyone tell me how to create multiple response sheets for the same form?
    For example, my sales team needs to send the form out to different companies, but needs their responses sepearted to analyze.
    Please Help!

    Hi,
    You can only have one active Response Sheet per form, this means that while you are using the same form for different companies, the responses that everyone submits will go to this one response sheet.
    However, if you just want to add other sheets in the 'View Responses' tab, for backing up data or other purposes, you can select Insert menu/Sheet in the 'View Responses' tab
    In your case, it sounds like you need a form per company or you can use one form and have a field requesting the user to enter the company name (or you can have a drop down for the user to select a predefined list of companies) and then once you received all the responses, you can sort or filter the responses in the table based on the company name, for example. Or export your responses in Excel format, and do the analysis there.
    thanks,
    Lucia

Maybe you are looking for

  • Error while running the Managed server

    Hi i am getting the below error while running the Managed server. java.lang.IllegalArgumentException: config=oracle.dms.config.DumpConfig@186793e logDir=null agency=oracle.dms.reporter.SpyAgency@181f91a dmsTimer=java.util.concurrent.ScheduledThreadPo

  • Acrobat 9 Pro....Distiller / ICC Profile Problem

    I have loaded Acrobat 9 Pro 3 times and continue to get following error message every time I reboot computer:  "Distiller can not find your ICC profiles.  Please reinstall the software." Acrobat opens ok but will not print or perfom perform email for

  • Too low(400Kbyte/sec) speed with USB MSI-6545 (and printer HP-1200, sc

    Hello! I Use motherboard MSI-6545(i850, with 3 USB 1.1 ports),  printer HP Laserjet-1200 and scanner HP scanjet-5400.  OS Windows Xp pro SP1. 2 cables USB are length 3m. I have found that speed of downloading from scanner to PC and from PC to printer

  • I was almost finished installing a trial of Acrobat XI when with 2 seconds left, an error occurred

    I was almost finished installing Acrobat XI trial when with 2 seconds left, an error occured and now nothing is happening. What do I do next and how?

  • Realesing objects in Teststand

    Using TestStand 3.5 with the debugging options on, I get the following debug message when exiting the CVI Test Executive after running a program. Reference to PropertyObjects 42 4 Top Level Type Definitions : FCParameter Type Definitions : Expression