Having header line in the structure inside another structure

How can I have a header line in a structure within a structure?
(I have posted a question before...but seems to be unclear..so I closed that thread and open a new one)
Thanks!
When compiling the below codes, I got error message stating that 'The internal table "IT_SALES_ORDER-DETAIL" has no header line - explicit specification of an output area with "INTO wa" or "ASSIGNING <fs>" is required'.
I know that the problem can be solved by using field symbols... but I wonder I can have a header line declared in a structure within another structure.
types: begin of ty_header,
         vbeln like vbak-vbeln,
         erdat like vbak-erdat,
         audat like vbak-audat,
         vkorg like vbak-vkorg,
         vtweg like vbak-vtweg,
         spart like vbak-spart,
         kunnr like vbak-kunnr,
         netwr like vbak-netwr,
         end of ty_header.
types: begin of ty_detail,
         posnr like vbep-posnr,
         edatu like vbep-edatu,
         etenr like vbep-etenr,
         ettyp like vbep-ettyp,
         wmeng like vbep-wmeng,
         bmeng like vbep-bmeng,
         vrkme like vbep-vrkme,
         mbdat like vbep-mbdat,
         lddat like vbep-lddat,
       end of ty_detail.
types: begin of ty_sales_order,
           header type ty_header,
           detail type ty_detail occurs 0,
       end of ty_sales_order.
data: it_sales_order type standard table of ty_sales_order
      with header line initial size 0.
data: it_selected_order type standard table of ty_header
      with header line initial size 0.
select *
  into corresponding fields of table it_selected_order
  from vbak
where erdat > '01.01.2005' and erdat < '31.12.2005'.
write :/ sy-subrc.
loop at it_selected_order.
  clear: it_sales_order-header, it_sales_order-detail.
  move-corresponding it_selected_order to it_sales_order-header.
  select *
    into corresponding fields of table it_sales_order-detail
    from vbep
   where vbeln = it_sales_order-header-vbeln.
  append it_sales_order.
endloop.
loop at it_sales_order.
  write :/ it_sales_order-header-vbeln.
  loop at it_sales_order-detail.
  endloop.
endloop.

You have to use a work area here, no header lines.
report zrich_0002 no standard page heading.
types: begin of ty_header,
vbeln like vbak-vbeln,
erdat like vbak-erdat,
audat like vbak-audat,
vkorg like vbak-vkorg,
vtweg like vbak-vtweg,
spart like vbak-spart,
kunnr like vbak-kunnr,
netwr like vbak-netwr,
end of ty_header.
types: begin of ty_detail,
posnr like vbep-posnr,
edatu like vbep-edatu,
etenr like vbep-etenr,
ettyp like vbep-ettyp,
wmeng like vbep-wmeng,
bmeng like vbep-bmeng,
vrkme like vbep-vrkme,
mbdat like vbep-mbdat,
lddat like vbep-lddat,
end of ty_detail.
types: begin of ty_sales_order,
header type ty_header,
detail type ty_detail occurs 0,
end of ty_sales_order.
data: it_sales_order type standard table of ty_sales_order
with header line initial size 0.
data: it_selected_order type standard table of ty_header
with header line initial size 0.
<b>data: wa_detail type ty_detail.</b>
select *
into corresponding fields of table it_selected_order
from vbak
where erdat > '01.01.2005' and erdat < '31.12.2005'.
write :/ sy-subrc.
loop at it_selected_order.
  clear: it_sales_order-header, it_sales_order-detail.
  move-corresponding it_selected_order to it_sales_order-header.
  select *
  into corresponding fields of table it_sales_order-detail
  from vbep
  where vbeln = it_sales_order-header-vbeln.
  append it_sales_order.
endloop.
loop at it_sales_order.
  write :/ it_sales_order-header-vbeln.
<b> loop at it_sales_order-detail into wa_detail.</b>
  endloop.
endloop.
Regards,
Rich Heilman
Message was edited by: Rich Heilman

Similar Messages

  • Add header line to the text file in receiver file adapter

    Hello Experts,
    I have to add a new line to the text file generated at the receiver end.
    My structure is
    Record
       Item......0-unbounded
             field1
             field2
             field3
    I have defined below parameters in receiver FCC.
    RecordSet Structure : Record,Item
    Item.fieldSeparator : ;
    Record.fieldSeparator : nl
    Record.endSeparator : '0x0D''0x0A' ( this is to get a carriage return at the end of the file)
    Item.addHeaderLine : 1
    With the above configuration, i am getting the desired output with NO header line.
    Please help.
    Thanks,
    Swetha.

    Hi, it looks like that the headerline "specification is only permitted if exactly one structure is defined." Please check [SAP help under Define Parameters for Recordset Structures|http://help.sap.com/saphelp_nw73/helpdata/en/44/686e687f2a6d12e10000000a1553f6/frameset.htm].
    One solution would be to generate the header fields in the message payload. Generate an additional first line containing the header names, e.g.
    <Item>
    <field1>Header1
    <field2>Header2
    <field3>Header3

  • Replace the header line in the o/p file

    My scenarion is to generate a xml file,the xml file contains a header line <?xml version="1.0" encoding="utf-8"?>
    and this lineis  to be relaced with <XYZ>.
    it is multi message mapping -- splitting of messages 1:n, i cannot add any extra fields to the target structure to pass the header
    I wrote a abap mapping program and included that in the second step of my interface mapping.
    the code for abap mapping is as below.
    method IF_MAPPING~EXECUTE.
       data: lv_new_str  type string,
             lv_old_str type string,
             lv_string type string.
    ***Convert the XSTRING to STRING
    CALL FUNCTION 'ECATT_CONV_XSTRING_TO_STRING'
      EXPORTING
        im_xstring        = source
    *   IM_ENCODING       = 'UTF-8'
    IMPORTING
       EX_STRING         = lv_string .
    **Pass the Values
    lv_old_str = '<?xml version="1.0" encoding="utf-8"?>'.
    lv_new_str = '<!XYZ>.
    REPLACE ALL OCCURRENCES OF lv_old_str in lv_string with lv_new_str.
    ***Convert the STRING to XSTRING.
    CALL FUNCTION 'ECATT_CONV_STRING_TO_XSTRING'
      EXPORTING
        im_string         = lv_string
    *   IM_ENCODING       = 'UTF-8'
    IMPORTING
       EX_XSTRING        = result
    *   EX_LEN            = .
    endmethod.
    But iam not able to get the desired output.
    Please suggest me how to make this work?
    Thanks
    Srinivas

    Hi Srinivas,
    Can you please see the java mapping as given by suraj in this thread:
    How do I remove xml encoding?
    Regards,
    ---Satish

  • How to print header lines at the top of every page with Alv list display?

    Dear all,
    I need a requirement with printing issue. A program list should be printed with the function reuse_alv_list_display.
    The list has several pages and then can be printed but the header lines appear only first page when they printed. The other pages don't have header lines, they continue with the next record of the list remaining from previous page. I use the alv parameters as below:
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program       = l_repid
          i_callback_pf_status_set = 'ALV_PF_STATUS'
          is_layout                = ls_layo
          it_fieldcat              = lt_fcat
          i_default                = 'X'
          i_save                   = 'A'
          is_variant               = ls_variant
          it_events                = lt_events
        TABLES
          t_outtab                 = lt_data
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
    and lt_events as below:
      ls_event-name = 'END_OF_LIST'.
      ls_event-form = 'ALV_END_OF_LIST'.
      APPEND ls_event TO lt_events.
      ls_event-name = 'END_OF_PAGE'.
      ls_event-form = 'ALV_END_OF_PAGE'.
      APPEND ls_event TO lt_events.
      ls_event-name = 'TOP_OF_LIST'.
      ls_event-form = 'ALV_TOP_OF_LIST'.
      APPEND ls_event TO lt_events.
      ls_event-name = 'TOP_OF_PAGE'.
      ls_event-form = 'ALV_TOP_OF_PAGE'.
      APPEND ls_event TO lt_events.
    So, how can I print header lines for every page?
    Best Regards,

    Hello Saba,
    Your point might be very close to solution.
    Because in the selection screen of the program there are two radio buttons, one of them visits 'REUSE_ALV_COMMENTARY_WRITE' function and the other doesn't. The one which visits has a problem with header liens in every page when printing. But I couldn't find out the solution yet.
    reuse_alv_list_display uses 4 event and of course I call subroutine. There are end_of_list, end_of_page, top_of_list and top_of_page. I use in the subroutine for top_of_page:
      CALL FUNCTION 'LVC_TRANSFER_TO_SLIS'
        EXPORTING
          it_fieldcat_lvc         = gt_fcat
        IMPORTING
          et_fieldcat_alv         = lt_fcat
        EXCEPTIONS
          it_data_missing         = 1
          it_fieldcat_lvc_missing = 2
          OTHERS                  = 3.
      CALL FUNCTION 'REUSE_ALV_LIST_WIDTH_GET'
        EXPORTING
          it_fieldcat = lt_fcat
        IMPORTING
          e_width     = l_width.
    WRITE l_reptx TO l_reptx CENTERED.
      NEW-LINE.
      WRITE: AT (l_width) l_reptx CENTERED.
      SUBTRACT 10 FROM l_width.
      WRITE: AT l_width sy-pagno RIGHT-JUSTIFIED.
        CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
          EXPORTING
            it_list_commentary       = lt_header
      I_LOGO                   =
      I_END_OF_LIST_GRID       =
    Do you have other suggestions ?

  • I am having these lines on the side and on bottom /top. What is this ?

    I went on computer about an hour ago and everything was fine then all of a sudden these series of lines||(horizontal moving slightly on the lft side of screen (just started again) On the bottom has lines cant really read anything and on top What is this and how do I fix it?.

    Can you attach a screenshot?
    *http://en.wikipedia.org/wiki/Screenshot
    *https://support.mozilla.org/kb/how-do-i-create-screenshot-my-problem
    Use a compressed image type like PNG or JPG to save the screenshot.
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe Mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • Multiple Header Lines for the ALV  Layout

    Hi Experts,
    I am working on a ALV report in MM , the output should be like mentioned below, I have tried this by using  ALV List , I got it then ,  but I want the output by using  ALV Grid ( Function Modules / Classes ).
    Material
    Branch
    Material No
    Created on
    Material Type
    Plant
    Valuation Category
        1343                 29/06/09            HALB                     HKM1                   01                        
        1342                 28/06/09            HALB                     HKM1                   01  
        1341                 27/06/09            HALB                     HKM1                   01   
        1340                 26/06/09            HALB                     HKM1                   01
        1339                 25/06/09            HALB                     HKM1                   01
        1338                 24/06/09            HALB                     HKM1                   01
    Thanks
    V. Venkatesh

    check the standard program  BALVHD01_GROUP
    http://www.geocities.com/mpioud/Z_ALV_HIERSEQ_LIST.html

  • Flat file having multiple header lines , how to separate the same and pushit into my intrnal table

    Hi Guys,
                    I got an issue , My flat file having multiple header lines
    TPS27RPR  MOME                                      THRIFT (SAVING) PLAN SYSTEM                                           Page    2
    09:54 05 JAN 2014                          List of Contributors w/Company Contributions                           Phase DAY Unit TRE
    Company No: xxxxxxxx - xxxxxxxxxxxxx.
                                                                            Employee/       Employee/
    Employee Full Name/                                                       Company         Company                        Allocation
    Number  ID Number                           PS  PN  End Date        Contribution          Profit        Total Balance   Percentage
    some lines of data and again
    TPS27RPR  MOME                                      THRIFT (SAVING) PLAN SYSTEM                                           Page    2
    09:54 05 JAN 2014                          List of Contributors w/Company Contributions                           Phase DAY Unit TRE
    Company No: xxxxxxxx - xxxxxxxxxxxxx.
                                                                            Employee/       Employee/
    Employee Full Name/                                                       Company         Company                        Allocation
    Number  ID Number                           PS  PN  End Date        Contribution          Profit        Total Balance   Percentage
    in this case how could I separate the header lines from the flat file and update the details to my internal table.
    kindly help me on this issue.
    Thanks and regards,
    M.S.Amirtharajvijay.

    Hi Amirthraj,
    If the flat file is static (if the content within it is same for all) then use the offset concept. First get the contents of the flat file into an internal table and later find the field that has to be in final internal table within the line, calculate the offset for the line and get the value into an workarea. Finally modify/append the work area into an internal table. Also wait for other experts answers for any other hassle free way to achieve the requirement.
    With Regards,
    Giriesh M

  • Accessing a field from a structure with out header line

    Hi Guys,
                 I am trying to assign a field from a structure type line of data to another field.
    This structure type line don't have a header line.
    here is the example.
    IT_EKKNU TYPE  MMPUR_EKKNU.
    when I use following statement..
    move IT_EKKNU-kostl to e_cekko-kostl.
    Iam getting error "IT_ENKKNU is not a structure or Internal table with header line.
    How to access the fields in structure IT_EKKNU.
    Thank U for ur time.
    Cheers
    S Kumar

    Here IT_EKKNU is an internal table without Header line.
    You can use a structure for assignment.
    DATA: IT_EKKNU TYPE MMPUR_EKKNU,
               wa_ekknu type    ekknu.
    read table it_ekknu into wa_ekknu........
    move wa_EKKNU-kostl to e_cekko-kostl.
    *modify the code for your conditions*.

  • Get the ID of a dynamically created symbol from library, INSIDE another symbol.

    Hi everyone,
    I'm trying to get the id from a dynamic created symbol from library.
    When dynamically creating the symbol directly on the stage (or composition level), there's no problem.
    But I just can't get it to work when creating the symbol inside another symbol. 
    Below some examples using both "getChildSymbols()" and "aSymbolInstances" 
    // USING "getChildSymbols()" ///////////////////////////////////////////////////////////////////////// 
    // ON THE STAGE 
    var m_item = sym.createChildSymbol("m_item","Stage");
    var symbolChildren = sym.getChildSymbols(); 
    console.log(symbolChildren[0].getSymbolElement().attr('id')); // ok eid_1391853893203
    // INSIDE ANOTHER SYMBOL
    var m_item = sym.createChildSymbol("m_item", sym.getSymbol("holder").getSymbolElement()); 
    var symbolChildren = sym.getSymbol("holder").getChildSymbols(); // Am i using this wrong maybe?
    console.log(symbolChildren.length) // returns 0 so can't get no ID either
    // USING "aSymbolInstances"" ////////////////////////////////////////////////////////////////////////// 
    // ON THE STAGE
    var m_item = sym.createChildSymbol("m_item","Stage"); 
    console.log(sym.aSymbolInstances[0]); // ok (i guess) x.fn.x.init[1] 0: div#eid_1391854141436
    // INSIDE ANOTHER SYMBOL
    var m_item = sym.createChildSymbol("m_item", sym.getSymbol("holder").getSymbolElement());
    console.log(sym.getSymbol("holder").aSymbolInstances[0]); // Javascript error in event handler! Event Type = element 
    In this post http://forums.adobe.com/message/5691824 is written: "mySym.aSymbolInstances will give you an array with all "names" when you create symbols"
    Could it be this only works on the stage/ composition level only and not inside a symbol? 
    The following methods to achieve the same are indeed possible, but i simply DON'T want to use them in this case:
    1) Storing a reference of the created symbol in an array and call it later by index.
    2) Giving the items an ID manually on creation and use document.getElementById() afterwards.
    I can't believe this isn't possible. I am probably missing something here.
    Forgive me I am a newbie using Adobe Edge!
    I really hope someone can help me out here.
    Anyway, thnx in advance people!
    Kind Regards,
    Lester.

    Hi,
    Thanks for the quick response!
    True this is also a possibility. But this method is almost the same of "Giving the items an ID manually on creation and use document.getElementById() afterwards".
    In this way (correct me if i'm wrong) you have to give it an unique ID yourself. In a (very) big project this isn't the most practical way.
    Although I know it is possible.
    Now when Edge creates a symbol dynamically on the Stage (or composition level) or inside another symbol it always gives the symbol an ID like "eid_1391853893203".
    I want to reuse this (unique) ID given by Edge after creation.
    If created on the stage directly you can get this ID very easy. Like this;
    var m_item = sym.createChildSymbol("m_item","Stage");
    var symbolChildren = sym.getChildSymbols(); 
    console.log(symbolChildren[0].getSymbolElement().attr('id')); // ok eid_1391853893203
    I want to do exactly the same when created INSIDE another symbol.
    var m_item = sym.createChildSymbol("m_item", sym.getSymbol("holder").getSymbolElement());
    Now how can I accomplish this? How can I get the Id of a dynamically created symbol INSIDE another symbol instead of created directly on the stage?
    This is what i'm after.
    Thnx in advance!

  • Header line and work area

    Hi,
    can anyone please explain me wht is the difference between header line and work area???

    Hi,
    INTERNAL TABLES
    - Internal tables are used to obtain data from a fixed structure for
    dynamic use in ABAP.
    - Each line in the internal table has the same field structure.
    - The main use for internal tables is for storing and formatting data from
    a database table within a program.
    WORK AREAS
    - Work areas are single rows of data.
    - It should have the same format as any of the internal tables.
    - It is used to process the data in an internal table one line at a time.
    Internal Tables with Header Line : Here the system automatically creates the work area. The work area has the same data type as internal table. This work area is called the HEADER line. It is here that all the changes or any of the action on the contents of the table are done. As a result of this, records can be directly inserted into the table or accessed from the internal table directly.
    Internal Tables without Header Line : Here there is no work area associated with the table. Work area is to be explicitly specified when we need to access such tables. Hence these tables cannot be accessed directly.
    HEADER LINE----
    CREATED EXPLICITLY------
    1.Internal table created by referring to another table
    Syntax: Data <f> <type> with header line.
    <type> refers to a table data type or table data objects using type or like.
    Here internal table <f> is created of the type <type>.
    Example:
    DATA t_line TYPE line OCCURS 10 with header line.
    2. Internal table created by referring to existing structure
    Syntax: Data<f> <type> occurs n with header line.
    The lines of the internal table <f> have the data type specified in <type> (Can use either like or type).
    Example:
    DATA flight_tab LIKE sflight OCCURS 10.
    CREATED BY DEFAULT---
    3. Internal table created With a new structure
    Syntax: Data : Begin of <f> occurs <n>,
    <component declaration>,
    End of <f>.
    Work area is created by default.
    Example:
    Data : Begin of itab occurs 10,
    column1 type I,
    column2(4) type C,
    column3 like mara-ernam,
    End of itab.
    reward if useful
    Regards

  • With header line & with out header line ?

    what is difference between with header line & without header line ?

    When you create an internal table object you can also declare a header line with the same name. You can use the header line as a work area when you process the internal table. The ABAP statements that you use with internal tables have short forms that you can use if your internal table has a header line. These statements automatically assume the header line as an implicit work area. The following table shows the statements that you must use for internal tables without a header line, and the equivalent statements that you can use for internal tables with a header line:
    Operations without header line
    Operations with header line
    Operations for all Table Types
    INSERT <wa> INTO TABLE <itab>.
    INSERT TABLE ITAB.
    COLLECT <wa> INTO <itab>.
    COLLECT <itab>.
    READ TABLE <itab> ... INTO <wa>.
    READ TABLE <itab> ...
    MODIFY TABLE <itab> FROM <wa> ...
    MODIFY TABLE <itab> ...
    MODIFY <itab> FROM <wa> ...WHERE ...
    MODIFY <itab> ... WHERE ...
    DELETE TABLE <itab> FROM <wa>.
    DELETE TABLE <itab>.
    LOOP AT ITAB INTO <wa> ...
    LOOP AT ITAB ...
    Operations for Index Tables
    APPEND <wa> TO <itab>.
    APPEND <itab>.
    INSERT <wa> INTO <itab> ...
    INSERT <itab> ...
    MODIFY <itab> FROM <wa> ...
    MODIFY <itab> ...
    Using the header line as a work area means that you can use shorter statements; however, they are not necessarily easier to understand, since you cannot immediately recognize the origin and target of the assignment. Furthermore, the fact that the table and its header line have the same name can cause confusion in operations with entire internal tables. To avoid confusion, you should use internal tables with differently-named work areas.
    The following example shows two programs with the same function. One uses a header line, the other does not.
    With header line:
    TYPES: BEGIN OF LINE,
    COL1 TYPE I,
    COL2 TYPE I,
    END OF LINE.
    DATA ITAB TYPE HASHED TABLE OF LINE WITH UNIQUE KEY COL1
    WITH HEADER LINE.
    DO 4 TIMES.
    ITAB-COL1 = SY-INDEX.
    ITAB-COL2 = SY-INDEX ** 2.
    INSERT TABLE ITAB.
    ENDDO.
    ITAB-COL1 = 2.
    READ TABLE ITAB FROM ITAB.
    ITAB-COL2 = 100.
    MODIFY TABLE ITAB.
    ITAB-COL1 = 4.
    DELETE TABLE ITAB.
    LOOP AT ITAB.
    WRITE: / ITAB-COL1, ITAB-COL2.
    ENDLOOP.
    Without header line:
    TYPES: BEGIN OF LINE,
    COL1 TYPE I,
    COL2 TYPE I,
    END OF LINE.
    DATA: ITAB TYPE HASHED TABLE OF LINE WITH UNIQUE KEY COL1,
    WA LIKE LINE OF ITAB.
    DO 4 TIMES.
    WA-COL1 = SY-INDEX.
    WA-COL2 = SY-INDEX ** 2.
    INSERT WA INTO TABLE ITAB.
    ENDDO.
    WA-COL1 = 2.
    READ TABLE ITAB FROM WA INTO WA.
    WA-COL2 = 100.
    MODIFY TABLE ITAB FROM WA.
    WA-COL1 = 4.
    DELETE TABLE ITAB FROM WA.
    LOOP AT ITAB INTO WA.
    WRITE: / WA-COL1, WA-COL2.
    ENDLOOP.
    The list, in both cases, appears as follows:
    1 1
    2 100
    3 9
    The statements in the program that does not use a header line are easier to understand. As a further measure, you could have a further work area just to specify the key of the internal table, but to which no other values from the table are assigned.
    Internal table with header line
    you can use anywhere except obkect oriented concept.
    Internal table without header line :
    You should use in Object oriented concept..
    Always try to use without header line,performance point of view it is best..
    Example :
    Without header line.
    Structure
    types : begin of ty_itab ,
    matnr type mara-matnr,
    end of ty_itab.
    Internal table
    data i_itab type standard table of ty_itab .
    Work area
    data wa_itab like line of i_itab
    With header line
    data : begin of i_itab occurs 0,
    matnr like mara-matnr,
    end of i_itab
    itab with header lines are obsolete, anyway it will work but not recommended. instead use work area or more effiecient is field symbols. so donot use itab with header line.
    i will explain use of itab w/o header line.
    Data: itab1 type standard table of mara with header line occurs 0,
            itab2 type standard table of mara,
            wa_itab2 type mara.
    loop at itab1.
    "This will work fine.
    endloop.
    loop at itab2.
    "This will give erro that itabd does not hav workarea
    endloop.
    "so write
    loop at itab2 into wa_itab2.
    "This will work
    endloop.
    <b>The difference between
    whih header line and with out heater line of internal table.
    ex:-
    a) Data : itab like mara occurs 0 with header line.
    b) Data: itab like mara occurs 0.
    -While adding or retrieving records to / from internal table we have to keep the record temporarily.
    -The area where this record is kept is called as work area for the internal table.
    -The area must have the same structure as that of internal table. An internal table consists of a body and an optional header line.
    -Header line is a implicit work area for the internal table. It depends on how the internal table is declared that the itab will have the header line or not.
    a) Data : itab like mara occurs 0 with header line.
    table is with header line
    b) Data: itab like mara occurs 0.
    table is without header line</b>
    regards,
    srinivas
    <b>*reward for useful answers*</b>

  • Multiple Header line in Receiver File adapter

    Hi,
    I have an issue in Receiver File adapter with multiple header lines. I am able to get only 1 header lines in the receiver file but not multiple header lines with 'nl' since it is static in file mode
    [CommunityTag:Header]
    empNo,EmpName,Age
    [CommunityTag]
    I tried with the below in content conversion one as below with no luck
    Root.addHeaderLine=1
    Root.headerLine=[CommunityTag:Header] 'nl' empNo,EmpName,Age 'nl' [CommunityTag]
    Root.fiedSeparator=,
    Root.endSeparator='nl'
    I am getting the Header line as same row as static text.
    Can you advise this.

    Hi Gabriel, I suggest to produce the header lines from additional nodes in the message payload. That means you need to modify the data type of the target message in order to generate an extra structure in the payload. Use constants in message mapping to generate the header column names, e.g.
    <Header>
      <H1>CommunityTag:Header</H1>
      <H2>empNo,EmpName,Age</H2>
      <H3>CommunityTag</H3>
    </Header>
    In content conversion you have to convert the Header row with
    Header.endSeparator='nl'
    You won't need parameter addHeaderLine anymore then.
    Regards, Martin

  • Passing an internal table WITH HEADER LINE to abap object

    Hi. In another thread, it was explained how to pass an internal table to an abap object method. Is it possible to pass an internal table that has a header line, and RETAIN the header line once the table has been passed?
    My problem is, that I can pass the table, update it, but the read buffer is not populated when returning from the object's method. This is the result of being able to pass a STANDARD TABLE type, but not a STANDARD TABLE WITH HEADER LINE.
    This means that I have to read the table into a work area instead of doing a READ TABLE LKNA1 within the method, which is what I need to do.
    Thanks.

    Please check this sample program, notice that it is modifing the internal table and passing it back modified as well as passing the "work area" or "header line" back thru the exporting parameter.
    report zrich_0001.
    *       CLASS lcl_app DEFINITION
    class lcl_app definition.
      public section.
        types: t_t001 type table of t001.
        class-data: it001 type table of t001.
        class-data: xt001 like line of it001.
        class-methods: change_table
                                    exporting ex_wt001 type t001
                                    changing im_t001 type t_t001.
    endclass.
    data: w_t001 type t001.
    data: a_t001 type table of t001 with header line.
    start-of-selection.
      select * into table a_t001 from t001.
      call method lcl_app=>change_table
                 importing
                     ex_wt001 = w_t001
                 changing
                     im_t001  = a_t001[] .
      check sy-subrc  = 0.
    *       CLASS lcl_app IMPLEMENTATION
    class lcl_app implementation.
      method change_table.
        loop at im_t001 into xt001.
          concatenate xt001-butxt 'Changed'
               into xt001-butxt separated by space.
          modify im_t001 from xt001.
        endloop.
        ex_wt001 = xt001.
      endmethod.
    endclass.
    Regards,
    Rich Heilman

  • Header, line and adress details

    hi experts,
    actually i am working on outbound iunterface.
    in the target structure it is given as ,
    1.header,
    2, line items,
    3, adress.
    using my select statements i have retrived the data and in the target structure the data should be displayed as
    1.header,
    2, line items,
    3, adress.
    plz suggest me how to do.
    regards,
    siri.

    Hi rajesh,
    Header is a workarea of the table which acts as an interface for the table. Header can have only one record at a time.
    WORKAREA is a structure that can hold only one record at a time. It is a collection of fields. We use workarea as we cannot directly read from a table. In order to interact with a table we need workarea. When a Select Statement is executed on a table then the first record is read and put into the header of the table and from there put into the header or the workarea(of the same structure as that of the table)of the internal table and then transferred top the body of the internal table or directly displayed from the workarea.
    Each row in a table is a record and each column is a field.
    example,
    internal table.
    data: begin of itab occurs 0,
    matnr like mara-matnr,
    maktx like makt-maktx,
    end of itab.
    workarea.
    data: begin of itab,
    matnr like mara-matnr,
    maktx like makt-maktx,
    end of itab.
    also,
    workarea:
    types: begin of type_mat,
    matnr like mara-matnr,
    maktx like makt-maktx,
    end of type_mat.
    internal table
    data: t_mat type standard table of type_mat.
    data: begin of itab occurs 10,
    ab type c,
    cd type i,
    end of itab. " this table will have the header line.
    data: wa_itab like itab. " explicit work area for itab
    data: itab1 like itab occurs 10. " table is without header line.
    The header line is a field string with the same structure as a row of the body, but it can only hold a single row.
    It is a buffer used to hold each record before it is added or each record as it is retrieved from the internal table. It is the default work area for the internal table.

  • Alv - how to create a broader header line?

    I'm using the 'TOP_OF_PAGE' parameter within 'AVL_GRID_DISPLAY' FM in connection with 'REUSE_ALV_COMMENTARY_WRITE' to create a Header Line for the List-display.
    My Problem is, that I really need to get a broader header with approx. 120 characters but the only structure, 'REUSE_ALV_COMMENTARY_WRITE' seems to allow is 'slis_listheader' which is only three fields broad with 80 characters.
    I need a line with 6 fields and 120 to 150 characters - how can i possibly submit that to the function module, or somehow different to 'TOP_OF_PAGE'...?
    Thanks, Clemens

    Clemens
    I think you will have to format the header yourself.
    The problem is that you need to have a pointer to the document (cl_dd_document class) so you can modify it as you want. The only way I found is to use I_CALLBACK_HTML_TOP_OF_PAGE parameter when you call REUSE_ALV_GRID_DISPLAY.
    Unortunately, the form specified in I_CALLBACK_TOP_OF_PAGE parameter for REUSE_ALV_GRID_DISPLAY FM is not being called with any parameters. Therefore can't be used to create your heading.
    Now, you need to call your FM like this:
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                I_CALLBACK_HTML_TOP_OF_PAGE = 'TOP_OF_PAGE1'
    ...other parameters....
    then you will need to create that FORM:
    FORM TOP_OF_PAGE1 USING p_doc type ref to cl_dd_document.
    DATA: mytoptext(255) TYPE C.
    CONCATENATE 'This is my very long text. Probably about 140 chars long'
      'or more just to check if it all appears as is. Hopefully with a bit'
      'of luck we might have some success here.'
      into mytoptext separated by space.
    CALL METHOD p_doc->new_line.
    CALL METHOD p_doc->add_text
        EXPORTING text  = mytoptext.
    ENDFORM.
    I advise that you have a look on the original SAP FM (REUSE_ALV_GRID_COMMENTARY_SET), which is used to format your commentary (through memorised parameter DYNDOS_FOR_ALV) and based on that you can make your heading.
    If you can't use I_CALLBACK_HTML_TOP_OF_PAGE parameter then probably defining your own grid is a solution (a bit longer to implement, though).
    Hope this helps.
    Wojtek

Maybe you are looking for

  • The web cam is not found

    hi hope you can help me. happens that when i turn on the lap a message appears saying that the web cam could not be started and suggests to restart. i did it already but the same window is shown. moreover, i cant find the web cam app. model: toshiba

  • How to force redownload in ACF Caching

    Hello All, Following the instructions in documentation from here: http://docs.oracle.com/cd/E21043_01/web.1111/b31973/ap_config.htm A.2.3.18 ADF Faces Caching Filter A.4.2 Defining Caching Rules for ADF Faces Caching Filter I am able to configure the

  • SQL Query (PL/SQL function body returning SQL query) when using to_char

    we are trying to build a report page of Type SQL Query (PL/SQL function body returning SQL query). our query is so simple, we need to extract the month from the recording_date column. declare l_query varchar2(1000); begin l_query:='select to_char(rec

  • HT3775 after installing Lion Mountain Plug-in  is missing

    After I installed Lion Mountain in my MacBook Pro my Plug-in  is missing ? I have tryed  the install defult thing but it did not work out.

  • Why does my iBooks keep closing?

    I'm about half way into a new book and now it keeps freezing and then closing on me. Doesn't seem to do it with my other books. What can I do to resolve the issue?