Append new field after call cl_abap_typedescr= describe_by_name( tabname )

Dears :
  i use cl_abap_typedescr=>describe_by_name( tabname ) to create a new structure type. The parameter tabname could be 'MARA' .
  and now i want to append a new field such as 'ZTEST' to this structure, is this possible ?
  ths in advance!

Hi,
  This is possible, Use get_components method to get the list of components
Then once yout get this list add one more component to this list.
Then use this list to create your strucutre using the method create.
See the below code.
DATA: lr_rtti_struc TYPE REF TO cl_abap_structdescr.
DATA: lt_comp       TYPE cl_abap_structdescr=>component_table.
DATA: ls_comp       LIKE LINE OF lt_comp.
    lr_rtti_struc ?= cl_abap_structdescr=>describe_by_data( wa_data ).
    lt_comp = lr_rtti_struc->get_components( ).
    LOOP AT it_elements INTO wa_element.
      ls_comp-name = wa_element.
      ls_comp-type = cl_abap_elemdescr=>get_string( ).
      APPEND ls_comp TO lt_comp.
    ENDLOOP.
    CALL METHOD cl_abap_structdescr=>create
      EXPORTING
        p_components = lt_comp
        p_strict     = abap_false
      RECEIVING
        p_result     = lr_rtti_struc.
Regards,
Sesh
Message was edited by:
        Seshatalpasai Madala

Similar Messages

  • Data vanishing in new fields after request activation in ODS

    Hi,
    I have added some new fields in ODS and updated it by end routine .Now when i run the dtp and check the data by pressing NEW DATA tab then i am able to see data updated in the new fields.
                       When i tried to activate that request in ODS ,the values that i populated in new fields got vansihed .I am not able to find wats d issue after activation even though before activating request in ODS all data is perfectly updated in new data table.
    Regards,
    Montz

    I have faced the same issue.Data was coming till new table,but after activation fields were getting
    blank.
    There is no necessity for doing a dummy mapping. In the transformation screen you will be having an ikon near to the delete
    routine symbol with an arrow symbol
    similar to select all and unselect all, just clikc on it and then mention the setting as Update all the target fields need to be populated.
    This will solve the issue, if it is not solved, then you can make a direct mapping to any of the field in the source, it need not be the
    exact field in the target.
    Thanks,
    Saveen Kumar

  • How to append new field in select clause of dynamic VO through CO

    I have dynamic VO "FaoWorkPerObjPerfRatingsVO" in controlloer below:
    public class FaoWorkApprObjectivesCO extends ApprObjectivesCO
    public void processRequest(OAPageContext oapagecontext, OAWebBean oawebbean)
    super.processRequest(oapagecontext, oawebbean);
    OAApplicationModule oam = oapagecontext.getApplicationModule(oawebbean);
    oracle.apps.fnd.framework.server.OADBTransaction oadbtransaction = oam.getOADBTransaction();
    OAViewObject oav = (OAViewObject)oam.findViewObject("FaoWorkPerObjPerfRatingsVO");
    if(oav != null)
    System.out.println("FAO Found VO PerObjPerfRatingsVO for ObjectivesAM. This means we have re-entered the page");
    } else
    oav = (OAViewObject)oam.createViewObject("FaoWorkPerObjPerfRatingsVO", "oracle.apps.per.selfservice.objectives.server.PerObjPerfRatingsVO");
    How can I append 2 new fields are MULTIRATERS_AVERAGE and COUNT_MULTIRATERS as statement below in select clause of dynamic VO above (FaoWorkPerObjPerfRatingsVO)
    fao_pems_utility.AVG_STEP_VALUE(fao_pems_utility.GET_APPRAISAL_ID(PCE.ASSESSMENT_ID),
    'MULTIRATER',
    Null,
    PCE.COMPETENCE_ID) MULTIRATERS_AVERAGE,
    fao_pems_utility.COUNT_RATINGS(Null,
    Null,
    fao_pems_utility.GET_APPRAISAL_ID(PCE.ASSESSMENT_ID),
    PCE.COMPETENCE_ID,
    Null,
    'MULTIRATER',
    Null) || ' out of ' ||
    (fao_pems_utility.HOW_MANY_RATING(fao_pems_utility.GET_APPRAISAL_ID(PCE.ASSESSMENT_ID),
    'GROUPAPPRAISER') +
    fao_pems_utility.HOW_MANY_RATING(fao_pems_utility.GET_APPRAISAL_ID(PCE.ASSESSMENT_ID),
    'REVIEWER')) COUNT_MULTIRATERS
    Thank you very much.

    Hi
    My VO is VO Extension below. In the seeded VO (oracle.apps.per.selfservice.objectives.server.PerObjPerfRatingsVO) doesn't include 2 fields that I want to add in VO.
    oav = (OAViewObject)oam.createViewObject("FaoWorkPerObjPerfRatingsVO", "oracle.apps.per.selfservice.objectives.server.PerObjPerfRatingsVO");
    Could you please provide me the coding to append 2 new fields in VO Extension approach. I would like to append them in select clause.
    Thank you.

  • Adding new field  in Call transaction

    Hi,
    i need to add a new field which is in flat file to  created transaction(vd01) using call transaction method.
    pls help me through step by step process
      thanks in advance
      Barkath

    1. Add the field in the file.
    2. Fill the BDCDATA table in your program ( find an exact and insert bdcdata record)
         perform bdc_field using 'RF02K-LIFNR' ITAB-LIFNR.
    Or
    Re-record VD01 and create a temporory program and check where exactly you need add the perform to fill bdcdata table.
    Regds
    Manohar

  • Append new fields to table

    Hello,
    If add a new field to a table (append structure) and I switch Off what happens to the information if the table fields was already used?
    Above all, what happpens when you switch off the fields in the table or structure are still available? I made a test and even if it´s switch off I can go to SE16 and made changes....
    Kind Regards.

    hi sagarika ,
      Here you go with the steps ,
    1) Modifing the  structure already appended to a DB table .
        Open the DB  table in change mode, double click on the structure name and bring it to the change mode for modification , and here add the needed fields in the structure , save and activate it . The new structure will then be reflected in your table .
    2) creating a structure and appending it to the DB table !
       go to Txn SE11 -> select the radio button data type -> give a name to it and select the create tab -> choose structure ->give the component name and component type save and activate  !
       again go to SE11 -> give the table name -> choose the change button -> u'll reach the table fields screen -> here you have option for APPEND Structure -> append the structure to your main table .. thats it ...
    Regards,
    Ranjita

  • Add new field in ME2N

    Hi Experts,
    How to add a new field(column) in ME2N output when you enter  value for "scope of list" as ALV on selection screen.
    I knew, the name of the structure that used to display output is MEREP_OUTTAB_PURCHDOC. I can append
    new field into this structure. But where we add data pulling logic for the added field?
    If the selection screen input for the field Scope of list" = 'ALV'.
    Then new code should trigger and pull long text from some Header text ID.
    Highly appreciated your reply. Thanks inadvance.
    Regards,
    Meera.

    Hi,
    Someone could add the new fields on the ME2N or ME3N Report?
    Because I'm searching how to do this in the standard report without copy it to a Z.
    I'd already add the fields in at the search screen with an enhancement-point but once I add the new field in one of the append structure in MEREP_OUTTAB_PURCHDOC I don't know how to proceed.
    I don't know where can I put the code for the db selection and adding to the ALV.
    You can also see another focus at this post:
    [Re: Report layout modification;
    Thanks far all Experts!!!!
    Regards.

  • EEWB - In BP, adding a new field regenerates append structure

    Hello,
    After adding or deleting a field using EEWB, I have the following issues -
    1. The new append structure that was created for BUT000 gets regenerated
    2. Field labels get overwritten by field names
    3. The order in which the fields were seen on the screen gets altered
    Is this a known behavior of EEWB?  How to alleviate this?
    Thanks!

    Thanks for your input Satish!
    I searched using the application component suggested and the keyword and it was not very useful. 
    Some more details -
    I created some new fields using EEWB.  When you go to transaction BP, the standard tabs are displayed - ex - address, bank data, notes, etc.  But now there is a new tab - Customer Data that has my custom fields on it. 
    In the backend, SAP has created an extend structure for table BUT000 that has these fields in it. 
    When I go to this extend structure, my fields are there with a ZZ prefix - Ex: ZZFIELD1, ZZFIELD2, etc.  If you go to the details of these fields in data dict - transaction SE11, the Field labels - Short, Medium, Long and Heading are the same as the field names.  Ex: in the first case, the four field labels will be - ZZFIELD1.  I then changed the field labels to something meaningful - Ex: Renter name and rental date.  After generating the structure, these labels are then displayed on the Customer data tab.  So far so good.
    However if I add a new field - ZZFIELD3, then all the label names that I had given (Ex: Renter name and rental date) get erased and replaced by the fieldnames again. 
    Also the order in which the fields were diplayed gets altered.  Ex: earlier the Customer data screen was showing - ZZFIELD1, ZZFIELD2.  Now it shows - ZZFIELD3, ZZFIELD2, ZZFIELD1. 
    I hope I have explained this issue.

  • Append hyphen automatically after the wrapping of text in the dimension field

    Post Author: Nita_here
    CA Forum: WebIntelligence Reporting
    I want to Append hyphen automatically after the wrapping of text in the dimension field.
    e.g the text reads "I want to wrap this text". then if cell width exceeds after "I want to wrap" then it should be displayed like this "I want to wrap-" "this text".
    Thanks in advance,
    Nita

    Post Author: Nita_here
    CA Forum: WebIntelligence Reporting
    Thanks for your input.
    Let me tell you what I have understood. I will create a variable having the formula (which i have earlier written) in universe. Whenever i need to use the formula in infoview, I will call the variable instead. That's fine. But again, I will have the same problem. If I do any change in infoview level, the cell width is bound to change as it is not the free standing cell, its a column among othe one. e.g.
    A  B  C
    1  2  3
    4  5  6
    (you can think B as the column). Any change(addition, deletion of columns) will certainly change the cell width of B. So, again I need to calculate the things, which i dont want.
    Nita_here: I manually calculated that after 12 characters, the cell wraps the text.
    I wonder if there would be a way to do the things dynamically.
    Thanks in advance,
    Nita

  • I am trying to generate purchase order and i create a BAPI also which is active. But when i call the BAPI from SYbase Mobile Object RFC then after calling it gives an Error "Conflict when calling a Function Module (Field Length)".

    i am trying to generate purchase order and i create a BAPI also which is active.
    But when i call the BAPI from SYbase Mobile Object RFC then after calling it gives an Error "Conflict when calling a Function Module (Field Length)".

    Hi,
    Yeah i tried my Z_BAPI in R3 and then giving some ERROR.
    This is my CODE-
    FUNCTION ZBAPIPOTV2.
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(POHD) TYPE  ZPOHD OPTIONAL
    *"     VALUE(POITEM) TYPE  ZPOITEM OPTIONAL
    *"  TABLES
    *"      RETURN STRUCTURE  BAPIRET1 OPTIONAL
    data: ls_pohd type bapimepoheader,
             ls_pohdx TYPE bapimepoheaderx,
             lt_poit TYPE TABLE OF bapimepoitem,
             lt_poitx TYPE TABLE OF bapimepoitemx,
             ls_poit TYPE bapimepoitem,
             ls_poitx TYPE bapimepoitemx.
       MOVE-CORRESPONDING pohd to ls_pohd.
       MOVE-CORRESPONDING poitem to ls_poit.
       ls_pohdx-comp_code = 'x'.
       ls_pohdx-doc_type = 'x'.
       ls_pohdx-vendor = 'x'.
       ls_pohdx-purch_org = 'x'.
       ls_pohdx-pur_group = 'x'.
       ls_poit-po_item = '00010'.
       APPEND ls_poit to lt_poit.
       ls_poitx-po_item = '00010'.
       ls_poitx-po_itemx = 'x'.
       ls_poitx-material = 'x'.
       ls_poitx-plant = 'x'.
       ls_poitx-quantity = 'x'.
       APPEND ls_poitx to lt_poitx.
    CALL FUNCTION 'BAPI_PO_CREATE1'
       EXPORTING
         POHEADER                     = ls_pohd
        POHEADERX                    =  ls_pohdx
    *   POADDRVENDOR                 =
    *   TESTRUN                      =
    *   MEMORY_UNCOMPLETE            =
    *   MEMORY_COMPLETE              =
    *   POEXPIMPHEADER               =
    *   POEXPIMPHEADERX              =
    *   VERSIONS                     =
    *   NO_MESSAGING                 =
    *   NO_MESSAGE_REQ               =
    *   NO_AUTHORITY                 =
    *   NO_PRICE_FROM_PO             =
    *   PARK_COMPLETE                =
    *   PARK_UNCOMPLETE              =
    * IMPORTING
    *   EXPPURCHASEORDER             =
    *   EXPHEADER                    =
    *   EXPPOEXPIMPHEADER            =
      TABLES
        RETURN                       = return
        POITEM                       = lt_poit
        POITEMX                      = lt_poitx
    *   POADDRDELIVERY               =
    *   POSCHEDULE                   =
    *   POSCHEDULEX                  =
    *   POACCOUNT                    =
    *   POACCOUNTPROFITSEGMENT       =
    *   POACCOUNTX                   =
    *   POCONDHEADER                 =
    *   POCONDHEADERX                =
    *   POCOND                       =
    *   POCONDX                      =
    *   POLIMITS                     =
    *   POCONTRACTLIMITS             =
    *   POSERVICES                   =
    *   POSRVACCESSVALUES            =
    *   POSERVICESTEXT               =
    *   EXTENSIONIN                  =
    *   EXTENSIONOUT                 =
    *   POEXPIMPITEM                 =
    *   POEXPIMPITEMX                =
    *   POTEXTHEADER                 =
    *   POTEXTITEM                   =
    *   ALLVERSIONS                  =
    *   POPARTNER                    =
    *   POCOMPONENTS                 =
    *   POCOMPONENTSX                =
    *   POSHIPPING                   =
    *   POSHIPPINGX                  =
    *   POSHIPPINGEXP                =
    *   SERIALNUMBER                 =
    *   SERIALNUMBERX                =
    *   INVPLANHEADER                =
    *   INVPLANHEADERX               =
    *   INVPLANITEM                  =
    *   INVPLANITEMX                 =
    ENDFUNCTION.
    i am trying to generate purchase order and i create a BAPI also which is active. But when i call the BAPI from SYbase Mobile Object RFC then after calling it gives an Error "Conflict when calling a Function Module (Field Length)". 

  • Why can't I create a document in my Facebook group on my iPad? It won't let me input any text into the text box field after I create a new document. Thanks.

    Why can't I create a document in my Facebook group on my iPad. It won't let me input any text into the text box field after I create a new document. Thanks.

    Just thought I'd add my solution, I decided to go with WebDAV and I think it actually works better than the iTunes way, the steps are pretty much the same but avoiding the iTunes interface just makes things easier and faster.
    I followed this guide but it does have a small mistake in the httpd-dav.conf file, on line 2, where it's WebServer/WebDAV">, it should be <Directory "/Library/WebServer/WebDAV">.
    The tricky part is setting permissions which if wrong will give you errors when connecting with the iPad, I opted to set all to Read&Write since my home network has a hardware firewall. Another convenience was to add an alias to the webdav share on the Desktop.
    I'm still expecting the call from Apple but even if they fix the iTunes I'm sticking with WebDAV, atleast until I see what's new with iOS5 and iCloud this fall which should bring true sync for documents (I'm hoping that they will offer encryption with my own keys, if not, then I'll probably keep using WebDAV).

  • ConnTrans fails after new fields are added to table & bdoc

    Hi,
    It was required to extend a standard object, which is responsible to create and move ATP data from ERP, to CRM, to Mobile Sales. I came quite far and I thought I have covered everything, but something is missing and ConnTrans has failed. I write down all steps and I hope you can find the missing step
    The adapter object CPB_STOCK_INFO is the responsible object for the transport. SMOCP_STOCK is the target table in CRM & MSA.
    - I have added a new field to CPSTOCK (ERP).
    - I have used R3AC3 to replace the extract module with my own module "Z_..." to fill the additional field on fly
    - In the R3AC3 I also have replaced the Mapping Module with my own, which which is able to handle the new field.
    - The object CPB_STOCK_INFO gets executed in CRM and the  SMOCP_STOCK gets filled as wanted
    - I have appended the new field also to the Segment fields of the bDoc CPSTOCK
    - I used the ClientConsole to generate & execute the SQL to update the DB sructure in MSA
    - If I press now ConnTrans, I get the error message "The application could not prcess some messages related to the BDoc Type CPSTOCK, Run ConTrans to send this information to the server."
    What went wrong? Do I need to play around with the SENDBIT thing?
    I am not able to find a detailed log file except the ConnTransLog.xml, which does not sure more details!
    Additional Info
    - MSA is not directly using the CPSTOCK bDoc for data queries. It is calling somehow the bDoc STOCK_QUERY. However, I do not think the MSA state could effect the ConnTrans?!
    Thank you for your help!
    Cheers,
    Andreas

    Hi,
    you need to generate also the metadata for the sBDoc CPSTOCK with ClientConsole and replace the tps.net on the Mobile Client.
    Only in this case conntrans is able to import these data.
    Regards,
    Wolfhard

  • Field sequence Change in Sales order after adding new field( Resolved)

    Hi I have added a new filed into sales order/item overview.(addded thr se51-layout ) . but when i go to va01/02/03, i noticed that the field sequence is changed due to my new field.(but when i see the layout its differnt and correct.)( even i checked changing the groups also)
    Is there something i need to do..?Please advise. Thanks a lot.
    <b>Answer:</b>
    Table view is configurable in VA01/02/03.( No matter where you add the  new fields)
    Users can always move them to desired position.
    Message was edited by: Deadlock1
    Message was edited by: Deadlock1
    Message was edited by: Deadlock1

    Hi
    In the comments for the subroutine, it says:
    *       Parameter new_pricing controls the new pricing in the calling *
    *       form. It can be filled according the the allowed values       *
    *       of domain KNPRS (Pricing type), for example:                  *
    *       ' ' = no new pricing                                          *
    *       B   = Carry out new pricing                                   *
    *       C   = Copy manual pricing elements and redetermine the others
    So, you must write:
    If VBAP_WERKS NE *VBAP_WERKS.
      new_pricing = 'B'.
    Endif.
    Regards
    Eduardo
    Edited by: E_Hinojosa on Aug 25, 2011 8:21 AM

  • I'm an avid Mac enthusiast who works in a creative field. However, I simply cannot afford a new Mac after my old one's internal hard drive failed. Can anyone recommend an affordable Mac option? I don't want to consider a non-Apple product.

    I'm an avid Mac enthusiast who works in a creative field. However, I simply cannot afford a new Mac after my old one's internal hard drive failed. Can anyone recommend an affordable Mac option? I don't want to consider a non-Apple product.

    Macs with a FireWire port will also boot happily from an External drive. You don't even need to open the MacBook.
    Some users buy a drive they would like to have as a future Internal drive, and also buy an external enclosure. They get the External set up the way they want it, then swap with the Internal drive.

  • Giving problem after I included the new field to MCHB table.

    Hi Friends,
    I added one new field called ZZINQNUM to the MCHB table.For this field I created one new data element called ZVBELN_INQUIRY and attached domain VBELN.
    Activated and adjusted  the table.
    Now what the problem is
    I went to SE11 -> Display - > Selected the contents -> In selection screen, I double clicked the ZZINQNUM select-option and selected the equal to space option. For this I am expecting all the records from the table,because in the field ZZINQNUM is empty. But result is zero entries.
    Can any one help me out in this. Thanks in advance.
    Thanks
    Srinu

    Hello Srinivasa
    Two years ago I had the very same problem when I added a new field to an already existing and filled customer table. I debugged the maintenance view and saw that the new field contained an undefined value but not the initial value.
    You could try and use the DB utility (<b>SE14</b>) and activate the table again (of course without deleting the table entries).
    Alternatively, you could write a simple ABAP to initialize the field value, e.g.:
    DATA:
      gs_mchb   TYPE mchb,
      gt_mchb    TYPE STANDARD TABLE OF mchb.
      SELECT * INTO TABLE gt_mchb.
      gs_mchb-zvbeln_inquiry = ' '. " space
      MODIFY gt_mchb FROM gs_mchb
        TRANSPORTING zvbeln_inquiry
        WHERE ( zvbeln_inquiry ne ' ' ).
      UPDATE mchb FROM TABLE gt_mchb.
    Regards
      Uwe

  • Need to know the changes required in proxy after enhancing one new field

    Hi All,
       I have a File to Proxy scenerio which is currently working fine. But the functional people have added two more fields in the table as a result we are not able to post any file in the table and the file goes intoerror.
    Note: We are not geting those new fields in our incoming file.
    Can anyone let me know from where else we have to changed the things to populate the file correctly in the table.
    Please let me know you need any further information.
    Thanks in advance.
    JAY

    Hi Jay,
          You regenrate the proxy structure(inbound interface) accordingly to local settings.
          please let me know, after regeneration also it is not reflecting.
          please do the following steps to regenrate.
          in s-proxy t.code, select message interface ( inbound)- right-click and chose option change/regenerate.
          save and activate, then it will reflect.
    regards
    mahesh.

Maybe you are looking for