Getting component name

Guys,
I want to find the component names of my dynamic table
ASSIGN COMPONENT  sy-index
         OF STRUCTURE <wa_table> TO <dyn_field>.
I know there are couple of threads but they are confusing, I tried using one of the method
ref_table_des ?=
cl_abap_typedescr=>describe_by_name( p_data = <t_dyn_table> ).
idetails[] = ref_table_des->components[].
but then I get an error as formal parameter p_data  does not exist.

Check this Example.
DATA : sflighttype type ref to cl_abap_structdescr,
      comp_tab    type cl_abap_structdescr=>component_table.
field-symbols: <wa_comp> like line of comp_tab.
sflighttype ?= cl_abap_typedescr=>describe_by_name('SFLIGHT').
comp_tab = sflighttype->get_components( ).
LOOP AT comp_tab ASSIGNING <wa_comp>.
  write : / <wa_comp>-name.
ENDLOOP.
In your case.
it should be
ref_table_des ?=
cl_abap_typedescr=>describe_by_name( <t_dyn_table> ).

Similar Messages

  • Get Component Name

    Hello,
    I am setting the value of rendered attribute for a button using method expression.
    Since, method parameters cannot be passed in method expression, how to get the name of the component in the method?
    The requirement is to hide the button based on user credentials.
    Thanks for your help.
    Hiren

    Use the actionListener attribute instead of the action attribute. The actionListener method should accept an ActionEvent parameter. From this you can get the calling UIComponent using ActionEvent#getComponent().
    Also see http://balusc.blogspot.com/2006/06/communication-in-jsf.html for some snippets.

  • Getting component name from property file

    Hi
    I want to get names for components(say button or label) from property file. How I can achiev this.
    second option is that getting names from database.
    I want to know both the things
    Can anybody help me in getting those names in both the ways. If anyone has sample code it will be really helpfull to me. :)
    Raj

    FileInputStream fin=null;
    Properties property=new Properties();
    try{
          fin=new FileInputStream("myfile.dat");
          property.load(fin);
          fin.close();
    }catch(Exception e){}Infact this is the simpliest way to load property from file. You should check if File exists or readable with catch block. I used Exception but you dont. If you are using an Applet it will be a little different.

  • Getting the name of the component

    How can I get the name of the component at run time. I'm trying to find out the name of components like JTextField. I've already tryed <component>.getName() but it returns null.
    Tks
    Roberto Garcia

    That must be because you didn't ever call the component's setName() method.
    Or what did you expect the "name" of the component to be?

  • How to get the component name in webdynpro

    Hi all,
            how can i get the name of the webdynpro component. The component is being displayed in the portal. Now i need the component name for this.Can any one suggest of how to get this.
    Regards,
    Kalyan Chakravarthi.M

    Hi ,
    get the object of  IF_WD_COMPONENT , by calling the method wd_get_api( ) of wd_component attribute , then call the method GET_COMPONENT_INFO( ) ,it will return the object of IF_WD_RR_COMPONENT in that call the method GET_NAME( ) .
    Regards
    Yash

  • How to get WD component name or application name

    Hi ,
    Is there any sap standard variable where webdynpro component name or application name get store like SY-CPORG.
    Thanks And Regards,
    Rohit

    Hi,
    You can get the application name using below code:
    DATA : lr_api      TYPE REF TO if_wd_component,
              lr_app      TYPE REF TO if_wd_application,
              lr_app_info TYPE REF TO if_wd_rr_application,
              lv_app_name TYPE string.
       lr_api = wd_comp_controller->wd_get_api( ).
       CALL METHOD lr_api->get_application
         RECEIVING
           result = lr_app.
       CALL METHOD lr_app->get_application_info
         RECEIVING
           result = lr_app_info.
       CALL METHOD lr_app_info->get_name
         RECEIVING
           result = lv_app_name.
    Now pass the lv_app_name to the FM.
    hope this helps u,
    Regards,
    Kiran

  • How to get application name or component name

    I have a requirement to make a Z table similar to the context change log table . I need to add application name to that.Is there a way one can retrieve application name of the current application from a function module or any other way?The table WDY_APPLICATION does not seem to have all the custom applications built it only shows the SAP provided applicatoin details.

    here is coding to get the wd app name:
      DATA:
        lr_ctrl_api                    TYPE REF TO if_wd_controller,
        lr_comp_api                    TYPE REF TO if_wd_component,
        lr_appl_api                    TYPE REF TO if_wd_application,
        lr_appl_info                   TYPE REF TO if_wd_rr_application,
        l_appl_name                    TYPE string.
    * get app name
      lr_ctrl_api  = wd_this->wd_get_api( ).
      lr_comp_api  = lr_ctrl_api->get_component( ).
      lr_appl_api  = lr_comp_api->get_application( ).
      lr_appl_info = lr_appl_api->get_application_info( ).
      l_appl_name  = lr_appl_info->get_name( ).
    For further Information check also the Runtime Repository APIs: [http://help.sap.com/saphelp_nw04s/helpdata/en/46/a07a6e79822c10e10000000a114a6b/frameset.htm]

  • How to get the name of a (custom) component

    Hi,
    I would like to know whether there is a way to get the name Xcelsius uses for instance in the Object Browser. Getting the components "name" property doesnt return this information.
    Thanks in advance.

    String myFileName = request.getRequestURL().substring(request.getRequestURL().lastIndexOf("/")+1);
    or with javascript
    <H1><script>document.write(document.location.href.substring(document.location.href.lastIndexOf("/")+1))</script></H1>
    bye! :)

  • How to find out the Target Component name and Target view name

    Hi All Expert,
                      I want to know ,how to find out the target component and target view in WEB UI,when i click on a field which shows as a hyper link in WEB UI .At GUI level ,i know the how it will work.Any way to find out the component name and view name which is show the details of that field at GUI level .IF you go to transaction CRMD_ORDER then open the service contract id .then goto the item level value .there is 1 service data tab is available at item level.there is two button is available.first one is available time and second one is response time .if i click on any button then one popup is open which is shows the details of that button.I dont know how to find out the component name and view name from GUI level.
    Thanks in Advance....
    Vishwas Sahu

    Hi Vishwa,
                 The control would be something like this for navigation in Get_p_xxx method u mention as link and u mention a event name which gets triggered on the click of this hyperlink. So your GET_P_XXX method would have the following code:
    CASE iv_property.
        WHEN if_bsp_wd_model_setter_getter=>fp_fieldtype.
          rv_value = cl_bsp_dlc_view_descriptor=>field_type_event_link.
        WHEN if_bsp_wd_model_setter_getter=>fp_onclick.
          rv_value = 'EXAMPLE'.
    Now you have to create a method as EH_ONEXAMPLE at your IMPL class and within which you would give an outbound plug method. Within the outbound plug the target data would be filled in the collection and window outbound plug would be triggered.
    This is a huge topic and  i have just mentioned you basic things.
    Regards,
    Bharathy.

  • How to get file name of the form attachment?

    Hi,
    is there anybody who is able to help me with the following problem???
    I started my process from Workspace ES and as a first step I attached one locale file (IMG.JPG or IMG.TIF e.g.) as a form attachment. I used "Attachments" bookmark in the Workspace ES.
    I need to get file name of attached file in the process!!!
    I tried to use "getTaskAttachments" component to get file name of form attachment but without success. This component successfully obtained attached file an stored it in the variable (type list, subtype document) but didn't produce all file attribute informations such as basename or Content Type:
    Is there some possibility to obtain file name (including file extension) by using "standard" tools and components of ALC?
    Thanks for your suggestions.

    Hi LekomDev,
    I faced the same situation some time back and this is what I know.
    Based on the file type few of the attributes will or will not be populated. (This is what the official documentation says about Document attributes)
    The file name that you are looking for would mostly be in 'name' attribute of Document object. The 'wsfilename' attribute is the atrribute which gets used to show the file name into Attachments tab of the workspace.
    So, if you are just interested in knowing the filenames then 'name' attribute is the place that you are looking for.
    But if you are trying to solve an issue in which Attachments against a Task isn't showing the filenames properly then you would need to copy the 'name' attribute value into 'wsfilename' attribute and then the Attachmetns against a Task would have the correct names.
    Tip: Use the Record and Playback option of the workbench to inspect the Document variable and you would see all of the values for a Document variable at desired step in your orchestration.
    hope this helps,
    cheers,
    Parth Pandya
    Blog: http://livecyclekarma.wordpress.com

  • Get file name and path from  adf inputFile

    Hi,
    I use adf's inputFile component. I need to get the file name and filePath. Does anyone knows how to do that?
    Thanks in advance

    You may bind the value to an UploadedFile object and get the name from this object.
    You may use a valueChangeListener backin bean method or a managed bean.
    Here the code i just write for something similar. Note that i'm not able to test it because of a bug in 10.1.3.1 with inputFile and web.xml parameters. I still waiting for the patch.
    public void uploadedFile(ValueChangeEvent valueChangeEvent) throws IOException,
    Exception {
    final int BUFFER = 2048;
    byte data[] = new byte[BUFFER];
    int currentByte;
    String fileName;
    UploadedFile uploadedFile =
    (UploadedFile)valueChangeEvent.getNewValue();
    if (uploadedFile != null) {
    String mimeType = uploadedFile.getContentType();
    if (mimeType == "application/x-zip-compressed") {
    // get the uploaded file as a zip file
    ZipFile zipFile = new ZipFile(uploadedFile.getFilename());
    // verify the zip archive contains only one entry
    if (zipFile.size() != 1) {
    FacesContext context =
    FacesContext.getCurrentInstance();
    ResourceBundle errorMessage =
    ResourceBundle.getBundle(context.getApplication().getMessageBundle());
    Exception ZipFileContentException =
    new Exception(errorMessage.getString("error.fileUpload.zipFileContent.moreThanOneEntry").replace("{0}",
    String.valueOf(zipFile.size())));
    throw ZipFileContentException;
    // get the entries in the zip file even it is only one
    Enumeration zipFileEntries = zipFile.entries();
    // Process each entry
    while (zipFileEntries.hasMoreElements()) {
    // grab a zip file entry
    ZipEntry entry =
    (ZipEntry)zipFileEntries.nextElement();
    // check the entry is not a directory
    if (entry.isDirectory()) {
    Exception ZipFileContentException =
    new Exception(JSFUtils.getStringFromBundle("error.fileUpload.zipFileContent.isDirectoryInsteadFile"));
    throw ZipFileContentException;
    File destFile = new File(entry.getName());
    Magic magic = new Magic();
    // getMagicMatch accepts Files or byte[],
    // which is nice if you want to test streams
    MagicMatch match = magic.getMagicMatch(destFile, true);
    if (match.getMimeType() != "application/xml") {
    Exception ZipFileContentException =
    new Exception(JSFUtils.getStringFromBundle("error.fileUpload.isNotXMLFile").replace("{0}",
    match.getMimeType()));
    throw ZipFileContentException;
    //TODO get the repository directory from classification-param.xml
    BufferedInputStream is =
    new BufferedInputStream(zipFile.getInputStream(entry));
    FileOutputStream fos = new FileOutputStream(destFile);
    BufferedOutputStream dest =
    new BufferedOutputStream(fos, BUFFER);
    // read and write until last byte is encountered
    while ((currentByte = is.read(data, 0, BUFFER)) !=
    -1) {
    dest.write(data, 0, currentByte);
    dest.flush();
    dest.close();
    is.close();
    zipFile.close();
    } else if (mimeType == "application/xml") {
    String currentEntry = uploadedFile.getFilename();
    File destFile = new File(currentEntry);
    BufferedInputStream is =
    new BufferedInputStream(uploadedFile.getInputStream());
    FileOutputStream fos = new FileOutputStream(destFile);
    BufferedOutputStream dest =
    new BufferedOutputStream(fos, BUFFER);
    // read and write until last byte is encountered
    while ((currentByte = is.read(data, 0, BUFFER)) != -1) {
    dest.write(data, 0, currentByte);
    dest.flush();
    dest.close();
    is.close();
    } else {
    Exception ZipFileContentException =
    new Exception(JSFUtils.getStringFromBundle("error.fileUpload.isNotXMLFile").replace("{0}",
    mimeType));
    throw ZipFileContentException;
    }

  • Ampersands in component names (very minor issue)

    This issue is not creating any problems for me, just something I have observed.  When an ampersand (&) symbol is inserted into a component name, the ampersand is not actually displayed anywhere once the change is made, but what appears to be an underscore (_) appears instead.  A space also appears at the beginning of the component name within the Object Browser.  Obviously a very minor issue but thought I should report it.

    Well, for what it's worth, this is what I get at this moment when I attempt to view this thread while logged in under Firefox 3.03:
    An error in the system has occurred. Please contact the system administrator if the problem persists.
    type: java.lang.NullPointerException
    java.lang.NullPointerException
         at jsp_thread_2d_flat1226300463732._jspService(jsp_thread_2d_flat1226300463732.java:556)
         at com.sap.engine.services.servlets_jsp.server.jsp.JspBase.service(JspBase.java:112)
         at com.sap.engine.services.servlets_jsp.server.servlet.JSPServlet.service(JSPServlet.java:544)
    code}
    It's actually a very long block of code.  When I refresh, sometimes no posts are displayed at all here.

  • How do you get the names of all your components on a JFRAME

    please help me on this issue. when i got the refrences it worked for me, however when i wanted to get the component name i got a NULL.

    Are you sure your components name is set ?

  • How to find the ABAP Webdynpro Component Name in the Portal IView(WDA)

    Hi All
    I got one ABAP Webdynpro IView in portal , when i opened the Iview i got the Application name of ABAP Webdynpro in the properties of the Iview but i could not able to find the component name .
    Please let me know how to find the component name of WDA , as i already got the Application name of component  from Iview i.e WDA_ED_RDF ( this is applicaiton name found in the portal Iview for ABAP Webdynpro)
    Please get back to me on the same , it would be great help to me.
    Thanks,
    PortalUser100
    Edited by: PortalUser100 on Mar 24, 2011 11:51 PM

    Hi
    Right Click on any UI Element in Portal->Go to more field help->TEchical Information. You can see all the information about component, application, ui elements etc.
    Please check this... may helps more
    http://wiki.sdn.sap.com/wiki/display/WDABAP/GeneralTechnicalAspects
    Thanks,
    Venkat.

  • Portal Runtime Error -  iview: N/A, Component Name: N/A

    Hi All,
    We are getting the following error when trying to access a tab in our portal
    Portal Runtime Error
    An exception occurred while processing the request for:
    iView: N/A
    Component Name: N/A
    and when I looked at the exception log I found the following trace:
    Exception ID:03:34_31/12/07_0135_209744050
    [EXCEPTION]
    com.sapportals.portal.prt.component.PortalComponentException: Error in service call of Portal Component
    User : lynchjp
         at com.sapportals.portal.prt.core.PortalRequestManager.handlePortalComponentException(PortalRequestManager.java:969)
         at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:343)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
         at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:753)
         at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:240)
         at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:522)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:405)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Caused by: com.sapportals.portal.prt.core.PortalRequestManagerException: PortalRuntimeException
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:143)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
         at com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:215)
         at com.sapportals.portal.prt.pom.PortalNode.service(PortalNode.java:646)
         at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
         ... 24 more
    Caused by: java.lang.NullPointerException
         at com.sapportals.portal.navigation.NavigationService.getNode(NavigationService.java:355)
         at com.sapportals.portal.navigation.cache.CachedNavigationService.getNode(CachedNavigationService.java:156)
         at com.sapportals.portal.navigation.NavigationEventsHelperService.getCurrentNavNode(NavigationEventsHelperService.java:373)
         at com.sapportals.portal.navigation.NavigationEventsHelperService.getCurrentLaunchNavNode(NavigationEventsHelperService.java:428)
         at com.sapportals.portal.navigation.fpm.NavigationFpmListener.addToHistory(NavigationFpmListener.java:287)
         at com.sapportals.portal.navigation.fpm.NavigationFpmListener.doNavigatePhase(NavigationFpmListener.java:98)
         at com.sapportals.portal.navigation.fpm.NavigationFpmListener.doPhase(NavigationFpmListener.java:70)
         at com.sapportals.portal.pb.fpm.FPMContainer.distributeEvent(FPMContainer.java:63)
         at com.sapportals.portal.pb.fpm.FPM.doDocumentHook(FPM.java:143)
         at com.sapportals.portal.prt.service.document.DocumentHookMulticaster.doDocumentHook(DocumentHookMulticaster.java:100)
         at com.sapportals.portal.prt.service.document.DocumentHookService.doDocumentHook(DocumentHookService.java:119)
         at com.sapportals.portal.prt.service.document.DocumentHookServiceNew.doDocumentHook(DocumentHookServiceNew.java:183)
         at com.sapportals.portal.prt.connection.PortalHook.doDocumentHook(PortalHook.java:824)
         at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:261)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
         ... 28 more
    Any idea as to why this is happening? Would a portal restart or workset remigration resolve this issue?
    Thanks,
    KN.

    Hi,
    Try removing iview and assiging back becoz error is saying that iview not found so remove iview and assign again
    Regards
    Krishna.

Maybe you are looking for

  • STO for sales order stock

    Hi All If I am not mistaken, one cannot do a STO for special stock using 2 step transfer, however it is possible in a one step process. I have made the setting in config to use a one step process, and it have been set up to use movement type 647. I a

  • Combine 2 rows

    I have result of a query as : emp_id emp_name wife_1 wife_2 wife_3 12   abc      xx 12   abc          yy 34  xyz         tt 34  xyz           pp 34   xyz                  uu I want to combine these reords so that the result should be like this : emp_

  • Invisible frame boundries

    Hi you'all. Anyone out there know how to make frame boundaries invisible so that a home page has a seamless colored background and graphics are superimposed. Thus a .pdf file text should superimpose over the page background without a text-box like bo

  • Link midlets to another midlets

    i would like to link midlets to midlets without passing the commands button.

  • Cannot use Protectlink on WRVS4400N

    Hello i have my LR-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX code but i dont know how to use protectlink servics to block the websites and manage the network please any one can help me with this