Regarding problem with assigning field to Field symbols

Hi All,
We are migrating(recreating) the program which was in 4.7 to ECC 6.0.
In 4.7 they are using the below code for assigning the field to fieldsymbol from work area as shown below.
ASSIGN wa_kostl_kstar-wkg001+offset TO <von>
wa_kostl_kstar is a work area and wkg001 is the fourth field and wkg011 is 13th field and it is taking this filed into field symbol <Von>.
In Ecc 6.0 th same code is not being accepted and throwing syntax error.
So they had changed the code in ECC 6.0 to
ASSIGN wa_kostl_kstar-wkg001+(offset) TO <von>
And there was no syntax error and while testing it goes to dump.
I had tested in 4.7 and its working fine taking the value of  13 th field to <von>,and like wise there are some other assign statements after,like this.
So any one please let me know what to do in this case.
Regards,
MADHAVA.

Hi,
Hope below example can give you an idea on handling your case:
TYPES: BEGIN OF t_sal_ord,
         vbeln TYPE vbeln_va,
         posnr TYPE posnr_va,
         auart TYPE auart,
         vkorg TYPE vkorg,
         matnr TYPE matnr,
       END OF t_sal_ord.
DATA: wa_mara TYPE mara.
DATA: wa_sal_ord TYPE t_sal_ord.
FIELD-SYMBOLS: <fs_matkl>,
               <fs_vkorg>.
ASSIGN COMPONENT 'MATKL' OF STRUCTURE wa_mara TO <fs_matkl>.
IF sy-subrc NE 0.
  EXIT.
ENDIF.
ASSIGN COMPONENT 'VKORG' OF STRUCTURE wa_sal_ord TO <fs_vkorg>.
IF sy-subrc NE 0.
  EXIT.
ENDIF.
Kind Regards
Eswar

Similar Messages

  • Problem with flow of expandable fields

    Hi everyone,
    I have important problem with flow of expandable fields in table in dynamic PDF form. The issue I am talking about you can see at the top of column 3 on page 2 in PDF in link below.
    Here is uploaded PDF form and sample XML data (form has import button and is ReaderExtended that you can easily test it and see my problem):
    http://www.speedyshare.com/718224676.html
    Generally I have created table with 3 columns using Table object (each field has allow multiple lines selected and expand to fit).  It is closed in FormBody subform which is flowed subform.
    Row in table is repeatable and has “is allow to break page” setting set on.
    Sometimes when there is a lot of text and row page break there is problem with flow.
    For example text from one rows overlaps on text from next row.
    I tried to solve this problem by changing row height, indents, font size, line spacing but always when I thought that I have fixed it  I got another data which generated the same flow problem.
    Did anyone met this problem earlier and found solution to this issue? This is really important for me and I am really in dead end so any hints would be really helpful.
    I am using Adobe Livecycle Designer 8.1 and PDF form target is 8.
    I really appreciate any help in this problem.
    Thanks,
    Kamil Dłutowski

    I posted link to my form in my first post.
    Here it is: http://www.speedyshare.com/718224676.html

  • Problem with Assign reference document.

    Hi all,
    I defined transaction input parameter type Xml.
    I used Reference Document Loader to load document (structure.xml) below.
    <?xml version="1.0" encoding="UTF-8"?>
    <SO_VALIDATION>
        <L4_SO_ID/>
        <L4_SOI_NO/>
        <PPC_STATUS/>
        <PPC_INFO/>
    </SO_VALIDATION>
    I used menu command Assign Reference Document, to assign above document to transaction input.
    I tryed to use this transaction in vs.net application as a web service.
    But there is no xml structure in InputParams in web service.
    I tryed alot but i did not achieve.
    What must i do?
    Thanks.

    cml_bzl,
    I'm using version 12.04 and I have not had any problems with assigning reference documents and using .NET.
    You should not have to do anyting special to get the transaction inputs to show up in .Net. To map the output I do the following:
    1. Create an output transaction variable and assign it's type as XML
    2. Using a XML document block to create and XML document for your output transaction variable
    3. Assign the XML document as the reference for the output transaction variable.
    THis works for me every time. If you change the transaction parameters, make sure you update the web service form the .NET side.
    Glenn

  • Problem with Assigning more than one value to GROUP dynamically

    Hi,
    I have a problem with assigning more than one value to GROUP varible dynamically.
    I am able to assign only one value dynamically through Initialization block
    I have even tried with the ROW-WISE initialization blocks..
    using this query..
    SELECT 'GROUP', G.GROUP_NAME
    FROM GROUP_MAP G
    WHERE G.USER_NAME = ':USER'
    if GROUP_1, GROUP_2 are two groups to be associated,
    through this, i'm getting " GROUP_1;GROUP_2 " into GROUP variable ( seen from Narative view )
    And the properties and securities of this Groups are not inherited.
    Please let me know if there is any other way to Populate the GROUP variable dynamically with more than one value.
    Thank you.,

    Hi,
    i finally got in this way..
    i had created a function which takes USER_NAME as input and returns a string that contains the GROUP names with semicolon delimeted..
    Though it is same as that of ROW-WISE initialization,
    the properties of those groups are also being inherited..
    Now, i can assign more than one groups and its properties to a user dynamically.

  • Problem with Math In Calculated Fields

    I am calculating a group incident rate for data returned from
    a query. The formula is Number of cases multiplied by 200000
    divided by number of hours worked. Cases in my report is the
    calculated field: calc.CaseSum (the sum of cases for the group)
    Hours is calc.SumHours (the sum of hours for the group). The actual
    values for these variables (for the first group are 48 and 29427171
    respectively. When I create the following calculated field called
    rate using the formula: (calc.CaseSum * 200000) / calc.SumHours,
    Cold Fusion Generates a Runtime Error:
    Invalid ColdFusion expression in report. If the expression is
    a string, ensure that it is within quotes. Error: (calc.CaseSum *
    200000) / calc.SumHours is not a valid ColdFusion expression.
    If I use the constant value "29427171" as the divisor, the
    report works albeit only for the first group. Any ideas; is this a
    bug, or am I misusing the product?
    Addition: I forgot to mention I am using CF8. Also this
    formula worked fine as a Report Total before I introduced grouping
    and modified the calculated fields to reset on the change of a
    group.

    Sorry, I've been on another project for awhile. This problem
    will certainly be a "show stopper" for me if I cannot resolve it.
    As I mentioned in my original post, I used a constant in the
    formula in lieu of the variable and the calculation worked. This
    would suggest that CF does not have a problem with a large number.
    In spite of that reasoning, I tried Tony's suggested (thanks
    by the way!) with the identical outcome, only difference is the new
    formula is displayed in the error message.
    Tony, you also suggested that I set the variables using
    CFSET... How would I do this within the report writer environment.
    I had tried a similar approach: to perform half the calculation
    i.e. that within the parenthesis, and assign that value to a
    separate "calculated field: and then perform the rest of the
    calculation on that variable with the same outcome.
    I think that I may be dealing with a CF bug here, I'd like to
    find a workaround... I've noticed that CF8 has a new patch, perhaps
    after I apply it, I may be able to get this thing to work. I'm on
    another project right now so it will be a few days before I can
    test this theory, I report the result.
    Should this fail, and no one can come up with a workaround, I
    will report this to Adobe.

  • Adhoc query-Problem with Personnel no output field

    Hi Gurus,
    We are trying to run an adhoc query using a customized Info set(PNPCE logical database).
    While running the query,we had selected Personnel no(from Payroll status P0003 table) as output field and Company code(from Org assignment P0001) as input field in the selection.
    Problem is in the output field we are seeing the Personnel name details in place of Personnel no.Could anyone please suggest what could be the reason behind this and how to fix it.
    Your help will be highly appreciated.
    Warm Rgds
    Sushil

    Hi Sushil,
    The default output for fields with a text and a value (Name = text, PERNR = value) is the text.  You can change this by right clicking on the output box in Ad Hoc and selecting "Value".  If you want both name and number, select "Value and Text". 
    You can also change this default to Value from Text if in Ad Hoc, you go to Edit --> Settings.  On the last tab, change the radio buttion for output default to Value from Text.  This will change it for all fields so you would see the eight digit number rather than the name of the position or org unit.  Thus, you may want to keep it at Text and use the right click to change specific fields as needed.
    By the way, it is usually best to utilize the personnel number field from IT0000-Actions, although it can be obtained from any infotype if you include that field in the field group when creating your infoset. 
    Paul

  • Import Manager - Problem with 0..n field in Import Manager

    Iu2019m having problems with XMLs that contain multiple or single tags in MDIS process. For example: I did the map using a XML with multiple tags for Address:
    <address>
    <item>
    u2026
    </item>
    <item>
    u2026
    </item>
    </address>
    When I send two address or more Address, the Import Server work fine, but when I send only one Address, the address is not imported.
    <address>
    <item>
    </item>
    <item>
    </item>
    </address>
    Opening the xml file with only one Address in Import Manager, I saw that the fields isnu2019t mapped, but when I open a xml file with multiple Address itu2019s open correctly.
    The XSD cardinality for the Address\Item is 0..n

    Hi Evandro ,
    If it is processing the input file correctly through the Manul Import manager process then update your latest Map by using SAVE As option or else save this correct map with a new name altogether and use this new map in the port for automatic importing.
    If your file is able to process correctly through the Import manager without showing any errors till the Import step in the Import manager then this map must be correct and shoul automate the importing correctly.
    Provided you are using the similar file for automatic importing as well.The file name and the fields as well as the value mapping as saved in this corrected map must not differ with the input file else this saved map will not be able to import correctly.
    Check to see if you have made correct setting for automatic importing by refering the below link:
    http://help.sap.com/saphelp_mdm550/helpdata/en/43/12036df94c3e92e10000000a1553f6/frameset.htm  (Automatic importing MDIS - Import manager ref guide>MDM import server(MDIS)>MDIS Consfiguration)
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8973bcaf-0801-0010-b7a7-f6af6b1df00e(mdm import and syndication server)
    Also check the exception folders if your import is not taking place automatically:
    http://help.sap.com/saphelp_mdm550/helpdata/en/43/12036df94c3e92e10000000a1553f6/frameset.htm (Exceptions- MDM Import Manager MDIS-Exception handling)
    Hope It Helped
    Thanks & Regards
    Simona Pinto

  • Problem with JPA @Embeddable class field in  @Embedded

    I have a Embeddable class and Embadded in all of my JPA Entities, the version(in DBUniqueId) field is mandatory for some JPA Entities and for others it should not be present.
    My DBUser.java JPA Entity shouldn't have version field(DBUser table doesn't have one) and so I didn't include it in @AttributeOverrides of DBUser.java. when I try to run the JPA query it results in exception
    Query:
    List<DBUser> userList = (List<DBUser>)entityManager.createQuery(SELECT u FROM DBUser u WHERE u.userId.root=?1 AND u.userId.extension=?2).setParameter(1,"root1").setParameter(2,"ext1").getResultList ();
    And The Exception is:
    ---- Begin backtrace for Nested Throwables
    java.sql.SQLException: ORA-00904: "T0"."VERSION": invalid identifier
         at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:74)
         at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:131)
    How do I inform to JPA Entity to ignore only the version field of the Embeddable in my JPA Entity @Embedded place.
    So the above query can successful. Thank You!
    Please guide me to solve this problem.
    @Embeddable
    @MappedSuperclass
    public class DBUniqueId implements Serializable {
    * serialVersionUID.
    private static final long serialVersionUID = 8903598739796209331L;
    * root.
    private String root;
    * extension.
    private String extension;
    * version.
    private String version;
         //Getters & Setters
    @Entity
    @Table(name = "MyTable", schema = "MySchema")
    public class DBUser implements Serializable {
    * unique user id.
    private DBUniqueId uniqueUserId;
    * Get the unique user id.
    * @return <code>DBUniqueId</code> - unique person id
    @Embedded
    @AttributeOverrides( {
    @AttributeOverride(name = "root", column = @Column(name = "LUSR02_ID_ROOT", nullable = true, length = 50)),
    @AttributeOverride(name = "extension", column = @Column(name = "LUSR02_ID_EXT", nullable = true, length = 50))
    public DBUniqueId getUserId () {
    return uniqueUserId;
    * set user unique id.
    * @param uniqueId - unique id of the person
    public void setUserId (final DBUniqueId uniqueId) {
    this.uniqueUserId = uniqueId;
    }

    Sudeep Naidu wrote:
    Hello gimbal2,
    Thanks for your response...
    In my project I have created a class with name DBVersionUniqueId but my lead said no to it.
    Only DBUniqueId should be used and make it work with or with out version fields.
    I tried experimenting around, but didn't succeed.
    Please Suggest some solution to make it work with DBUniqueId class.
    Thank You.No, let your lead write the code. He/she seems to be the expert. I certainly have no clue how to do it and honestly I also cannot find any reason why it should be possible. Let me put what is required in other words:
    - you have an entity with three properties, all of which are not transient. This means these properties map to three columns in the database according to the JPA specs.
    - you have a table with only two properties
    - you must and you shall use the object with three properties but at the same time one of the fields must all of a sudden be ignored by the persistence provider
    It makes no sense to want to do that.
    Correct answer: create a new object with only the two fields so the database and the object model match exactly
    Wrong answer: try to create workarounds that in six months time nobody is going to understand why the hell it was done that way

  • LSMW - Problem while assigning the quantity field to the target structure

    Hi,
    Here I am getting the warning while I am maintaing the field mapping and conversion rules .  Here I am doing this through the Batch input Recording.
    That is , while I am assigning the source field to the target structre field .
    " <b>WARNING : Source field is longer than target field</b> "
    plz help me to remove that warning.
    Thank you

    in lsmw  use char field instead quantity of same length(in stucture defined in lsmw).

  • Problems with Assign Task operation

    I'm having a problem with the Assign Task operation. When I export an application of the LiveCycle ES2 environment and import into another environment LiveCycle ES2, my process get stalled in the all Assign Task operations, and the only way to solve the problem I found is to redo all the Assign Task operations. But in an application with many Assign Task operations, this solution becomes very complicated.
    Anyone who has encountered this problem could help me better to fix it?
    Thanks for any help!
    Following is the error message:
    StackTrace:
    java.lang.NullPointerException
    at com.adobe.idp.taskmanager.dsc.util.UserManagerUtils.getUserOID(UserManagerUtils.java:959)
    at com.adobe.idp.taskmanager.dsc.userservicev2.UserServiceImpl.createTaskFromDialogPropertie s(UserServiceImpl.java:941)
    at com.adobe.idp.taskmanager.dsc.userservicev2.UserServiceImpl.createLongLivedTask(UserServi ceImpl.java:1631)
    at com.adobe.idp.taskmanager.dsc.userservicev2.UserServiceImpl.createLongLivedTask(UserServi ceImpl.java:1506)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.adobe.idp.dsc.component.impl.DefaultPOJOInvokerImpl.invoke(DefaultPOJOInvokerImpl.jav a:118)
    at com.adobe.idp.dsc.interceptor.impl.InvocationInterceptor.intercept(InvocationInterceptor. java:140)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
    at com.adobe.idp.dsc.interceptor.impl.DocumentPassivationInterceptor.intercept(DocumentPassi vationInterceptor.java:53)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
    at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor$1.doInTransaction(Transa ctionInterceptor.java:74)
    at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterBean.execute(EjbTr ansactionCMTAdapterBean.java:357)
    at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterBean.doSupports(Ej bTransactionCMTAdapterBean.java:227)
    at sun.reflect.GeneratedMethodAccessor643.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
    at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionConta iner.java:237)
    at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionI nterceptor.java:158)
    at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstance Interceptor.java:169)
    at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
    at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
    at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:378)
    at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
    at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
    at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
    at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor. java:138)
    at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
    at org.jboss.ejb.Container.invoke(Container.java:960)
    at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:430)
    at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:103)
    at $Proxy378.doSupports(Unknown Source)
    at com.adobe.idp.dsc.transaction.impl.ejb.EjbTransactionProvider.execute(EjbTransactionProvi der.java:104)
    at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor.intercept(TransactionInt erceptor.java:72)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
    at com.adobe.idp.dsc.interceptor.impl.InvocationStrategyInterceptor.intercept(InvocationStra tegyInterceptor.java:55)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
    at com.adobe.idp.dsc.interceptor.impl.InvalidStateInterceptor.intercept(InvalidStateIntercep tor.java:37)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
    at com.adobe.idp.dsc.interceptor.impl.AuthorizationInterceptor.intercept(AuthorizationInterc eptor.java:165)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
    at com.adobe.idp.dsc.interceptor.impl.JMXInterceptor.intercept(JMXInterceptor.java:48)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
    at com.adobe.idp.dsc.engine.impl.ServiceEngineImpl.invoke(ServiceEngineImpl.java:121)
    at com.adobe.idp.dsc.routing.Router.routeRequest(Router.java:129)
    at com.adobe.idp.dsc.provider.impl.base.AbstractMessageReceiver.routeMessage(AbstractMessage Receiver.java:93)
    at com.adobe.idp.dsc.provider.impl.vm.VMMessageDispatcher.doSend(VMMessageDispatcher.java:22 5)
    at com.adobe.idp.dsc.provider.impl.base.AbstractMessageDispatcher.send(AbstractMessageDispat cher.java:66)
    at com.adobe.idp.dsc.clientsdk.ServiceClient.invoke(ServiceClient.java:208)
    at com.adobe.idp.jobmanager.execution.workadapter.AbstractExecutableJob.invokeRequest(Abstra ctExecutableJob.java:127)
    at com.adobe.idp.jobmanager.execution.workadapter.PersistentExecutableJob.execute(Persistent ExecutableJob.java:60)
    at com.adobe.idp.dsc.workmanager.adapter.UnManagedAsynchronousWorkAdapter.run(UnManagedAsync hronousWorkAdapter.java:39)
    at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
    at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:275)
    at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
    at java.lang.Thread.run(Thread.java:619)

    Hi javier,
    1. record = <DATOS>
    If possible, try to use
    a pre-defined strucure of type P9069
    for putting data into this infotype.
    2. Avoid using field symbols.
    3. Try with P9069
    regards,
    amit m.

  • Regarding problem while assigning logical system

    Hi Friends,
    I had a problem while assigning logical system to the client where in both of my systems are having same client number which belong to 2 different systems.
    while assigning the sender and receiver logical system to the same client i am facing problem stating that an entry has already been made for the same key.
    could any one plz give me a clear idea...while assigning logical systems (cross clients) for 2 different systems having same client number.
    Regards,
    Madhu

    Hello Madhusree,
    I'm running with same problem. I've created two logical systems and assigned them to two different clients. But here pops up the issue while generating partner profiles, throwing error "No active plan version exists". Later when I researched about the issue, I came to know that T77S0 table doesn't have any entries regarding plan versions. Basically, I created two clients by doing "client copy" from source client (800 & 100). And I could see plan version entries in the T77S0 of client 800. So, I thought of assigning just defined logical system to the source client 800 itself. But it throws error saying "entry already exists"; as client (800) is already assigned with other logical system.
    By coming across your post, gives me leap of hope that two logical systems can be assigned to same client. Could you please share me those troubleshooting steps concerning this issue. Points will be awarded.
    Regards, Anil. 

  • Problem with Assigning Policy button in Outlook 2010 and Exchange 2010

    First of all, I'm posting here because I'm not sure how to post in the previous version of Exchange forums.
    Secondly, I'm re-posting this from the Outlook forums as I'm not getting any responses there despite of views.
    Hi,
    I'm having an issue in Outlook 2010 where I can't assign personal policies to folders. I have setup personal tags and added the mailbox to the right policy. I have also ran Start-MangedFolderAssistant in Exchange 2010 Shell against the mailboxes.
    When I go into OWA, everything shows up perfectly, I can right-click and assign policies at will, but when I open Outlook 2010 then the Assign Policy button never appears. I force added it to the ribbon and I can see from there that the button stays grayed
    out irregardless of where I click in the folder structure. I have even assigned the mailbox user Owner rights to all the folders to see if it will  make a difference.
    If anyone can help me solve this problem I will very grateful, I'm pulling my hair out here and I'm certain I could just be missing something very obvious somewhere,
    It might be worth mentioning that the company has been using .prf files to configure Outlook thus far, I'm
    looking to eliminate that. I'm not sure if that will have any effect on my current problem.
    Thanks for your time.
    Nico

    Thanks for the reply Max, that's a pretty good link.
    Like is I said though, I have the policies all set up in the Exchange configuration side of things, when I use OWA all the options for applying tags appear. It's just in Outlook 2010 Standard that the Assign Policy button stays grayed out.
    Thanks.
    EDIT:
    This has been solved, looks like version problem with Outlook.
    http://office.microsoft.com/en-us/outlook-help/license-requirements-for-personal-archive-and-retention-policies-HA102576659.aspx

  • Problem With Assignment, Need Tips

    Hi, i'll try and keep the code to a minimum. My assignment (at UNI) is to create a JUG Program (Java Ultimate Graphist) which works like a paint program.
    So far ive done most of it. But im having problems with combo boxes. Basically its required to have a combo box at the bottom where you choose your shape (rectangle, line, ellipse etc etc). When you choose your shape, and click on the screen, it draws that shape.
    This is the bit thats troubling me. The way ive programmed it, (we're using frames) I have one file "Application.java" which runs everything. Another file "Settings.java" which holds most of my methods as well as the control panel (for combo boxes) at the bottom, and a menu bar at the top.
    The final file is the actual drawing panel - "PaintPanel.java". This has the paint method etc in it.
    Now the problem im having is getting the combo box (Prefrences.java) to interact with the "PaintPanel.java". If i could put all this in one file it would probably work but i just get errors and it just wont work.
    Does anyone know how i can make an action listener, listen for my choice in the combo box, then change the shape drawn in the paint panel.
    I can post the entire code if you want it
    Thanks!

    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class ClassCommunication
        DrawingCode drawCode;
        EventCode eventCode;
        public ClassCommunication()
            // pass a reference of/for/to the DrawingCode instance
            // to EventCode that EventCode can use to call methods
            // in the DrawingCode class
            drawCode = new DrawingCode();
            eventCode = new EventCode(drawCode);
        private JPanel getCenterPanel()
            return drawCode;
        private JPanel getSouthPanel()
            return eventCode.getUIPanel();
        public static void main(String[] args)
            ClassCommunication app = new ClassCommunication();
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(app.getCenterPanel());
            f.getContentPane().add(app.getSouthPanel(), "South");
            f.setSize(300,175);
            f.setLocation(200,200);
            f.setVisible(true);
    class DrawingCode extends JPanel
        String s;
        public DrawingCode()
            s = "hello world";
        public void setString(String s)
            this.s = s;
            repaint();
        protected void paintComponent(Graphics g)
            super.paintComponent(g);
            g.setFont(g.getFont().deriveFont(18f));
            g.drawString(s, 100, 50);
    class EventCode implements ActionListener
        DrawingCode drawCode;
        public EventCode(DrawingCode dc)
            drawCode = dc;
        public void actionPerformed(ActionEvent e)
            JComboBox cb = (JComboBox)e.getSource();
            String s = (String)cb.getSelectedItem();
            drawCode.setString(s);
        public JPanel getUIPanel()
            String[] items = { "rectangle", "ellipse", "line" };
            JComboBox combo = new JComboBox(items);
            combo.addActionListener(this);
            JPanel panel = new JPanel();
            panel.add(combo);
            return panel;
    }

  • Problem With Insert statement using field symbols with unicode enabled

    I was writng a function module for dyanamic operations on the table. We are using the field symbols, function module is unicode enabled.
    Assign statements are working fine, with which we created work are <fs_wa_header> and internal table <fs_tb_item> dynamically based on the table name (IM_TB_HENAME) which we get as import parameter.
    we have query which is giving us dump.
    INSERT  (IM_TB_HENAME)  FROM <FS_WA_HEADER>.

    Hi
    INSERT (IM_TB_HENAME) FROM <FS_WA_HEADER> is good for inserting a line in the database, so IM_TB_HENAME has to have the name of dictionary table.
    U should write:
    INSERT  <FS_WA_HEADER> INTO (IM_TB_HENAME).
    But I believe you can't use the variable IM_TB_HENAME, you should use another field-symbols:
    ASSIGN (IM_TB_HNAME) TO <FS_TB_ITEM>.
    INSERT  <FS_WA_HEADER> INTO <FS_TB_ITEM>.
    Max

  • Problem with characters in text field

    hi all
    i am missing a few characters, once i load text into a dynamic text field. chars are not missing per say; they are being replaced with empty squares.
    characters like the euro sign and accentuated german a letter.
    whats is weird is that other accentuated german letters do appear. so only a few selected are missing.
    How ive set up the fla:
    1) i've added 4 text fields to the stage in the font im using, Arial, one for each font style: normal, italic, bold and bold italic, and in all 4 fields ive embedded all latin characters (to include the german accentuaded characters and im guessing it's in the punctuation group that holds the euro sign, so that one is also embedded), besides lowercase, uppercase, numerical, and all the default groupd to include basic text.
    2) i've got a dynamic text field, created with createTextField, and setup the following ActionScript (2):
    this.createTextField("T_text",1,0,10,Stage.width-60,50);
    var myFmt = new TextFormat();
    myFmt.size = 12;
    myFmt.leading = 3;
    myFmt.font = "Arial";
    T_text.html = true;
    T_text.autoSize = "left";
    T_text.multiline = true;
    T_text.wordWrap = true;
    T_text.selectable = false;
    T_text.embedFonts = false;
    T_text.textColor = "0x666666";
    T_text.htmlText = _global.gallery_1_image_text_1; // this holds the text im displayed, called in from a database.
    T_text.setNewTextFormat(myFmt);
    now, im calling text from a database.
    when calling the text from the browser  url bar, there's no chars missing.
    its just when i make this call from flash and load the text into the dynamic text field, that characters go missing.
    below is a link to a print screen of the faulty text that is displayed in flash's dynamic text field.
    http://img210.imageshack.us/img210/340/utf8.png
    any ideas? i mean, it seems that the arial font is missing a few accentuated characters! because the code i have setup loads other accentuated characters.
    anyone has seen this issue before and know how to solve it?
    regards

    no.
    you assigned your embedFonts property to be false.
    look, you can test if you've embedded fonts correctly by using:
    T_text._rotation=3;
    if you see no text, you're not embedding fonts correctly.
    so, use:
    T_text.embedFonts=true;
    and then test.  if you see no text, use:
    click on the upper right of your library panel > new Font > select Arial and tick the symbols you need to embed > tick export for actionscript and assign a linkage id (eg, ArialID). click ok.  then use:
    this.createTextField("T_text",1,0,10,Stage.width-60,50);
    var myFmt = new TextFormat();
    myFmt.size = 12;
    myFmt.leading = 3;
    myFmt.font = "ArialID";
    T_text.html = true;
    T_text.autoSize = "left";
    T_text.multiline = true;
    T_text.wordWrap = true;
    T_text.selectable = false;
    T_text.embedFonts = true;
    T_text.textColor = 0x666666;  // no quotes here.  this is a number
    T_text.htmlText = _global.gallery_1_image_text_1; // this holds the text im displayed, called in from a database.
    T_text.setTextFormat(myFmt);  // to format the above text, use setTextFormat().  if you want to format text added after this line, use setNewTextFormat()

Maybe you are looking for