<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ALV in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2438231#M545541</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try tis pricess.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*data definition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables:&lt;/P&gt;&lt;P&gt;marav. "Table MARA and table MAKT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Data to be displayed in ALV&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Using the following syntax, REUSE_ALV_FIELDCATALOG_MERGE can auto-&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;matically determine the fieldstructure from this source program&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;begin of imat occurs 100,&lt;/P&gt;&lt;P&gt;matnr like marav-matnr, "Material number&lt;/P&gt;&lt;P&gt;maktx like marav-maktx, "Material short text&lt;/P&gt;&lt;P&gt;matkl like marav-matkl, "Material group (so you can test to make&lt;/P&gt;&lt;P&gt;                        " intermediate sums)&lt;/P&gt;&lt;P&gt;ntgew like marav-ntgew, "Net weight, numeric field (so you can test to&lt;/P&gt;&lt;P&gt;                        "make sums)&lt;/P&gt;&lt;P&gt;gewei like marav-gewei, "weight unit (just to be complete)&lt;/P&gt;&lt;P&gt;end of imat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Other data needed&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;field to store report name&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;data i_repid like sy-repid.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;field to check table length&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;data i_lines like sy-tabix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Data for ALV display&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;TYPE-POOLS: SLIS.&lt;/P&gt;&lt;P&gt;data int_fcat type SLIS_T_FIELDCAT_ALV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select-options:&lt;/P&gt;&lt;P&gt;s_matnr for marav-matnr matchcode object MAT1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;read data into table imat&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  select * from marav&lt;/P&gt;&lt;P&gt;  into corresponding fields of table imat&lt;/P&gt;&lt;P&gt;  where&lt;/P&gt;&lt;P&gt;  matnr in s_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Check if material was found&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  clear i_lines.&lt;/P&gt;&lt;P&gt;  describe table imat lines i_lines.&lt;/P&gt;&lt;P&gt;  if i_lines lt 1.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Using hardcoded write here for easy upload&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    write: /&lt;/P&gt;&lt;P&gt;    'No materials found.'.&lt;/P&gt;&lt;P&gt;    exit.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end-of-selection.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Now, we start with ALV&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;To use ALV, we need a DDIC-structure or a thing called Fieldcatalogue.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;The fieldcatalouge can be generated by FUNCTION&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;'REUSE_ALV_FIELDCATALOG_MERGE' from an internal table from any&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;report source, including this report.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;The only problem one might have is that the report and table names&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;need to be in capital letters. (I had it &lt;SPAN __jive_emoticon_name="sad"&gt;&lt;/SPAN&gt; )&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Store report name&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  i_repid = sy-repid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create Fieldcatalogue from internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            I_PROGRAM_NAME         = i_repid&lt;/P&gt;&lt;P&gt;            I_INTERNAL_TABNAME     = 'IMAT'  "capital letters!&lt;/P&gt;&lt;P&gt;            I_INCLNAME             = i_repid&lt;/P&gt;&lt;P&gt;       CHANGING&lt;/P&gt;&lt;P&gt;            CT_FIELDCAT            = int_fcat&lt;/P&gt;&lt;P&gt;       EXCEPTIONS&lt;/P&gt;&lt;P&gt;            INCONSISTENT_INTERFACE = 1&lt;/P&gt;&lt;P&gt;            PROGRAM_ERROR          = 2&lt;/P&gt;&lt;P&gt;            OTHERS                 = 3.&lt;/P&gt;&lt;P&gt;*explanations:&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   I_PROGRAM_NAME is the program which calls this function&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   I_INTERNAL_TABNAME is the name of the internal table which you want&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                      to display in ALV&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   I_INCLNAME is the ABAP-source where the internal table is defined&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;              (DATA....)&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     CT_FIELDCAT contains the Fieldcatalouge that we need later for&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     ALV display&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    write: /&lt;/P&gt;&lt;P&gt;    'Returncode',&lt;/P&gt;&lt;P&gt;    sy-subrc,&lt;/P&gt;&lt;P&gt;    'from FUNCTION REUSE_ALV_FIELDCATALOG_MERGE'.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*This was the fieldcatlogue&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;And now, we are ready to display our list&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Call for ALV list display&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           I_CALLBACK_PROGRAM = 'Z_ALV_SIMPLE_EXAMPLE_WITH_ITAB'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            I_CALLBACK_PROGRAM = i_repid&lt;/P&gt;&lt;P&gt;            IT_FIELDCAT        = int_fcat&lt;/P&gt;&lt;P&gt;            I_SAVE             = 'A'&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;            T_OUTTAB           = imat&lt;/P&gt;&lt;P&gt;       EXCEPTIONS&lt;/P&gt;&lt;P&gt;            PROGRAM_ERROR      = 1&lt;/P&gt;&lt;P&gt;            OTHERS             = 2.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*explanations:&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   I_CALLBACK_PROGRAM is the program which calls this function&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   IT_FIELDCAT (just made by REUSE_ALV_FIELDCATALOG_MERGE) contains&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                now the data definition needed for display&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   I_SAVE allows the user to save his own layouts&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     T_OUTTAB contains the data to be displayed in ALV&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    write: /&lt;/P&gt;&lt;P&gt;    'Returncode',&lt;/P&gt;&lt;P&gt;    sy-subrc,&lt;/P&gt;&lt;P&gt;    'from FUNCTION REUSE_ALV_LIST_DISPLAY'.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward all helpfull answers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards.&lt;/P&gt;&lt;P&gt;Jay.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Jun 2007 05:06:27 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-26T05:06:27Z</dc:date>
    <item>
      <title>ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2438230#M545540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what is process code types?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2007 05:04:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2438230#M545540</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-26T05:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2438231#M545541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try tis pricess.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*data definition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables:&lt;/P&gt;&lt;P&gt;marav. "Table MARA and table MAKT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Data to be displayed in ALV&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Using the following syntax, REUSE_ALV_FIELDCATALOG_MERGE can auto-&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;matically determine the fieldstructure from this source program&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;begin of imat occurs 100,&lt;/P&gt;&lt;P&gt;matnr like marav-matnr, "Material number&lt;/P&gt;&lt;P&gt;maktx like marav-maktx, "Material short text&lt;/P&gt;&lt;P&gt;matkl like marav-matkl, "Material group (so you can test to make&lt;/P&gt;&lt;P&gt;                        " intermediate sums)&lt;/P&gt;&lt;P&gt;ntgew like marav-ntgew, "Net weight, numeric field (so you can test to&lt;/P&gt;&lt;P&gt;                        "make sums)&lt;/P&gt;&lt;P&gt;gewei like marav-gewei, "weight unit (just to be complete)&lt;/P&gt;&lt;P&gt;end of imat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Other data needed&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;field to store report name&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;data i_repid like sy-repid.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;field to check table length&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;data i_lines like sy-tabix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Data for ALV display&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;TYPE-POOLS: SLIS.&lt;/P&gt;&lt;P&gt;data int_fcat type SLIS_T_FIELDCAT_ALV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select-options:&lt;/P&gt;&lt;P&gt;s_matnr for marav-matnr matchcode object MAT1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;read data into table imat&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  select * from marav&lt;/P&gt;&lt;P&gt;  into corresponding fields of table imat&lt;/P&gt;&lt;P&gt;  where&lt;/P&gt;&lt;P&gt;  matnr in s_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Check if material was found&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  clear i_lines.&lt;/P&gt;&lt;P&gt;  describe table imat lines i_lines.&lt;/P&gt;&lt;P&gt;  if i_lines lt 1.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Using hardcoded write here for easy upload&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    write: /&lt;/P&gt;&lt;P&gt;    'No materials found.'.&lt;/P&gt;&lt;P&gt;    exit.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end-of-selection.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Now, we start with ALV&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;To use ALV, we need a DDIC-structure or a thing called Fieldcatalogue.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;The fieldcatalouge can be generated by FUNCTION&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;'REUSE_ALV_FIELDCATALOG_MERGE' from an internal table from any&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;report source, including this report.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;The only problem one might have is that the report and table names&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;need to be in capital letters. (I had it &lt;SPAN __jive_emoticon_name="sad"&gt;&lt;/SPAN&gt; )&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Store report name&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  i_repid = sy-repid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create Fieldcatalogue from internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            I_PROGRAM_NAME         = i_repid&lt;/P&gt;&lt;P&gt;            I_INTERNAL_TABNAME     = 'IMAT'  "capital letters!&lt;/P&gt;&lt;P&gt;            I_INCLNAME             = i_repid&lt;/P&gt;&lt;P&gt;       CHANGING&lt;/P&gt;&lt;P&gt;            CT_FIELDCAT            = int_fcat&lt;/P&gt;&lt;P&gt;       EXCEPTIONS&lt;/P&gt;&lt;P&gt;            INCONSISTENT_INTERFACE = 1&lt;/P&gt;&lt;P&gt;            PROGRAM_ERROR          = 2&lt;/P&gt;&lt;P&gt;            OTHERS                 = 3.&lt;/P&gt;&lt;P&gt;*explanations:&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   I_PROGRAM_NAME is the program which calls this function&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   I_INTERNAL_TABNAME is the name of the internal table which you want&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                      to display in ALV&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   I_INCLNAME is the ABAP-source where the internal table is defined&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;              (DATA....)&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     CT_FIELDCAT contains the Fieldcatalouge that we need later for&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     ALV display&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    write: /&lt;/P&gt;&lt;P&gt;    'Returncode',&lt;/P&gt;&lt;P&gt;    sy-subrc,&lt;/P&gt;&lt;P&gt;    'from FUNCTION REUSE_ALV_FIELDCATALOG_MERGE'.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*This was the fieldcatlogue&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;And now, we are ready to display our list&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Call for ALV list display&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           I_CALLBACK_PROGRAM = 'Z_ALV_SIMPLE_EXAMPLE_WITH_ITAB'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            I_CALLBACK_PROGRAM = i_repid&lt;/P&gt;&lt;P&gt;            IT_FIELDCAT        = int_fcat&lt;/P&gt;&lt;P&gt;            I_SAVE             = 'A'&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;            T_OUTTAB           = imat&lt;/P&gt;&lt;P&gt;       EXCEPTIONS&lt;/P&gt;&lt;P&gt;            PROGRAM_ERROR      = 1&lt;/P&gt;&lt;P&gt;            OTHERS             = 2.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*explanations:&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   I_CALLBACK_PROGRAM is the program which calls this function&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   IT_FIELDCAT (just made by REUSE_ALV_FIELDCATALOG_MERGE) contains&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                now the data definition needed for display&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   I_SAVE allows the user to save his own layouts&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     T_OUTTAB contains the data to be displayed in ALV&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    write: /&lt;/P&gt;&lt;P&gt;    'Returncode',&lt;/P&gt;&lt;P&gt;    sy-subrc,&lt;/P&gt;&lt;P&gt;    'from FUNCTION REUSE_ALV_LIST_DISPLAY'.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward all helpfull answers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards.&lt;/P&gt;&lt;P&gt;Jay.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2007 05:06:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2438231#M545541</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-26T05:06:27Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2438232#M545542</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Process Code are related to IDOC not ALV.&lt;/P&gt;&lt;P&gt;What are you exactly looking for?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Atish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2007 05:06:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2438232#M545542</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-26T05:06:58Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2438233#M545543</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Definition&lt;/P&gt;&lt;P&gt;Another name for a specific process, for example function module or workflow. IDocs are read or written in this process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use&lt;/P&gt;&lt;P&gt;In the partner profiles, the processing is never addressed directly but rather always using a process code. You can therefore replace an old process with a new one for any number of partners by assigning the existing process code to the new process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Two types of process code are used in conjunction with the partner profiles:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        Outbound Process Code - if you are using outbound processing under Message Control, the IDoc is generated in the IDoc Interface. The process code names the relevant function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        Inbound Process Code - names the function module or workflow which reads the IDoc data and transfers the data to the application document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wenn Sie nicht wissen, welcher Vorgangscode für Ihren Geschäftsprozess relevant ist, aber den Nachrichtentyp kennen, so lassen Sie sich die für diesen Nachrichtentyp definierten Vorgangscodes anzeigen: Wählen Sie SAP Menü ® Werkzeuge ® IDoc-Schnittstelle/ALE ®  Dienste ® Dokumentation ® Vorgangscodes (WE64) oder verwenden Sie die F4-Hilfe in den Partnervereinbarungen, nachdem Sie den Nachrichtentyp eingetragen haben.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are also the process codes for exception handling:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        System Process Code - names the workflow which is triggered in inbound or outbound processing when an exception occurs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        Status Process Code - names the exception workflow which is triggered when an incorrect status is returned by the external system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These two types are configured centrally and not on a partner-specific basis and therefore do not have to be maintained when a new process is defined. They were introduced for the sake of completeness, so that each process in the IDoc Interface is addressed using a process code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points if useful,&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;seshu.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2007 05:09:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2438233#M545543</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-26T05:09:28Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2438234#M545544</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the process code is related to IDOC, it comes to picture when dealing with inbound and outbound of IDOCs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data Creation in Idoc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IDocs are text encoded documents with a rigid structure that are used to exchange data between R/3 and a foreign system. Instead of calling a program in the destination system directly, the data is first packed into an IDoc and then sent to the receiving system, where it is analyzed and properly processed. Therefore an IDoc data exchange is always an &lt;/P&gt;&lt;P&gt;asynchronous process. The significant difference between simple RFC-calls and IDoc data exchange is the fact, that every action performed on IDocs are protocolled by R/3 and IDocs can be reprocessed if an error occurred in one of the message steps. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While IDocs have to be understood as a data exchange protocol, EDI and ALE are typical use cases for IDocs. R/3 uses IDocs for both EDI and ALE to deliver data to the receiving system. ALE is basically the scheduling mechanism that defines when and between which partners and what kind of data will be exchanged on a regular or event triggered basis. Such a set-up is called an ALE-scenario. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IDoc is a intermediate document to exchange data between two SAP Systems.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)IDocs are structured ASCII files (or a virtual equivalent). &lt;/P&gt;&lt;P&gt;2)Electronic Interchange Document&lt;/P&gt;&lt;P&gt;3)They are the file format used by SAP R/3 to exchange data with foreign systems.&lt;/P&gt;&lt;P&gt;4)Data Is transmitted in ASCII format, i.e. human readable form&lt;/P&gt;&lt;P&gt;5)IDocs exchange messages&lt;/P&gt;&lt;P&gt;6)IDocs are used like classical interface files&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IDOC types are templates for specific message types depending on what is the business document, you want to exchange.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WE30 - you can create a IDOC type.&lt;/P&gt;&lt;P&gt;An IDOC with data, will have to be triggered by the application that is trying to send out the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOr testing you can use WE19.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to create idoc?&lt;/P&gt;&lt;P&gt;WE30 - you can create a IDOC type&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To Create Idoc we need to follow these steps:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create Segment ( WE31)&lt;/P&gt;&lt;P&gt;Create Idoc Type ( WE30 )&lt;/P&gt;&lt;P&gt;Create Message Type ( WE81 )&lt;/P&gt;&lt;P&gt;Assign Idoc Type to Message Type ( WE82 )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Creating a Segment&lt;/P&gt;&lt;P&gt;Go to transaction code WE31&lt;/P&gt;&lt;P&gt;Enter the name for your segment type and click on the Create icon&lt;/P&gt;&lt;P&gt;Type the short text&lt;/P&gt;&lt;P&gt;Enter the variable names and data elements&lt;/P&gt;&lt;P&gt;Save it and go back&lt;/P&gt;&lt;P&gt;Go to Edit -&amp;gt; Set Release&lt;/P&gt;&lt;P&gt;Follow steps to create more number of segments&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create IDOC Type&lt;/P&gt;&lt;P&gt;Go to transaction code WE30&lt;/P&gt;&lt;P&gt;Enter the Object Name, select Basic type and click Create icon&lt;/P&gt;&lt;P&gt;Select the create new option and enter a description for your basic IDOC type and press enter&lt;/P&gt;&lt;P&gt;Select the IDOC Name and click Create icon&lt;/P&gt;&lt;P&gt;The system prompts us to enter a segment type and its attributes&lt;/P&gt;&lt;P&gt;Choose the appropriate values and press Enter&lt;/P&gt;&lt;P&gt;The system transfers the name of the segment type to the IDOC editor.&lt;/P&gt;&lt;P&gt;Follow these steps to add more number of segments to Parent or as Parent-child relation&lt;/P&gt;&lt;P&gt;Save it and go back&lt;/P&gt;&lt;P&gt;Go to Edit -&amp;gt; Set release&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create Message Type&lt;/P&gt;&lt;P&gt;Go to transaction code WE81&lt;/P&gt;&lt;P&gt;Change the details from Display mode to Change mode&lt;/P&gt;&lt;P&gt;After selection, the system will give this message &amp;#147;The table is cross-client (see Help for further info)&amp;#148;. Press Enter&lt;/P&gt;&lt;P&gt;Click New Entries to create new Message Type&lt;/P&gt;&lt;P&gt;Fill details&lt;/P&gt;&lt;P&gt;Save it and go back&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assign Message Type to IDoc Type&lt;/P&gt;&lt;P&gt;Go to transaction code WE82&lt;/P&gt;&lt;P&gt;Change the details from Display mode to Change mode&lt;/P&gt;&lt;P&gt;After selection, the system will give this message &amp;#147;The table is cross-client (see Help for further info)&amp;#148;. Press Enter.&lt;/P&gt;&lt;P&gt;Click New Entries to create new Message Type.&lt;/P&gt;&lt;P&gt;Fill details&lt;/P&gt;&lt;P&gt;Save it and go back&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INBOUND:&lt;/P&gt;&lt;P&gt;Step 1. EDI Subsystem creates an IDoc file from EDI Messages&lt;/P&gt;&lt;P&gt;2. Subsystem calls Functional Module EDI_DATA_INCOMING from startRFC program.&lt;/P&gt;&lt;P&gt;3. Data in Control Record is validate against the Partner Profile.&lt;/P&gt;&lt;P&gt;4. IDoc is generated in Database and syntax check is carried out.&lt;/P&gt;&lt;P&gt;5. IDoc file is deleted once file read.&lt;/P&gt;&lt;P&gt;6. Event PROCESSSTATE REACHED is triggered in Idoc Object Workflow. &lt;/P&gt;&lt;P&gt;7. Check for Process Immediately.&lt;/P&gt;&lt;P&gt;If NO&lt;/P&gt;&lt;P&gt;Execute RBDAPP01 Program&lt;/P&gt;&lt;P&gt;Else&lt;/P&gt;&lt;P&gt;Read Process Code from Partner Profile &lt;/P&gt;&lt;P&gt;Process Code Points to Function Module&lt;/P&gt;&lt;P&gt;Application Document Posted. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Outbound:&lt;/P&gt;&lt;P&gt;Step 1. Application document is created when transaction is saved.&lt;/P&gt;&lt;P&gt;2. Message control is invoked.&lt;/P&gt;&lt;P&gt;3. Messages are processed by system.&lt;/P&gt;&lt;P&gt;4. Messages are Edited (if desired).&lt;/P&gt;&lt;P&gt;5. Output (ALE / EDI) is checked&lt;/P&gt;&lt;P&gt;6. Validate against Message control record from Partner Profile&lt;/P&gt;&lt;P&gt;7. Application Document is saved.&lt;/P&gt;&lt;P&gt;8. Entry NAST table is created for every selected output program&lt;/P&gt;&lt;P&gt;along with Medium &amp;amp; Timing.&lt;/P&gt;&lt;P&gt;9. Check for Process Immediately .&lt;/P&gt;&lt;P&gt;If (yes)&lt;/P&gt;&lt;P&gt;Determine Processing Program from TNAPR Table.&lt;/P&gt;&lt;P&gt;ELSE&lt;/P&gt;&lt;P&gt;Execute RSNASTED Program.&lt;/P&gt;&lt;P&gt;10. Read Partner Profile to determine Process Code.&lt;/P&gt;&lt;P&gt;11. Process Code points to the Function Module &amp;amp; Invoked.&lt;/P&gt;&lt;P&gt;12. IDoc is generated. &lt;/P&gt;&lt;P&gt;13. Check for ALE Request.&lt;/P&gt;&lt;P&gt;if (Yes)&lt;/P&gt;&lt;P&gt;Perform Filters, Conversions, Version Changes etc.&lt;/P&gt;&lt;P&gt;Else.&lt;/P&gt;&lt;P&gt;IDoc is stored in DATABASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*********&lt;STRONG&gt;please reward points if the information is helpful to you&lt;/STRONG&gt;***************&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2007 05:19:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2438234#M545544</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-26T05:19:50Z</dc:date>
    </item>
  </channel>
</rss>

