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>.

Similar Messages

  • 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

  • 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 access the value of application item in javascript

    How to access the value of application item in javascript?

    Hi,
    One way
    var myVariable = '&MY_APP_ITEM.';Br,Jari

  • How to Access the value(Ex: Delivery no) From Web to R/3 side.

    How to Access the value(Ex: Delivery no) From Web to R/3 side.
    Any sample code please suggest.
    sai

    Hi,
    Try RSA3.
    Extract Checker
    /people/sajeed.ms/blog/2006/02/12/extract-checker
    Thanks,
    JituK

  • How to access the value of fiedl ( select list with redirect )

    WE created one report and form. When i click in the edit button of the report
    for the specific record ; the system go automatically in the form
    and show me all the information. In my form ia have some fields ( select list with redirect ) in this way i store the key but i can see the description.
    I want to control the delete operation in checking the value of some field
    in my form. How can i do that. When i verfy the content with SESSION
    my variable are empty
    Thanks
    Marc Fortin

    Hello Larry,
    You can use a select list with submit and create a branch to the page you want to go to.
    Hope that helps.
    Regards,
    Dimitri
    http://dgielis.blogspot.com/
    http://www.apex-evangelists.com/
    http://www.apexblogs.info/

  • 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 the editorDataField="value" to the actionscript file

    Hi ,
    I have a itemRenderer component(button) in the datagrid ,I am
    catching the label of the button (when changed )using the property
    in the <dataGridColumn> tag .
    My tag looks like this
    <mx:DataGridColumn headerText="ABC" dataField="COL1"
    rendererIsEditor="true" editorDataField="value"
    itemRenderer="renderer.buttonRenderer" editable="false"/>
    I need to access the value of the editorDataField in to my
    actionscript file ,
    Can any one please help me
    thanks
    Nash

    Hi,
    if it is the current row, use this.getCurrentRow().getAttr() where the attribute can be identified by the index or a String (its name). If you need to access aspecific non-current row, use getRowAtRangeIndex(int index)
    See: http://www.oracle.com/webapps/online-help/jdeveloper/10.1.2/state/content/navId.4/navSetId._/vtTopicFile.bc4jjavadoc%7Crt%7Coracle%7Cjbo%7Cserver%7CViewObjectImpl~html/
    Frank

  • 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 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 access the value of a dynamic checkboxes

    Hello,
    I have a userform with a dynamic set of checkboxes. 
    Set chkBox = Me.Controls.Add("Forms.Checkbox.1", "Checkbox_" & counter & "_" & i)
    I'm giving the name of each checkbox multiple parts because there will be multiple rows of checkboxes.
    How can I know if checkbox_1_1 is checked or not?
    I have tried
    For Each cont In Me.Controls
    If cont.Name = strCtrlName Then
    'cont.Value doesn't exist
    End If
    Next cont
    The value property is not showing up.
    Thank you for any help

    Maybe you've got your strCtrlName wrong, this worked for me
    Private Sub UserForm_Initialize()
    Dim i As Long
    Dim counter As Long
    counter = 5
    Dim chkBox As MSForms.CheckBox
    For i = 1 To 3
    Set chkBox = Me.Controls.Add("Forms.Checkbox.1", "Checkbox_" & counter & "_" & i)
    chkBox.Left = 9
    chkBox.Top = i * 20
    chkBox.Caption = chkBox.Name
    Next
    End Sub
    Private Sub UserForm_Click()
    Dim i As Long
    Dim counter As Long
    counter = 5
    Dim chkBox As MSForms.CheckBox
    For i = 1 To 3
    Set chkBox = Me.Controls("Checkbox_" & counter & "_" & i)
    s = s & i & "=" & chkBox.Value & " "
    Next
    Me.Caption = s
    End Sub
    Paste the above into an empty userform and run it. Tick a couple of checkboxes and click the form.
    Maybe look into WithEvents in a class module to trap and act on checkbox changes in real time.

  • 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();
    }

  • How to check the length of a field symbol value

    hi all,
    i have a problem with string function, i have assined  table fields to  a field symbol in a loop i want check the length of the assigned fields symbol value  in every loop . i have written like ,,,,,len = strlen( <fs>). then i am getting the length of the field label what i ahve assigned to fiels symbol not the field value lenght ,
    please advise me on this,
    thanks,
    sre

    I think you're on the right track.  This should work:
    data: len type i.
    data: begin of itab OCCURS 1,
            a type string value '1',
            b type string value '12',
            c type string value '123',
          end of itab.
    FIELD-SYMBOLS: <fs> type ANY.
    do 3 times.
      assign component sy-index of STRUCTURE itab to <fs>.
      len = strlen( <fs> ).
    enddo.

  • Urgent: How to get the Value of Search Field

    Hello All,
    I want to get the value of <b>'Search Fiel</b>d' in my HTML file.
    Please help with this.
    Regards
    Vaib

    Hi Vaibav,
    It should be under the Script tag.
    You can refer this link for details.
    http://help.sap.com/saphelp_nw04/helpdata/en/d0/55074155bcf26fe10000000a1550b0/frameset.htm
    Please reward points if my suggestion helped you.
    Thanks and regards
    Deepa

Maybe you are looking for

  • Save As Image fails with PDF files

    Using Acrobat X Pro, version 10.1.7. After the most recent update, I can no longer crop a PDF file and save it in any image format. The options are there, but when I select File > Save As > Image > PNG (or JPG or any other image format) and enter the

  • TS3999 should all my calendars entries be in the cloud?  trying to share calendars between 2 iphones and ipad

    I have 2 iphones and an ipad.  On one of the iphones the calendar entries and not showing up on anything else.  I have checked all the settings and everything looks good - been a headache trying to figure out what is not set up correctly.  I had this

  • J2EE 13 : what kind of application server?

    Hi, I m using j2ee 1.3 but i m wondering what kind of application server does it use it? I asume it is the j2ee application server... Is there a plugin for eclipse that works with this AS(application server); I ve installed Lomboz but AS JBoss is sup

  • Passing Multiple Tax classification in LSMW BAPI method

    Dear All, Iam using LSMW BAPI method to create and change material master. I need to pass multiple tax classification values for a single material. How can I do this. The structure used in the BAPI for passing the tax classification data is MLAN. How

  • Two reports combined in one Go URL

    Hi All, Can I include two reports in one Go URL? If so, Can you please tell me the syntax? Thanks in advance.