Populate values in data tab

Hi, I have a table type: Ztable_type which has structure of Ztable_type_struct.
Ztable_type_struct has two fields:
fieldname  type syuname
range_table type data. (this is table)
how could I insert data into this table type.
any snippets of code is appreciated.

Hi Bijay ,
I think you are talking about Nested internal tables....
First enter data into the table  range_table  i.e. append some records into that table..
then add record in the table Ztable_type .
this is the way you enter records..
Below is  sample example of nested internal table...It will help you to solve your problem...
TYPE-POOLS icon.
*Declaring Variables.
DATA :
   w_counter TYPE i VALUE 1.                             "Counter.
*Declaring Structure.
DATA :
   BEGIN OF fs_subject,
     subject(15) TYPE c,
     marks       TYPE i,
   END OF fs_subject,
   BEGIN OF fs_student,
     student_id  TYPE i,
     student_name(10) TYPE c,
     subjectall LIKE TABLE OF fs_subject,          " Nested table
   END OF fs_student.
*Creating Internal Table.
DATA :
  t_subject  LIKE STANDARD TABLE OF fs_subject,
  t_student  LIKE STANDARD TABLE OF fs_student.
*Inserting Records in nested Internal Table.
fs_subject-subject = 'HINDI'.
fs_subject-marks = '55'.
APPEND fs_subject TO t_subject.
fs_subject-subject              = 'English'.
fs_subject-marks                   = '65'.
APPEND fs_subject TO t_subject.
fs_subject-subject              = 'Mathematics'.
fs_subject-marks  = '80'.
APPEND fs_subject TO t_subject.
fs_subject-subject           = 'Physics'.
fs_subject-marks  = '60'.
APPEND fs_subject TO t_subject.
fs_subject-subject             = 'Chemistry'.
fs_subject-marks  = '72'.
APPEND fs_subject TO t_subject.
*Inserting Records in outer Internal Table.
fs_student-student_id           = '0001'.
fs_student-student_name         = 'RAVI'.
fs_student-subjectall           = t_subject.
APPEND fs_student TO t_student.
*Inserting Records in nested Internal Table.
CLEAR fs_student.
fs_subject-subject              = 'Hindi'.
fs_subject-marks  = '30'.
APPEND fs_subject TO t_subject.
fs_subject-subject              = 'English'.
fs_subject-marks  = '39'.
APPEND fs_subject TO t_subject.
fs_subject-subject              = 'Mathematics'.
fs_subject-marks  = '69'.
APPEND fs_subject TO t_subject.
fs_subject-subject              = 'Physics'.
fs_subject-marks  = '35'.
APPEND fs_subject TO t_subject.
fs_subject-subject              = 'Chemistry'.
fs_subject-marks  = '56'.
APPEND fs_subject TO t_subject.
*Inserting Records in outer Internal Table.
fs_student-student_id           = '0002'.
fs_student-student_name         = 'RADHA'.
fs_student-subjectall           = t_subject.
APPEND fs_student TO t_student.
*Inserting Records in nested Internal Table.
CLEAR fs_student.
fs_subject-subject              = 'Hindi'.
fs_subject-marks  = '78'.
APPEND fs_subject TO t_subject.
fs_subject-subject              = 'English'.
fs_subject-marks  = '84'.
APPEND fs_subject TO t_subject.
fs_subject-subject              = 'Mathematics'.
fs_subject-marks  = '99'.
APPEND fs_subject TO t_subject.
fs_subject-subject              = 'Physics'.
fs_subject-marks   = '89'.
APPEND fs_subject TO t_subject.
fs_subject-subject              = 'Chemistry'.
fs_subject-marks   = '90'.
APPEND fs_subject TO t_subject.
*Inserting Records in outer Internal Table.
fs_student-student_id           = '0003'.
fs_student-student_name         = 'RAMA'.
fs_student-subjectall           = t_subject.
APPEND fs_student TO t_student.
*Inserting Records in nested Internal Table.
CLEAR fs_student.
fs_subject-subject              = 'Hindi'.
fs_subject-marks  = '45'.
APPEND fs_subject TO t_subject.
fs_subject-subject              = 'English'.
fs_subject-marks  = '39'.
APPEND fs_subject TO t_subject.
fs_subject-subject              = 'Mathematics'.
fs_subject-marks   = '38'.
APPEND fs_subject TO t_subject.
fs_subject-subject              = 'Physics'.
fs_subject-marks   = '53'.
APPEND fs_subject TO t_subject.
fs_subject-subject              = 'Chemistry'.
fs_subject-marks  = '67'.
APPEND fs_subject TO t_subject.
*Inserting Records in outer Internal Table.
fs_student-student_id           = '0004'.
fs_student-student_name         = 'RAJESH'.
fs_student-subjectall           = t_subject.
APPEND fs_student TO t_student.
*Displying Records.
LOOP AT t_student INTO fs_student.
  WRITE :/ fs_student-student_id,
           fs_student-student_name.
  DO 5 TIMES.
    READ TABLE fs_student-subjectall INDEX w_counter INTO fs_subject.
    WRITE : 50 fs_subject-subject,
            80 fs_subject-marks.
    IF fs_subject-marks < 40.
      WRITE icon_led_red AS ICON .
    ELSE.
      WRITE icon_led_green AS ICON .
    ENDIF.                                        "IF fs_subject-marks
    WRITE :/.
    w_counter = w_counter + 1.
  ENDDO.
ENDLOOP.                                          "LOOP AT t_student
Best regards,
Brijesh

Similar Messages

  • VA01 creation of new feild in Additional data tab B and populating values

    Hi All ,
           I had created  a new field zzordqty in VA01 item level -> additional Data  Tab B  SE51 -> SAPMV45A-> 8459.
          The values while creating a sales order are coming from Inbound FM Idoc_input_orders .  for this particular field the value is stored in segment E1EDP35 when QUALZ is 011 the value of CUSADD is to be shown of the screen of VA01.
          For this I had tried to create a enhancement point in FM Idoc_input_orders , and tried to capture the value of CUSADD into XVAP-ZZORDQTY .
           But as soon as i come out of the enhancment point the value of XVBAP-ZZORDQTY BECOMES 0 .
           And at the screen level of SAPMV45A i had created a PBO and transfered the values from XVBAP TO VBAP .
            But since the values are getting cleared , the value of zzordqty is zero and also niether it s getting updated at table level .
            I request to let me know , how should i proceed further , either to use exists or badi's
    Thanks & Regards,
    Kavitha

    hi,
    you can do it in include MV45AOZZ. the method should be for module in PBO of subscreen 8459.
    and ifyou are not able to pass it to any standard structures( like xvap, or vbap or some thing like that) you can export it from PBO or PAI module) and catch it in the save exits (user exits)
    Edited by: Soumyaprakash Mishra on Oct 2, 2009 11:08 AM

  • Grouping field value in the additional data tab is saved with capital lette

    Hi,
    Whenever I change the value in the 'Grouping field' in the additional data tab, it gets saved with all letter caps.
    For e.g, if i enter 'Manager'.. it gets saved as 'MANAGER'.
    what could be the reason for this? Is there any configuration for this?
    Regards,
    Simmi

    Hi Simmi,
    For Grouping and Search Field, this seems to be the standard system behaviour in cProjects and as per my knowledge there are no settings for the same.
    Probably you can raise an OSS message regarding the same.
    Regards,
    Vivek Pandey

  • In debuging "Smart Data" tab don't show value

    Hello Exparts,
    SQL Developer version 4.0 Build MAIN-13.80
    when i run my code in debuging for example procedure, Smart Data tab don't show the value. But Data tab show value.
    In earlier version it's working fine.
    Looking for your inputs.
    Ask2Learn.

    Thanks Jeff, for your reply.
    so, its a BUG. ?
    So, we will get it working in next build, soon. Its very useful.
    Thanks again.

  • How to populate values in List Box in Adobe form

    Hi,
    How to populate values in List box in adobe forms?
    Thanks
    RB

    if you want to display a fixed values in the dropdown you can use list box ui and can specify values there
    or if u want to display values from the context node of the webdynpro
    1. Drag and drop a Value Help Drop-down List element from the Web Dynpro Library tab to the Body Pages pane.
    2. Drag and drop your node from the Data View tab onto it. This action binds the layout element to the corresponding node.
    with regards
    shanto aloor

  • How is calculated SC current quantity in item basic data tab ?

    Hello,
    We work on a SRM 7 release with PPS.
    As it is not possible in Extended Classic Scenario to use local contracts (that is not replicated into ECC backend) as sources of supply for "Limit" item Shopping Cart creation, we create "Free text" (Description) SC item.
    For this kind of SC item, according to a specific and dedicated UoM, SC quantity is given as mandatory to be '1'. Then, users populate price. So, in this way, we have an "Amount" SC item being equivalent to standard "Limit" SC item.
    Then, at corresponding PO item creation, SC item quantity ('1') is populated into PO item gross price and SC item gross price is populated into quantity PO item in order to be able to confirm in "quantity" our PO.
    This process is OK.
    Nevertheless, we have two sides effect after PO is generated :
    1- Field "Current quantity" (not sure with the name - i do not have SRM system in front of me)  for SC item basic data tab seems to be populated with value being difference between SC item quantity and PO item quantity.
    For example, if SC item quantity is '1' and PO item quantity is  '20.000' in SC item basic data, order quantity is '1' and ordered quantity is '20.000' with is normal. But "Current quantity" (below "Ordered quantity") is '19.999-' instead of '0'.
    2- After a first confirmation created based on SC (not on PO, this is important), SC POWL button "Create confirmation" is greyed out. This seems to be normal behavior as PO item quantity confirmed first time can not be lower than 1, this confirmed quantity is greater than SC item quantity. So, there is no SC outsanding quantity...
    Our two problems should be linked: this is due to how "Current quantity" for SC is calculated.
    As our customer users do not have access to PO POWL, we can not use create Confirmation transaction in order to use PO as reference document to create confirmations.
    In a technical point of view, field concerned is PS_SC_OUT_QUAN (not sure with this name...) for context ITEM_BASIC_DATA from view V_DODCSC_I_BD (WDC /SAPSRM/WDC_DODC_SC_I_BD ).
    I found enhancement for this field ( /SAPPSRM/WD_SC_I_BD_QUAN ) but this enhancement has no method !
    I tried to debug some methods from Class /SAPSRM/CL_CH_WD_SET_FACADE, but i did not find yet where calculation is done for concerned field.
    My aim is to make an enhancement to overwrite standard calculation.
    An easier way should be to reverse gross price and quantity directly inside SC (to not have difference betwen SC and PO quantities), but our customer does not want.
    Do you have any idea ?
    Regards.
    Laurent.

    Hello,
    We used a workaround to answer to our customer's requirement.
    We ceated two customer fields, one for net price and a second one for the quantity. Using metadata, we hid the two corresponding standard fields and displayed our CUF in SC.
    Using BadI Change for SC, we populated standard fields with our CUF values (after having made inversion between quantity / net price).
    Checks are done in BAdI to be sure our quantity CUF and price unit values are '1'.  
    As we use SC to create only PO as follow-on document, no other modifications are necessary.
    Regards.
    Laurent.

  • Sequence: possible to use sequence in "Data" tab

    Hello,
    I have one question concerning the "Data" tab in Developer which makes it possible to enter rows like in an excel sheet.
    Is it possible to use a sequence in a direct way here? Entering "<sequence_name>".nextval or ""<sequence_name>".currval" just puts the string like "s.nextval" or "s.currval" in a varchar2-field.
    Trying to put "s.nextval" in a number-field results in ORA-01722 which means invalid number.
    Would be very helpful when there is a way to do this?
    Thanks a lot in advance for answers how I can achieve this.
    Regards
    Firefighter

    SQL Developer has a small utility that does what Jim describes. Select Tables, right -click to invoke the context menu, then select Trigger -> Create (PK from SEQUENCE). The context menu title is misleading in a sense that you might want to populate any column and you can, but in general this can be used to populate the PK with the next value in a sequence. (Assuming you have created the sequence)
    Sue

  • Unable to update a field using the Data tab on a VIEW

    When viewing data using a VIEW instead of going to the table directly, am unable to change the values in any of the fields
    When I click on the list of VIEWs for a schema, then select a view that is based on a SELECT statement for a single table with a Primary key, and then click on the DATA tab to modify the value in one of the fields, SQL Developer does not allow me to change the value.
    Went into SQL Plus, and was able to execute an UPDATE statement against the same row of that VIEW, and update that field ("UPDATE vw_mytable SET thisfield = 'YES' WHEN row_id_number = 1'").
    Does SQL Developer not allow updating tables through a VIEW?
    Will it allow updating in the future? Please say yes.
    Oracle 10g DB and latest version of SQL Developer.

    Remember to add feature requests and vote on them on the SQL Developer Exchange!
    <br>
    <p>We have added updateable views to 1.1, but do remember, not all views are updateable - even in SQL*Plus.</p>
    <br>
    Sue

  • Bug in 1.5.1 Deleting number value in data grid

    Hello,
    it is not possible to set a number in a column to NULL by simply deleting the value
    DROP TABLE tab_test;
    CREATE TABLE tab_test(
    dat DATE
    ,num NUMBER
    ,var VARCHAR2(2)
    INSERT INTO tab_test (dat,num,var)
    VALUES (TO_DATE('01.01.2009','dd.mm.yyyy'),4,'ff');
    COMMIT;Open the table in SQL Developer and select data tab.
    Deleting the date value and commiting is ok
    UPDATE "RVS_FE"."TAB_TEST" SET DAT = TO_DATE('', 'DD.MM.YYYY') WHERE ROWID = 'AAA6Q0AAGAABHUlAAA' AND ORA_ROWSCN = '10443975276'
    Commit Successful
    Deleting the number value and commiting raises an error
    UPDATE "RVS_FE"."TAB_TEST" SET NUM =  WHERE ROWID = 'AAA6Q0AAGAABHUlAAA' AND ORA_ROWSCN = '10443975285'
    One error saving changes to table "RVS_FE"."TAB_TEST":
    Row 1: ORA-00932: inconsistent datatypes: expected NUMBER got DATE
    Rollback Successful
    Deleting the char value and commiting is ok
    UPDATE "RVS_FE"."TAB_TEST" SET VAR =  WHERE ROWID = 'AAA6Q0AAGAABHUlAAA' AND ORA_ROWSCN = '10443975285'
    Commit Successful
    Regards
    Marcus
    Edited by: Marwim on 26.11.2008 08:59

    Jim, I could reproduce and see the error, no change columns order.
    You can use the Marwim script's and, on the data grid, select the column DATE, delete value and commit.
    On the data grid, select the column var, delete value and commit.
    On the data grid, select the column num, delete value and commit -> get error.

  • Mandatory field in sales order additional data tab

    Hi,
    I have added an extra field in additional data tab of sales order. 
    How can i make this field as mandatory for certain sales organisations ?
    TIA

    since it's conditional, I think I would add code in SAVE_DOCUMENT_PREPARE subroutine in MV45AFZZ, based on transaction code, prior values (YVBAP) and current values (XVBAP), and issue an error message, allowing user to return to the screens displaying Item table control, when the field is not properly populated.

  • How to populate values in to dropdown in table ui element

    Hi,
    according to my scenario  i have atable with five records ...andi have acolumn name DATE and  it contains 5 dropdowns with some values i.e dates from jan 1 2008-dec 31 2008.user needs to select only those values which are in dropdown. can u tell me the code to populate values in to dropdown in table UI element.
    Thanks
    Raju

    Hi,
    you can go for two drop downs like DropDown by Key or Drop Down by Index as per requirment.
    Create context Node for the table UI, in that one will be for ur drop down. Create element for the Context node and add thses to the conetxt.
    Code example for DropDownBy Key:-
    ISimpleType simpleType =               wdContext     .nodeProjEstiTable().getNodeInfo()
         .getAttribute("projphasname")               .getModifiableSimpleType();
    IModifiableSimpleValueSet svs1 =
    simpleType.getSVServices().getModifiableSimpleValueSet();
    svs1.clear();
    for (int j = 0; j < projphasname.length; j++) {
         svs1.put(projphasname[j][1], projphasname[j][1]);
    for DropDownBy Index you can work in normal way means try to create element for the respective context attribute.
    Hope this may help you...
    Deepak

  • How to populate value node with values?

    Hi Experts,
    I have created a new view with a vlaue node of table type.
    How can I populate values into the value node?
    Which method will be useful?
    Is there any material for Web UI Programing?
    Please help me in this.
    Thanks,
    Adi.

    Hi Adi
    If ZVal is your value node then,
      DATA: lref_entity    TYPE REF TO cl_bsp_wd_value_node,
            lref_bo_coll   TYPE REF TO if_bol_bo_col,
            lref_data TYPE REF TO <<your ZStructure>>,
             ls_data type <<your ZStructure>>.
    ls_data-<<field1>> = 'XYZ'
    ls_data-<<field2>> = 'XYZ'
         CREATE OBJECT lref_bo_coll TYPE cl_crm_bol_bo_col.
          CREATE DATA lref_data.
          CREATE OBJECT lref_entity
            EXPORTING
              iv_data_ref = lref_data.
          lref_entity->set_properties( ls_data ).
          lref_bo_coll->add( lref_entity ).
          typed_context->ZVal->set_collection( lref_bo_coll ).
    Hope this was helpful.
    Best Regards,
    Lakshminarayana

  • How to pass variable to data tab which replace text in Word attachment

    Dear ABAP folks,
    I use METHOD cl_gui_frontend_services=>gui_upload to upload my word doc in BINARY and sucessful sent this word doc as attachment with Thomas Jung's FUNCTION 'Z_E_KEG_SEND_SIMPLE_EMAIL'.
    However, inside the word file, i need insert varible personnel number p0000-pernr.
    *How to pass the value p0000-pernr to data tab (lt_data) which replace symbol text &s_pernr& in doc before created as attachment ? *
    I try 'SCMS_BINARY_TO_TEXT'  and 'SCMS_BINARY_TO_STRING'    but fail.
    Need expert 's help.
    Thanks & Rgds,
    Felice
    Below are my code:
    ** Upload file to read data as binary
        CALL METHOD cl_gui_frontend_services=>gui_upload
    IF lt_data[] IS NOT INITIAL.
        CALL FUNCTION 'SO_SPLIT_FILE_AND_PATH'
         EXPORTING
            full_name     = lv_filename
          IMPORTING
            stripped_name = lv_str_filename
          EXCEPTIONS
            x_error       = 1
            OTHERS        = 2.
        SPLIT lv_str_filename AT '.' INTO lv_junk lv_filetype.
        ls_attach-type = lv_filetype.
        ls_attach-subject = lv_str_filename.
        ls_attach-CONTENT_HEX[] = lt_data[].
        APPEND ls_attach TO lt_attach.
        CLEAR ls_attach.
    ENDIF.
    CALL FUNCTION 'Z_E_KEG_SEND_SIMPLE_EMAIL'
    EXPORTING
    REQUESTED_STATUS = 'E'
    DOCUMENTS = lt_attach
    RECIPIENTS = lt_rec
    MESSAGE = t_objtxt
    SUBJECT = 'Confirmation Review'.
    COMMIT WORK.
    clear lt_rec.
    clear ls_rec-i_copy.

    Dear Luigi,
    Do you have sample code which replace the value in Word file ?
    I try sample code below, but the mergefield 'Title' in Word file not replace instead it override the whole file.
    Even i try with different download path, it also not update field 'Title'.
    The mergefield i insert by microsoft word > mailings > insert merge field >Title.
    report ztestmail_c.
    data: global_filename LIKE RLGRAP-FILENAME.
    data: begin of imerge occurs 0,
    Title(85) type c, field02(85) type c,
    field03(85) type c, field04(85) type c,
    end of imerge.
    data: begin of itabf occurs 31,
    ff(10),
    end of itabf.
    itabf-ff = 'Title'. "append itabf.
    imerge-Title = 'test0'.
    append imerge. clear imerge.
    global_filename = 'c:\temp\confirm-form0508.doc'.
    CALL FUNCTION 'WORD_OLE_FORMLETTER'
    EXPORTING
    WORD_DOCUMENT = global_filename
    *   hidden        =
    *   word_password =             "               Password for the mail merge file (.DOC)
    *   password_option = 1         " i             Controls password use
    *   file_name =  'confirm-form0508'               " rlgrap-filename  Name of download file (w/o ext.)
    *   new_document =              "               Create new Word document
    DOWNLOAD_PATH = 'C:\temp\confirm-form0615.doc'
    TABLES
    DATA_TAB = imerge
    FIELDNAMES = itabf
    EXCEPTIONS
    INVALID_FIELDNAMES = 1
    USER_CANCELLED = 2
    DOWNLOAD_PROBLEM = 3
    COMMUNICATION_ERROR = 4
    OTHERS = 5.

  • 'Role Data' tab appearing twice in Business Partner master data

    Hello,
    The 'Role Data' tab is appearing in the master data of business partner for TWO times. The contents of both the tabs are identical. So I know that the only thing that I probably need to fix is the screen sequence. I have followed note 695714 and could not find anything wrong. Can someone please help me with the following queries:
    1. Identifying where we maintain the tab sequence for business partner master data, ie the transaction code or the path in BDT
    2. What is the name used in BP for the 'tabs'... I mean they are not called TABS but I suppose as Screens or Screen Sequence. So, what is the correct name for a Tab in BP master data.
    3. How I can hide the extra tab of Role Data from the BP master data screen
    4. How do we control the sequencing of the tabs, ie whether the address tab should be the first one or the third one or the last one.
    Regards
    Suvarghya Dutta

    Hi Kiran,
    Can you post the query here, which you used in fromatted search.
    I believe you mean to say that by this formatted search, user will have flexibility to choose the field and enter the search value.
    thanks in advance,
    Samir Gandhi

  • How to populate values into a Listbox on selection screen

    Hi All,
    Please any one let me know how to populate values (for ex.01,02 and 03) in a list box of selection screen..
    Thanks,
    Vijay

    Try this code ...
    REPORT  ZLISTBOX.
    TYPE-POOLS: VRM.
    TABLES SPFLI.
    TABLES SSCRFIELDS.
    DATA flag.
    DATA: NAME TYPE VRM_ID,
    LIST TYPE VRM_VALUES,
    VALUE LIKE LINE OF LIST.
    PARAMETERS PS_PARM LIKE SPFLI-CARRID AS LISTBOX VISIBLE LENGTH 5
    USER-COMMAND fcodex.
    data: i_spfli type spfli occurs 0 with header line.
    PARAMETERS PQ_PARAM LIKE SPFLI-connid AS LISTBOX VISIBLE LENGTH 15
    USER-COMMAND
    fcodey.
    *DS AS CHECKBOX USER-COMMAND FLAG.
    INITIALIZATION.
    NAME = 'PS_PARM'.
    DATA T TYPE I VALUE 0.
    SELECT DISTINCT carrid into corresponding fields of table i_spfli FROM
    SPFLI.
    loop at i_spfli.
    VALUE-KEY = i_spfli-CARRID.
    VALUE-TEXT = i_spfli-CARRID.
    APPEND VALUE TO LIST.
    endloop.
    CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
    ID = NAME
    VALUES = LIST.
    AT SELECTION-SCREEN.
    if sy-ucomm eq 'FCODEX'.
    REFRESH LIST.
    CLEAR LIST.
    PQ_PARAM = ' '.
    NAME = 'PQ_PARAM'.
    SELECT * FROM SPFLI WHERE CARRID = PS_PARM.
    VALUE-KEY = SPFLI-connid.
    VALUE-TEXT = SPFLI-connid.
    APPEND VALUE TO LIST.
    ENDSELECT.
    endif.
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
    IF SY-UCOMM NE 'FCODEX' OR SY-UCOMM NE 'FCODEY'.
    CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
    ID = NAME
    VALUES = LIST.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    START-OF-SELECTION.
    clear i_spfli.
    refresh i_spfli.
    select * into table i_spfli from spfli where carrid = ps_parm and connid
    = pq_param.
    loop at i_spfli.
    WRITE: / 'CITY FROM:', I_SPFLI-CITYFROM, 'CITY TO :',I_SPFLI-CITYTO,
    'DEPARTURE TIME :', I_SPFLI-DEPTIME.
    ENDLOOP.

Maybe you are looking for