How to check the value of the structure component at run time

Dear Friends,
Kindly, through some idea for the below query:
Step 1: I have a structure name as STRUCT with components COMP1, COMP2, COMP3,......, COMP99. At run time in this structure few components may have values and few may not have.
Step 2: Now I have a variable of type char name as LV_CHAR, at run time this variable may have value as any of the structure components given in the above step such as COMP1 or COMP2 or .....or COMP99.
Step 3: Let us assume the variable LV_CHAR have value COMP11 and now I need to check whether the strucutre componet STRUCT-COMP11 is initial or not using this variable.
Could you please give me the steps what needs to be done to handle it.
Thanks & regards,
Mallikarjuna M.

PatanGova wrote:
Hi,
Can someone help me out to divide a Hexadecimal number say"ABCD" and display 
1) each value of hexadecimal number like 'A','B','C','D' in separate indicators and
2)each value of hexadecimal number like 'A','B','C','D' into their respective decimal number and to show in separate indicators.
Thanks.
That has absolutely nothing to do this thread.  Start a new thread.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines

Similar Messages

  • How to check the value of "The Interrupt Status Flag"?

    Hi, thank you for reading this post!
    Invoking Thread.interrupt() sets the value of the Interrupt Status Flag.
    Just wondering if there is a Java method to check the value of this flag? Or is using isInterrupted() or interrupted() the only way to check?
    http://download.oracle.com/javase/tutorial/essential/concurrency/interrupt.html
    Thank you in advance for your help!
    Eric

    Below is the full code. As soon as the Thread.sleep() is taken out in main(), the interrupt is detected in the child thread. But if the sleep() stays, then the child thread goes into an infinite loop. It's not detected the interrupt.
    //ParentInterruptChildThreadCatchedDemo.java
    //Program function: This program demonstrates the parent thread (main()) interrupting a child thread (thread1).
    //Threaded class
    class TryThread extends Thread {
         //fields
         private String threadname;
         private long aWhile;
         //Constructor
         public TryThread(String tname, long delay) {
              threadname = tname;
              aWhile = delay;
         //run() method
         public void run() {
              while(!Thread.interrupted()) {
                   //Do work
              try {
                   System.out.println(Thread.currentThread().getName() + " was just interrupted!");
                   throw new InterruptedException();
              } catch(InterruptedException e) {
                   //System.exit(1);
                   return;
    public class ParentInterruptChildThreadCatchedDemo {
         public static void main(String[] args) {
              Thread thread1 = new TryThread("thread1", 2000L);
              thread1.start();
              try {
                   System.out.println("main() goes to sleep for 10 second.");
                   Thread.sleep(10000);
                   System.out.println("Statement after main() sleep().");
              } catch(InterruptedException e) {
                    e.printStackTrace();
                 //Interrupt thread1
                  int interruptFlag = 5;
                  for(int i=0; i<11; i++) {
                       if(i == interruptFlag) {
                            System.out.println("Condition met, going to interrupt thread1 ...");
                            thread1.interrupt();
                            System.out.println("Thread1 interrupted!");
                  System.out.println("Ending main()");
    /*Output:
    main() goes to sleep for 10 second.
    Statement after main() sleep().
    Condition met, going to interrupt thread1 ...
    Thread1 interrupted!
    Ending main()
    INFINITION LOOP
    */

  • How to Save the multiple selection check box values into the database

    i have the multiple selection check box implemented in UI through drop down list,i can choose the desired values from the drop down through checkbox, but i m unable to store these values and commit the values into the database all at a time.

    You can access the values using listbinding and can then store them as a string by using a delimiter.

  • How to select multiple values from the parameters in BI Publisher report

    How to select multiple values from the parameter drop down in BI Publisher, and how to handle this mulitple values from the report sql...

    Hi kishore,
    I have used all the steps as you mentioned in your previous reply....including checking Mulitple Selection Check Box..
    Iam able to get the results when I am selecting one value..
    and also I am able to handle multiple values the in the query by using IN :Parameter, but seems when we select more than one value from the parameter drop down i think the Bi Publisher is sending the values in concatenated form something ilke
    ex: "'ACCOUNT','HR','SALES'" ,and when trying to display the parameters values in the output, its throwing the error as 'missing right paranthesis' ....on the whole do you have any solution which would handle
    1.Single selection.
    2.Multiple selection.
    3.'ALL' Values.
    4.Separating the concatenated string into individual strings and dispaly them on the output of the report..etc..in case of Mulitple selection.
    Ex:
    Concatenated String from BI Publisher:"'ACCOUNT','HR','SALES'"
    Expected Output on the report:ACCOUNT,HR,SALES
    reply to this would be much appreciated....
    thanks,
    manoj

  • How to display(binding) values in the table from more than one node?

    Hi,
    I have two nodes (TRIPS & AMOUNTS)in the context. How to bind these values into the table control?
    When i bind second one, first one is getting replaced.

    Hi Mog,
    Of course it is possible to create a table from attributes of more than one node, and in some cases this is still necessary, but you have to do this the hard (manual) way.
    If you have a table control, have a look at the properties and the elements belonging to it.
    First of all, there is the property "dataSource", which binds to a multiple node (let's name it TableRootNode). This means that for each element of THIS node, one row is created. In each row the data of exactly one element of this TableRootNode is displayed.
    Then you have columns in this table. Inside of the columns there is a header and an editor. The editor is the interesting part.
    Normally the primary property of this editor is bound to an attribute of the TableRootNode. Then everything works as expected. If it binds to an attribute of a subnode (SUB) of TableRootNode, then in row i the data of the subnode of the i-th element of TableRootNode is displayed. There is no need for SUB to be a multiple node, but it must not be a singleton.
    If you bind a property of the editor to an attribute, which does not lie in the subtree of TableRootNode, then you will see the same value in each row.
    Now it depends on the structure of your context. Take the node, which is relevant for the change in each row (I assume it is TRIPS) and bind the table to the node as you are used to. Then for each additional column, you have to create a new column in the tree, create a new header element with a title and a new editor (e.g. textview or inputfield) and then bind the right property of the editor to the corresponding attribute in node AMOUNTS).
    If these 2 nodes do not have parent-child-relationship, the tip to create a new node, which consists of the attributes of both nodes is the only solution.
    Ciao, Regina

  • How to remove hash in the value of the field fetched from application serve

    Hi,
       I am populating values of the file which is in the application server to the internal table. But for the last field hash is also populating from the file along with the value.
    Please suggest me how to remove hash in the value of the last field.
    Thanks,
    Neelima.

    Hi Vinay,
    Please check the program. I have used the replace statement but it is not working.
    IF NOT v_sap_bom_rec IS INITIAL.
    Spliting the records at '~' delimiter
        SPLIT v_sap_bom_rec AT c_del INTO  wa_bom_file-model_name
                                           wa_bom_file-product_code
                                           wa_bom_file-description
                                           wa_bom_file-product_type
                                           wa_bom_file-mfg_part_num
                                           wa_bom_file-mfg_part_desc.
        REPLACE cl_abap_char_utilities=>horizontal_tab IN wa_bom_file-mfg_part_desc WITH space .
        wa_bom_file-status = c_status.
        APPEND wa_bom_file  TO i_bom_file.
    But it is not working.
    Please help me..
    Thanks
    Neelima

  • How to display text value in the header data (Header text) of credit memo

    Hi...
    I need to display the text value of the text field in the header text of the header data in credit memo.
    The text values are stored in a ztable and i need to display it based on the billing document stored in vbrk (zfield) that was inserted during the creation of credit request..
    Appreciate your help on how to do this...
    Thansk and will surely reward the points..
    Kanthi..

    Hi kanthi ,
                   Read the value from Z Table and during the creation of cedit memo check out for some exit where u the value from The zTABLE AND use function module SAVE_TEXT with object and id in the header text .
    Please award if useful.

  • How can we get the value of the key field in a custom data model using governance API?

    Dear Team,
    How can we get the value of the key field in a custom data model, to be used for manipulation of the change request fields using governance API?
    Any kind of help would be sincerely appreciated.
    Thanks & Regards,
    Tushar.

    Hi Michael,
    Thanks for direction. Let me give more context on this as I'm interested to get more details..One of the issue was to read cross entity field values on UI based on user action and set other entity field behaviour...It is similar to what is being posted here.
    For ex: Reading MTART from Basic Data UIBB in MM MDG UI and set the field properties in some other custom entities say ZZETEST. This cannot be done using UI BADI as it only supports single entity at a time and not cross entity. So alternatively we found a solution where we can enhance existing PLMB feederclass cl_mdg_bs_mat_feeder_form by reading the model and the entity as needed as it it proved that it supports cross entity UI field behaviours and so business requirements.
    This is a workaround for now.
    So the question is How do we achive it using governance API for cross entity field behiaviours.?or what is the right way doing this.
    Can we do that using governance API and its' methods?
    In the Governance API doc you provided below has referring to below external model as part of gevernance API.
    The active or inactive data (before or during the derivation or the check) can be read
    with the external data model interface IF_USMD_MODEL_EXT with the method READ_CHAR_VALUE and
    the corresponding READ_MODE parameter. To avoid unnecessary flushes (derivations), the NO_FLUSH
    parameter should b
    e set to ‘X’.
    Thanks
    Praveen

  • How to pass the values from the Wb Dynpro Application to the SAP Backend ?

    Hi All,
    Good morning..,
    I have scenario like:
    I want to pass the values from the web dynpro appication to the SAP Back end R/3 Table. IN backend the RFC is writtn to accept the structure input from the Webdynpro.
    Upto know I imported the corresponding RFC and maaped to the View.
    How to proceed with the coding to save the data...
    PLease suggest...
    Regards and Thanks in Advance,
    CSP

    Hi  Pradeep
    Steps:
    1. First create an instance for bapi and bind the instance to the bapi node.
      Z<bapi name> zb=new Z<bapi name>();
      wdContext.nodeZ<bapi name>. bind(zb);
    2. Then if u have the import parameter u have to set them by using
        The instance of the above bapi.
        Zb.set<import parameters>;
    3. If the bapi has a table parameters then the structure for the table parameters will also be imported
       In the model class.
    4. Set the table parameters by creating the instance for that structure and using this instance set it.
       Z<Struct>itm tab=new Z<Struct>();
       Tab.set<table parameters>
    5. Then add the structure instance to the bapi instance.
        Zb.add(Tab);
    6. Then Execute the bapi after setting the import parameters.
    7.  If there is any export parameters, then get the values after execution.
    Look at this thread for codes
    Re: RFC call on click of button
    Regards,
    Arun

  • How to get the value of the current form values after "save" in MD form

    Hi,
    I am trying to run a procedure using the form values right after I save the current records in a master-detail form. When I pass the value using p_session.get_value to the procedure, there is only null value passed. I checked the package body generated and found that the OnReset function runs immediately following the saving of the current records and this onReset function is called within the OnSave procedure. So when I save the current changes, I loose the values in the p_session. Any PL/SQL code I write after OnSave, does not get any p_session value.
    Interestingly, in case of just one table form, the OnReset is not within the OnInsert function and it is possible to get the p_session values. OnReset runs after OnInsert and within this two functions we can write any pl/sql code on the Insert button PL/SQL handler.
    I have the following questions:
    1. Why is the procedure written differently in case of master-detail form ? Why is the OnReset inside the OnSave ? How do we write codes which we want to execute before onReset and after OnSave ?
    2. I want to run a procedure after onSave and before OnReset. How do I do that ? Do I have to change the package manually ?
    3. If the above is not possible, I can also try to store the values I need to run the procedure before I save in some variable. How do I do that ? It seems I cannot declare variables to store session values inside the pl/sql event code on Save button, because it gives me error. The variable declaration code goes in between the begin and end of genesys.. procedure and that is not allowed in pl/sql
    Please help me with this. I definitely need to run a procedure after saving for almost all of my forms. Otherwise I am not sure what to do with my development. I am completely stuck with this. Thanks a lot for helping me out.
    Mainak

    Never mind. I found the answer.

  • BDC-How to get the value of the screen field

    Hi All,
    I am facing a problem while writing the BDC code for the XK02 transaction.
    Recording:
    We have recorded like this :after giving the values in the initial screen(vendor no and purchase group and selecting the purchasing data check box) and enter into the second screen and then click on alternative data icon.There we ll have set of plants we have to check auto ordering (by selecting the plant and click purchasing icon)for the plants which are in the given file.
    Problem:
    Suppose there are five plants(like 1,2,3,4,5) for a particular vendor but we are having only three plants in the file for which auto ordering check has to be done.The problem is that its doing auto ordering check for the first three plants(1,2,3) in the transaction.But  in the file we are having Plants like (1,3,5).How to get the screen field value directly or is there any other way to resolve the problem?

    Dear Raja,
    You cannot get hold of screen values while running through the BDC Operation.
    Only way you can get the value --> populating an Internal Table from the Database Table.
    Regards,
    Abir
    Don't forget to award Points *

  • How can i compare the values of the objects in a class?

    hi ,
    i am testing how to test the values of the two objects
    this is the code i have return below.....
    class Sample{
              String name;
              int age;
              Sample(String name,int age){
                   this.name=name;
                   this.age=age;
    public class sample2{
              public static void main (String []arg){
                   Sample one = new Sample("cat",20);
                   Sample two = new Sample("cat",20);
    how can i test that object one and two are equal.
    can anyone clarify me about this?

    hansbig wrote:
    Um, this part doesn't work, it will never return true.
      public boolean equals(Object obj) {
    if (obj == this) {
    return true;
    It will :) try for example objectOne.equals(objectOne); and add a System.out.println() at that part. It will return there.
    >
    but this part, woah dude, that's some pretty slick code you got here:
    I couldn't figure out how to do the compare inside the class, but I think I see how this works.
    Not sure how I would do it for an object with more than one value to check though.
        if (obj instanceof EqualsExample) {               //Not the best implementation considering possible subclasses but the easiest.
    EqualsExample temp = (EqualsExample) obj;
    return (this.name.equals(temp.name)); //Always use the equals function when comparing strings!
    } else {
    return false;
    You could add them in one massive return (this.something == temp.something && etc). Or you could split it in a series of if statements. It's really dependant on what kind of variables there are in your class.
    Maybe you have an ArrayList you need to compare but also an id. then it would make more sense to check the id first and then possibly loop through the arraylist.
    Hope it's a bit more clear :)
    Edited by: hms on Jan 16, 2008 11:25 AM

  • Pass the value of the current case in a case structure to a global variable for use in VIs.

    I have built a large queued state machine (>100 cases).  In each state, I run a VI that I have created.  These VIs are usually not very different from one another.  In many cases, I could simply use the same VI over and over again.  There is only one problem with that.  None of these VIs know which case to send the program to next.  I have to change the value of the "NEXT_CASE" constants in the VI and save it under a new name to be inserted into each new case.  Now my program consists of hundreds of VIs whose only difference is the value of their "NEXT_CASE" constants.  This causes all kind of headaches when I have to insert new cases into the state machine, and it is just too much for me to deal with.
    I need to be able to use a global variable to keep track of the current case within my VIs.  I could change it from a string to a number and add or subtract from it to determine which case the program should go to next.  Since I'm usually only skipping from one case to the next (or the previous) I could use the exact same VI in most cases.  Can anyone tell me how to create a global variable that contains the value of the case in my case structure that I could use within my VIs to keep track of the current case?  Let me know if you have any questions.

    Instead of defining the next state inside the subvi, why not do it in the main vi inside each state case?  An output from the subvi could be used with a case structure to determine the next state.  Sort of like, if the subvi returns 0 then next state is State3, else if the subvi returns 1 then next state is State4.
    Message Edited by tbob on 08-19-2005 03:15 PM
    - tbob
    Inventor of the WORM Global
    Attachments:
    NextState.PNG ‏5 KB

  • How to pass a value to the export parameter for a method (public instance)?

    Hello,
      I am trying ABAP OO newly. How to pass a value to the export parameter for a method (public instance) called in a report? This *export parameter has a reference type of structure.
    Thanks in advance,
    Ranjini

    Hi,
    "class definition
    class lcl... definition.
      public section.
        method m1 imporitng par type ref to data.  "now you can pass any reference to the method, but this way you have to maintain this reference dynamically inside the method (you can't be sure what that reference is really "pointing" at)
    endclass.
    "in program
    data: r_lcl type ref to lcl...
    create object r_lcl.
    call method r_lcl
      exporting
         par    =  "pass any reference variable here
    Regards
    Marcin

  • How to check data type of the field symbol at run time

    Hi,
    My code is as following:
          LOOP AT <fs> ASSIGNING <wa_covp_ext>.
            ASSIGN COMPONENT 86 OF STRUCTURE <wa_covp_ext> TO <f_zzname>.
            IF sy-subrc = 0.
              ASSIGN COMPONENT 158 OF STRUCTURE <wa_covp_ext> TO <f_pernr>.
              IF sy-subrc = 0.
                  SELECT SINGLE sname INTO <f_zzname> FROM pa0001
                                WHERE pernr = <f_pernr>
                                AND endda GE sy-datum
                                AND begda LE sy-datum.
             ENDIF.
          ENDIF.
        ENDLOOP.
    This query is giving dump when <f_zzname> is type P length 8 and decimals 2, because it tries to put PA0001-sname into it which is type C length 30. So I want to check the type of <f_zzname> before the select statement. If it is character 30, then I will write the select statement else not.
    How to check data type of the field symbol at run time? If it's not possible, then can somebody suggest a workaround? Thanks.

    check this ...
    write describe statement  ...
    field-symbols : <f_zzname> .
    data : sname like pa0001-sname,
           typ(10).
    assign sname to  <f_zzname>.
    describe  field <f_zzname> type typ.
    write : typ. <-- typ contains character type in this case ..
    U can check if typ is of character(C) if so .. write the select statement ...

Maybe you are looking for

  • Help needed in text entry box...

    hi, I have created one assessment simulation, which has a few text entry boxes. This I have included it in another flash file. Output of that flash file is .exe and not .swf.  But when I play that exe; this simulation doent allow to enter the text, w

  • Transfer iPod Movie toe Library (PC)

    I am new to the iPod scene and do not know how to transfer movies from the ipod to the PC. I purchased a move from the iTune Store using my PC at work. I want to add it to the PC at home from my iPod (30GB Video). How do you syncronize the iPod to up

  • How to reduce type size on exported copyright?

    I have a pretty long name. Therefore, my copyright notice is quite long. eg. © Hibbard T. Smith, JR 2007 When I export a web sized (300 x 200) image, the copyright notice is so large that it gets chopped off. How can I reduce the type size used so th

  • ENCODING STREAMING VIDEO

    Hi, I have encoded several .MOV files (Web Streaming) and uploaded them to an HTTP server (not a video specific server). When I create a hyperlink, to stream the video, the QT player will open and play on my Mac but not my PC. The PC Explorer window

  • In attempting to install Adobe Flash Player, my username and password are not accepted.  Cannot proc

    Need help