HR Repeative Structures

Hello,
     Can some one give me a neat explaination or document with a example scenario and code on repeative stuctures please.
Regards
  SDN Powered

Hi ,
Repititive structures in HR are basically used to store amounts for the different wagetypes or u can say dates for the Different action ,
Please refer the sample codes ,
basically we access the values for the Repititive structures in the
code through do varying ,
DATA : BEGIN OF S_DATETYPE,
       DAR TYPE P0041-DAR01,
       DAT TYPE P0041-DAT01,
       END OF S_DATETYPE.
  RP_PROVIDE_FROM_LAST P0041 SPACE PN-BEGDA PN-ENDDA.
  IF PNP-SW-FOUND = 1.
   DO 12 TIMES VARYING S_DATETYPE-DAR FROM P0041-DAR01 NEXT P0041-DAR02
              VARYING S_DATETYPE-DAT FROM P0041-DAT01 NEXT P0041-DAT02.
      IF S_DATETYPE-DAR IS INITIAL.
        EXIT.
      ENDIF.
Hire Date Type.
      IF S_DATETYPE-DAR = C_HR.
        IT_OUTPUT-HIRE_TYPE = S_DATETYPE-DAT.
      ENDIF.
Rehire Date Type.
      IF S_DATETYPE-DAR = C_RH.
        IT_OUTPUT-REHIRE = S_DATETYPE-DAT.
      ENDIF.
Seniority Date Type.
      IF S_DATETYPE-DAR = C_SN.
        IT_OUTPUT-SENIORITY = S_DATETYPE-DAT.
        L_VAR = SY-DATUM - S_DATETYPE-DAT.
        L_VAR = L_VAR / 365.
        IT_OUTPUT-D_YEARS = L_VAR.
      ENDIF.
      IF S_DATETYPE-DAR = C_DD.
        IT_OUTPUT-DEATH = S_DATETYPE-DAT.
      ENDIF.
    ENDDO.
  ENDIF.
hope u find it usefull

Similar Messages

  • Repeating structure through the receiver file adapter

    I wanted to ask wheter it is possible to create repeating structure through the SAP xi receiver file adapter. What I'm trying to accomplish is this:
    Item1
    Item2
    Item1
    Item2
    (variable number of times).
    I can accomplish the following:
    Item1
    Item1
    Item2
    Item2
    What I could do is have the Item1 and Item2 fields in the same segment in the design time, but this would mean the file adapter would write all the items on a single line instead of two.
    There is no way to define line breaks between the the receiver file adapter field parameters ?
    There is no way to support nested structures in the recordset definition ie. Item1.Item2 ?

    Henri,
    What Vishal means is following:
    Add sequences of the tag <recordset> between pairs of item1, item2:
    <documentName>
       <<b>recordset</b>>
         <item1>
           <field-item1>column-value</field-item1>
           <field-item1>column-value</field-item1>
           <field-item1>column-value</field-item1>
         </item1>
         <item2>
           <field-item2>column-value</field-item2>
           <field-item2>column-value</field-item2>
           <field-item2>column-value</field-item2>
         </item2>
       </<b>recordset</b>>
       <<b>recordset</b>>
         <item1>
           <field-item1>column-value</field-item1>
           <field-item1>column-value</field-item1>
           <field-item1>column-value</field-item1>
         </item1>
         <item2>
           <field-item2>column-value</field-item2>
           <field-item2>column-value</field-item2>
           <field-item2>column-value</field-item2>
         </item2>
       </<b>recordset</b>>
    </documentName>
    A similar problem with header and items is in this thread:
    Repeating structure through the receiver file adapter
    Hope that helps,
    Stefan

  • How to pick the wage type (repeat structure) in pa0008 infotype and Pa0014.

    Hi all.
         Iam writing code we pick the data from Pa0008-lgart Pa0008-brt01.
        these two field are repeat structure.
       here iam given code what we writen.
    select pernr
              lgart
              betrg
                from pa0014
                into table it_p0014
              for all entries in it_p0001
                where pernr = it_p0001-pernr.
               and   it_p0014-lgart  = '1507'
               or   it_p0014-lgart = '1508'
               or   it_p0014-lgart = '1509'.
    if sy-subrc ne 0.
      message e063.
    endif.
    select pernr
           lga01
           bet01
             from pa0008
             into table it_p0008
             for all entries in it_p0001
             where pernr = it_p0001-pernr.
    if sy-subrc ne 0.
      message e063.
    endif.
    ***---> Using wage types.
    DO 20 TIMES VARYING lgart FROM it_p0008-lgart NEXT it_p0008-lgart
                VARYING betrt FROM it_p0008-betrg NEXT it_p0008-betrg.
    case lgart.
        when '1001'.        " HOURLY RATE.
          write:/ it_p0008.
        when '1500'.        " HOURLY RATE.
          write:/ it_p0008.
        when '1008'.        " RED CIRCULE HOURLY RATE.
          write:/ it_p0008.
    endcase.
    ENDDO.
    here i am getting o/p it featch the all the data.
    but i need only  1001,1500and 1008 records only.
    here iam using DO varing condition.
    please help me.
    and one more thing
    as well i featch the data from 14 infotype same lgart and betrg
    in 00014 infotype i need only 1507,1508,1509 recorde along with betrg.how to write code .  
    Regards,
    Krishna.

    DO 20 TIMES VARYING lgart FROM it_p0008-lgart NEXT it_p0008-lgart
    VARYING betrt FROM it_p0008-betrg NEXT it_p0008-betrg.
    WRITE:/ lgart, betrg.
    <b>case LGART.
    when '1001'. " HOURLY RATE.
    write:/ betrg.
    when '1500'. " HOURLY RATE.
    write:/  betrg.
    when '1008'. " RED CIRCULE HOURLY RATE.
    write:/  betrg.
    endcase.</b>ENDDO.
    check this.
    Regards
    Prabhu

  • How to pick the wage type (repeat structure) in pa0008 infotype.

    Hi all.
         Iam writing code we pick the data from Pa0008-lgart Pa0008-brt01.
        these two field are repeat structure.
       here iam given code what we writen.
    select pernr
              lgart
              betrg
                from pa0014
                into table it_p0014
              for all entries in it_p0001
                where pernr = it_p0001-pernr.
               and   it_p0014-lgart  = '1507'
               or   it_p0014-lgart = '1508'
               or   it_p0014-lgart = '1509'.
    if sy-subrc ne 0.
      message e063.
    endif.
    endif.
    ***---> Using wage types.
    *loop at it_p0008
    DO 20 TIMES VARYING lgart FROM it_p0008-lgart NEXT it_p0008-lgart
                VARYING betrt FROM it_p0008-betrg NEXT it_p0008-betrg.
    WRITE:/ lgart, betrg.
    case it_p0008-lgart.
        when '1001'.        " HOURLY RATE.
          write:/ it_p0008.
        when '1500'.        " HOURLY RATE.
          write:/ it_p0008.
        when '1008'.        " RED CIRCULE HOURLY RATE.
          write:/ it_p0008.
    endcase.
    ENDDO.
    here i am getting o/p it featch the all the data.
    but i need only  1001,1500and 1008 records only.
    here iam using DO varing condition.
    please help me.
    and one more thing
    as well i featch the data from 14 infotype same lgart and betrg
    in 00014 infotype i need only 1507,1508,1509 recorde along with betrg.how to write code .  
    Regards,
    Krishna.

    DO 20 TIMES VARYING lgart FROM it_p0008-lgart NEXT it_p0008-lgart
    VARYING betrt FROM it_p0008-betrg NEXT it_p0008-betrg.
    WRITE:/ lgart, betrg.
    <b>case LGART.
    when '1001'. " HOURLY RATE.
    write:/ betrg.
    when '1500'. " HOURLY RATE.
    write:/  betrg.
    when '1008'. " RED CIRCULE HOURLY RATE.
    write:/  betrg.
    endcase.</b>ENDDO.
    check this.
    Regards
    Prabhu

  • Repeat Structure in 0168 Infotype

    Hi All,
             How can i access the data from the infotype 0168 repeat structure like (ITS01 DTY01 DID01 BPT01). I need to move the this structure values into a internal table.
    Please Suggest me with some Code....
    Thanks in Advance,
    Yogesh.

    DO 20 TIMES VARYING lgart FROM it_p0008-lgart NEXT it_p0008-lgart
    VARYING betrt FROM it_p0008-betrg NEXT it_p0008-betrg.
    WRITE:/ lgart, betrg.
    <b>case LGART.
    when '1001'. " HOURLY RATE.
    write:/ betrg.
    when '1500'. " HOURLY RATE.
    write:/  betrg.
    when '1008'. " RED CIRCULE HOURLY RATE.
    write:/  betrg.
    endcase.</b>ENDDO.
    check this.
    Regards
    Prabhu

  • Infotype creation with repeat structure

    Hi All,
    I need to create the custom infotype with repeat structure in the PS-structure.
    There are around 90 fields need to be added in the structure. If we look in the standard structure of the repeat structure, its a include structure(p0008 and p0168 etc). I cant able to include the structure in my custom infotype. If i give the repeat structure in my PS structure( in my custom infotype structure) its throwing an error in the screen fields. How can i resolve this issue.
    Is there any way that the structure can be included in the structure.
    Please provide me the solution.
    Thanks,
    Yogesh

    Hi Yogeshwaran,
         First create a structure with the repeat structures. For eg if U want to create a repetetive structure with pernr , dat and name . Create the structure as follows:
    pernr1, dat1,name1. Next time should be like pernr2,dat2,name3. Next time should be like pernr3,dat3,name3.....
    Note: Even if it is a repetetive structure U should not provide the same name for all the repetetive fields.

  • Design with repeating structure /Duplicate Structures

    I have to develop a layout in Ultiboard, which has a repeating structure (each repetition uses the same circuit). For saving time my idea was to only input one of that structure in Multisim, export that single structure into Ultiboard, develop a layout for that single structure and afterwards copy that structure as often as it is needed in the complete circuit.
    Trying to do so does not work. When I duplicate the layouted structure with Edit/Copy Paste, all Netlist information and traces for the copied structure is lost, so it looks that this is not the right way to do so.
    Is there some method so duplicate/clone parts of the layout without loosing the connection and traces?

    This may or may not be what you need, but you can group parts together and then use group replicate. I haven't tried this method so I am not sure about the nets with this method. What I have done in the past is to just window the entire area and the use the copy function. When pasting I use "paste special" and this should make a direct duplicate of everything. I know there is at least one other method, but I can't recall it at the moment.
    The one thing to watchout for is that if this pasting is done to the same board the Refdes will increment. If this is desirable then that isn't a problem, but if you are trying to create a panel board then that is not acceptable and I don't think you can do anything about it.
    I hope some of this is of use as I am remembering this off the top of my head.
    Kittmaster's Component Database
    http://ni.kittmaster.com
    Have a Nice Day

  • What is repeated structure?

    what is repeated structure?
    Title edited by: Alvaro Tejada Galindo on Jun 12, 2008 6:46 AM

    Hi,
             In many master data infotypes the data is stored in the form of repetitive structures. For example infotype 0008, the structure wage type line is available for 20 times, that is an employee is eligible for having 20 different wage types based on his benefits. When evaluating repeat structures, you must ensure that all fields are entered. In the case of the Basic Pay infotype, 20 * 5 = 100 fields are queried.
    To use this method of evaluation, define a field string whose structure corresponds to the fields in one line of the repetitive structure.
    Example for understanding the repetitive Structure
         Say, for an employee you want to know that for what all wage types an employee is eligible for the latest period you mentioned on the selection screen.
      Using LDB (PNP)
    Program:
      Report zhr_repstru.
      Tables Pernr.
       Infotypes 0008. 
    u2022     You have to declare a structure same as repetitive structure in the 0008 infotype
       Data: begin of s_wagetypes,
                    Wagetype type p0008-lga01,
                    Amount      type p0008-bet01,
                    Hours         type p0008-anz01,
                    Unit            type p0008-ein01,
                    Ind             type p0008-opk01,
                End of s_wagetypes, 
    u2022     Selecting data from the Data base       Get pernr
    u2022     Getting the latest record based on the selection period.
          RP_PROVIDE_FROM_LAST P0008 SPACE PN-BEGDA PN-ENDDA.
    u2022     Now knowing for what all wage types the employee is eligible.
    Do 20 times varying s_wagetypes from p0008-lga01 next p0008-lga02.  If s_wagetypes-wagetype is initial.
    o     Here the data is stored sequentially, i.e., if the employee is eligible for 5 wage types then all the 5 wage types are stored sequentially in lga01 to lga05 respectively. So, if say the lga05 is initial then it is understood that, employee is eligible for only 4 wage types and from lga05 to lga20 structures will be empty so, we need not process further
                Exit.
            Else.
               Write: / s_wagetypes-wagetype,
                            S_wagetypes-amount.
            Endif.
    Enddo.

  • Sender file adapter content with repeating structure

    i have a scenario where my source file could have the following structure:
    node1 (1:1)
    node2 (0:1)
    node3 (0:n)
    node1 (1:1)
    node2 (0:1)
    node3 (0:n)
    each node will have many fields. the three different nodes can repeat like this unbounded times. how would i define my content conversion and my data type to capture this structure? any help is appreciated.

    hi chris,
    make your Content Conversion Parameters as:
    Document Name "your doc_name"
    Document Namespace "your name space"
    Recordset structure node1,1,node2,1,node3,*,
    Key Field Name Record Type
    Key Field Type String
    To differentiate the incomings to each nodes, we need a key value
    say 01 for each node1 (you can use your own) *
    Entry in FCC (below table)
    node1.fieldFixedLengths "enter the length of the fields separated by commas
    node1.fieldNames  "specify the actual fieldnames separated by comma (no whitespace)
    node1.keyFieldValue "enter the key value - for node1 i took as 01" *
    make same entries for all the nodes
    thanks n regards,
    nikhil bos
    <i>reward if helpful

  • ALV report with dynamic columns, and repeated structure rows

    Hey Guys,
    I've done some ALV programming, but most of the reports were straight forward. This one is a little interesting. So here go the questions...
    Q1: Regarding Columns:
    What is the best way to code a report with columns being dynamic. This is one of the parameters the user is going to enter in his input.
    Q2: Regarding Rows:
    I want to repeat a structure(say it contains f1, f2, f3) multiple time in rows. What is the best way to do it? The labels for these fields have to appear in the first column.
    Below is the visual representation of the questions.
    Jan 06  , Feb 06, Mar 06....(dynamic)
       material 1
    Current Stock
    current required
    $Value of stock
       material 2
    Current Stock
    current required
    $Value of stock
       material 3
    Current Stock
    current required
    $Value of stock
    Thanks for your help.
    Sumit.

    Hi Sumit,
    Just check this sample from one of the SAP site
    ABAP Code Sample for Dynamic Table for ALV with Cell Coloring
    Applies To:
    ABAP / ALV Grid
    Article Summary
    ABAP Code Sample that uses dynamic programming techniques to build a dynamic internal table for display in an ALV Grid with Cell Coloring.
    Code Sample
    REPORT zcdf_dynamic_table.
    * Dynamic ALV Grid with Cell Coloring.
    * Build a field catalog dynamically and provide the ability to color
    * the cells.
    * To test, copy this code to any program name and create screen 100
    * as described in the comments. After the screen is displayed, hit
    * enter to exit the screen.
    * Tested in 4.6C and 6.20
    * Charles Folwell - [email protected] - Feb 2, 2005
    DATA:
    r_dyn_table TYPE REF TO data,
    r_wa_dyn_table TYPE REF TO data,
    r_dock_ctnr TYPE REF TO cl_gui_docking_container,
    r_alv_grid TYPE REF TO cl_gui_alv_grid,
    t_fieldcat1 TYPE lvc_t_fcat, "with cell color
    t_fieldcat2 TYPE lvc_t_fcat, "without cell color
    wa_fieldcat LIKE LINE OF t_fieldcat1,
    wa_cellcolors TYPE LINE OF lvc_t_scol,
    wa_is_layout TYPE lvc_s_layo.
    FIELD-SYMBOLS:
    <t_dyn_table> TYPE STANDARD TABLE,
    <wa_dyn_table> TYPE ANY,
    <t_cellcolors> TYPE lvc_t_scol,
    <w_field> TYPE ANY.
    START-OF-SELECTION.
    * Build field catalog based on your criteria.
    wa_fieldcat-fieldname = 'FIELD1'.
    wa_fieldcat-inttype = 'C'.
    wa_fieldcat-outputlen = '10'.
    wa_fieldcat-coltext = 'My Field 1'.
    wa_fieldcat-seltext = wa_fieldcat-coltext.
    APPEND wa_fieldcat TO t_fieldcat1.
    wa_fieldcat-fieldname = 'FIELD2'.
    wa_fieldcat-inttype = 'C'.
    wa_fieldcat-outputlen = '10'.
    wa_fieldcat-coltext = 'My Field 2'.
    wa_fieldcat-seltext = wa_fieldcat-coltext.
    APPEND wa_fieldcat TO t_fieldcat1.
    * Before adding cell color table, save fieldcatalog to pass
    * to ALV call. The ALV call needs a fieldcatalog without
    * the internal table for cell coloring.
    t_fieldcat2[] = t_fieldcat1[].
    * Add cell color table.
    * CALENDAR_TYPE is a structure in the dictionary with a
    * field called COLTAB of type LVC_T_SCOL. You can use
    * any structure and field that has the type LVC_T_SCOL.
    wa_fieldcat-fieldname = 'T_CELLCOLORS'.
    wa_fieldcat-ref_field = 'COLTAB'.
    wa_fieldcat-ref_table = 'CALENDAR_TYPE'.
    APPEND wa_fieldcat TO t_fieldcat1.
    * Create dynamic table including the internal table
    * for cell coloring.
    CALL METHOD cl_alv_table_create=>create_dynamic_table
    EXPORTING
    it_fieldcatalog = t_fieldcat1
    IMPORTING
    ep_table = r_dyn_table
    EXCEPTIONS
    generate_subpool_dir_full = 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.
    * Get access to new table using field symbol.
    ASSIGN r_dyn_table->* TO <t_dyn_table>.
    * Create work area for new table.
    CREATE DATA r_wa_dyn_table LIKE LINE OF <t_dyn_table>.
    * Get access to new work area using field symbol.
    ASSIGN r_wa_dyn_table->* TO <wa_dyn_table>.
    * Get data into table from somewhere. Field names are
    * known at this point because field catalog is already
    * built. Read field names from the field catalog or use
    * COMPONENT <number> in a DO loop to access the fields. A
    * simpler hard coded approach is used here.
    ASSIGN COMPONENT 'FIELD1' OF STRUCTURE <wa_dyn_table> TO <w_field>.
    <w_field> = 'ABC'.
    ASSIGN COMPONENT 'FIELD2' OF STRUCTURE <wa_dyn_table> TO <w_field>.
    <w_field> = 'XYZ'.
    APPEND <wa_dyn_table> TO <t_dyn_table>.
    ASSIGN COMPONENT 'FIELD1' OF STRUCTURE <wa_dyn_table> TO <w_field>.
    <w_field> = 'TUV'.
    ASSIGN COMPONENT 'FIELD2' OF STRUCTURE <wa_dyn_table> TO <w_field>.
    <w_field> = 'DEF'.
    APPEND <wa_dyn_table> TO <t_dyn_table>.
    * Color cells based on your criteria. In this example, a test on
    * FIELD2 is used to decide on color.
    LOOP AT <t_dyn_table> INTO <wa_dyn_table>.
    ASSIGN COMPONENT 'FIELD2' OF STRUCTURE <wa_dyn_table> TO <w_field>.
    * Get access to internal table used to color cells.
    ASSIGN COMPONENT 'T_CELLCOLORS'
    OF STRUCTURE <wa_dyn_table> TO <t_cellcolors>.
    CLEAR wa_cellcolors.
    wa_cellcolors-fname = 'FIELD2'.
    IF <w_field> = 'DEF'.
    wa_cellcolors-color-col = '7'.
    ELSE.
    wa_cellcolors-color-col = '5'.
    ENDIF.
    APPEND wa_cellcolors TO <t_cellcolors>.
    MODIFY <t_dyn_table> FROM <wa_dyn_table>.
    ENDLOOP.
    * Display screen. Define screen 100 as empty, with next screen
    * set to 0 and flow logic of:
    * PROCESS BEFORE OUTPUT.
    * MODULE initialization.
    * PROCESS AFTER INPUT.
    CALL SCREEN 100.
    * MODULE initialization OUTPUT
    MODULE initialization OUTPUT.
    * Set up for ALV display.
    IF r_dock_ctnr IS INITIAL.
    CREATE OBJECT r_dock_ctnr
    EXPORTING
    side = cl_gui_docking_container=>dock_at_left
    ratio = '90'.
    CREATE OBJECT r_alv_grid
    EXPORTING i_parent = r_dock_ctnr.
    * Set ALV controls for cell coloring table.
    wa_is_layout-ctab_fname = 'T_CELLCOLORS'.
    * Display.
    CALL METHOD r_alv_grid->set_table_for_first_display
    EXPORTING
    is_layout = wa_is_layout
    CHANGING
    it_outtab = <t_dyn_table>
    it_fieldcatalog = t_fieldcat2.
    ELSE. "grid already prepared
    * Refresh display.
    CALL METHOD r_alv_grid->refresh_table_display
    EXPORTING
    i_soft_refresh = ' '
    EXCEPTIONS
    finished = 1
    OTHERS = 2.
    ENDIF.
    ENDMODULE. " initialization OUTPUT
    Regards
    vijay

  • Dynamic internal table with repeated structure

    Hi,
        I have a requirement, in which I need to create a dynamic internal table with the below structure.
       Dynamic Int. table structure: fld1 and fld2.
       If another internal table (say int2), contains 3 records, then my final output table should contain the below structure.
                    Value 1              Value 2              Value3          
         fld1     fld2     fld1     fld2     fld1     fld2     
      If in case, the int2 table contains 10 records, then my final output table should contain the structure below.
                    Value 1              Value 2           .....              Value10          
         fld1     fld2     fld1     fld2     .....     fld1     fld2     
    Please advice on how to acquire this. Thanks in advance for your help.
    Regards,
    Swetha.

    You can do it...but it won't be  table... it would be some thing like
    itab
    ref1->  strycture (field 1  field 2 field 3)
    ref2-> structure (field1 field 4 )
    ref3-> structure (field5  field7 )
    say Define a  internal table with a single field to hold  a reference of Data
    Go on creating Rows of different structures and storing the address into the table... you can use RTTS for same
    Use  the below link for RTTS (search on wiki for examples).
    http://wiki.sdn.sap.com/wiki/display/ABAP/RuntimeTypeServices+%28RTTS%29

  • Mapping of repeating structure to nested structure

    Hi I have a mapping issue.
    My Data type look like this
    MT_RcicRecords
    -TRNH  1-1
    -RECH  0-Unb
    -RECL  0-Unb
    -ENDT  0-Unb
    -TRLR  1-1
    In above structure pattern of RECH, RECL and ENDT can occur multiple type.
    My output after File content conversion look like
    <ns:MT_RcicRecords xmlns:ns="urn:amgen-com:pts:rcic">
         <TRNH>
              <RECORD_ID>TRNH</RECORD_ID>
         </TRNH>
         <RECH>
              <RECORD_ID>RECH</RECORD_ID>
              <ACTION>C</ACTION>
         </RECH>
         <RECL>
              <RECORD_ID>RECL</RECORD_ID>
              <ACTION>C</ACTION>
         </RECL>
         <ENDT>
              <RECORD_ID>ENDT</RECORD_ID>
              <COMP_CODE>EL</COMP_CODE>
         </ENDT>
         <RECH>
              <RECORD_ID>RECH</RECORD_ID>
              <ACTION>C</ACTION>
         </RECH>
         <RECL>
              <RECORD_ID>RECL</RECORD_ID>
              <ACTION>C</ACTION>
         </RECL>
         <ENDT>
              <RECORD_ID>ENDT</RECORD_ID>
              <COMP_CODE>EL</COMP_CODE>
         </ENDT>
         <TRLR>
              <RECORD_ID>TRLR</RECORD_ID>
         </TRLR>
    </ns:MT_RcicRecords>
    Now i want to map this to another data type whose structure is as follows
    MT_RcicRecords_temp
    -TRNH  1-1
    -RCIC  0-Unb
    --RECH  0-Unb
    --RECL  0-Unb
    --ENDT  0-Unb
    -TRLR  1-1
    I want to map earlier data in such way that for each pattern of RECH,RECL and ENDT there should be corresponding RCIC node created in target structure.
    Any help

    Hi,
    You can use the graphical node function useOneAsMany to solve this. The node, <RCIC> need to occur atleast once in the source.
    This function, generates a particular number of nodes n number of times, depending on the inputs you give to the function.
    If this node is not present in the source and you need to create it in the target, you would have to use xslt mapping.
    Regards,
    Smitha.

  • Biztalk Map: Map repeating structures into a single node

    Simple one for the experts. I have the following two samples. Can somebody please guide me on how to achieve my output? Just a caveat. The Errorlist may or may not have errors in which case just an empty tag should suffice.
    Input
    <Detail Att1="a">
    <Value1>Test</Value1>
    <Value2>Test2</Value2>
    <ErrorList>
    <Error>Error_0</Error>
    <Error>Error_1</Error>
    <Error>Error_2</Error>
    </ErrorList>
    </Detail>
    Output1: Could be one or more xmls depending on the number of errors
    <Detail Att1="a">
    <Value1>Test</Value1>
    <Value2>Test2</Value2>
    <Error>Error_0</Error>
    </Detail>
    <Detail Att1="a">
    <Value1>Test</Value1>
    <Value2>Test2</Value2>
    <Error>Error_1</Error>
    </Detail>
    <Detail Att1="a">
    <Value1>Test</Value1>
    <Value2>Test2</Value2>
    <Error>Error_2</Error>
    </Detail>
    Output 2: Concatenation of errors using a suitable delimiter (I used pipe..pls suggest)
    <Detail Att1="a">
    <Value1>Test</Value1>
    <Value2>Test2</Value2>
    <Error>Error_0 | Error_1 | Error_2</Error>
    </Detail>
    Thanks

    Hello ZIntegrator,
    for your second output case, you can build map like below . since error can occur zero or more times, make sure you set the "Error" element  max occurs property to unbounded and Min occurs to 0 in the input schema.
    so just drop String concatenation and cumulative concatenation functiods like above.
    and for String concatenation, supply second parameter as the character pipe  "|".  that's it, it should work.
    And coming to your first output case, as per your input you have 3 error cases. so do you want to create 3 different xml messages?
    please note that a map can only output one message (of course we can create more than one using transform shape in orchestration, that is different case).
    if you want seperate xml documents to be generated for each error, then normal mapping cannot work. 
    Please mark the post as answer if this answers your question. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • Creation of HR infotype with repeated fields

    Hi,
       We have a requirement in our project where in we need to implement the repeat field screen structure.
    We have to create an info type with ‘96’ fields in which some of the fields are repeated more than once.
    We have tried to create a table control to represent the repeated fields, for this we have a standard way which SAP follows. We have done the same way but we are not able to get the table control in the info type screen.
    We have done the following steps using this link
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/4f/d52552575e11d189270000e8322f96/frameset.htm
    1) I have created a structure with the repeated fields of the info type
    2) created the entries in Mapping for Conversion of Repeat Structure/Tables (table T588AUTO_MAP) with the repeated fields
    3) For each type LINE screen structure to be used, a corresponding entry was defined in Mapping for Conversion of Repeat Structure/Tables (table T588AUTO_TABLE).
    4) I have created an info type with all these fields where in I should get the repeated fields in the table control format, but this was not happening.
    Is there any task to be done to link all these transactions before going for creation of the info type?
    Can any one suggest me how to get the table format on the screen with all these repeated fields.
    with regards,
    ramu mullapudi

    Hi Choudhury,
    Thanks for your reply. The infotype that you suggested solved my problem.
    Regards,
    RSS.

  • Message mapping 2D structure

    Please excuse me, this seems to be a very simple issue but being resonably new to message mapping I am having issues solving it.
    Ok each field maps to a repeating structure in the target IDOC, I ahve duplicated the subtree in the Structure and mapped each of the fields.
    _Source_                    _Desired_                                      _Actual_
    <header>                    <header>                                          <header>           
      <line1>                     <line1>                                           <line1>
         <Field1>                    <Field1>                                           <Field1>
         <Field2>     Message        <Field2>                                           <Field2>
         <Field3>       Mapping       <Field3>                                          <Field3>
       <line2>           ------>   <line2>                                               <Field4>
         <Field4>                      <Field4>                                         <Field5>
         <Field5>                      <Field5>                                         <Field6>   
         <Field6>                      <Field6>                                     <line2>
    Each lineNode has been mapped across, and the FieldNode's have been mapped to the line as well. I have had to map the lineNode to the fieldNode as well as I am duplicating the subtree for the fieldNode which is 1..N range.
    My issue is all the fields are mapping into the first node and not maintaining their structure. The value in the fields is coming through correctly in the repeating structure but the node itself is misplaced.

    Thought it was solved ... it isnt...
    To clafiry...
    There are fields in the incoming structure that map into Nodes in the target structure ...
    So Field1 in Line1 .... will actually become Field1Node in the target. To add addition complexity the target node is a repeating node, so used the copt subtree feature but I think it is loosing context.
    So...
    <lineNode1>    -
    > <lineNode1>
        <field1>      -
    >     <FieldNode1>
                                                               <field1 value>
                                                               <field1 constant> --- provided by PI
        <field2>     -
    >    <FieldNode2>
    and so on .... basically the fields in the originating message and creating a bunch of nodes in the user exit, With some small constants to hardcoded in PI to add context to the value in the field.
    A real example ...
    <saleLine1>                                             <saleLine1>
    <saleValue>100</saleValue>                                 <userExitGenericNode>
    </saleLine1>                                                    <Value>100</Value>
                                                                     <ID>SaleValue</ID>
                                                                </userExitGenericNode>
                                                            </saleLine1>

Maybe you are looking for