How to update the value inside a field symbol ?

ASSIGN COMPONENT 'MENGE' OF STRUCTURE <fs_line> TO <fs_field>.
<fs_field> = itab_stpo-menge.
COLLECT <fs_line> INTO <fs_table>.
.processing some code......
ASSIGN COMPONENT 'MENGE' OF STRUCTURE <fs_line> TO  <fs_field>.
<fs_field> = ( itab_stpo-menge * itab_plpo-vgw03 ).
COLLECT <fs_line> INTO <fs_table>.
Hi, guys,
May i know is there a way to update the value in inside a field symbol?
I feel hard to figure out the way to solve this situation. Kindly give me some help or perhaos tell me other altenative way to do it also can.
Thanks in advance.
Edited by: Jiansi Lim on Apr 25, 2008 8:09 PM

hi check this...
For a structured data object s, you can use the statement
ASSIGN COMPONENT comp OF STRUCTURE s TO FS.
Here the comp is the component name or its index number in the structure.
Find the following sample code -
DATA: BEGIN OF LINE,
COL1 TYPE I VALUE '11',
COL2 TYPE I VALUE '22',
COL3 TYPE I VALUE '33',
END OF LINE.
DATA COMP(5) VALUE 'COL3'.
FIELD-SYMBOLS: <F1>, <F2>, <F3>.
ASSIGN LINE TO <F1>.
ASSIGN COMP TO <F2>.
DO 3 TIMES.
ASSIGN COMPONENT SY-INDEX OF STRUCTURE <F1> TO <F3>.
WRITE <F3>.
ENDDO.
ASSIGN COMPONENT <F2> OF STRUCTURE <F1> TO <F3>.
WRITE / <F3>.
The output is:
11 22 33
33
I need to update one field in Internal table
regards,
venkat

Similar Messages

  • How to print the value of a field of  type FLTP

    hi experts,
    pls tell me how to print the value of a field of  type FLTP. i.e in decimal format not in exponential format.
    thankyou.
    krishna

    Hi ,
    I dont think in Floating point u can able to go for the decimal point display as it is for the minimum precission display..
    Define the variable as the 'packed' type and then u can able to define the decimal point...
    Cheers,
    SImha.

  • How to update the value of setter and getter..!!

    Hii all i am developing an portal application in which i display the metadata information related to a document(Stored in UCM) in a popup in my application...
    The user can also update the information through the application.
    in my popup i have a trh : table layout in which i have a Select Onechoice field as
    <trh:cellFormat id="xcfcSecurityGrp">
    <af:selectOneChoice value="#{MetaDataFields.DSecurityGroup}" id="ddldSecurityGroup" showRequired="false"
    autoSubmit="true"
    immediate="true">
    <f:selectItems value="#{ContentDataBean.TSecurityGrpList}" id="si1"/>
    </af:selectOneChoice>
    </trh:cellFormat>
    The MetaDataFields.DSecurityGroup show the current security group on document
    and
    ContentDataBean.TSecurityGrpList provide the user with the list of security group to update.
    The current security group i am getting through a map which consist of metadata information for a document :-
    public void setDSecurityGroup(String dSecurityGroup) {
    this.dSecurityGroup = dSecurityGroup;
    public String getDSecurityGroup() throws IdcClientException, IOException {
    Map<String,String> mapValue=ep.getDocumentPropertiesSystem();
    dSecurityGroup=mapValue.get("dSecurityGroup");
    return dSecurityGroup;
    The problem is that whenever i am updating the value for the security group, i am getting the old value, the problem is that i have to every time get value from the map only as it consist metadata information for the current selected document..
    Is there is any way through which i can update the value for this field..??
    Thanks
    JDeveloper - 11.1.1.6.0

    Hi,
    Try binding ValueChangeListener on the selectList. Also set autoSumit property to true.
    Thanks,
    Pandu

  • How to update Elements value inside existing xml file

    Hi Gurus,
    Am somehow new to java and working on xml with java, i have a scenario where i want to update the elements of my existing xml file, i know its possible as i have posted one code on this forum which updates the values of the arrtibutes of existing xml file. Ref :
    http://forum.java.sun.com/thread.jsp?forum=34&thread=186091&start=15&range=15&hilite=false&q=
    But am not able to use the same code to update the vlaues of the attribute.
    if i have this xml file :
    <?xml version="1.0"?>
    <RootElement>
    <Transaction>
    <Task9>
    <TaskID>Task9</TaskID>
    <Description>My Test Case</Description>
    <Time>12/12/2004</Time>
    </Task9>
    </Transaction>
    <Transaction>
    <Task2>
    <TaskID>Task2</TaskID>
    <Description>Testing my xml</Description>
    <Time>12/12/2004</Time>
    </Task2>
    </Transaction>
    </RootElemen>
    Now i want to update teh </Description> and </Time> field using the code that i have given above in the link.
    If any one can help me ill really appreciate.

    The value of an element is stored in a child node of that element. For example, let's say that "e" references the node <Description> then:
    e.getFirstChild().getNodeValue() => "My Test Case"

  • How to read the value of a field belonging to a different context node in GET_I method during runtime

    I want the read the value of a field,'LCSTATUS' belonging to context node 'BTADMINH' in the GET_I method of the field, 'ZZFLD000008' belonging to context node,'ZBTACTIVITYH'.
    In the context node class of context node 'ZBTACTIVITYH',I have created an instance attribute,GR_OWNER type ref to context class.
    I get the following error in the line - lv_act_status = Lr_entity->if_bol_bo_property_access~GET_PROPERTY_AS_STRING( 'LCSTATUS' ).
    'An exception (CX_CRM_CIC_PARAMETER_ERROR) occurred Message no. TPDA430'
    I have used the below code.
    method GET_I_ZZFLD000008.
         DATA: current TYPE REF TO if_bol_bo_property_access,
               lv_act_status TYPE string.
         DATA:lr_entity TYPE REF TO cl_crm_bol_entity,
               lr_current TYPE REF TO if_bol_bo_property_access,
              lr_parent TYPE REF TO cl_crm_bol_entity.
         rv_disabled = 'TRUE'.
         if iterator is bound.
           current = iterator->get_current( ).
         else.
           current = collection_wrapper->get_current( ).
         endif.
    CHECK gr_owner IS BOUND.
    lr_entity ?= gr_owner->btadminh->collection_wrapper->get_current( ).
    CHECK  lr_entity  IS BOUND.
    lv_act_status = Lr_entity->if_bol_bo_property_access~GET_PROPERTY_AS_STRING( 'LCSTATUS' ). "error states that lcstatus can't be used here.
       TRY.
             IF current->is_property_readonly(
                           'ZZFLD000008' ) = abap_false. "#EC NOTEXT
               rv_disabled = 'FALSE'.
             ENDIF.
         CATCH cx_sy_ref_is_initial cx_sy_move_cast_error
               cx_crm_genil_model_error.
           RETURN.
       ENDTRY.
    endmethod.

    Hi,
    LCSTATUS is not an attribute of the BTADMINH structure. It is read using the relation to the status object
    BTADMINH-> BTHeaderStatusSet-> BTStatusHCurrent-> ACT_STATUS.
    Try reading the ACT_STATUS of object BTStatus as given below.
            data: coll   type ref to if_bol_entity_col.
           data: entity type ref to cl_crm_bol_entity,
                         lv_act_status TYPE string.
           entity ?= current.                                                               "BTADMINH entity.
           coll = entity->get_related_entities(
                    iv_relation_name = 'BTHeaderStatusSet' ).    "#EC NOTEXT
           current = coll->get_current( ).
            entity ?= current.
           coll = entity->get_related_entities(
                    iv_relation_name = 'BTStatusHCurrent' ).     "#EC NOTEXT
           current = coll->get_current( ).
            try.
           lv_act_status = current->if_bol_bo_property_access~GET_PROPERTY_AS_STRING(  'ACT_STATUS' ).
             catch cx_crm_cic_parameter_error.
           endtry.
    Regards JP

  • How to access the value of a field of a field symbol.

    Hello All,
    i need to access the value of a field in a field symbol. But when i am trying to get the value like <FS>-POSNR, it's showing that that the <FS> has no structure.
    In my program, the field itself that i need to check should be dynamic. ie i'll get the field in a variable and i need to find the value of that field.
    Am pasting my code below, please tell me what needs to be done.
    here in my sample code i am moving the entry of the <FS> into a work area structure. But in my actual program, i gets the structure as a parameter. So is there any way i can declare a work area dynamically...
    FUNCTION z_39181_dyn_fs_60758.
    ""Local interface:
    *"  IMPORTING
    *"     REFERENCE(PARAMETER) TYPE  VBELN
    *"  TABLES
    *"      DATA_TAB
      BREAK-POINT.
      FIELD-SYMBOLS <fs> TYPE ANY.
      FIELD-SYMBOLS <fs1> TYPE ANY.
      FIELD-SYMBOLS <fstab> TYPE ANY TABLE.
      DATA name(5) VALUE 'POSNR'.
      FIELD-SYMBOLS <f> TYPE ANY.
      DATA: dref TYPE REF TO data,
            dref1 TYPE REF TO data,
            dref2 TYPE REF TO data.
      DATA: lv_lips TYPE string.
      DATA: lv_lipsfld TYPE string,
                lv_fld TYPE string,
                lw_lips TYPE lips.
                lv_lips = 'LIPS'.
                lv_fld = 'LW_lips-POSNR'.
      CREATE DATA dref1 TYPE (lv_lips).
      CREATE DATA dref TYPE STANDARD TABLE OF (lv_lips).
      CREATE DATA dref2 LIKE LINE OF data_tab.
      ASSIGN dref->* TO <fstab>.
      ASSIGN dref1->* TO <fs>.
    assign dref2->* to <fs
      <fstab> = data_tab[].
      LOOP AT <fstab> INTO <fs>.
        lw_lips = <fs>.
        WRITE lw_lips-vbeln.
        ASSIGN (lv_fld) TO <fs1>.
       write <fs>
      ENDLOOP.
    Helpful answers will be rewarded...

    Use syntax
    ASSIGN COMPONENT name OF STRUCTURE struc TO <fs>.

  • How to update the value in wbs element in the iw32

    Hi All,
    Can anyone help me in providing the USER EXIT OR BADI at the time of saving the IW31 / IW32  work order creation or Change. I need to populate the PSPEL ( WBS ELEMENT in Additional data tab with the value coming from Field Exit.
    Here is my analysis on the same.
    I have written Field Exit for Settlement Receiver field in Maintain Settlement SCREEN à 1 and Exporting the value.
    IMPORT the same value into Variable and need to pass the value to PSPEL field ( WBS ELEMENT ) in Additional Data Tab  using any USER EXIT or BADI at the time of save Work Order .
    I tried to use the USER EXIT u201CEXIT_SAPLCOIH_009u201D  and passed Manually at the time of Debugging into CAUFVD-PSPEL and executed. But the Value is not appearing in the Screen after execution.
    Any help is greatly appreciated.

    hi check this exit...
    IWO10012

  • How to update the value in xml file using transformer after setNodeValue

    Hi,
    This is my code
    I want to set update the values in xml file using transformer..
    Any one can help me
    This is my Xml file
    <?xml version="1.0" encoding="UTF-8"?>
    <place>
    <name>chennai</name>
    </place>
    Jsp Page
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@ page import="javax.xml.parsers.DocumentBuilderFactory,
    javax.xml.parsers.DocumentBuilder,org.w3c.dom.*,org.w3c.dom.Element"
    %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>JSP Page</title>
    </head>
    <body>
    <% String str="";
    String str1="";
    try
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    DocumentBuilder db = dbf.newDocumentBuilder();
    Document doc = db.parse("http://localhost:8084/XmlApplication1/sss.xml");
    out.println("Before change");
    NodeList n11 = doc.getElementsByTagName("name");
    Node n22= n11.item(0).getFirstChild();
    str1 = n22.getNodeValue();
    out.println(str1);
    out.println("After change");
    String name = "Banglore";
    NodeList nlst = doc.getElementsByTagName("name");
    Node node= nlst.item(0).getFirstChild();
    node.setNodeValue(name);
    NodeList n1 = doc.getElementsByTagName("name");
    Node n2= n1.item(0).getFirstChild();
    str = n2.getNodeValue();
    out.println(str);
    catch(Exception e)
    out.println(e) ;
    %>
    <h1><%=str%></h1>
    <%--
    This example uses JSTL, uncomment the taglib directive above.
    To test, display the page like this: index.jsp?sayHello=true&name=Murphy
    --%>
    <%--
    <c:if test="${param.sayHello}">
    <!-- Let's welcome the user ${param.name} -->
    Hello ${param.name}!
    </c:if>
    --%>
    </body>
    </html>

    hi check this exit...
    IWO10012

  • How to update the path for a field which is of type textarea

    Hi,
    1.I have multiple record block,i need to update the textarea field in this multi entry block.I have put a for loop to achieve the same,however i'm able to update the path for text field,checkbox,selecttype,but am unable to update the path for field which is of textarea.Please suggest.
    2. Also i have another problem which occurs randomly.although i have record for a button click event in  my property file,button click is not happening during the playback.am getting error asVariable "obj.libraryname.web_button_BTN_1" not found for string:
    please not i have entry for the above button in my property file.
    Please suggest.

    Say i have 5 rows then
    for(int i=1;i<=5;i++){
    String Newpath = updatepath(eval("{{obj.libraryname.web_input_text_fieldname}}"),i)
    web.text_area(Newpath).setText("Text to be set")
    Below function is used to update my path
    public String updatepath(String path,int i) throws exception {
    String FPath = "";
    if(i<2) {
    FPath = path.substring(0, path.indexOf("'", path.lastIndexOf("@id=")+5))+path.substring(path.indexOf("'", path.lastIndexOf("@id=")+5));
    } else {
    FPath = path.substring(0, path.indexOf("'", path.lastIndexOf("@id=")+5))+(i-1)+path.substring(path.indexOf("'", path.lastIndexOf("@id=")+5));
    return Fpath
    anyother way to update path and set the fields in mutiple block is appreciable
    thanks
    Suresh

  • How do I update the value of  a field programmatically

    I want to change a form field "modified_by" to the current sso
    user using wwctx_api.get_user before updating the record in the
    database, how is a good way to do it? p_session.set_value? not
    having much luck with that, I put it in before processesing the
    for and get this error when I hit QUERY
    Error: An unexpected error occurred: ORA-06502: PL/SQL: numeric
    or value error (WWV-16016)
    An unexpected error occurred: ORA-06502: PL/SQL: numeric or
    value error (WWV-16016)
    (WWV-00000)

    Hi,
    If you create a function to return wwctx_api.get_user you could
    call this inside an update trigger, you could put in an
    exception to return USER if there is an error, this would then
    work for users connected directly and users using Portal.
    Regards Michael
    e.g.
    CREATE OR REPLACE FUNCTION F_PORTAL_USER RETURN VARCHAR2 IS
         vRet VARCHAR2(50) := wwctx_api.get_user;
    BEGIN
         RETURN(vRet);
    EXCEPTION
         WHEN OTHERS THEN
              RETURN (USER);
    END F_PORTAL_USER;

  • DATASET_WRITE_ERROR :How to know the value of a field at the time of error?

    Hi All,
    I have an ABAP code that write some records to a  flat file. Am getting a DATASET_WRITE_ERROR when this program is run.
    in ST22 i checked for any info that could be of help.
    The Error Text is: "No Space left on device"
    Error code: 28.
    Now i want to know after writing how many records did the program threw the error.
    I have a counter named WRITE_CTR. <b>Is there any way in the debug mode I can check for the value of WRITE-CTR just before the program terminated ?</b> checking the value of counter each time a record is written is not practical as there are almost 40k records in total.
    In ST22 i checked the section "Chosen Variables". unfortunately this counter's value is not listed there.
    Please let me know if there is any way i can see the contents of a field just before a short dump is generated.
    Otherwise is there any option during debug that i can set a breakpoint on a statement when the field WRITE-CTR=<some value> say when WRITE-CTR = 30000 ?
    Thanks in advance,
    Rit

    Ok. Havent used Try..Catch in ABAP. I'll try using that. That should be a better way. Thanks.
    I think it throws the error only after 20 or 30000 records are written. So its not possible to set a breakpoint where it writes to file and check which all records are written.
    I wanted to know if there's any way to know the value of a filed just before the error is thrown. In the 'Watch' feature i saw an option to select a field and then give a comparison operator and all. Do you know how to use that ? Will that help me to break the execution when a field value equals a limit ? Just wondering what the Watch option is for!!
    Regrads,
    rit

  • How to update the value of a column when a row is deleted

    Hi,
    My requirement is basically i have a table .Below is a sample data along with sample data
    Column A Column B ColumnC
    1 SAM 0
    2 RAM 0
    Now if i run a delete statement saying
    delete from Table where ColumnA =1 then i want to see the value of ColumnC to be updated as 1.The row shouldnt be deleted however the value of ColumnC should be changed to 1.
    Can someone please help me with any suggestions? I can create a trigger but i havent worked with triggers so not sure on how to use it.
    Please let me know if i am unclear or if you need any details.
    Thanks

    As I understand what you need is an INSTEAD OF DELETE trigger like below
    CREATE TRIGGER Trg_TableName
    ON TableName
    INSTEAD OF DELETE
    AS
    BEGIN
    UPDATE t
    SET ColumnC = 1
    FROM TableName t
    WHERE EXISTS (SELECT 1
    FROM DELETED
    WHERE ColumnA = t.ColumnA
    END
    this will set ColumnC to 1 and will not do an actual delete of the row.
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • How to watch the value of a field

    Hi,
    I've a Variable Form with a field of the Drop-Down List type. I'd like to be able to read the content of this field when I deploy my project.
    For example, when I don't choose any value for this field, the content of this field should be null or  ' ' but, I don't really which is the content of the value. How can I know exactly the content?
    Thanks in advance.
    Regards.

    Hi,
    Check the empty field condition with ISNULL conditional operator. i.e.
    =ISNULL(@field)
    and check the spaces with " " i.e.
    =@field ==" "
    when user enters multiple spaces then you can trim and and check i.e.
    = TRIM(@field)==""
    if you want to check the both then...
    =IF(ISNULL(@field) OR field==" ", "true condition", "false condition")

  • How to populate the value of 1 field in subtabs.

    Guys,
    Need your help.
    In one of the standard page there are multiple subtabs. So, I have requirement if users enter a value for a field in 1st subtab then the same value should automatically get populated to the second subtab field .
    Please help me in this.
    Is it possible through personalization or we need to extend the CO.
    Standard Page :- /oracle/apps/ap/payments/psr/webui/PsrPG
    This is a form in 11i but in R12 it is OAF page.

    Hi,
    As per my understanding, you have to extend your controller class:
    1) Set PPR event on tab/field
    2) Catch the PPR event in PFR method.
    3) Get handle to AM and then VO and set attributes of the VO of 2nd tab.
    --Sushant                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to set the values to a field?

    I have created a page which is used to create the records by using "Add Another Row" button.
    If i click on "Add Another Row",a blank row will be created.
    The requirement is,after clicking the "Add Another Row" , a default value should be set to one of the fields of the blank row.
    Can anybody help me !!!!.
    Thanks,
    Srinivas

    In processFormRequest write the below code
    if("addRows".equals(eventName) && "<AdvancedTabldID>".equals(pageContext.getParameter("source"))){
    am.invokeMethod("populateValues");
    In AMImpl write the below code:
    public void populateValues(){
    XyzVOImpl vo = getXyzVO();
    XyzVORowImpl row = (XyzVORowImpl ) vo.first();
    while ( row != null )
    if( identify the new ly added row here using some unique id or someother condition etc..)
    row.setFieldxyzvalue("set the value here");
    row = (XyzVORowImpl ) vo.next();
    }

Maybe you are looking for

  • Acrobat Plug In Container Crashes After Update to Acrobat Pro 10.1.3

    After the 10.1.3 update was applied to Acrobat Pro X for Windows (on Windows 7 64-bit), the Acrobat Plug-In for Firefox crashes intermittently.  A dialog box will appear within the Firefox environment reporting the crash.  Firefox continues running w

  • Just stopped booting!

    my system, as listed in my sig (the athlon 64 one) started having problems a little while ago after running stable for weeks if not months.  It started witha "disk read error" when it tried to boot from teh hard drives.  Now i can only occasionaly ge

  • SQL query validation with XML?

    Hi Is there anything out there that will validate an SQL statement (validate meaning the SQL statement 'will run') using XML? I want to make a servlet that takes SQL and adds it to a java class that will in turn do a bunch of magical things. However

  • Want to see the stock of different variants with same configurable material

    I have the stock for configurable material with different variants. Now I can see the cumulative stock for that configurable material. But my requirement is that I want to see the stock for every variant belonging to the configurable material.       

  • Standalone transactional program using J2See1.3...IllegalStateException.

    Greetings ! I'm using the reference implementation. After getting the TransactionManager and Transaction object, I'm enlisting an XAResource....SonicMQ XAResource object in this case ( even though the idea is to try out 2-phase commit , me just tryin