Select field BZTXT from T171 or V_T171

Hi,
I need a help.
I need use the content of field BZTXT of table T171. At SE11 the table T171 haven't the field but if i see in SE16 the field appears.
Then I try to use V_T171 but when I check my program appears
"V_T171" is not defined in the ABAP Dictionary as a table, projection
view or database view."
My ABAP is:
LOOP AT lt_final INTO ls_final.
    SELECT bztxt
      FROM v_T171 INTO ls_final-bztxt
      WHERE bzirk EQ ls_final-bzirk.
      MODIFY lt_final FROM ls_final TRANSPORTING bztxt.
  ENDLOOP.
and I've define
TABLES: likp,
        lips,
        vbpa,
        vbuk,
        V_T171,
        T171,
        kna1.
Can somebody help me ? ...how can i acess to bztxt ?
Thanks
Edited by: Ricardo Filipe Pimenta on Jul 17, 2009 1:50 PM

Se16 detects the text table associated to the table displayed, and add the field to the display.
- call SE11 display T171 and go to text table, you will get T171T.
V_T171  is a maintenance view, which cannot be used in SELECT statement
- Perform a second select on T171T (with key SPRAS = SY-SPRAS)
- or use FM like [VIEW_GET_DATA|https://forums.sdn.sap.com/search.jspa?objID=c42&q=VIEW_GET_DATA]
Regards,
Raymond

Similar Messages

  • SELECT FIELD INTO FROM WHERE

    Hello,
    pls. help me to solve the following problem :
    declare
    zsql varchar2(200);
    I_FKART varchar2(4);
    begin
    zsql:='select FKART into';
    zsql:=zsql||'P39_FKART from scmoper.ZUMFA WHERE
    FKART =:P39_INPUT';
    return (zsql);
    end;
    IT WORKS, BUT THE FIELD P39_FKART isn't filled . It shows the value of the table ZUMFA (only one value) in form of list.
    I've tried with :P39_FKART or &P39_FKART. It doesn't work.
    many thanks for your help in advance .
    Tl

    I think it should work when you do it like:
    zsql:=zsql||:P39_FKART||' from scmoper.ZUMFA WHERE
    Oh wait, now I see what you are doing...
    You shouldn't do the select INTO in the buildup of your dynamic sql, but where you use it. I'm not sure of the syntax, but a quick search on Google or the forum should help you along. It should be something like EXECUTE IMMEDIATE zsql INTO :P39_FKART;
    Edited by: Michel van Zoest on Sep 16, 2009 2:53 PM

  • Selecting fields  PLD  from another form

    Hi Experts,
                    I want to print invoices which are in four format like sometimes i am using GRN no which is not in invoice form of SAP -B1  if i want to select fileds in PLD from another form Lets say right now if i have open A/P invoice and some fields is in another for Lets Say Item master data so can i select that feld  in PLD
                        Pls revert back that this can be done or not or even if  i am not clear enugh
    thankx and regard
    Satish tale ( SAP-B1 functional consultant ,Paradyne Infotech limited)

    Effectively, you can copy a field from a form to an other in order to add tables.
    Sincerely,
    Olivier SPINELLI

  • Making selection field mandatory in invoice overview

    Hi All,
    I am trying to make selection field  (Ship from Location ) mandatory in invoice overview through customizing mode.
    however system is showing mandatorysymbol against field but not throwing any error message when user execute the invoice overview screen without ship from location.
    kindly suggest / help
    Best Regards
    Gaurav

    Hi,
    You can do it simple:
    AT SELECTION-SCREEN ON s_matnr.
    IF s_matnr IS INITIAL.
        MESSAGE e055(00).
    Make an entry in all required fields
    ENDIF.
    (s_matnr: is a field on the selection screen)
    Good luck.
    Gilad Hubara.

  • ALV with classes for selected fields

    Hi ALL,
            Please can anybody will give the example code for
    <b>ALV with classes for selected fields</b> from database table .

    Hi,
    *& Report  YR_TANS_ALVTEST                                             *
    REPORT  yr_tans_alvtest                         .
    INCLUDE ya_yr_tans_alvtest_top.
    TABLES yttans_test.
    DATA itab LIKE yttans_test OCCURS 0.
    DATA gr_alvgrid TYPE REF TO cl_gui_alv_grid .
    DATA gc_custom_control_name TYPE scrfname.
    gc_custom_control_name = 'CC_ALV'.
    DATA gr_ccontainer TYPE REF TO cl_gui_custom_container .
    DATA gt_fieldcat TYPE lvc_t_fcat .
    DATA gs_layout TYPE lvc_s_layo .
    data wa_itab like line of itab.
    TYPES : BEGIN OF ty_help,
              roll_no LIKE yttans_test-roll_no,
              name LIKE yttans_test-name,
            END OF ty_help.
    DATA: git_returntab TYPE TABLE OF ddshretval INITIAL SIZE 0.
          CLASS lcl_event_handler DEFINITION
    CLASS lcl_event_handler DEFINITION .
      PUBLIC SECTION .
        METHODS:
    handle_double_click FOR EVENT double_click OF cl_gui_alv_grid IMPORTING
        e_row e_column es_row_no.
      PRIVATE SECTION.
    ENDCLASS.                    "lcl_event_handler DEFINITION
    DATA gr_event_handler TYPE REF TO lcl_event_handler .
    *&      Form  handle_double_click
          text
         -->I_ROW      text
         -->I_COLUMN   text
         -->IS_ROW_NO  text
    FORM handle_double_click USING i_row TYPE lvc_s_row i_column TYPE
    lvc_s_col is_row_no TYPE lvc_s_roid.
    leave to list-processing.
    read table itab index is_row_no-row_id into wa_itab.
    write:/ 'Roll no: ', wa_itab-roll_no, /'Name: ', wa_itab-name,
    /'Marks: ', wa_itab-marks.
    LEAVE SCREEN.
    ENDFORM .                    "handle_double_click
          CLASS lcl_event_handler IMPLEMENTATION
    CLASS lcl_event_handler IMPLEMENTATION .
    *--Handle Double Click
      METHOD handle_double_click .
        PERFORM handle_double_click USING e_row e_column es_row_no .
      ENDMETHOD .                    "lcl_event_handler
    ENDCLASS .                    "lcl_event_handler IMPLEMENTATION
    SELECT-OPTIONS roll FOR yttans_test-roll_no .
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR roll-low.
      DATA: lit_help TYPE TABLE OF ty_help.
      DATA: wa_returntab LIKE LINE OF git_returntab.
      SELECT roll_no name INTO TABLE lit_help FROM yttans_test.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'ROLL_NO'
          dynpprog        = sy-repid
          dynpnr          = sy-dynnr
          dynprofield     = 'roll-low'
          value_org       = 'S'
        TABLES
          value_tab       = lit_help
          return_tab      = git_returntab
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      READ TABLE git_returntab INTO wa_returntab INDEX 1.
      roll-low = wa_returntab-fieldval.
    AT SELECTION-SCREEN.
      SELECT * FROM yttans_test INTO TABLE itab WHERE roll_no IN roll.
    START-OF-SELECTION.
      CREATE OBJECT gr_event_handler .
      CALL SCREEN '9000'.
    *&      Module  STATUS_9000  OUTPUT
          text
    MODULE status_9000 OUTPUT.
      SET PF-STATUS 'STATUS_9000'.
      SET TITLEBAR 'TITLE_9000'.
    ENDMODULE.                 " STATUS_9000  OUTPUT
    *&      Module  USER_COMMAND_9000  INPUT
          text
    MODULE user_command_9000 INPUT.
      DATA: ok_code TYPE sy-ucomm,
            save_ok TYPE sy-ucomm.
      save_ok = ok_code.
      CLEAR ok_code.
      CASE save_ok.
        WHEN 'BACK' OR '%EX' OR 'RW'.
          CALL METHOD gr_ccontainer->free.
         CALL METHOD cl_gui_cfw=>flush.
          LEAVE TO SCREEN 0.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_9000  INPUT
    *&      Module  alv_display_9000  OUTPUT
          text
    MODULE alv_display_9000 OUTPUT.
      PERFORM display_alv .
    ENDMODULE.                 " alv_display_9000  OUTPUT
    *&      Form  display_alv
          text
    FORM display_alv .
      IF gr_alvgrid IS INITIAL .
        CREATE OBJECT gr_ccontainer
          EXPORTING
       PARENT                      =
            container_name              = gc_custom_control_name
       STYLE                       =
       LIFETIME                    = lifetime_default
       REPID                       =
       DYNNR                       =
       NO_AUTODEF_PROGID_DYNNR     =
          EXCEPTIONS
            cntl_error                  = 1
            cntl_system_error           = 2
            create_error                = 3
            lifetime_error              = 4
            lifetime_dynpro_dynpro_link = 5
            OTHERS                      = 6
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        CREATE OBJECT gr_alvgrid
          EXPORTING
       I_SHELLSTYLE      = 0
       I_LIFETIME        =
            i_parent          = gr_ccontainer
       I_APPL_EVENTS     = space
       I_PARENTDBG       =
       I_APPLOGPARENT    =
       I_GRAPHICSPARENT  =
       I_NAME            =
          EXCEPTIONS
            error_cntl_create = 1
            error_cntl_init   = 2
            error_cntl_link   = 3
            error_dp_create   = 4
            OTHERS            = 5
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        SET HANDLER gr_event_handler->handle_double_click FOR gr_alvgrid .
        PERFORM prepare_field_catalog CHANGING gt_fieldcat .
        PERFORM prepare_layout CHANGING gs_layout .
        CALL METHOD gr_alvgrid->set_table_for_first_display
          EXPORTING
       I_BUFFER_ACTIVE               =
       I_BYPASSING_BUFFER            =
       I_CONSISTENCY_CHECK           =
       I_STRUCTURE_NAME              =
       IS_VARIANT                    =
       I_SAVE                        =
       I_DEFAULT                     = 'X'
             is_layout                     = gs_layout
       IS_PRINT                      =
       IT_SPECIAL_GROUPS             =
       IT_TOOLBAR_EXCLUDING          =
       IT_HYPERLINK                  =
       IT_ALV_GRAPHICS               =
       IT_EXCEPT_QINFO               =
          CHANGING
            it_outtab                     = itab[]
            it_fieldcatalog               = gt_fieldcat
       IT_SORT                       =
       IT_FILTER                     =
          EXCEPTIONS
            invalid_parameter_combination = 1
            program_error                 = 2
            too_many_lines                = 3
            OTHERS                        = 4
        IF sy-subrc <> 0.
          LEAVE TO LIST-PROCESSING.
          WRITE 'error'.
        ENDIF.
      ELSE.
        CALL METHOD gr_alvgrid->refresh_table_display
    EXPORTING
       IS_STABLE      =
       I_SOFT_REFRESH =
          EXCEPTIONS
            finished       = 1
            OTHERS         = 2
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ENDIF.
    ENDFORM.                    "display_alv
    *&      Form  prepare_field_catalog
          text
         <--P_GT_FIELDCAT  text
    FORM prepare_field_catalog  CHANGING p_gt_fieldcat TYPE lvc_t_fcat .
      DATA ls_fcat TYPE lvc_s_fcat .
      ls_fcat-fieldname = 'ROLL_NO'.
      ls_fcat-coltext = 'ROLL No.'.
      APPEND ls_fcat TO p_gt_fieldcat.
      ls_fcat-fieldname = 'NAME'.
      ls_fcat-coltext = 'NAME'.
      APPEND ls_fcat TO p_gt_fieldcat.
      ls_fcat-fieldname = 'MARKS'.
      ls_fcat-coltext = 'MARKS'.
      APPEND ls_fcat TO p_gt_fieldcat.
    ENDFORM.                    " prepare_field_catalog
    *&      Form  prepare_layout
          text
         <--P_GS_LAYOUT  text
    FORM prepare_layout  CHANGING ps_layout TYPE lvc_s_layo.
      ps_layout-zebra = 'X' .
      ps_layout-grid_title = 'Students Details'.
      ps_layout-smalltitle = 'X' .
    ENDFORM.                    " prepare_layout
    Regards,
    Tanveer.
    Mark helpful answers
    Message was edited by: Tanveer Shaikh

  • I have created a PDF form with multiple drop downs, all with the same drop down values. When I select a value from 1 of the drop down fields, it replicates in all of the others - which I do not want. How can I fix this?

    I have created a PDF form with multiple drop downs, all with the same drop down values. When I select a value from 1 of the drop down fields, it replicates in all of the others - which I do not want. Can I fix this?

    I'm fairly new to this, but I think it has to do with the way you have the drop downs named. Did you copy one then keep pasting it in each field? If so, that is the problem. You should rename each one with a different number: Dropdown1, Dropdown2, etc. I think that might solve the issue.

  • How can we read the screen field values from the report selection screen wi

    Hi expart,
    How can we read the screen field values from the report selection screen with out having an ENTER button pressed  .
    Regards
    Razz

    use this code...
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_posnr.
    **Read the Values of the SCREEN FIELDs
    CALL FUNCTION 'DYNP_VALUES_READ'

  • How to make users to select the date from calendar control my making the date field read only in date time control in external list in sharepoint 2010

    How to make users to select the date from calendar control only, by my making the date text field read only (don't want to let users type the date) in date time control in external list in sharepoint 2010. I am looking for a solution which can
    be done through sharepoint desginer / out of the box.
    thanks.

    Congratulate you got the solution by yourself. I am new to a
    WinForms calendar component, I feel so helpless on many problems even I'd read many tutorials. This question on the
    calendar date selection did me a great favor. Cheers.

  • Select fields from Table PA0001 where condition in PA0000 EQ X.

    I'm quite new here at SDN an to ABAP as my code below will show.  =)
    I have two tables PA0001 and PA0000 and I want to show the PERNR from Table PA0001 WHERE PA0000-stat2 EQ '3'.
    SELECT PERNR STAT2 FROM pa0000 INTO CORRESPONDING FIELDS OF TABLE it_act WHERE stat2 EQ '3'.    "this works fine
    SELECT * FROM pa0001 INTO TABLE it_pos.
    LOOP AT it_pos INTO wa_pos WHERE It_pos-pernr EQ it_act-pernr.                
    WRITE......
    ENDLOOP.
    Isn't it possible to put the conditions in the LOOP statement? Should i somehow do i join in the select instead?
    If you dont understand what I mean just ask and I will try to explain.
    Best Regards Claes.

    Hi Claes Widestadh ,
    I have total Code for you, to solve your Problem, I have written the code for you & tested it, and it was Working Very Fine.
    Please find the Below Code.
    TABLES : PA0000, PA0001.
    DATA : IT_PA0000 LIKE PA0000 OCCURS 0 WITH HEADER LINE,
           IT_PA0001 LIKE PA0001 OCCURS 0 WITH HEADER LINE.
    DATA : BEGIN OF IT_FINAL OCCURS 0,
           PERNR LIKE PA0001-PERNR,
           END OF IT_FINAL.
    SELECT PERNR STAT2 INTO CORRESPONDING FIELDS OF TABLE IT_PA0000 FROM
    PA0000 WHERE STAT2 = '3'.
    SELECT * FROM PA0001 INTO TABLE IT_PA0001.
    SORT IT_PA0001.
    LOOP AT IT_PA0000.
      READ TABLE IT_PA0001 WITH KEY PERNR = IT_PA0000-PERNR.
      IF SY-SUBRC = 0.
        IT_FINAL-PERNR = IT_PA0001-PERNR.
        APPEND IT_FINAL.
        CLEAR IT_FINAL.
      ENDIF.
    ENDLOOP.
    LOOP AT IT_FINAL.
      WRITE :/ IT_FINAL.
    ENDLOOP.
    Note: If you find this Answer is very Helpful Please allot me the Points.
    Please do let me know any isssues at your end.
    Thanks,
    Satya Krishna.M

  • TFS Workitems:Bugs : I want ot select different lists, from the global list, for fields basd upon user group

    Hi,
    I am customizing the bug workitem workflow.
     I want ot select different lists, from the gllobal list, for fields basd upon user group
    I am aware that I can use "when" clauses in the allowed/suggested values of the field.
    My question is : how do I get the group(s) that the current user is in and how do use this to select different lists?

    Hi!
    You can not do this through standard way. You must to create the custom work item control:
    http://witcustomcontrols.codeplex.com/
    And get the user group through IIdentityManagementService.
    IIdentityManagementService IdentityService = _workItem.Store.TeamProjectCollection.GetService<IIdentityManagementService>();
    TeamFoundationIdentity _curid = null;
    _workItem.Store.TeamProjectCollection.GetAuthenticatedIdentity(out _curid);
    string _group = "Admin";
    var _gr = IdentityService.ReadIdentity(IdentitySearchFactor.AccountName, _group, MembershipQuery.Direct, ReadIdentityOptions.None);
    if (_gr.Members.Where(s => s.Identifier == _curid.Descriptor.Identifier).Count() > 0) return true;

  • To fetch selective fields from DATABASETABLE into Internal TABLE

    Hi Friends,
    I have declared an internal table with fields for e.g. A , B , C , D.
    This does not have any records as of now.
    I have to fetch data from a DATABASE TABLE with fields A , B , X , Y , Z having records .
    I only need records for fields A B fron DB table.Can any one pls tell how can I do that with performance issues in mind as lots of records are there.
    I had written a query where:
    SELECT A B from dbtab
                        into CORRESPONDING FIELDS of table it_table.
    It_table i had defined with only two fields A B.
    Is this correct?
    Please tell wats the way to do it as I am new to ABAP.
    THANKS in ADVANCE..

    Hi.....
    What mentioned in all above answers is very helpful for ur requirement...
    and...
       Here some Steps to increase the performence of your programs...
    >Use Select Single when only one row is expected
    >Use Select Where rather than Selectu2026Check
    >Use Select with aggregate functions (SUM, MAX, MINu2026)
    >Use a View instead of nested Selects
    >Use Select column specific instead of select * for few fields
    >Use Selectu2026Into Table rather than Select...Move Corru2026Apend
    >Use Join extension with Select if possible
    >Use special operators (CO, CA, CS) rather than code your own
    >Use Delete Adjacent Duplicates rather than manual processing
    >Specify key fields for Readu2026Binary Search
    >Use Loop At Where rather than Loop Atu2026Check
    >Copy Internal Tables with TAB_DEST() = TAB_SRC()
    >Specify the sort key as restrictively as possible
    >Use Append To, Insert Into, Collect Into rather than Move
    >Compare tables with If Tab1() = Tab2()u2026
    >Use Delete ITAB Whereu2026 instead of Loop At ITAB Whereu2026Delete..
    >Use Case statements instead of If-constructions
    >Use Call Functions wisely, Performs use less memory
    >Use While instead of Do Exit
    >Use Type I for Indices
    >Keep Occurs clause realistic or use 0
    >Use COMMIT WORK as appropriate to free the Data Base and preserve work
    >
    >Avoid:
    >Using Shift inside a While-loop
    >Leaving unneeded declarations in your program
    >Using Move-corresponding for just a few fields
    >Excessive nested includes within function calls
    >Using DB field names if the value will be changed
    >Using Occurs clause if only the header is needed
    Thanks,
    Naveen.I

  • [ADF-UIX] updating some fields after selecting an item from messageChoice

    Hi,
    I'll try and keep it short and simple.
    How do I do the following: I have 2 ViewObjects: department - employees, they
    have a 1 - many relationship. But there's no master-detail in my ViewObjects
    (no link between my view objects)
    On my UIX page I have a input form for Employees, with a messageChoice for
    choosing a department. And I show an extra label department_description, which
    comes from Department view. How can I update this label after selecting an item
    from the messageChoice?
    Is is possible?
    I tried searching this forum, but didnt find anything, hard define search
    parameters for this :)
    kind regards
    Ido

    Hi,
    I tried it in another page, one with a read-only form for courses.
    There it kinda works for the first 2 out of 3 items in the messageChoice,
    but not the last option.
    It does give me an error in JDev during runtime though
    05/10/20 15:13:57 editCourseV2DP.uix:line 60,col 95: Illegal HTML: cannot put a <td> element in a <form> element.
    which points to <messageTextInput model="${bindings.Longname1}" id="longname1"/>
    Dont see a relation between the error and my xml source...
    and it states: 05/10/20 15:25:48 Parameter partialTargets=_uixState longname1
    so that should be ok
    Can it be because CourseView has 2 EntityObjects, course and course_codes.
    and I have a course_codeView, with just 1 EntityObject, course_codes
    So when im building the uix page I have 2 options where to pull the longname
    from, CourseView and course_codeView. I tried both btw, and only the longname
    from CourseView changes. I would expect the other one to change.
    Oh well, im kinda lost now, perhaps I'll drop this feature and think of an
    otherway to implement my screen.
    Thanks for the replies
    kind regards
    Ido

  • Unable to read field value from main table - unexpected socket read error

    Hi Friends,
    While executing the below code, I am able to get the value of the field 'id' but i am unable to get the value for the 'materialnumber' field. i am getting the below exception
    +com.sap.mdm.commands.CommandException: com.sap.mdm.internal.protocol.manual.ProtocolException: java.io.IOException: Unexpected socket read.  Result is -1.
         at com.sap.mdm.data.commands.AbstractRetrieveLimitedRecordsCommand.execute(AbstractRetrieveLimitedRecordsCommand.java:158)
         at com.sap.mdm.data.commands.RetrieveLimitedRecordsCommand.execute(RetrieveLimitedRecordsCommand.java:157)
         at updaterecords.main(updaterecords.java:126)
    Caused by: com.sap.mdm.internal.protocol.manual.ProtocolException: java.io.IOException: Unexpected socket read.  Result is -1.
         at com.sap.mdm.internal.protocol.manual.AbstractProtocolCommand.execute(AbstractProtocolCommand.java:100)
         at com.sap.mdm.data.commands.AbstractRetrieveLimitedRecordsCommand.execute(AbstractRetrieveLimitedRecordsCommand.java:146)
         ... 2 more
    Caused by: java.io.IOException: Unexpected socket read.  Result is -1.
         at com.sap.mdm.internal.net.DataSocket.receiveData(DataSocket.java:59)
         at com.sap.mdm.internal.net.ConnectionImpl.readInt(ConnectionImpl.java:417)
         at com.sap.mdm.internal.net.ConnectionImpl.nextMessage(ConnectionImpl.java:501)
         at com.sap.mdm.internal.net.ConnectionImpl.receiveMessage(ConnectionImpl.java:472)
         at com.sap.mdm.internal.net.ConnectionImpl.send(ConnectionImpl.java:209)
         at com.sap.mdm.internal.net.ReservedConnection.send(ReservedConnection.java:105)
         at com.sap.mdm.internal.protocol.manual.AbstractProtocolCommand.execute(AbstractProtocolCommand.java:97)
         ... 3 more+
    import com.sap.mdm.commands.AuthenticateUserSessionCommand;
    import com.sap.mdm.commands.CommandException;
    import com.sap.mdm.commands.CreateUserSessionCommand;
    import com.sap.mdm.commands.DestroySessionCommand;
    import com.sap.mdm.commands.GetRepositoryRegionListCommand;
    import com.sap.mdm.data.Record;
    import com.sap.mdm.data.RegionProperties;
    import com.sap.mdm.data.ResultDefinition;
    import com.sap.mdm.data.commands.RetrieveLimitedRecordsCommand;
    import com.sap.mdm.ids.TableId;
    import com.sap.mdm.net.ConnectionException;
    import com.sap.mdm.net.ConnectionPool;
    import com.sap.mdm.net.ConnectionPoolFactory;
    import com.sap.mdm.schema.FieldProperties;
    import com.sap.mdm.schema.RepositorySchema;
    import com.sap.mdm.schema.commands.GetFieldListCommand;
    import com.sap.mdm.schema.commands.GetRepositorySchemaCommand;
    import com.sap.mdm.search.Search;
    import com.sap.mdm.server.DBMSType;
    import com.sap.mdm.server.RepositoryIdentifier;
    public class updaterecords {
         public static void main(String[] args) {
              try {               
                    String serverName = "159.112.6.26";
                    ConnectionPool connections = null;
                    try {
                         connections = ConnectionPoolFactory.getInstance(serverName);
                    } catch (ConnectionException e) {
                         e.printStackTrace();
                         return;
                   // specify the repository to use
                   // alternatively, a repository identifier can be obtain from the GetMountedRepositoryListCommand
                   String repositoryName = "DEMO";
                   String dbmsName = "MDMD";
                   RepositoryIdentifier reposId = new RepositoryIdentifier(repositoryName, dbmsName, DBMSType.ORACLE);
                   // get list of available regions for the repository
                   GetRepositoryRegionListCommand regionListCommand = new GetRepositoryRegionListCommand(connections);
                   regionListCommand.setRepositoryIdentifier(reposId);
                   try {
                        regionListCommand.execute();
                   } catch (CommandException e) {
                        e.printStackTrace();
                        return;
                   RegionProperties[] regions = regionListCommand.getRegions();
                   // create a user session
                   CreateUserSessionCommand sessionCommand = new CreateUserSessionCommand(connections);
                   sessionCommand.setRepositoryIdentifier(reposId);
                   sessionCommand.setDataRegion(regions[0]); // use the first region
                   try {
                        sessionCommand.execute();
                   } catch (CommandException e) {
                        e.printStackTrace();
                        return;
                   String sessionId = sessionCommand.getUserSession();
                   // authenticate the user session
                   String userName = "meter1";
                   String userPassword = "meter1";
                   AuthenticateUserSessionCommand authCommand = new AuthenticateUserSessionCommand(connections);
                   authCommand.setSession(sessionId);
                   authCommand.setUserName(userName);
                   authCommand.setUserPassword(userPassword);
                   try {
                        authCommand.execute();
                   } catch (CommandException e) {
                        e.printStackTrace();
                        return;
                   GetRepositorySchemaCommand cmd=new GetRepositorySchemaCommand(connections);
                   cmd.setSession(sessionId);
                   try{
                        cmd.execute();               
                   }catch(CommandException e){
                        System.out.println(e.getLocalizedMessage());
                   RepositorySchema repsch=cmd.getRepositorySchema();
                   // the main table, hard-coded
                   TableId mainTableId = new TableId(1);     
                   // specify the result definition (what to retrieve); in this example, nothing
                   ResultDefinition rd = new ResultDefinition(mainTableId);
                   // select all records
                   Search search = new com.sap.mdm.search.Search(mainTableId);
                   //get fields
                   GetFieldListCommand getFieldListCommand = new GetFieldListCommand(connections);
                   getFieldListCommand.setSession(sessionCommand.getUserSession());
                   getFieldListCommand.setTableId(mainTableId);
                   try {
                        getFieldListCommand.execute();
                   } catch (CommandException e) {
                        System.out.println(e);
                   FieldProperties[] lookupFields = getFieldListCommand.getFields();
                   // add fields to records to retrieve
                   rd.addSelectField(repsch.getFieldId("Products","Id"));
                   rd.addSelectField(repsch.getFieldId("Products","MaterialNumber"));                              
                   // retrieve the records
                   RetrieveLimitedRecordsCommand limitingCommand = new RetrieveLimitedRecordsCommand(connections);
                   limitingCommand.setSession(sessionId);
                   limitingCommand.setResultDefinition(rd);
                   limitingCommand.setSearch(search);
                   //limitingCommand.setPageSize(2000);
                   try {
                        limitingCommand.execute();
                   } catch (CommandException e) {
                        e.printStackTrace();
                        return;
                   System.out.println("Record count is " + limitingCommand.getRecords().getCount()+"\n");
                   Record[] records=limitingCommand.getRecords().getRecords();
    System.out.println(records[0].getFieldValue(repsch.getFieldId("Products","Id"))+ " \n");
    System.out.println(records[0].getFieldValue(repsch.getFieldId("Products","MaterialNumber"))+ " \n");
                   // finally destroy the session
                   DestroySessionCommand destroySessionCommand = new DestroySessionCommand(connections);
                   destroySessionCommand.setSession(sessionId);
                   try {
                        destroySessionCommand.execute();
                   } catch (CommandException e) {
                        e.printStackTrace();
                        return;
              } catch (Exception e) {
                   System.out.println(e.getLocalizedMessage());
                   e.printStackTrace();
    Kindly let me know where i am going wrong. MaterialNumber field is a TEXT not a lookup table field.  Above fields are from the main table.
    Thanks,
    Raags

    Hi Friends,
    I got the solution. It was the error because of not having a the below statement.
    limitingCommand.setPageSize(1);
    As i havent used that statement, it was trying to get 1000 records, and i dont know exactly what makes this to get that error. Anyhow., As i want to use for updation, i cn live with one record.
    Thanks,
    Raags

  • How to create a multi column list item and select these values from a LOV

    Hi all,
    My requirements are:
    1) create an LOV which holds the productno, productname and productprice fields (this is working)
    2) at run time, select one record from LOV and populate the list/grid with this selected record values of productno, productname and productprice fields, so we are showing them on the form in the form of a table/grid (not working)
    3) be able to select multiple records from LOV and be able to populate the list item with multiple records (not working)
    4) have two more columns in the list/grid, for productquatity and total price (not wokring)
    Please help me.
    how can i create this grid or list in oracle
    whats the possible way of acheiving this in oracle

    If you use a list item to display multiple columns then you'll need to use a fixed-width font. You can achieve a similar look with proportional fonts by using a normal block and setting the fields' bevel to 'None'.
    Each column in the LOV has a Return Item property (under Column Mapping Properties). Set this to a :block.item reference for each column to bring the data back into those referenced fields.
    You can't select multiple records from an LOV. For this you will need to create your own form. Check the help for system.mouse_button_modifiers to see how to respond to Ctrl+click and Shift+click.
    To add columns just modify the LOV's record group's query.

  • How to get multiple selected fields in list

    Hello all,
    I am trying to get multiple selected value from a list but i dont know how to get multiple selected fields from a list though AS3.
    Actually i want to pass the selected fields to php, so for that i need to get the selections and send to php.
    Thankx..

    i want to put the selected fields of list in an array through AS3....
    actually......i figured it out how to do that...........
    Its simple......use
    list.selectedItems[index]
    and to get the number of items selected......
    list.selectedItems.length
    simple.....

Maybe you are looking for

  • How do I stop firefox from pre-downloading a file during a file download prompt?

    I use DownThemAll as my download manager for files generally over 10MB, as my internet connection is generally too slow for firefox to download a file larger then this without firefox "finishing" a download before it's complete, corrupting the file.

  • How to clear the endpoint directory in NAC Profiler

    Hi All, I want to delete all the endpoint discovered and profiled by the NAC Profiler. Can anybody guide me on this, such that I can delete all the endpoint discovered and profiled by the Profiler in one go. Thanks, Abuzar.

  • Purchase Requisition version

    Dear all, could you help me on this question? i want to keep the PR date & Requirement date fixed under all activities in project builder, but whenever i do the scheduling or in thing like addition of new activity & then go to save project builder sy

  • File to Idoc with wait for 30 secs time

    Hi Experts, We  have a requirement like, sending a file using MDM adapter to Idoc. We need to process messgaes coming into ftp one by one to target system ECC with a time interval of 30 seconds. After 1 msg is processed, wait for 30 seconds and next

  • Dynamic Text Looks Crooked

    I am loading text from xml file into dynamic text field . xml file use the cdata  e.g. <?xml version="1.0" encoding="UTF-8"?> <section><description><![CDATA[<li>Gender</li><li>Male</li><textFormat leftmargin="20"><p><b>History</b></p><p><font color="