Using models for multiple one-to-many table relationships

Hi there!
I have a database with tables that have one-to-many relationships. They
are laid out with a standard join tables:
A     A_B     B     B_C     C
a_id     a_id     b_id     b_id     c_id
b_id     c_id
and has 1 A for n of B. In some cases, the B table also joins with
another table for yet more information.
My question: what technique should I use to organize a database of this
type into JATO Models?
I could create an AModel, for example, that would have a set of query
field descriptors for the information relevant from tables A and B. But
then how do I query table C when that information is necessary? Or,
more to the point, create information in C when a new entry in B is created.
Do the models use each other, or is that left up to the view bean (seems
incorrect for data isolation).
Any pointers appreciated,
Byron

Byron,
You can create a separate "modifying" model for each table and do
inserts/deletes/updates in a transaction across the tables with the
three models. That's really the easy part.
The somewhat more tedious part is the "join" models, but not hard to do.
You just have to decide what you need from the different tables and
quite possibly create multiple join models for different select scenarios.
So let's just run through a simple two table join model.
Create a SQL model. I usually name them based on the table joins. Let's
use a somewhat more real example:
table = customer
columns = custid, firstname, lastname, email
table = address
columns = addrid (seqid), custid (fk), type
('w'ork,'h'ome,'b'illing,'s'hipping,'o'ther), address1, address2, city,
state, zip
Suppose we want to select a customer and show a list of all his/her
addresses.
I would create a SQL model class (extending QueryModelBase of course)
called CustomerAddressJoinModel (this naming convention gets tough with
three or more tables, so you have to be creative).
In that model, I would create the fields just like any single table
model. You need only include the columns you need. Maybe you create one
join model that only has custid, lastname, firstname, type, city, zip.
OK, so we only cut out 2 columns, but you get the point. If you had a
table with lots of columns with data you rarely need to display and/or
update, then you can exclude them. Probably a slick way to exclude
dynamically, but this is straight forward.
Another join model could have all the columns of both tables.
So the trick is to set the static where criteria (using the
setStaticWhereCriteria method) in the model's constructor. I think the
sql model template has this in it.
setStaticWhereCriteria(customer.custid=address.custid);
Now you just set your criteria like any other model, and execute it.
For a 3 table join, you just set the static criteria like this:
tableA.aid=tableB.aid AND tableB.bid=tableC.bid
does that make sense?
You can also set the "modifying table" (setModifyingTable(table) - i
think that's right) in the model and inserts/updates/deletes will only
operate on that table within the model. Problem is maybe in the the
field binding in your views. You may want to select from one field, and
modify using another field. Can be done though, just not directly supported.
In the next release of JATO, you will be able to set a display fields
binding for read and write using different fields and even different models.
craig
Byron Servies wrote:
Hi there!
I have a database with tables that have one-to-many relationships. They
are laid out with a standard join tables:
     A     A_B     B     B_C     C
     a_id     a_id     b_id     b_id     c_id
     b_id     c_id
and has 1 A for n of B. In some cases, the B table also joins with
another table for yet more information.
My question: what technique should I use to organize a database of this
type into JATO Models?
I could create an AModel, for example, that would have a set of query
field descriptors for the information relevant from tables A and B. But
then how do I query table C when that information is necessary? Or,
more to the point, create information in C when a new entry in B is created.
Do the models use each other, or is that left up to the view bean (seems
incorrect for data isolation).
Any pointers appreciated,
Byron
To download the latest version of JATO, please visit:
http://www.sun.com/software/download/developer/5102.html
For more information about JATO, please visit:
http://developer.iplanet.com/tech/appserver/framework/index.jsp

Similar Messages

  • One-to-many table linking

    Hi all,
    I'm trying to write a report with multiple one-to-many table links.  The issue is I only want a single record from the linked tables.  The main table is an item table and the linked tables are issue and receipt.  I want to display information from the last issue record and the last receipt record along with the item information.  Not sure how to restrict the joins to just a single record (also need to sort desc on dates in the linked tables).  Does this require the use of a view? or a custom sp?
    Thanks for taking your time to help.
    Kevin

    To bring back a single record then you will probably need to use a View , command or SP.
    However, in Crystal you can bring back multiple records and only display the record you want. The easiest way will be to group
    Data on Date and then Item code.
    Place the data you want to see in in Item group footer and suppress details and all other Group headers and footers.
    To get receipt date just use a maximum summary of receipt date in item group footer
    Ian

  • Weblogic-cmp-rdbms-jar.xml for One-To-Many unidirectional relationship

    hi,
    I am trying to create a simple cmp One-To-Many unidirectional relationship and deploy the same in weblogic. Can someone help me with the weblogic-cmp-rdbms-jar.xml. Am attaching the weblogic-cmp-rdbms-jar. xml tht i am using as also the corresponding ejb-jar.xml. Pls. note tht i want a unidirectional relationship here. one i am tryng However i get this error:
    Error while reading 'META-INF/weblogic-cmp-rdbms-jar.xml'. The error was: Role 'Supplier supplies Products' of relationship 'Product Supplier' contains an invalid key-column value of 'productID'. The key-column must specify a primary key column in the related bean. However, there is no primary key column named 'productID' defined in the related bean 'ProductEJB' or else 'productID' is not being recognized due to case mismatch. My weblogic-cmp-rdbms-jar
    <?xml version="1.0"?>
    <!DOCTYPE weblogic-rdbms-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 8.1.0 EJB RDBMS Persistence//EN' 'http://www.bea.com/servers/wls810/dtd/weblogic-rdbms-jar.dtd'>
    <weblogic-rdbms-jar>
    <weblogic-rdbms-bean>
         <ejb-name>SupplierEJB</ejb-name>
         <data-source-name>RJDataSource</data-source-name>
         <table-map>
               <table-name>AA_Supplier</table-name>
               <field-map>
                     <cmp-field>supplierID</cmp-field>
                     <dbms-column>supplierID</dbms-column>
               </field-map>
               <field-map>
                    <cmp-field>name</cmp-field>
                    <dbms-column>name</dbms-column>
               </field-map>
         </table-map>
    </weblogic-rdbms-bean>
    <weblogic-rdbms-bean>
           <ejb-name>ProductEJB</ejb-name>
           <data-source-name>RJDataSource</data-source-name>
           <table-map>
                 <table-name>AA_Product</table-name>
                 <field-map>
                      <cmp-field>productID</cmp-field>
                      <dbms-column>productid</dbms-column>
                 </field-map>
                 <field-map>
                      <cmp-field>description</cmp-field>
                      <dbms-column>description</dbms-column>
                 </field-map>
                 <field-map>
                      <cmp-field>basePrice</cmp-field>
                      <dbms-column>baseprice</dbms-column>
                 </field-map>
                <field-map>
                      <cmp-field>name</cmp-field>
                      <dbms-column>name</dbms-column>
                 </field-map>
                 <field-map>
                     <cmp-field>supplierID</cmp-field>
                       <dbms-column>supplierID</dbms-column>
                 </field-map>
            </table-map>
    </weblogic-rdbms-bean>
    <weblogic-rdbms-relation>
         <relation-name>Product Supplier</relation-name>
         <weblogic-relationship-role>
              <relationship-role-name>Supplier supplies Products</relationship-role-name>
              <relationship-role-map>
                   <column-map>
                        <foreign-key-column>supplierID</foreign-key-column>
                        <key-column>productID</key-column>
                   </column-map>
              </relationship-role-map>
         </weblogic-relationship-role>
         <weblogic-relationship-role>
              <relationship-role-name>Product supplied by Supplier</relationship-role-name>
              <relationship-role-map>
              <column-map>
                   <foreign-key-column>products</foreign-key-column>
                   <key-column>supplierID</key-column>
              </column-map>
              </relationship-role-map>
         </weblogic-relationship-role>
    </weblogic-rdbms-relation>
    </weblogic-rdbms-jar> My ejb-jar.xml
    <?xml version="1.0"?>
    <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
    <ejb-jar>
         <enterprise-beans>
         <entity>
              <ejb-name>SupplierEJB</ejb-name>
              <home>com.tpt.practice.entityBeans.cmp.product.relationship.SupplierHome</home>
              <remote>com.tpt.practice.entityBeans.cmp.product.relationship.Supplier</remote>
              <ejb-class>com.tpt.practice.entityBeans.cmp.product.relationship.SupplierEJB</ejb-class>
              <persistence-type>Container</persistence-type>
              <prim-key-class>java.lang.String</prim-key-class>
              <reentrant>False</reentrant>
              <cmp-version>2.x</cmp-version>
              <abstract-schema-name>AA_Supplier</abstract-schema-name>
              <cmp-field>
                   <field-name>supplierID</field-name>
              </cmp-field>
              <cmp-field>
                   <field-name>name</field-name>
              </cmp-field>
              <primkey-field>supplierID</primkey-field>
              <ejb-ref>
                        <ejb-ref-name>ProducEJB</ejb-ref-name>
                        <ejb-ref-type>Entity</ejb-ref-type>
                        <home>com.tpt.practice.entityBeans.cmp.product.ProductHome</home>
                        <remote>com.tpt.practice.entityBeans.cmp.product.Product</remote>
                        <ejb-link>ProductEJB#ProductEJB.jar</ejb-link>
              </ejb-ref>
              <query>
                   <query-method>
                        <method-name>findByName</method-name>
                        <method-params>
                             <method-param>java.lang.String</method-param>
                        </method-params>
                   </query-method>
                   <ejb-ql>
                        <![CDATA[SELECT OBJECT(a) FROM AA_Supplier AS a WHERE a.name =
                        ?1]]>
                   </ejb-ql>
              </query>
              <query>
                   <query-method>
                        <method-name>findAllSuppliers</method-name>
                        <method-params>
                        </method-params>
                   </query-method>
                   <ejb-ql>
                        <![CDATA[SELECT OBJECT(a) FROM AA_Supplier AS a WHERE a.supplierID
                        IS NOT NULL]]>
                   </ejb-ql>
              </query>
         </entity>
         <entity>
              <ejb-name>ProductEJB</ejb-name>
              <home>com.tpt.practice.entityBeans.cmp.product.relationship.ProductHome</home>
              <remote>com.tpt.practice.entityBeans.cmp.product.relationship.Product</remote>
              <local-home>com.tpt.practice.entityBeans.cmp.product.relationship.ProductLocalHome</local-home>
              <local>com.tpt.practice.entityBeans.cmp.product.relationship.ProductLocal</local>
              <ejb-class>com.tpt.practice.entityBeans.cmp.product.relationship.ProductEJB</ejb-class>
              <persistence-type>Container</persistence-type>
              <prim-key-class>com.tpt.practice.entityBeans.cmp.product.relationship.ProductPK</prim-key-class>
              <reentrant>False</reentrant>
              <cmp-version>2.x</cmp-version>
              <abstract-schema-name>AA_Product</abstract-schema-name>
              <cmp-field>
                   <field-name>productID</field-name>
              </cmp-field>
              <cmp-field>
                   <field-name>name</field-name>
              </cmp-field>
              <cmp-field>
                   <field-name>description</field-name>
              </cmp-field>
              <cmp-field>
                   <field-name>basePrice</field-name>
              </cmp-field>
              <cmp-field>
                   <field-name>supplierID</field-name>
              </cmp-field>
              <primkey-field>productID</primkey-field>
              <query>
                   <query-method>
                        <method-name>findByName</method-name>
                        <method-params>
                             <method-param>java.lang.String</method-param>
                        </method-params>
                   </query-method>
                   <ejb-ql>
                        <![CDATA[SELECT OBJECT(a) FROM AA_Product AS a WHERE a.name =
                        ?1]]>
                   </ejb-ql>
              </query>
              <query>
                   <query-method>
                        <method-name>findByDescription</method-name>
                        <method-params>
                             <method-param>java.lang.String</method-param>
                        </method-params>
                   </query-method>
                   <ejb-ql>
                        <![CDATA[SELECT OBJECT(a) FROM AA_Product AS a WHERE a.description
                        = ?1]]>
                   </ejb-ql>
              </query>
              <query>
                   <query-method>
                        <method-name>findByBasePrice</method-name>
                        <method-params>
                             <method-param>double</method-param>
                        </method-params>
                   </query-method>
                   <ejb-ql>
                        <![CDATA[SELECT OBJECT(a) FROM AA_Product AS a WHERE a.basePrice =
                        ?1]]>
                   </ejb-ql>
              </query>
              <query>
                   <query-method>
                        <method-name>findExpensiveProducts</method-name>
                        <method-params>
                             <method-param>double</method-param>
                        </method-params>
                   </query-method>
                   <ejb-ql>
                        <![CDATA[SELECT OBJECT(a) FROM AA_Product AS a WHERE a.basePrice >
                        ?1]]>
                   </ejb-ql>
              </query>
              <query>
                   <query-method>
                        <method-name>findCheapProducts</method-name>
                        <method-params>
                             <method-param>double</method-param>
                        </method-params>
                   </query-method>
                   <ejb-ql>
                        <![CDATA[SELECT OBJECT(a) FROM AA_Product AS a WHERE a.basePrice <
                        ?1]]>
                   </ejb-ql>
              </query>
              <query>
                   <query-method>
                        <method-name>findAllProducts</method-name>
                        <method-params>
                        </method-params>
                   </query-method>
                   <ejb-ql>
                        <![CDATA[SELECT OBJECT(a) FROM AA_Product AS a WHERE a.productID
                        IS NOT NULL]]>
                   </ejb-ql>
              </query>
         </entity>
         </enterprise-beans>
         <relationships>
         <ejb-relation>
              <ejb-relation-name>Product Supplier</ejb-relation-name>
              <ejb-relationship-role>
                   <ejb-relationship-role-name>Supplier supplies Products</ejb-relationship-role-name>
                   <multiplicity>One</multiplicity>
                   <relationship-role-source>
                        <ejb-name>SupplierEJB</ejb-name>
                   </relationship-role-source>
                   <cmr-field>
                        <cmr-field-name>products</cmr-field-name>
                        <cmr-field-type>java.util.Collection</cmr-field-type>
                   </cmr-field>
              </ejb-relationship-role>
              <ejb-relationship-role>
                   <ejb-relationship-role-name>Product supplied by Supplier</ejb-relationship-role-name>
                   <multiplicity>Many</multiplicity>
                   <relationship-role-source>
                        <ejb-name>ProductEJB</ejb-name>
                   </relationship-role-source>
              </ejb-relationship-role>
         </ejb-relation>
         </relationships>
         <assembly-descriptor>
              <container-transaction>
              <method>
                   <ejb-name>SupplierEJB</ejb-name>
                   <method-intf>Remote</method-intf>
                   <method-name>*</method-name>
              </method>
              <trans-attribute>Required</trans-attribute>
              </container-transaction>
         </assembly-descriptor>
    </ejb-jar>

    I think u r some confusion with productID and SuppliedID . primary key of one column( productId ) can be a foreign key of other table colum( SuppliedID). but foreign key( SuppliedID) can not be a primary key of second table .u declared SuppliedId as primary key . so ur mapping is incorrect.

  • Creating a PO Using BAPI For Multiple PLants Or Multiple Line Items

    Hi All
        Can you please suggest me how to create a Purchase Order Using BAPI_PO_Create1 for Multiple Plants Or for Multiple Line items. The Requirement is like the PO is for single material for single vendor but for mulple stores i.e plants
    NOte:  Suggest me the  Creation of PO for MUltiple Line items or for multiple plants Using BAPI . Hope you people will give me the needful.
    Regards
    Shivakumar Bandari

    Hi,
    Here is the sample code to do that...
    *---> po header data
      wa_poheader-vendor    =  your vendor..
      wa_poheader-doc_type  =  Your doc type..check with Functional contact....
      wa_poheader-purch_org =  Purchasing Org..
      wa_poheader-pur_group =  Purchasing Group
    *---> po header data (change toolbar)
      wa_poheaderx-vendor    =  'X'.
      wa_poheaderx-doc_type  =  'X'.
      wa_poheaderx-purch_org =  'X'.
      wa_poheaderx-pur_group =  'X'.
    *---> poitem data
    data: item like ekpo-ebelp.
    item = '0010'.
    loop at t_parts.
      it_poitem-po_item  =  '00010'.
      IT_POITEM-PLANT    =  Plant..
      IT_POITEM-STGE_LOC =  Sloc...
    *---> poitemx (item data change toolbar)
      it_poitemx-po_item  =  '0010'.
      it_poitemx-po_itemx  =  'X'.
      IT_POITEMX-PLANT    =  'X'.
      IT_POITEMX-STGE_LOC =  'X'.
    *---> add record's to internal table
      APPEND:  it_poitem,
             it_poitemx.
    endloop.
    *call bapi_po_create1
      CLEAR v_ebeln.
      CALL FUNCTION 'BAPI_PO_CREATE1'
        EXPORTING
          poheader         = wa_poheader
          poheaderx        = wa_poheaderx
        IMPORTING
          exppurchaseorder = v_ebeln
        TABLES
          return           = it_return
          poitem           = it_poitem
          poitemx          = it_poitemx.
    *---> check the return table for error message
      READ TABLE it_return WITH KEY type = 'E'.
      IF sy-subrc NE 0.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
          EXPORTING
            wait = 'X'.
      endif.
    Thanks,
    Murali

  • Looking for a One to Many script to extend the system partition for Windows 7 machines

    Looking for a One to Many script to extend the system partition for Windows 7 machines

    Pre-written scripts can be found in the repository:
    http://gallery.technet.microsoft.com/scriptcenter
    If you can't find what you need, you can request a script (no idea if anyone ever bothers to fulfill these requests though, I know I don't):
    http://gallery.technet.microsoft.com/scriptcenter/site/requests
    Let us know if you have any specific questions.
    Don't retire TechNet! -
    (Don't give up yet - 12,950+ strong and growing)

  • I have iphone 4 and i used it for a one and half years.i used it in sri lanka and doha qatar,recently i update it i.o.s 7, then it was working.after i.o.s 7.0.3 came i again updeted it and now my phone network is not working.now phone is locked.pls help.

    i have iphone 4 and i used it for a one and half years.i used it in sri lanka and doha qatar also..,recently i update it i.o.s 7, then it was working.after i.o.s 7.0.3 came i again updeted it and now my phone network is not working.now phone is locked.pls help.

    I am seeing if I can get another battery even though I do not believe that is the issue.  It keeps giving me vdd_under which I believe is under voltage, maybe it is just a faulty battery?  It charges up like normal and functions normal (when plugged in, or above 90%) but it gives under voltage warnings and shuts down when in heavy use (using camera or going back and forth to imessage).  When just sitting idle it doesn't seem to turn off until that 55-60% mark.  It may just be a faulty battery because I feel I installed all of the other cables correctly when replacing the screen, and I don't think those connections should affect the battery anyway except for maybe the logic board cable (the 2nd cable to be unplugged after the battery cable) I guess I could clean that out as well with isopropyl just in case.
    Any other suggestions would be helpful... and I will get back to you if a new battery helps.  Thanks!

  • One-to-many biderectional relationship

    Hello, I am trying to create a one-to-many biderectional relationship between NewsengContent(1) and NewsengProperty(many) entities.
    Inside NewsengContent, I define a collection of NewsengProperty's as:
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "contentId", fetch=FetchType.EAGER)
    private Collection<NewsengProperty> newsengPropertyCollection;In NewsengProperty I define the contentId as FK to NewsengContent:
    @ManyToOne
    @JoinColumn(name = "content_id", referencedColumnName = "id")
    private NewsengContent contentId;
        In the client code these are used as:
    List<NewsengProperty> props = new ArrayList<NewsengProperty>();
    NewsengContent nc = new NewsengContent();
      nc.setNewsengPropertyCollection(properties);Eventually all data gets populated fine except that content_id column always comes out null.
    Could anyone help me with this?
    Thanks!

    the problem was that I had to add following code to client:
    for (NewsengProperty np: properties ) {
                np.setContentId(nc);
            nc.setNewsengPropertyCollection(properties);

  • One-to-many self relationship guide

    Using the TopLink Mapping Workbench within JDeveloper 9.0.5.2, I am trying to create a hierarchical query. I have a table that includes the following columns:
    OBJECTID
    PARENT_ID
    where OBJECTID is the primary key, and PARENT_ID is a foreign key to OBJECTID. The CONNECT BY clause I would like to generate is:
    CONNECT BY PRIOR PARENT_ID = OBJECTID
    I have tried to use the tutorial at http://download-west.oracle.com/docs/cd/B10464_01/web.904/b10316/tutorial.htm#652452, but the TopLink Mapping Workbench GUIs in JDeveloper 9.5.0.2 are not the same as those shown in the tutorial. In particular, I cannot add a table reference in the one-to-many mapping GUI. I can only choose from existing foreign keys.
    Has anyone found a way to create a one-to-many self relationship, using JDeveloper 9.5.0.2?
    Thank you.

    As far as I can tell you are right that the Add button on the Table Reference is not available on the Mapping Workbench in JDeveloper 9.0.5. It is available only on the standalone version of the Mapping Workbench.
    The solution is to have the Table Reference (FK -> PK) Constraints already available from the Database. So all you need is to pick from an available relationship.
    From JDEV log into the HR / HR Schema and map the EMPLOYEES table. That table has such a Constraint.

  • How to use Keychain for multiple users on one computer?

    I have a new Macbook Pro with Yosemite.  I just moved over from PC for my work computer and the Keychain thing is killing me!  I am a social media consultant so I manage multiple accounts for multiple clients.  I need a way to log in and out as them on many different platforms.  The reality is that I am the only user but I log in and out of different things as if this was a public computer with multiple users. 
    PC allowed me a drop-down option with each login.  For example the email box could be clicked and then I could select the client email that I needed to fill in.  The password would then auto-populate.  Is there any setting I can change to make this happen on a Macbook? I have been logging in, deleting the info in Keychain, then logging in for the next client, delete...etc.
    Most password managers don't work because of this same problem.  Please don't recommend a password manager app unless it can handle logging in and out of (for example)10 different LinkedIn profiles.
    Any advice would be greatly appreciated!

    Tanja Turtsanyi wrote:
    I have a new Macbook Pro with Yosemite.
    Apple>About This Mac>More Info>Service
    Please read the warranty paperwork that came w/your computer.
    You have 14 days to return the computer w/no questions asked. 
    You have 90 days of FREE phone tech support on top of your standard 1 year warranty unless you also purchased AppleCare which gives you an additional 2 years of coverage plus FREE phone support.
    Strongly suggest that you take FULL advantage of the above before it runs out.  Let Apple deal w/the problems.
    Mac OS X (10.4)
    Conflicting info:  Please update/correct your profile so that you can receive the correct troubleshooting suggestions.  This will assist the users in trying to help you.  Thank you.

  • Use case for multiple crosstabs under one datasource

    I'm trying to understand why one would have multiple crosstabs for one datasource.  When I change one crosstab, it changes the other crosstab.  I was could have a different layout for multiple crosstabs.
    Thanks.
    Regards,
    Mel Calucin

    Hi Mel,
    I am not following this question; would it be possible to rephrase it?
    You could have multiple tabs for a data source - such as a one tab showing the result set in a cross tab and the other for a chart.
    Tammy

  • One to Many table join -- concat field per record grouped by id

    Post Author: wm5
    CA Forum: Formula
    Hello,
    I am using Crystal Reports XI and have two tables that have a one to many relationship and are joined by an JobID (number).
    Below is a sample with relative fields for each table.
    job_table: JobID (number), Manager (text), Status (text)
    jobaudit_table : JobAuditID (number), JobID (Number), FormID (Number)
    There is a one to many relationship with jobaudit_table having multiple records for each JobID in job_table.
    I have created a Group Header using the job_table.JobID and suppressed the detail section.
    In the group header for each JobID I display the JobID, Manager, Status. I also use the below formula to determine if any records in the jobaudit_table has a record where FormID = 90. If so, I display "Yes". If not, "No".
    So my report currently looks like.
    JobID     Manager     Status     Audit Performed
    1           Manager 1  Closed           N
    2          Manager 2   Closed           Y
    Here are the formula's I use to determine if any records in jobaudit_table contains a record where FormID = 90.
    @ja90exists
    if {jobaudit_table.FormID} = 90 then    1else    0;
    if sum({@ja90exists},{job_table.JobID}) = 0 then    "No"else    "Yes";
    Everything so far works fine. What I would like to do now is add a hyperlink to a script to view the job audit when in the above report the "Audit Performed" column is "Yes"
    So Report is now:
    JobID     Manager     Status     Audit Performed
    1           Manager 1  Closed           N
    2          Manager 2   Closed           Y (hyperlink to view audit)
    I cannot figure out how to gather the valid JobAuditIDs where FormID = 90 grouped by JobID to be used in the Group Heading section of the report.
    Also, it is unlikely, but possible that more than one job_audit record exists with FormID = 90 per JobID. So, my hyperlink could look like http://mysite.com/viewjobaudit.aspx?jobid=[jobaudit_table.JobAuditID],[jobaudit_table.JobAuditID] .
    Thanks for any help. And if this post is not clear let me know and I will clarify.
    wm5

    Post Author: bettername
    CA Forum: Formula
    Although I can't think of a way to get multiple hyperlinks, this should be a start.  It (should) hyperlink to the last job/audit in the group that formID of 90.  Oh, I assumed that the hyperlink should have been  xxxx...jobID,jobAuditID! 
    I think there may be a way of getting hyperlinks to every "90" record, but that will involve a subreport, so lets try this first...
    1 - everything from your group header to the group footer...
    2 -  add a formula into the group header that says:
    whileprintingrecords;
    stringvar jobauditID="";
    stringvar jobID:=";
    3 - Then add a formula to the details section:
    whileprintingrecords;
    stringvar jobauditID;
    stringvar jobID;
    if {jobaudit_table.FormID} = 90
    then (jobID:=totext({job_table.job_id},0,""); jobauditID:=totext({jobaudit_table.jobaudit_id},0,"")
    4 - Finally, on your "Audit Performed" formula, have a conditional hyperlink that says:
    whileprintingrecords;
    stringvar jobauditID;
    stringvar jobID;
    if {@audit performed} = "Y" then http://mysite.com/viewjobaudit.aspx?jobid=jobID","+jobauditID

  • Pls help me to create SO using BDC for multiple line items (VA01)

    Hi all,
    My requirement is to create SO for multiple line items in ECC6.0
    My recording for VA01 is like this.
    start-of-selection.
    perform open_group.
    perform bdc_dynpro      using 'SAPMV45A' '0101'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'VBAK-AUART'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'VBAK-AUART'
                                  'ZOR'.
    perform bdc_field       using 'VBAK-VKORG'
                                  '2000'.
    perform bdc_field       using 'VBAK-VTWEG'
                                  '10'.
    perform bdc_field       using 'VBAK-SPART'
                                  '05'.
    perform bdc_dynpro      using 'SAPMV45A' '4001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'VBKD-BSTKD'
                                  'open SO'.
    perform bdc_field       using 'VBKD-BSTDK'
                                  '29.01.2008'.
    perform bdc_field       using 'KUAGV-KUNNR'
                                  '100000'.
    perform bdc_field       using 'KUWEV-KUNNR'
                                  '100000'.
    perform bdc_field       using 'RV45A-KETDAT'
                                  '29.01.2008'.
    perform bdc_field       using 'RV45A-KPRGBZ'
                                  'D'.
    perform bdc_field       using 'VBKD-PRSDT'
                                  '29.01.2008'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'VBAP-WERKS(01)'.
    perform bdc_field       using 'RV45A-MABNR(01)'
                                  'hrpocf'.
    perform bdc_field       using 'VBAP-POSNR(01)'
                                  '    10'.
    perform bdc_field       using 'RV45A-KWMENG(01)'
                                  '                 55'.
    perform bdc_field       using 'VBAP-WERKS(01)'
                                  '2010'.
    perform bdc_dynpro      using 'SAPLCEI0' '0109'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RCTMS-MWERT(06)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=BACK'.
    perform bdc_field       using 'RCTMS-MNAME(01)'
                                  'A_THICK_MM'.
    perform bdc_field       using 'RCTMS-MNAME(02)'
                                  'A_WIDTH_MM'.
    perform bdc_field       using 'RCTMS-MNAME(03)'
                                  'A_EQUIVALENT_SPEC'.
    perform bdc_field       using 'RCTMS-MNAME(04)'
                                  'A_BATCH_WEIGHT_MAX_SI'.
    perform bdc_field       using 'RCTMS-MNAME(05)'
                                  'A_BATCH_WEIGHT_MIN_SI'.
    perform bdc_field       using 'RCTMS-MNAME(06)'
                                  'A_COIL_INNER_DIA_MM'.
    perform bdc_field       using 'RCTMS-MWERT(01)'
                                  '3.2'.
    perform bdc_field       using 'RCTMS-MWERT(02)'
                                  '1200'.
    perform bdc_field       using 'RCTMS-MWERT(03)'
                                  'IS_11513_GR_D_1985'.
    perform bdc_field       using 'RCTMS-MWERT(04)'
                                  '26.4'.
    perform bdc_field       using 'RCTMS-MWERT(05)'
                                  '26.4'.
    perform bdc_field       using 'RCTMS-MWERT(06)'
                                  '610'.
    perform bdc_dynpro      using 'SAPMV45A' '4001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'VBKD-BSTKD'
                                  'open SO'.
    perform bdc_field       using 'VBKD-BSTDK'
                                  '29.01.2008'.
    perform bdc_field       using 'KUAGV-KUNNR'
                                  '100000'.
    perform bdc_field       using 'KUWEV-KUNNR'
                                  '100000'.
    perform bdc_field       using 'RV45A-KETDAT'
                                  '29.01.2008'.
    perform bdc_field       using 'RV45A-KPRGBZ'
                                  'D'.
    perform bdc_field       using 'VBKD-PRSDT'
                                  '29.01.2008'.
    perform bdc_field       using 'VBKD-INCO1'
                                  'EXW'.
    perform bdc_field       using 'VBKD-INCO2'
                                  'mumbai east'.
    perform bdc_field       using 'VBKD-ZTERM'
                                  '0001'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'VBAP-WERKS(02)'.
    perform bdc_field       using 'RV45A-MABNR(02)'
                                  'hrpocf'.
    perform bdc_field       using 'VBAP-POSNR(02)'
                                  '    11'.
    perform bdc_field       using 'RV45A-KWMENG(02)'
                                  '                 66'.
    perform bdc_field       using 'VBAP-WERKS(02)'
                                  '2010'.
    perform bdc_dynpro      using 'SAPLCEI0' '0109'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RCTMS-MWERT(06)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=BACK'.
    perform bdc_field       using 'RCTMS-MNAME(01)'
                                  'A_THICK_MM'.
    perform bdc_field       using 'RCTMS-MNAME(02)'
                                  'A_WIDTH_MM'.
    perform bdc_field       using 'RCTMS-MNAME(03)'
                                  'A_EQUIVALENT_SPEC'.
    perform bdc_field       using 'RCTMS-MNAME(04)'
                                  'A_BATCH_WEIGHT_MAX_SI'.
    perform bdc_field       using 'RCTMS-MNAME(05)'
                                  'A_BATCH_WEIGHT_MIN_SI'.
    perform bdc_field       using 'RCTMS-MNAME(06)'
                                  'A_COIL_INNER_DIA_MM'.
    perform bdc_field       using 'RCTMS-MWERT(01)'
                                  '3.1'.
    perform bdc_field       using 'RCTMS-MWERT(02)'
                                  '1250'.
    perform bdc_field       using 'RCTMS-MWERT(03)'
                                  'IS_11513_GR_D_1985'.
    perform bdc_field       using 'RCTMS-MWERT(04)'
                                  '20.084'.
    perform bdc_field       using 'RCTMS-MWERT(05)'
                                  '20.084'.
    perform bdc_field       using 'RCTMS-MWERT(06)'
                                  '610'.
    perform bdc_dynpro      using 'SAPMV45A' '4001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=PDE3'.
    perform bdc_field       using 'VBKD-BSTKD'
                                  'open SO'.
    perform bdc_field       using 'VBKD-BSTDK'
                                  '29.01.2008'.
    perform bdc_field       using 'KUAGV-KUNNR'
                                  '100000'.
    perform bdc_field       using 'KUWEV-KUNNR'
                                  '100000'.
    perform bdc_field       using 'RV45A-KETDAT'
                                  '29.01.2008'.
    perform bdc_field       using 'RV45A-KPRGBZ'
                                  'D'.
    perform bdc_field       using 'VBKD-PRSDT'
                                  '29.01.2008'.
    perform bdc_field       using 'VBKD-INCO1'
                                  'EXW'.
    perform bdc_field       using 'VBKD-INCO2'
                                  'mumbai east'.
    perform bdc_field       using 'VBKD-ZTERM'
                                  '0001'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'VBAP-POSNR(01)'.
    perform bdc_field       using 'RV45A-VBAP_SELKZ(01)'
                                  'X'.
    perform bdc_dynpro      using 'SAPMV45A' '4003'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=T\09'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'VBKD-INCO2'.
    perform bdc_field       using 'VBKD-INCO1'
                                  'EXW'.
    perform bdc_field       using 'VBKD-INCO2'
                                  'mumbai'.
    perform bdc_field       using 'VBKD-ZTERM'
                                  '0001'.
    perform bdc_field       using 'VBKD-FKDAT'
                                  '29.01.2008'.
    perform bdc_field       using 'VBAP-TAXM1'
                                  '1'.
    perform bdc_field       using 'VBAP-TAXM2'
                                  '1'.
    perform bdc_field       using 'VBAP-TAXM3'
                                  '0'.
    perform bdc_field       using 'VBAP-TAXM4'
                                  '0'.
    perform bdc_dynpro      using 'SAPMV45A' '4003'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=TP_DELETE'.
    perform bdc_field       using 'LV70T-SPRAS'
                                  'EN'.
    perform bdc_dynpro      using 'SAPMV45A' '4003'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=TP_CREATE'.
    perform bdc_field       using 'LV70T-SPRAS'
                                  'EN'.
    perform bdc_dynpro      using 'SAPMV45A' '4003'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=TP_DETAIL'.
    perform bdc_field       using 'LV70T-SPRAS'
                                  'EN'.
    perform bdc_dynpro      using 'SAPLSTXX' '1100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RSTXT-TXLINE(02)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=TXVB'.
    perform bdc_field       using 'RSTXT-TXLINE(02)'
                                  'FDGFDG'.
    perform bdc_dynpro      using 'SAPLSTXX' '1100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RSTXT-TXLINE(02)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=TXBA'.
    perform bdc_dynpro      using 'SAPMV45A' '4003'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=T\10'.
    perform bdc_dynpro      using 'SAPMV45A' '4003'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/EBACK'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'VBKD-POSEX_E'.
    perform bdc_field       using 'VBKD-BSTKD'
                                  'open SO'.
    perform bdc_field       using 'VBKD-BSTDK'
                                  '29.01.2008'.
    perform bdc_field       using 'VBAP-POSEX'
                                  '108128'.
    perform bdc_field       using 'VBKD-BSTKD_E'
                                  '3011192'.
    perform bdc_field       using 'VBKD-POSEX_E'
                                  '000005'.
    perform bdc_dynpro      using 'SAPMV45A' '4001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=PDE3'.
    perform bdc_field       using 'VBKD-BSTKD'
                                  'open SO'.
    perform bdc_field       using 'VBKD-BSTDK'
                                  '29.01.2008'.
    perform bdc_field       using 'KUAGV-KUNNR'
                                  '100000'.
    perform bdc_field       using 'KUWEV-KUNNR'
                                  '100000'.
    perform bdc_field       using 'RV45A-KETDAT'
                                  '29.01.2008'.
    perform bdc_field       using 'RV45A-KPRGBZ'
                                  'D'.
    perform bdc_field       using 'VBKD-PRSDT'
                                  '29.01.2008'.
    perform bdc_field       using 'VBKD-INCO1'
                                  'EXW'.
    perform bdc_field       using 'VBKD-INCO2'
                                  'mumbai east'.
    perform bdc_field       using 'VBKD-ZTERM'
                                  '0001'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'VBAP-POSNR(02)'.
    perform bdc_field       using 'RV45A-VBAP_SELKZ(02)'
                                  'X'.
    perform bdc_dynpro      using 'SAPMV45A' '4003'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=T\09'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'VBKD-INCO2'.
    perform bdc_field       using 'VBKD-INCO1'
                                  'EXW'.
    perform bdc_field       using 'VBKD-INCO2'
                                  'mumbai'.
    perform bdc_field       using 'VBKD-ZTERM'
                                  '0001'.
    perform bdc_field       using 'VBKD-FKDAT'
                                  '29.01.2008'.
    perform bdc_field       using 'VBAP-TAXM1'
                                  '1'.
    perform bdc_field       using 'VBAP-TAXM2'
                                  '1'.
    perform bdc_field       using 'VBAP-TAXM3'
                                  '0'.
    perform bdc_field       using 'VBAP-TAXM4'
                                  '0'.
    perform bdc_dynpro      using 'SAPMV45A' '4003'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=TP_DELETE'.
    perform bdc_field       using 'LV70T-SPRAS'
                                  'EN'.
    perform bdc_dynpro      using 'SAPMV45A' '4003'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=TP_CREATE'.
    perform bdc_field       using 'LV70T-SPRAS'
                                  'EN'.
    perform bdc_dynpro      using 'SAPMV45A' '4003'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=TP_DETAIL'.
    perform bdc_field       using 'LV70T-SPRAS'
                                  'EN'.
    perform bdc_dynpro      using 'SAPLSTXX' '1100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RSTXT-TXLINE(02)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=TXVB'.
    perform bdc_field       using 'RSTXT-TXLINE(02)'
                                  'GFGFDG'.
    perform bdc_dynpro      using 'SAPLSTXX' '1100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RSTXT-TXLINE(02)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=TXBA'.
    perform bdc_dynpro      using 'SAPMV45A' '4003'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=T\10'.
    perform bdc_dynpro      using 'SAPMV45A' '4003'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'VBKD-POSEX_E'.
    perform bdc_field       using 'VBKD-BSTKD'
                                  'open SO'.
    perform bdc_field       using 'VBKD-BSTDK'
                                  '29.01.2008'.
    perform bdc_field       using 'VBAP-POSEX'
                                  '108128'.
    perform bdc_field       using 'VBKD-BSTKD_E'
                                  '3011192'.
    perform bdc_field       using 'VBKD-POSEX_E'
                                  '000005'.
    perform bdc_dynpro      using 'SAPMV45A' '4003'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/EBACK'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'VBAP-POSEX'.
    perform bdc_field       using 'VBKD-BSTKD'
                                  'open SO'.
    perform bdc_field       using 'VBKD-BSTDK'
                                  '29.01.2008'.
    perform bdc_field       using 'VBAP-POSEX'
                                  '108128'.
    perform bdc_field       using 'VBKD-BSTKD_E'
                                  '3011192'.
    perform bdc_field       using 'VBKD-POSEX_E'
                                  '5'.
    perform bdc_dynpro      using 'SAPMV45A' '4001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=KKAU'.
    perform bdc_field       using 'VBKD-BSTKD'
                                  'open SO'.
    perform bdc_field       using 'VBKD-BSTDK'
                                  '29.01.2008'.
    perform bdc_field       using 'KUAGV-KUNNR'
                                  '100000'.
    perform bdc_field       using 'KUWEV-KUNNR'
                                  '100000'.
    perform bdc_field       using 'RV45A-KETDAT'
                                  '29.01.2008'.
    perform bdc_field       using 'RV45A-KPRGBZ'
                                  'D'.
    perform bdc_field       using 'VBKD-PRSDT'
                                  '29.01.2008'.
    perform bdc_field       using 'VBKD-INCO1'
                                  'EXW'.
    perform bdc_field       using 'VBKD-INCO2'
                                  'mumbai east'.
    perform bdc_field       using 'VBKD-ZTERM'
                                  '0001'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RV45A-MABNR(01)'.
    perform bdc_dynpro      using 'SAPMV45A' '4002'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=T\02'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'VBKD-KONDA'.
    perform bdc_field       using 'VBAK-AUDAT'
                                  '29.01.2008'.
    perform bdc_field       using 'VBAK-VKBUR'
                                  'IN15'.
    perform bdc_field       using 'VBAK-WAERK'
                                  'INR'.
    perform bdc_field       using 'VBKD-PRSDT'
                                  '29.01.2008'.
    perform bdc_field       using 'VBKD-KDGRP'
                                  'CF'.
    perform bdc_field       using 'VBKD-PLTYP'
                                  '01'.
    perform bdc_field       using 'VBKD-KONDA'
                                  '01'.
    perform bdc_field       using 'VBKD-BZIRK'
                                  'NORTH'.
    perform bdc_dynpro      using 'SAPMV45A' '4002'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=T\03'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'VBKD-VSART'.
    perform bdc_field       using 'VBAK-VSBED'
                                  '01'.
    perform bdc_field       using 'VBKD-KZAZU'
                                  'X'.
    perform bdc_field       using 'VBKD-VSART'
                                  'ER'.
    perform bdc_dynpro      using 'SAPMV45A' '4002'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=T\05'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'VBKD-INCO2'.
    perform bdc_field       using 'VBKD-INCO1'
                                  'EXW'.
    perform bdc_field       using 'VBKD-INCO2'
                                  'mumbai'.
    perform bdc_field       using 'VBKD-ZTERM'
                                  '0001'.
    perform bdc_field       using 'VBKD-FKDAT'
                                  '29.01.2008'.
    perform bdc_field       using 'VBAK-TAXK1'
                                  '1'.
    perform bdc_field       using 'VBAK-TAXK3'
                                  'l'.
    perform bdc_dynpro      using 'SAPMV45A' '4002'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=T\09'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'VBKD-ZLSCH'.
    perform bdc_field       using 'VBKD-KTGRD'
                                  '01'.
    perform bdc_field       using 'VBKD-ZLSCH'
                                  'c'.
    perform bdc_dynpro      using 'SAPMV45A' '4002'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=TP_DELETE'.
    perform bdc_field       using 'LV70T-SPRAS'
                                  'EN'.
    perform bdc_dynpro      using 'SAPMV45A' '4002'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=TP_CREATE'.
    perform bdc_field       using 'LV70T-SPRAS'
                                  'EN'.
    perform bdc_dynpro      using 'SAPMV45A' '4002'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=TP_DETAIL'.
    perform bdc_field       using 'LV70T-SPRAS'
                                  'EN'.
    perform bdc_dynpro      using 'SAPLSTXX' '1100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RSTXT-TXLINE(02)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=TXVB'.
    perform bdc_field       using 'RSTXT-TXLINE(02)'
                                  'BDFBFDB'.
    perform bdc_dynpro      using 'SAPLSTXX' '1100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RSTXT-TXLINE(02)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=TXBA'.
    perform bdc_dynpro      using 'SAPMV45A' '4002'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=T\11'.
    perform bdc_dynpro      using 'SAPMV45A' '4002'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=KSTC'.
    perform bdc_dynpro      using 'SAPLBSVA' '0300'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'J_STMAINT-ANWS(02)'.
    perform bdc_field       using 'J_STMAINT-ANWS(01)'
    perform bdc_field       using 'J_STMAINT-ANWS(02)'
                                  'X'.
    perform bdc_dynpro      using 'SAPLBSVA' '0300'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'J_STMAINT-ANWS(03)'.
    perform bdc_field       using 'J_STMAINT-ANWS(02)'
    perform bdc_field       using 'J_STMAINT-ANWS(03)'
                                  'X'.
    perform bdc_dynpro      using 'SAPLBSVA' '0300'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'J_STMAINT-ANWS(04)'.
    perform bdc_field       using 'J_STMAINT-ANWS(03)'
    perform bdc_field       using 'J_STMAINT-ANWS(04)'
                                  'X'.
    perform bdc_dynpro      using 'SAPLBSVA' '0300'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=BACK'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'JOSTD-OBJNR'.
    perform bdc_dynpro      using 'SAPMV45A' '4002'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/EBACK'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RV45A-TXT_VBELN'.
    perform bdc_dynpro      using 'SAPMV45A' '4001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SICH'.
    perform bdc_field       using 'VBKD-BSTKD'
                                  'open SO'.
    perform bdc_field       using 'VBKD-BSTDK'
                                  '29.01.2008'.
    perform bdc_field       using 'KUAGV-KUNNR'
                                  '100000'.
    perform bdc_field       using 'KUWEV-KUNNR'
                                  '100000'.
    perform bdc_field       using 'RV45A-KETDAT'
                                  '29.01.2008'.
    perform bdc_field       using 'RV45A-KPRGBZ'
                                  'D'.
    perform bdc_field       using 'VBKD-PRSDT'
                                  '29.01.2008'.
    perform bdc_field       using 'VBKD-INCO1'
                                  'EXW'.
    perform bdc_field       using 'VBKD-INCO2'
                                  'mumbai'.
    perform bdc_field       using 'VBKD-ZTERM'
                                  '0001'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RV45A-MABNR(01)'.
    perform bdc_transaction using 'VA01'.
    perform close_group.
    if in excel file one row of records means i am succesfully creating SO.
    But for multiple i am not getting idea to create SO.
    My excel file details like this.In this excel file based on VBKD-BSTKD_E value i have to keep the records in line items.
    VBAK-AUART    :Order Type
    VBAK-VKORG    : Sales Org
    VBAK-VTWEG    : Distri Channel
    VBAK-SPART    : Division
    VBAK-KUNNR    : Sold-to-Party
    VBPA-KUNNAR   : Ship-to-Party
    VBAK-BSTNK    : PO No
    VBAK-BSTDK    : PO Date
    VBAP-MATNR    : Material No
    A_THICK_MM
    A_WIDTH_MM
    A_EQUIVALENT_SPEC
    A_COIL_INNER_DIA_MM
    A_BATCH_WEIGHT_MIN_SI
    A_BATCH_WEIGHT_MAX_SI
    VBAP-KWMENG    : Qty
    VBAP-WERKS     : Delivery Plant
    VBKD-INCO2     : Incoterm2
    VBKD-KONDA     : Price Group
    VBKD-VSART     : Shipping Type
    VBAK-TAXK1     : Cust Tax-1
    VBAK-TAXK2     : Cust Tax-2
    VBAK-TAXK3     : Cust Tax-3
    VBAK-TAXK4     : Cust Tax-4
    VBKD-ZLSCH     : Payment Method
    VBAP-TAXM1     : Mat tax clss-1
    VBAP-TAXM2     : Mat tax clss-2
    VBAP-TAXM3     : Mat tax clss-3
    VBAP-TAXM4     : Mat tax clss-4
    VBAP-POSEX     : IMPS Order No
    VBKD-BSTKD_E   : old SO in 4.6c
    VBKD-POSEX_E   : old SO Item  in 4.6c
    Text Id        : TDC No
    Text Id-ES10   : Special Inst(Unld const & Veh)
    ZOR,2000,10,5,100000,100000,PO NO 125,19.01.2008,HRPOCF,3.1,1200,IS_11513_GR_D_1985,610,20.084,20.084
    51,2010,Mumbai,01Freight-pre paid,ER,2,0,L,0,c,1,1,0,0,108128,3011192,     1,PO 444 AMD 1,Spl Inst
    based on VBKD-BSTKD_E line items has to create.
    if VBKD-BSTKD_E = 3011192 is like 4 records in excel means for these 4 should be one SO
    if it is changed to 3011193 then only different SO.
    PLs If any one knows solution pls write some sample code for me.
    If u send that code to my mail id also  very thankful.
    Pls help me this is urgent requirement.
    [email protected]
    Thanks & Regards,
    J.Lokesh

    If u want to add Items data, u have to handle the Table control by writing the complete code.
    U have to write code for 2 items, when u press enter u will get new row to enter new record one by one.
    Narendra

  • One to many table insert in JDBC

    hi all, I have an online form when it submit the value will get into three table, one child table is one to many relation to parent , like
    parent  table have(     UserId        int Not null,     UniversityN      varchar(10) Not null,   ...   PRIMARY KEY  (UserId)   PaymentId          int Not null  auto_increment ,     UserId        int Not null, ) child Table( PaymentId          int Not null  auto_increment , UserId        int Not null, UniversityN      varchar(10) Not null, record1            varchar(50) Not null, record2            varchar(50) Not null, record13          varchar(50) Not null,     PRIMARY KEY  (PaymentId),     FOREIGN Key(UserId) REFERENCES Parent(UserId) on Delete     Cascade on update cascade)Type=InnoDB DEFAULT CHARSET=utf8; )
    then I have
    conn.setAutoCommit(false); calstat1 = (CallableStatement) conn.prepareCall(                     "{ call Insert_Parent(?,?,?,?,?,?,?,?,?,?,?,? )}"); calstat2 = (CallableStatement) conn.prepareCall(                     "{ call Insert_ChildRecords(?,?,?,?,?,?,?,?,?,?,?,? )}");
    and the UniversityN , recored1, record2, record3 all come from the input form, how can i handle this one to many insert? for each submit the parent table always one row, and the child table is a lease one up to five rows the if the did have five the userId , and UniversityN is same, but the recore 1. record2... is different
    thank you

    I think you have a problem with your database table definitions that you need to fix before coding java.
    In the above, I dont think you need the first PaymentId (in the 'have' table). I also dont think your tables are normalized since I see 'UniversityN' in both the parent and child record. Also, you should rename your tables to something meaningfull rather than 'have' and 'table'. Also, rename the fields better. Ideally get your friendly neighborhood DBA to review your tables. Only when they are well defined should you start to work on java.
    Here's an example:
    parent  table:
    Customer(
        id                number, not null, primary key, must be unique, auto increment
        userId         number, not null, natural key, must be unique
        universityN  varchar(10), Not null
    child Table:
    Payment(
        id                      number, not null, primary key, must be unique, auto increment
       customer_id        number, not null, foreign key to the customer table's id field
       record1               varchar(50), not null,
       record2               varchar(50), not null,
       record3               varchar(50), not null,
        Cascade on delete record when parent is deleted
        dont cascase update record
    )Note: in the above, record1,record2, record3 should probably be put in its own table, with a foreign key back to the payment table.
    Note: each table in your database has its own id that is auto generated. Some have a natural key (like userID) that can be used to look up records independent of the auto generated key.
    Note the customer_id (foreign key) has the name of table it refers to (customer) and the key its refering to in that table (id).
    Note: when you insert a new customer, you need to get the newly generated id. Use the natural key to retreive the id in order to put it in the new payment table's customer_id field.
    I suggest you dont cascade delete any child table. Do it programmatically so you can better learn the issues that come up as you insert, update, and delete various parent and child combinations.

  • How to use IWEB for multiple websites?

    Okay.
    I have two websites. One on a 3rd party, one on .MAC.
    Computer 1 = .MAC website
    Computer 2= 3rd party website
    I want to use computer 2 to edit my .MAC website and moved the DOMAIN file but haven't open it in iWEB on the second computer as I need to know how to open and not destroy the 3rd party website.
    How is this done?
    Thanks.

    You can rename the domain file to something descriptive of the site and open them manually. But I find it much safer to use iWebSites for managing multiple sites, over 25. I use iWebSites to manage multiple sites.. It lets me create multiple sites and multiple domain files.
    If you have multiple sites in one domain file here's the workflow I used to split them into individual site files with iWebSites. Be sure to make a backup copy of your original Domain.sites files before starting the splitting process.
    This lets me edit several sites and only republish the one I want.

  • COPA Assessment Cycle using KEU5 for multiple controlling areas

    Hello All,
    There is an organization with operations in several countries. There is a separate controlling area for each country. There is one controlling area, for instance, for Germany and another for Netherlands.
    A problem is encountered while executing transaction KEU5 for multiple controlling areas in parallel. For instance, when one user from Germany executes KEU5 for an assessment cycle for Germany controlling area and at the same time another user from Netherlands tries to execute KEU5 for a cycle for NL controlling area, the user from Netherlands encounters an error message u201C'Cycle XXXX 01.02.2008 cannot be started because run group 0000 is locked'.
    Apparently SAP allows assessment cycles for exactly one controlling area to be executed together. This poses a problem since the organization plans to implement SAP in several other countries (There will be one separate controlling area for each country as per the organization structure adopted by the company).
    Any ideas, views or suggestions on the aforesaid issue would be highly appreciated.
    Regards,
    Soumya

    Hi Soumya,
    Did you find any text in SAP Documentation saying that "SAP does not allow cycles belonging to different controlling areas to be executed at the same time"...?
    Pls find the following text from SAP Help...
    Parallel Processing of Cycles of an Allocation Type
    Use
    Parallel processing of cycles results in considerable time savings. To process cycles of one allocation type in parallel, they must be assigned to different cycle run groups.
    You define the cycle run groups in the cycle header data. You also assign cycles to the cycle run groups in the header data.
    To process the cycles of a cycle run group in parallel, start the cycles one after the other, if required, in different sessions.
    You are carrying out a cross-company code cost accounting and want to perform the actual assessment in the individual company codes in parallel. Create a cycle run group for each company code and assign the appropriate cycles to these groups. You can then carry out the actual assessment in the individual company codes in parallel.
    When you execute a cycle, you can start a consistency check. The system checks whether you are allowed to execute the selected cycles in parallel.
    Though I didn't come across such requirement, I feel, my earlier suggestion will work out...
    Srikanth Munnaluri

Maybe you are looking for

  • Upgrade phase STARTSAP_NBAS error: SYSTEM START failed

    During an upgrade from BW 3.5 to BI 7.0, I get the following error message in phase STARTSAP_NBAS: SYSTEM START failed, code -2 -2: the test rfc did not work. Try to log on to the system with user DDIC When I try to log on to the system as user DDIC,

  • Credit Memo request with reference to Billing Document number via IDoc

    Hi, I want to create credit memo request with reference to billing document number via IDocs. I have tried through ORDERS05, but when I process I saw that it is only processing with reference to contract  number or quotation. So is any other way of c

  • The problem in using of (mx) VideoDisplay.attachCamera(camera) in flex webapp

    i have encountered a problem last night. my code looks like the following: <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"                xmlns:s="library://ns.adobe.com/flex/spark"                xmlns:

  • How to edit sony 3d mts videoclip in final cut pro x??'

    I don't know if it's possible to edit mts 3d clips from a Sony video camera on FCP PRO-X!!! if it's possible how?? thanks

  • Tutor/live streaming surf video

    I'm looking for a tutor in the Santa Cruz Ca or bay area. I want to be able to do live streaming video on the web. Film surfing in the day, edit it & show it at night on the web. I'm currently taking a HTML class & have asked the professors at my col