Dynamic typing error

Hi *,
I'm trying to build a generic application to check values into any table.
But I'm facing the following problem:
FIELD-SYMBOLS: <fstable> TYPE table,
               <fscond> TYPE table,
               <fs_line> TYPE ANY,
               <dyn_wa> TYPE any,
               <dyn_field> TYPE any.
data: tipo(20) TYPE c VALUE '/FRE/SUBST_ASSMT'.
data:       dy_line  type ref to data.
ASSIGN it_data TO <fstable> CASTING TYPE (tipo).
  create data dy_line TYPE (tipo)."like line of <fstable>.
  assign dy_line->* to <dyn_wa> CASTING TYPE (tipo).
LOOP at <fstable> INTO <dyn_wa>.
--->  if <dyn_wa>-subst_c = '0'.
-->    endif.
    do.
     assign component  sy-index of structure <dyn_wa> to <dyn_field>.
      if sy-subrc <> 0.
      exit.
      endif.
    enddo.
ENDLOOP.
It's clear that since the variable is untyped I can not perform this check. SE80 says that there is no structure, therefore no component.
Let's say, I've got a table, MARA and I want to check if a field is 0, and then later on I have to check if MARC has field 'X' to 0... I want to reuse the code.
Any ideas how can achieve that?
Any help will be apprecitad,
Isidoro!

Hi,
Your solution is not bad, actually I like it, but I solved the problem in a different way. Have a look at:
FIELD-SYMBOLS: <fstable> TYPE table,
               <fscond> TYPE table,
               <fs_line> TYPE ANY,
               <dyn_wa> TYPE any,
               <dyn_field> TYPE any.
data:  lt_wheres         TYPE rsds_twhere,
       lrt_cond          TYPE STANDARD TABLE OF rsds_range,
       lrs_cond          LIKE LINE OF lrt_cond.
data:  dy_line  type ref to data.
DATA: lr_rtti_struc TYPE REF TO cl_abap_structdescr.
DATA: lt_comp TYPE cl_abap_structdescr=>component_table.
DATA: ls_comp LIKE LINE OF lt_comp.
data: campos type DDFIELDS,
      ls_campos LIKE LINE OF campos.
DATA: index TYPE i VALUE '1'.
*Assign the dynamic structures.
ASSIGN it_data TO <fstable>.
create data dy_line like line of <fstable>.
assign dy_line->* to <dyn_wa>.
*get the description of the elements from DDIC
lr_rtti_struc ?= cl_abap_structdescr=>DESCRIBE_BY_DATA_REF( dy_line ).
lr_rtti_struc->GET_DDIC_FIELD_LIST( EXPORTING P_INCLUDING_SUBSTRUCTRES = 'X'
                                    RECEIVING P_FIELD_LIST = campos ).
LOOP at campos INTO ls_campos.
    if ls_campos-fieldname = 'SUBST_CTRL'.
      index = sy-tabix.
    endif.
ENDLOOP.
LOOP at <fstable> INTO <dyn_wa>.
    do.
     assign component  sy-index of structure <dyn_wa> to <dyn_field>.
      if sy-subrc <> 0.
      exit.
      endif.
if sy-index = index.
if  <dyn_field> = '3'.
  WRITE / 'OK!

Similar Messages

  • Dynamic typing in Java

    Hi,
    I keep reading that Java is predominantly a statically typed language, but with some added dynamic type checks at run-time.
    What aspects of Java are dynamically typed?
    Thanks

    Try this little test, and then experiment some more.
    class A {
      public void methA() {
        int i = 0;
        System.out.println("A.methA "+i);
    class B  extends A {
      int i = 1;
      public void methA() {
        System.out.println("B.methA "+i);
    public class AorB {
      public static void main(String[] args) {
        A a = new A();
        A ab = new B();
        B b = new B();
        a.methA();
        ab.methA();
        b.methA();
    }

  • 'Unallowed tags or dynamic code' error on a page without these...

    Hi,
    I've been using InContext Editing for a few sites now and my clients have been very happy with it, but I have a new site that's having problems on just one page.
    http://www.windhampilates.com/index.php
    I've enabled ICE on the text areas below the main photo and nav bar, as I have on other pages. There are a few scripts running on this page, but the only difference on this page from the rest of the site is the rotating image at the top of the page.
    Ironically, I've used this same script on previous sites where I've used ICE and they've worked without any problems. Am I missing something?
    Really and truly appreciate  your help!
    - MaryAnn

    I can login, and try to edit, but the system won't save my changes and gives me the 'unallowed tags or dynamic code' error as the reason why it can't save the changes.
    I tried removing the jquery in the header, but that didn't seem to work:
    http://www.windhampilates.com/index-testjqueryerror.php
    I still can't get the edits to save and it's still giving me the same message.
    The only other non-static elements on the page are the newsletter subscription script and the Facebook link, but I have these on other pages and we can edit those pages without issue.
    Any other ideas?
    Thanks for your help!

  • Sqlplus stack trace, dynamic link error.

    When using sqlplus through the Oracle Enterprise Manager, or on the commandline, if I try to query a XMLType table, it dumps a stack trace, failing with the error message:
    Dynamic link error: libxdb.so: cannot open shared object file: No such file or directory
    I've done a full Oracle 9.2.0.1.0 Client installation, but this library isn't in my $ORACLE_HOME/lib. How do I get this file?

    Hi,
    Maybe not much use to you, but on Solaris, with a full Enterprise install, this library is in my $ORACLE_HOME/lib.
    So maybe you can find it on the EE CDROM?
    Regards
    Pete

  • Dynamic link error while executing XQUERY in SQL*Plus

    Hi,
    When I'm doing the following  XQUERY in SQL*Plus (version 11.2.0.3.0 instant client for mac64bit) :
    XQUERY declare default element namespace "http://xmlns.oracle.com/xdb/xdbconfig.xsd"; (:
           (: This path is split over two lines for documentation purposes only.
              The path should actually be a single long line.
           for $doc in fn:doc("/xdbconfig.xml")/xdbconfig/sysconfig/protocolconfig/httpconfig/
            webappconfig/servletconfig/servlet-list/servlet[servlet-name="orawsv"]
           return $doc
    I'm getting the following error:
    Dynamic link error: dlopen(/Users/markbeelen/Oracle/instantclient_11_2/lib/lib/libxdb.dylib, 9): image not found
    OCI-21500: internal error code, arguments: [unable to load XDB library], [], [], [], [], [], [], []
    Errors in file :
    OCI-21500: internal error code, arguments: [unable to load XDB library], [], [], [], [], [], [], []
    ERROR:
    OCI-21500: internal error code, arguments: [unable to load XDB library], [],
    Any ideas how to solve this?

    Got same issue with :
    Component
    Version
    =========
    =======
    Java(TM) Platform
    1.6.0_41
    Oracle IDE
    3.2.20.09.87
    Versioning Support
    3.2.20.09.87
    Alternate path for SqlHistory directory :
    C:\Users\USER_NAME\AppData\Roaming\SQL Developer
    Best Regards,
    F.L.

  • Adobe Dynamic Link Error

    Lately, when I try to open a Premiere Pro CS3 or CS4 project in Encore CS4, I set this error message: "an adobe dynamic link error occurred". It used to work but now it doesn't. Anyone know why?

    Something went corrupted in your system you will have to run the Clean-up Scripts and reinstall.
    Best thing to have full functioning Reinstall from a Clean Formated hard Drive
    Regards
    Julio Cesar

  • Dynamic RFC error

    Hi
    When I am trying to run my Webdynpro application I am getting a Dynamic RFC error. Can anyone help me to resolve this error.
    Thanks
    Lakshmi

    Hi
    Thanks for immediate response.
    I have checked in the transaction ST22 and I could see several dumps on my user id for the function module which I am using.
    what does it mean? what i need to do in this case?
    Thanks
    Lakshmi

  • Premiere Pro CS4 export doesn't work Dynamic Link Error

    I am on Windows XP and have upgraded to Premier Pro CS4.  I have under a 2 minute video that will not export (combo of photos and avi files we shot and a couple purchased avi in the NTSC format).  AME sits on a "Waiting" status with no sign of movement.  After an hour I turned it off.  Tried to open AME and add the sequence, when I get the Adobe Dynamic Link Error - at least I get an error.  What is this?  I have no extra items on the timeline and have deleted the other sequences out to see it that mattered - no.  I have done the updater and have the latest updates - still nothing.  What am I missing?  What should I be looking for?  Help Please.

    Antivirus isn't an issue and I have a lot of space.
    Gerri
    Allan Block
    "This is a transmission from Allan Block Corporation and may contain
    information which is privileged or confidential.  If you are not the
    addressee, note that any disclosure, copying, distribution, or use of
    the contents of this message is prohibited.  If you have received this
    information in error, please destroy it and notify us immediately at our
    telephone number (952) 835-5309."

  • Dynamic link error message again?

    Hi
    I am running Bridge CS6, somethimes with photoshop CS6.
    I am running mac OSX.6.8 (snow leopard).
    mac book pro
    I am getting the dynamic link error message again after not having the problem since CS6beta. It sometimes is only with mov or other movie files but sometimes it is with all.  It is also very slow and sluggish in general.
    When I click on a video files Bridge spins the wheel for a whlie and then gives me the below error message
    (in case the screen shot does not load)
    The error message reads
    "dynamiclinkserver has encountered an error"
    and then it reads off a file thread. and then I must click to continue
    I click to contiue. the message comes back. I click once more and the file then presents. I click to play the vid. the error message again comes back. And I must repeat the clicking twice. I have reset the preferences and purged the cashe. I have installed the patch I found in the forum too. thanks for any help you can render, Uhane

    Yes I did that while talking to tech support on the phone. They had given up and refered me to an upper tech support staff who was supposed to call me back but never did. Where is a link to this udate? It did not show up when I ran the updater.?!  As for permission listed as a culprit on the other thread you link to I have no such firewall or other software running. All the permissions have been set to my admin accnt which is the one and only accnt on this machine. I had NO problem since the beta version and then all of sudden it started again with the dynamic link fail with somoe files types in the last day or so. As for the other problems ... I honestly don't have a clue but assume they are all related to a single cause as they all showed up at the same time. I will reset once more. All start up scripts are checked. always have been. Can you tell me more about this update?? Is there a link? I will go fish...thanks for your help

  • Dynamic Link Error when sending sequence to AME

    Hi,
    I have a very short sequence without errors in premiere pro, but when I drag the project over to Adobe Media Encoder, I get a "Dynamic Link Error"...
    "There was an error when adding selected sequence to the batch".
    Any ideas on how I can fix this?  Currently I have to export sequences one at a time, and that's not going to be cool in the near future.
    Premiere pro 6.0.5
    Adobe media encoder 6.0.1.31
    ---Trav

    Have you tried Queuing from PP instead of dragging?

  • HT4623 So I upgraded my 4S phone to IOS6, and when I try to log in to Cloud on the phone, it comes back as wrong password. I tried a dozen times, VERY SLOOOOWLY to make sure I wasn't making some sort of typing error, but noo.

    So I upgraded my 4S phone to IOS6, and when I try to log in to Cloud on the phone, it comes back as wrong password. I tried a dozen times, VERY SLOOOOWLY to make sure I wasn't making some sort of typing error, but noo.

    hi i had the same problem today when i updated my itunes to latest version. however, i have just found my songs in the 'itunes media' folder. this was accessed through 'my music'  then keep clicking through until you find itunes media and all my library songs were in there and i then just added these files to my library and all were restored however, i have lost all my playlists but at least my 700 songs are back. very dissapointed with apple that they have let this happen with their latest update, the previous version was miles better than this one . hope you find them. stevo

  • How to undo typing errors on an iPad?

    How do I undo typing errors on my iPad without deleting backwards through several words?
    Jean

    Manipulating and editing text ....
    Hold down on the area that you want to select until a blue line appears. Tap on it again and another pop up appears with the options to select, select all or paste. If you select all, all of the copy on the page or within the text block in which it was created will be highlighted in blue. An option to cut, copy or place appears. Two blue vertical lines will be on both ends of the text block. You can select the blue dot on one of those lines and drag it to select exactly the text that you want to manipulate.
    If you choose select - then blue lines will be on either side of that word only. You get the cut, copy, paste or replace options. You can once again drag the lines with the blue dots to select text. If you drag the line to select more text, you get the cut, copy or paste options.
    Cut is self explanatory, copy will put that text in the invisible iPad clipboard and you can select another area in your document in which to paste that copy or you can paste into any other document or field that will accept text.  Replace is when the iPad will auto correct a word from it's dictionary if the word you have typed does not "make sense" to the iPad.

  • Keyboard typing errors

    My recently purchased HP laptop frequently introduces keyboard typing errors.  The cursor will jump to different locations while typing, will introduce unrequested commands, such as erasing, jumping to different pages, etc. I have turned off the fingerpad and the errors continue.  Is there a cure?
    Pavilion dv7t-6c00 CTO Quad Edition Entertainment Notebook PC
    Product Number:
    A1L69AV
    [Personal Information Removed]

    Try this  - Reset the iPad by holding down on the Sleep and Home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons. (This is equivalent to rebooting your computer.) No data/files will be erased.
    Frozen or unresponsive iPad
    Resolve these most common issues:
        •    Display remains black or blank
        •    Touch screen not responding
        •    Application unexpectedly closes or freezes
    http://www.apple.com/support/ipad/assistant/ipad/
    iPad Frozen, not responding, how to fix
    http://appletoolbox.com/2012/07/ipad-frozen-not-responding-how-to-fix/
    iPad Frozen? How to Force Quit an App, Reset or Restart Your iPad
    http://ipadacademy.com/2010/11/ipad-frozen-how-to-force-quit-an-app-reset-or-res tart-your-ipad
    Black or Blank Screen on iPad or iPhone
    http://appletoolbox.com/2012/10/black-or-blank-screen-on-ipad-or-iphone/
    What to Do When Your iPad Won't Turn On
    http://ipad.about.com/od/iPad_Troubleshooting/ss/What-To-Do-When-Your-Ipad-Wo-No t-Turn-On.htm
    iOS: Not responding or does not turn on
    http://support.apple.com/kb/TS3281
    Home button not working or unresponsive, fix
    http://appletoolbox.com/2013/04/home-button-not-working-or-unresponsive-fix/
    Fixing an iPad Home Button
    http://tinyurl.com/om6rd6u
    iPad: Basic troubleshooting
    http://support.apple.com/kb/TS3274
     Cheers, Tom

  • CS5.5 Production Premium Dynamic Link error

    I have trial CS5.5 Production Premium. I'm trying to dynamic link premiere pro to after effects but error "Using Adobe Dynamic Link with Adobe After Effects requires Adobe Production Premium". I already instal Production Premium.I reinstall but still ongoing. I need a solution.

    Try using a Forum search or a Google search - 'Using Adobe Dynamic Link with After Effects requires Adobe Production Premium' was quite common error. Deactivating and reactivating the Suite resolved the issue in most cases.

  • Dynamic Filename Error

    Hi all,
    I have the requirement of getting same file name with timestamp on the receiver side (EX.Filename_timestamp) by modifying the Adapterspecific messageattributes refering the following blog
    Re: Regarding Target File name
    and wrote the code as specifeid in the blog as follows mapped to some
    dummy variable on the target side
    //write your code here
    String FileName    = "";
    String TimeStamp = "";
    DynamicConfiguration conf1 = (DynamicConfiguration) container
        .getTransformationParameters()
        .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key1 = DynamicConfigurationKey.create            ("http:/"+"/sap.com/xi/XI/System/File","FileName");
    FileName = conf1.get(key1);
    TimeStamp  = container.getTransformationParameters().get
    (StreamTransformationConstants.TIME_SENT).toString();
    FileName = FileName.replaceAll( ".txt" ,"_" );
    FileName = FileName;
    conf1.put(key1,FileName);
    return  FileName; 
    but iam getting an error as follows in the receiver side communication channel moniroting.
    Message processing failed. Cause:com.sap.aii.af.ra.ms.api.RecoverableException: Rename failed.:
    com.sap.aii.adapter.file.ftp.FTPEx: 550 Rename failed.
    An error occurred while connecting to the FTP server '10.6.161.65:21'. The FTP server returned the following error message: 'com.sap.aii.adapter.file.ftp.FTPEx: 550 Rename failed.'. For details, contact your FTP server vendor.
    Can anybody give me an idea of how to reslove the error.
    Thanks,
    Ram.

    I dont think it is a permission issue...it seems to be due to the way the UDF is defined....are you successful in giving the fileName (without TImeStamp)....
    also can you change the String FileName = ""; to String fileName = ""; .....may be it is conflicting with the
    DynamicConfigurationKey key1 = DynamicConfigurationKey.create            ("http://sap.com/xi/XI/System/File","FileName");
    Also when you do Dynamic Configuration the return statement is not needed....the value gets populated into the ASMA attribute directly....
    Edited by: abhishek salvi on Jun 12, 2009 12:59 PM

Maybe you are looking for

  • WLS 10.0: WebDAV methods are rejected

    Hi,           WebDAV methods are rejected with status code 501. There is no basis for this in the specification. The only indication is the strict definition of the "http-method" element in the deployment descriptor, but it has been relaxed again in

  • WRT160N Help !

    Hey forum, I have a couple of questions regarding how to secure my wireless connection from others around me. This  is what my network is looking like, but I think my wireless connection isn't correct with that image. I have my wireless router connec

  • Garbage in mail body when sending mail from abap code

    Hi abapers, i am sending mail from my program and when the data reaches in mailbox it is as follows. 佐呓义⁇䅄䕔䌉乏啓䕍⁒低䌉乏啓䕍⁒䅎䕍䤉⁃䥔䭃⁔低म䍉吠䍉䕋⁔䕄䍓䤉⁃䥔䭃呅匠䅔啔॓ which is not proper. I'm attaching the following part of code which i have used.Please let me know if i've

  • Call centre number for

    Okay, every time I try to call +3534333200, I keep getting a Kwiksave in Queensbury Park, wherever that is. I tried the Ireland number as well, and got through to kwiksave AGAIN. Have Creative done a bunk? Getting rather frustrated now. If I dial 003

  • Help! Need to let Viewers upload photos -but how?

    I am v new to Dreamweaver and would really appreciate a bit of simpleton advice! I've worked through the tutorial and scoured the internet - but maybe i'm looking in the wrong places. How easy is it to set up a website using DW that lets users upload