How to append structure dynamically to another structure

Hi Everyone,
My requirement is like this.
PERFORM fill_additional_fields_f16 USING         'RIHAFVC'
                                                        CHANGING <ls_object_tab>.
FORM fill_additional_fields_f16  USING         iv_structure_name TYPE strukname
                                                  CHANGING  cs_object    type any.
endform.
Now my question is how to append the structure IV_STRUCTURE_NAME to CS_OBJECT in the subroutine.
Thanks in advance
-Regards
  TOM

Have a look at the below link.
https://wiki.sdn.sap.com/wiki/display/Snippets/Add%20a%20column%20to%20an%20internal%20table%20dynamically
Thanks

Similar Messages

  • How to append structure into transperant table in sap abap

    Hi all,
      I have 1 structure already in the data dictionary .
    And this structure is already being used by other transperant table for creatin the fields .
    Now i need to create new table and wann use the same structure .
    when i click on the Append Structure it shows that this structure us already been assign to other table .
    So, can i not used the same structure for more than 1 transperant table |???
    Praff

    Hi Prafful,
    You cannot append the same structure, if already used.
    I think you can include the structure instead of appending it.
    Goto the change mode (CTRL+F1).
    Edit -> Include -> Insert.
    Hope this helps...
    Lokesh
    pls. reward appropriate points

  • How to append to dynamic table

    hi, everyone
    I want to append some data to a dynamic internal table.
    I have some code like following:
    form dyna  using  itab.
    DATA: NEW_LINE type ref to data.
    FIELD-SYMBOLS: <FS_1> type any table,
                   <FS_2>,
                   <FS_3>.
    assign itab to <FS_1>.
    create data NEW_LINE like line of <FS_1>.
    assign NEW_LINE->*  to <FS_2>.
    assign component 1 of structure <FS_2> to <FS_3>.
    <FS_3> = 'I'.
    assign component 2 of structure <FS_2> to <FS_3>.
    <FS_3> = 'ABC'.
    then <FS_2> is the entry I want to append now
    append ???
    endform.
    What I want to know is how to append the <FS_2> to the dynamic table. I require the entry can be append, and return out of this form.
    Any suggestion and answer is welcome
    Hope your reply, thanks a lot

    Hi,
    try out like this.
    data: begin of itab occurs 0,
          val1 type c,
          val2(3) type c,
          end of itab.
    data ws_itab like itab.
    DATA: NEW_LINE type ref to data.
    FIELD-SYMBOLS: <FS_1> type standard table,
    <FS_2>,
    <FS_3>.
    assign itab[] to <FS_1>.
    create data NEW_LINE like line of <FS_1>.
    assign NEW_LINE->* to <FS_2>.
    assign component 1 of structure <FS_2> to <FS_3>.
    <FS_3> = 'I'.
    assign component 2 of structure <FS_2> to <FS_3>.
    <FS_3> = 'ABC'.
    append <FS_2> to <FS_1>.
    Regards,
    Jagath

  • How to append a ResultSet to another ResultSet?

    Hi,
    How could I append a ResultSet to another ResultSet object if their columns are exactly the same?
    For example, I have some methods that return ResultSet objects for particular queries.
    int a = 3;
    ResultSet rs1 = getRoute(20, a);
    ResultSet rs2 = getRoute(a, 40);
    ResultSet rs3 = rs1 + rs2;
    How do I combine the two ResultSet objects together instead of writing the last statement? Thank you.
    -Henry Chang

    As I noted earlier, UNION is always going to re-sort your results and remove any duplicate rows; UNION ALL might or might not depending on the database implementation.
    I think Oracle happens to be among the databases that will produce a concatenated result FROM UNIUN ALL, without resorting, but if not, and if your database happens to be Oracle, then this will work:
    SELECT * FROM
      (SELECT test_table.*, 1 subresult_no, rownum row_no
      FROM test_table
      WHERE column_a = 20 AND column_b = 10
      ORDER BY order_no)
    UNION ALL
      (SELECT *, 2 subresult_no, rownum row_no
      FROM test_table
      WHERE column_a = 10 AND column_b = 30
      ORDER BY order_no DESC)
    ORDER BY subresult_no, rownum row_no"rownum" is an Oracle feature, it's a pseudo-column that gives the row index at that point in the computation.
    The above SQL will of course add 2 columns to your result set; you can of course suppress them by explicitly listing your selected columns; doing so is widely considered to be good practice anyway.

  • How to append a gif to another gif in adobe photosop cs5 extended???

    like i have two gif files and i need to apppend 2 gif file at the end of 1st gif file,,so that i 'll a single gif.

    There is no such thing as an "append" with GIF files, since adding frames always affects the color palette, which is global. Ultimately it doesn't matter if you use PS or another tool to add the frames, but of course using e.g. Ulead GIF Animator may be a bit more straightforward than going through the song and dance in PS...
    Mylenium

  • How to append the dynamically created sequence in to the main sequence

    i have created a sequence dynamically using c# with myEngine.NewSequence(). I  am loading this sequence into a sequence file created using myEngine.NewSequenceFile(). every sequence file has a main sequence by default. Now I need to append the created sequence in to the main sequence. can you please help me to solve this issue?

    1. Sequence seqMain = seqFile.GetSequenceByName("MainSequence");  2. Your stuff that creates a SequenceStuff e.g. "Hello"3. Step stepSeqCall = engine.NewStep(AdapterKeyNames.SequenceAdapterKeyName, "SequenceCall"); 4.stepSeqCall.Name = "HELLO" or sequenceStuff.Name;5. objModule.UseCurrentFile = true;
    6.objModule.SequenceName = stepSeqCall.Name ;
    7.seqMain.InsertStep(stepSeqCall, nSeq, StepGroups.StepGroup_Main);
    Greetings from Germany
    Juergen
    =s=i=g=n=a=t=u=r=e= Click on the Star and see what happens :-) =s=i=g=n=a=t=u=r=e=

  • Modify fields in Append Structure

    Hi there,
    I am driving crazy about append structures. We appended a few fields to KNA1 - e.g. a field that keeps a version number (every time a record changes we want to increment the version starting with 1 at creation time).
    We found a lot of material about how to append structures and actually, it's fairly simple to extend KNA1 with append structures. But HOW can someone update those fields?
    We tried user exit EXIT_SAPLVV01_001 and BAdI IF_EX_CUSTOMER_ADD_DATA-SAVE_DATA to populate those fields at commit of customer data. In both scenarios, we don't have CHANGING or EXPORTING parameters. So, we tried to update the table directly, e.g.
    method IF_EX_CUSTOMER_ADD_DATA~SAVE_DATA .
    DATA: w_kna1 type kna1.
    select single *
      from kna1                            " Customer master table
      into w_kna1
      where kunnr = I_KUNNR.
    w_kna1-sap_version = w_kna1-sap_version + 10.
    update kna1 from w_kna1.
    break-point.
    endmethod.
    Now, when we execute VD02 the program stops at the given break-point and we see the data changed in KNA1. But the record gets updated by the SAP program SAPMF02D (underlying program of VD02), of course as we cannot manipulate the KNA1 record in the internal table of SAPMF02D.
    Is there any way to store information into append structures at save time (within the same transaction) without customizing standard programs?
    Many thanks for your help

    Hi Maic,
    Normally for append structures to standard tables, code is written in user exits where it is mandatory to change existing SAP objects (user exits exist are provided by SAP and you need change key).
    For additional functionality to the existing flow of transaction, we use BADIs and customer exits (through CMOD).
    Your requirement suits the first point above.
    Annyways, try using method GET_DATA in badi CUSTOMER_ADD_DATA_CS. This has changing parameter for KNA1.
    Ramesh.

  • How do I find the name of an append structure?

    Lets say I want to add a field to the component BT115QS_SLSQ (Sales quote search).
    I enhanced the component and the view (SlsQuotSQ).
    If I go to the context nodes and the context node BTQSLSQUOT.
    I can see the implementation class ZL_BT115QS_SLSQUOTESQ_CN00.
    If I go inside of this class I see a tab attributes with a field called base_entity_name
    the initial value is BTQSlsQuot for this attribute.
    But how would I ever know that the append strcture name for this component / view is CRMST_QUERY_SLSQUOT_BTIL ???
    I only displayed it above becuase I did endless searches and realized this is the one.  But is there an easier way to find the append strcture name so that when I go to SE11 I can either copy and paste it in or type it in.  Is there somewhere in the workbench or anywhere which tells me its in this case CRMST_QUERY_SLSQUOT_BTIL ???
    How do I find this name ?

    Edit:
    FOUND THE ANSWER!
    Here is a complete document I put together for anyone else with this issue.
    I would really love to blog SAP issues like this because there seems to be very little help on the forums for the CRM Web client side :(...
    Purpose
    The purpose of this document is to explain how to find the append structure and how to use it.
    Problem
    Letu2019s say I want to add a field to the component BT115QS_SLSQ (Sales quote search).
    I enhanced the component and the view (SlsQuotSQ).
    If I go to the context nodes and the context node BTQSLSQUOT (this is in the context nodes area)
    I can see the implementation class ZL_BT115QS_SLSQUOTESQ_CN00.
    If I go inside of this class I see a tab attributes with a field called base_entity_name
    the initial value is BTQSlsQuot for this attribute.
    That is the key here, in order to determine the append structure to use when going into SE11 you need to know the name of the base_entity_name.  In the above case the base entity name is BTQSlsQuot.
    That means you need to use BTQSlsQuot
    Step By Step Procedure
    1)     Get the base entity name as described above
    2)     Once the base entity name is given go to transaction GENIL_MODEL_BROWSER
    3)     Enter a component or a component set like so:
    a.     
    4)     Press the green check box
    5)     For model select u201CDynamic Search Objectsu201D (for this particular case because we are trying to add a field to a dynamic search)
    6)     Select u201CDynamic Query Object BTQSlsQuotu201D
    7)     Once you expand this you should be given the attribute structure as shown below:
    Now you have the attribute structure name CRMST_QUERY_SLSQUOT_BTIL
    How To Use Append Structure
    Now that youu2019ve found the append structure to use it follow these steps:
    1)     Go to SE11
    2)     Click radio button Data type
    3)     Enter CRMST_QUERY_SLSQUOT_BTIL
    4)     Click display like so:
    a.     
    5)     Click the u201Cappend structureu2026u201D button at the top right
    6)     Add the field as a ZZ field and enter the data type like so:
    a.     
    References
    No search available for field //BTOPPORTH/EXPREVENUE (STRUCT.EXP_REVENUE) ?
    Field Available in Results List But Not Available In Search Criteria?
    Edited by: Hermiz Jon on Jan 6, 2011 5:51 PM

  • How to find where the code for append structures for LIS extractors?

    Hi,
    I found 4 append structures for extractor 2LIS_03_BF,
    Out of 4 append structures, I found code for one, using where-used option. But in vain for other 3. Is it possible they didn't transport the code for remaining structures? how to find that?
    Cheers,
    Kannan N

    Kannan,
    When ever you apply a logic to populate tdata for the appended filed then you will be writing some code in CMOD transaction code where you will find a ZXRSAU01
    program, just double click on that then it will take you to the complete exit. Ther you can find with your data source name.
    Hope it helps...
    ****Assign Points if it helps******
    Gattu

  • How to find the program for append structure upload

    Hi all,
    I am facing a issue that one Char. in a ODS, I have found the source field for this Char. in R3 in a extract structure. But this field locates in an appended structure, so this means the value of the field must be updated by ABAP. My question is How I can find the ABAP program(BADI or User exit?)
    Thanks
    Leon

    Hi,
    First u identify the type of DS, then according to the type of DS, go to CMOD, provide the project name then select the enhancements there it will display the four Exits, select the appropriate one,
    if DS is of Type,
    Transactional - EXIT_SAPLRSAP_001
    MD ATTR - EXIT_SAPLRSAP_002
    MD TEXT - EXIT_SAPLRSAP_003
    MD HIER - EXIT_SAPLRSAP_004
    double click on the particular one then select the include program there u will fild the code fro all the DSs.
    Hope this inflammation help u.............
    Assinging Points is the way of saying Thanks in SDN
    Regards
    Ramakrishna Kamurthy

  • How to delete an appended structure

    Hi everyone-
      I have appended a structure to MC02M_0ITM (2lis_02_itm) and now I want to delete this. Can somebody tell me how can I do this?
    Thanks.

    Hi Punzu,
    You need not delete the appended structure, rather just check the "Hide field" column against the field in your datasource(RSA5 or RSA6 in R/3).
    This excludes the field in the extraction structure from the data transfer . The field is then no longer available in BW for determining transfer rules and therefore cannot be used for generating transfer structures.
    So this accomplishes the task which your are looking for in a wise manner, because if in the future when u require the same field in ur transfer structure u can just uncheck the "Hide field" option and use it.
    Hope this helps
    Samarasimha

  • How to append S950 Info structure with the structure ZS950

    I have created Info structure ,now How to append S950 Info structure with the structure ZS950

    Refer this link:
    Addition of a new field to a standard table .
    Regards,
    ravi

  • How can i delete append structure  ?

    i created / add append structure to standard table  ,
    but now i want to delete here  , how can i do so  ?
    i didn't find any option for it  .
    thanks  .

    Hi Dakota,
    Go to SE11 and give the name of the structure that you have created.
    (Say ZVBAK.. for VBAK..) and just click on the delete (trash can) icon.
    This structure will also be inactivated in the table.
    Regards,
    Sameer

  • How to activate the transparent table along with append structure

    Hi,
    I add the new fields in existing append structure on tale VBAP.
    Initially i provide them the data type as Char with length 20.
    Similarly i added the fields in user exit on scree 8459 to add fields on screen.
    Until this eveything was working fine.
    Then my functional consultant ask me to delete one field from structure and change the length of other data types to 40 characters.
    I done this changes but when i go to activate that append structure its giving me error that certan structures in which it is been used are not adjusted and activated.
    The table is not adjusted through SE14 - Database Utlity.
    Its showing me that Runtime Object and Transparent table are different and not consistent.
    Can i delete the runtime object?
    The domains which i ave changed are also not geing activated.
    Suggest me the node of problem and solution also.
    What should be the problem.
    What should i do to solve the problem.
    Suggest me the solution if any.

    Give a trail that instead of activating all together, activate low-level objects (domains, data elements etc)first and then high levels (structures, tables) individually. With this approach you could find the errors easily and can resolve quickly.
    Regards,
    Prasanth

  • How to append a structure to a std table

    I appended two fields to vbak but these are not reflecing in the program.,i.e in program syntax error is showing that no componenet exist.
    Please help out.
    Thank you
    Bhanu

    Hi
    steps:
    0)Append structures allow you to attach fields to a table without actually having to modify the table itself. You can use the fields in append structures in ABAP programs just as you would any other field in the table.
    1)Click on the append structure tab and opt to create new
    structure.
    Append structures allow you to enhance tables by adding fields to them that are not part of the standard. With append structures; customers can add their own fields to any table or structure they want.
    Append structures are created for use with a specific table. However, a table can have multiple append structures assigned to it
    2)Customers can add their own fields to any table or structure they want.
    The customer creates append structures in the customer namespace. The append structure is thus protected against overwriting during an upgrade. The fields in the append structure should also reside in the customer namespace, that is the field names should begin with ZZ or YY. This prevents name conflicts with fields inserted in the table by SAP
    <b>Reward if usefull</b>

Maybe you are looking for