Using table field name as a variable

Hi ,
Is it possible to map some values to a field in a Ztable , if I have the field name of the Ztable in a variable.
For ex:
I have a ZTABLE -- which has some fields - ZF1 and ZF2.
In my code, I determine the field in which I want to put data at runtime. For ex, in my code i determine at runtime I want to update field ZF2 , but I have this field name in a variable <V_FIELDNAME>
So, Is it possible to do something as:
<V_FIELDNAME> = ZF2.
ZTABLE-<V_FIELDNAME>    =    <VARIABLE -SOME VALUE>.
and this value should actually maps to ZTABLE-ZF2.
If it is possible , how to do it ?
Thanks-

Hi Tamas,
Thanks a lot for ur post ! it did certainly help. However, I need some more help.
Here is what I need -
I will have a string coming up from an interface which would be something like : Val1;Val2;Val3
And in SAP R/3 I have a variable maintained as : Field1;Field2;Field3
Field1 Field2 and Field3 are fields of a ZTABLE.
So , at runtime, using the variable I have to determine which Value goes to which field and then insert this field in ZTABLE.
So, ultimately , code should perform the following actions:
ZTABLE-FIELD1 = Val1
ZTABLE-FIELD2 = Val2
ZTABLE-FIELD3 = Val3
Insert ZTABLE.
Going by code you provided, I can assign individual values, But then ultimately I need to map it to a structure which can be used to insert in a DB table. How can I do this?
Thanks-

Similar Messages

  • Table field name

    Hi
    Good afternoon to all ,
    can any one tell me the table fields name for
    1. bill amount : ?
    2. tds : ?
    3>passed amount : ?
    transaction use is mir7 .
    Regards
    Rakesh kumar singh

    Use transaction ST05 and run an SQL trace when running this transaction.
    It is what I would do if I needed to know this information, instead of coming on here and getting someone else to tell me.

  • Get Table fields name for an SAP table

    hi,
    i need to pass SAP table name as a parameter to the selection screen of a Report program.
    This prog shud give me the table Fields name along with type and length.
    Is there any standard SAP report program for the same or i have to write my own logic?
    Please advise.
    regards,
    ags.

    Hi,
    For your requirement you have to write own program in dynamic manner by using field symbol concept.
    Use this FM DDIF_FIELDINFO_GET and get the field information of database table.
      call function 'DDIF_FIELDINFO_GET'
        exporting
          tabname        = <master>    u201C Table name
        Tables   
          DFIES_TAB      = <table_field> u201C here you will get field information of table
        exceptions
          not_found      = 1
          internal_error = 2
          others         = 3.
      if sy-subrc <> 0.
        message  text-005 type 'E' .
      endif.
    Loop <table_field> assignigng <field>
    *---here you have to collect the relevant information that you are going to display in your output.
    Endloop.
    Use any one of ALV or OOALV and display your records.
    Regards,
    Peranandam

  • How to get the database table field names from program

    Hi,
    Can any one tell me,whether any function module is there which can get the table field name and its details ,when we pass database table name to it.
    Thanks in Advance
    <REMOVED BY MODERATOR>
    Regards
    Shibin
    Edited by: Alvaro Tejada Galindo on Feb 14, 2008 12:41 PM

    Hi,
    DD02L Table contains the SAP Tables.
    DD02T Table contains the SAP Table Texts.
    DD01L Table contains the Domains
    DD01T Table contains the Domain Texts.
    DD03L Table contains the Table Fields.
    DD03T Table contains the Table Field Texts. (Language Dependent)
    DD04L Table contains the Data Elements.
    DD04T Table contains the Data Element Texts.
    DD05s Table contains the Foreign Key Fields
    last words with L and T only. L->Database Fetch T-> Text
    For ur question use table DD03L or DD03T.
    Regards,
    Chandru

  • TABLE-FIELD NAME FOR AGENT (SALES ORDER)

    HI
    I am making despatch report agent wise .
    Can any one tell me the table-field name for agent it is used in saleorder
    t.code va01 .
    Regards
    Rakesh Kumar Singh

    Whereever you can see that Input Field for Agent..Click F1, click Technical Information..You can see the Table and Data Element and Field Name..
    Incase it is a structure, click on the data element..click Where Used List..You will get a list of tables.

  • Authorization object to display table field names in english text in SE17

    Hi,
    One of users have issues with the filed name getting displayed in technical format instead of english text while browsing table information in SE17. Normally we can set this in through Settings->User Parameters. But here for this user, user parameter option is greyed out and he doesn't have access to SE16.
    Is there any other way to change user specific parameters, instead of granting him accesss to SE16 or enabling user parameters in SE17?
    Thanks,
    Mano

    Hi,
    I made him run SU53 on SE17 transaction the log is showing that authorization check failed for S_ALV_LAYO with value 23.
    Actually i have access SE16 and for me also, user parameter option is greyed out in SE17. I ran SU53 on SE17 in my session i also got same log.
    One more observation is, the user's colleague also doesn't have access to SE16 and user parameter option is greyed out in SE17 but he can view the table field names in english. So we are wondering if some authorization object is missing here.
    We do not want user to make any changes through GUI.
    Thanks,
    Mano.

  • Table & Field Name for Plan Data in CO

    Hi All,
    Can anyone tell me the table & field name where we can get the planned data in Cost Center Accounting and Profit Center Accounting.
    I checked out the COSP(which is Totals) and COEP tables for CCA but i could find the fields only for actual data and not planned data.
    Same for PCA...i checked out the GLPCT & GLPCA tables but in vain.
    Regards & Thanks
    Piyush Kothari.

    Hi,
    Thanks for the reply but COKL is only for Activity Type which contains Allocation Cost Elements.
    I would like to have the Table & Field name for Plan data of Primary Cost Element.
    Piyush

  • What  balance value  in sales order  and iwant to know table field name in

    where the balance value come in sales order i want make sales order report in which i want to add this filed how we add it  and tell me table field name of balance vlue and how we give it in FS please help me in this my report are left without it please give me solution

    Hello
    where the balance value come in sales order
    Please note that when you raise your question at SDN forum, your question needs to be clear...
    What do you mean by BALANCE VALUE ????
    Regards,
    Sarthak

  • Table & field name related to credit

    Hi experts,
    Are the tables/field names below are correct?
    If yes, what reasons would be for the field of sales value shows zero in SE16 while the field shows correct amount in FD33?
    If not, pls provide the correct table & field name for credit exposure & sales value. Thx.
    Table KNKK - SKFOR = credit exposure
    Table KNKK - SAUFT = Sales value.

    Hi
    You are looking the right table
    However field KNKK - SAUFT = Sales value, displays the Total of all order values which have not been transferred to FI, but which are taken into consideration when checking the credit limit.
    You can check following fields
    Table KNKK - KLIMK = Credit LIMIT
    Table KNKK - SKFOR = Credit Exposure (i.e Total Receivables)
    Check for the values appearing against  Receivables field (skfor) on the customer credit management : status page (FD33).
    Regards
    Tejpal

  • Is it possible to use internal table field name as variable?

    data : temp_string(10) type c.
    data : result type string.
    temp_string = 'field1'.
    loop at itab1 into str1.
      result =  str1-temp_string. "error here"
    endloop.
    HI.
    think this code not executable and actually fail to compile.
    is it possible to put structure field name with variable?
    anyone can help me ? please
    thank you.
    Regards
    Bae

    You may use of COMPONENT of your structure.
    FIELD-SYMBOLS: <F>.
    ASSIGN COMPONENT I OF STRUCTURE F TO <F>.
    To find index of component you may use
    DESCRIBE FIELD f INTO td.
    (But SAP beware us)
    Regards

  • Tables & field names used in PS?

    Hi ALL
    I need all the Tables and fields names that are used in PS.If anyone provide it then it will be of great help.
    Thanks in advance

    Hi,
    refer below link
    https://forums.sdn.sap.com/click.jspa?searchID=26790042&messageID=7548930
    Regards,
    Sandeep

  • Problem using alias field names in a sql query

    Hello,
    I have a question regarding a simple Oracle database SQL query writeup:
    In the following (badly written but properly working) SQL query:
    Query 1:
    select
    soe.field1,
    (soe.field2 + soe.field3) as field4,
    (soe.field5 - (soe.field2 + soe.field3)) as field6,
    (select comp.parValue*soe.field7
    from
    CompTable comp) as parValue,
    (select soe.field8 - (comp.parValue*soe.field7+ soe.field9)
    from
    CompTable comp) as field10
    from
    SomeTable soe
    PROBLEM 1:
    I am re writing the code (soe.field2 + soe.field3) to get the alias field4 or column name field4 that I have created on the fly in the previously for use with the following fields. Can't I rewrite the query as follows. There is something simple missing!
    Query 2:
    select
    soe.field1,
    (soe.field2 + soe.field3) as field4,
    soe.field5 - field4 as field6, <<< field4 does not work here
    (select
    comp.parValue*soe.field7
    from
    CompTable comp) as parValue,
    (select
    soe.field8 - (comp.parValue*soe.field7+ soe.field9)
    from
    CompTable comp) as field10
    from
    SomeTable soe
    PROBLEM 2:
    Similar to the above problem, I was thinking to get a field parValue out of the CompTable table and re-use many times rather than the code shown in Query 1:
    Query 3:
    select
    soe.field1,
    (soe.field2 + soe.field3) as field4,
    soe.field5 - field4 as field6,
    soe.field7* (select comp.parValue from CompTable comp) as parValue1,
    soe.field8 - (parValue1*soe.field7+ soe.field9) as field10      <<<< parvalue1 does not work here
    parValue1*soe.field9 as TaxCondition               <<<< parvalue1 does not work here
    from
    SomeTable soe
    See that the query becomes so simple, but the above query does not work. There is something fundamentally wrong in my usage of the alias field names in creating other fields. The Query1 seems to be the only working option but its very slow as I am redoing and re-writing the whole code again and again to get the parValue field out of the CompTable table for use to create many other fields.
    I will appreciate if you can guide me in the right direction on this issue.
    Thanks and Regards
    Rama

    SELECT tmp.contract_no, tmp.Actual, tmp.Actual - tmp.NbHours
    FROM ( SELECT t.contract_no, sum(l.hrs) AS Actual, (c.labour_hours * c.labour_progress_per) / 100 AS NbHours
    FROM TASK_DELEGATION t
    INNER JOIN COST_CODE c
    ON t.cost_code = c.cost_code AND t.contract_no = c.contract_no AND t.is_inactive=0
    INNER JOIN Labour.dbo.LABOURALLOT l
    ON l.contractNo = c.contract_no AND l.costcode = c.cost_code AND l.pm = 'N'
    GROUP BY t.contract_no, c.labour_hours, c.labour_progress_per
    ) tmp

  • Php select using column Field names ?

    Hello,
    I need some advice using this select
    usually I do this
    $query = "SELECT * FROM table WHERE title LIKE 'body'";
    it works, is fast and no problems.
    But now I've a big table [id, ..., ...] and need to select just the row starting with body, so I use body%
    question is
    How can I select records using the Field property of the MySql table? (Field, Type, Collation, Attributes,...)
    I want something like
    $query = "SELECT * FROM table WHERE FIELD LIKE 'body_%'";
    Thanks
    Pluda

    ExPluda wrote:
     ok, I know the name of my table, but don´t know the name of the fields, or I know them, but need this to be dinamic, so what i´m trying is to select all content from table 'body' where FIELD name like ´body%'
    I understand what you're trying to do (or at least I think I do). The answer is simple. You can't do it.
    Why not? Because it's nonsense. If you know the name of the table, you know the names of the fields (columns). Moreover, the WHERE clause is used for checking values in fields, not for checking field (column) names.
    What you're actually trying to do is probably this:
    SELECT [field_name] FROM body.
    By the way, this sort of question should really be posted in the Application Development forum.

  • Re: Table & Field Name

    Dear All,
    Pls suggest a table name & field name to find out customer debit balance
    Awaiting for ur valuable inputs.
    Regards
    Pavani

    There is only one table that will give you this.
    it is KNC1.
    It give you the total debits, credits and balance per customer per period.
    Please award points if this is useful.

  • Required ATP Table field name

    Hello Gurus,
    As per my client requirement, durig the time of internet sales, The customer (user) while ordering for a material there should be a field where in customer can view the available quantity for that particular material.
    I ve checked in MD04 and i got the structure MDEZ [field MNG04]. But i want to know whether i can fetch data from this field or is there any other table/field where i can get the GATP quantities for the particular material. Anybody please provide the exact Table and field name.......
    Thanks in advance....
    Edited by: Praveen on Jan 7, 2009 5:59 AM
    Edited by: Praveen on Jan 7, 2009 9:35 AM
    Edited by: Praveen on Jan 7, 2009 9:52 AM

    Dear Praveen
    In Table MDTB,  you can see fields like
    -  MNG01:::Recd / Req.quantity
    -  MNG02:::Scrap
    -  MNG03:::Shortage Quantity
    You can make use of these fields according to your requirement.
    thanks
    G. Lakshmipathi

Maybe you are looking for