<?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 BADI problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/badi-problem/m-p/2090580#M434617</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's the background on what we're trying to do. There's an FM report that you can run using trx SE38. The program is called RFFMEPGAX and it displays an ALV list of FM posted line items. The issue is that the report can display the vendor number but not the vendor name. SAP suggested that we use the BADI associated with the report - FMRP_RFFMEPGAX_EXIT. This BADI supposedly will allow additional fields to be included in the resulting ALV display that is not in the current default structure. To do this, ABAP code will have to be written in the BADI's methods that will incorporate the new field that we want (field NAME1 from table LFA1). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;anybody who had seen this before has a solution&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 Mar 2007 21:33:41 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-03-30T21:33:41Z</dc:date>
    <item>
      <title>BADI problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/badi-problem/m-p/2090580#M434617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's the background on what we're trying to do. There's an FM report that you can run using trx SE38. The program is called RFFMEPGAX and it displays an ALV list of FM posted line items. The issue is that the report can display the vendor number but not the vendor name. SAP suggested that we use the BADI associated with the report - FMRP_RFFMEPGAX_EXIT. This BADI supposedly will allow additional fields to be included in the resulting ALV display that is not in the current default structure. To do this, ABAP code will have to be written in the BADI's methods that will incorporate the new field that we want (field NAME1 from table LFA1). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;anybody who had seen this before has a solution&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Mar 2007 21:33:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/badi-problem/m-p/2090580#M434617</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-30T21:33:41Z</dc:date>
    </item>
    <item>
      <title>Re: BADI problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/badi-problem/m-p/2090581#M434618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Dishant&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately I do not have any FM data available on our IDES system (ECC 5.0) to test the report. However, looking at the available methods of interface IF_EX_FMRP_RFFMEPGAX_EXIT you can either change a single item entry (method CHANGE_LIST_LINE) or the entire item entries (method CHANGE_LIST_TABLE).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Method CHANGE_LIST_LINE has a single CHANGING parameter C_F_LINE_ITEM of line type IFMREPGAX. Assuming that the vendor can be found in field IFMREPGAX-LIFNR you could add the following coding to the method:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;method IF_EX_FMRP_RFFMEPGAX_EXIT~CHANGE_LIST_LINE.
  DATA:
    ls_lfa1     TYPE lfa1.

  CALL FUNCTION 'VENDOR_READ'
    EXPORTING
      i_bukrs = space
      i_lifnr    = c_f_line_item-lifnr
    IMPORTING
      e_lfa1 = ls_lfa1
    EXCEPTIONS
     not_found = 1
     others      = 2.
  IF ( syst-subrc = 0 ).
    c_f_line_item-name1 = ls_lfa1-nam1.
  ENDIF.

endmethod.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The layout of the ALV list has to be adjusted in order to display the NAME1 column.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 31 Mar 2007 19:56:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/badi-problem/m-p/2090581#M434618</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2007-03-31T19:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: BADI problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/badi-problem/m-p/2090582#M434619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I already tried something similar to what you indicated and was able to include the NAME1 info in the internal table and ALV field catalog (g_t_fieldcat). I've also added it to the IFMREPGAX structure. But what happens is that when routine FFMEPGAX_CHECK_NEEDED_TABLEF01 is executed, the field is deleted from the catalog because it's not in the IFMREP1AX structure. I thought putting the code in the BADI will prevent that from happening but it's still doing it. Any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Apr 2007 17:55:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/badi-problem/m-p/2090582#M434619</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-02T17:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: BADI problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/badi-problem/m-p/2090583#M434620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Dishant&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you tried to &amp;lt;i&amp;gt;unmark &amp;lt;/i&amp;gt;flag &amp;lt;b&amp;gt;Variant fields only&amp;lt;/b&amp;gt; (bottom of selection screen, fieldgroup Layout). If you look at routine &amp;lt;b&amp;gt;check_needed_tables&amp;lt;/b&amp;gt; there is the following IF statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[code]FORM check_needed_tables CHANGING&lt;/P&gt;&lt;P&gt;                             c_flg_asset_read          TYPE boole-boole&lt;/P&gt;&lt;P&gt;                             c_flg_master_data         TYPE boole-boole&lt;/P&gt;&lt;P&gt;                             c_flg_master_data_bseg    TYPE boole-boole&lt;/P&gt;&lt;P&gt;                             c_flg_bank_data           TYPE boole-boole&lt;/P&gt;&lt;P&gt;                             c_flg_head_eban           TYPE boole-boole&lt;/P&gt;&lt;P&gt;                             c_flg_head_ekpo           TYPE boole-boole&lt;/P&gt;&lt;P&gt;                             c_flg_head_kblk           TYPE boole-boole&lt;/P&gt;&lt;P&gt;                             c_flg_head_bkpf           TYPE boole-boole&lt;/P&gt;&lt;P&gt;                             c_flg_head_vbkpf          TYPE boole-boole&lt;/P&gt;&lt;P&gt;                             c_flg_head_ekko           TYPE boole-boole&lt;/P&gt;&lt;P&gt;                             c_flg_co_data             TYPE boole-boole&lt;/P&gt;&lt;P&gt;                             c_flg_co_texts            TYPE boole-boole.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: l_t_fieldcat   TYPE slis_t_fieldcat_alv,&lt;/P&gt;&lt;P&gt;        l_f_fieldcat   TYPE slis_fieldcat_alv.&lt;/P&gt;&lt;P&gt;  DATA: l_t_fields_1ax TYPE TABLE OF dfies WITH HEADER LINE.&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;/P&gt;&lt;P&gt;  PERFORM read_variant_fieldcat CHANGING l_t_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"$Comment: If p_fixvar = ' ' then the ELSE branch is executed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Only layoutfields (p_fixvar) or&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;background processing&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  IF NOT p_fixvar IS INITIAL OR&lt;/P&gt;&lt;P&gt;     NOT sy-batch IS INITIAL.&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;Fields will be empty -&amp;gt; delete from field catalogue&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Don't delete the fields of IFMREP1AX (filled by LDB)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    CALL FUNCTION 'DDIF_FIELDINFO_GET'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        tabname        = 'IFMREP1AX'&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;        dfies_tab      = l_t_fields_1ax&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;        not_found      = 1&lt;/P&gt;&lt;P&gt;        internal_error = 2&lt;/P&gt;&lt;P&gt;        OTHERS         = 3.&lt;/P&gt;&lt;P&gt;    IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&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;  ELSE.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;No layout entered/no default layout or&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;p_fixvar initial -&amp;gt; read all&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    MOVE:&lt;/P&gt;&lt;P&gt;        'X' TO  c_flg_asset_read,&lt;/P&gt;&lt;P&gt;        'X' TO  c_flg_master_data,&lt;/P&gt;&lt;P&gt;        'X' TO  c_flg_master_data_bseg,&lt;/P&gt;&lt;P&gt;        'X' TO  c_flg_bank_data,&lt;/P&gt;&lt;P&gt;        'X' TO  c_flg_head_eban,&lt;/P&gt;&lt;P&gt;        'X' TO  c_flg_head_ekpo,&lt;/P&gt;&lt;P&gt;        'X' TO  c_flg_head_kblk,&lt;/P&gt;&lt;P&gt;        'X' TO  c_flg_head_bkpf,&lt;/P&gt;&lt;P&gt;        'X' TO  c_flg_head_vbkpf,&lt;/P&gt;&lt;P&gt;        'X' TO  c_flg_head_ekko,&lt;/P&gt;&lt;P&gt;        'X' TO  c_flg_co_data,&lt;/P&gt;&lt;P&gt;        'X' TO  c_flg_co_texts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.[/code]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Apr 2007 21:04:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/badi-problem/m-p/2090583#M434620</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2007-04-02T21:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: BADI problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/badi-problem/m-p/2090584#M434621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not very familiar with ALV grids and am not quite sure what unmarking the Flag variant field will do or how it will stop the deletion of the ZNAME field from the field catalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could u elaborate a litle bit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Apr 2007 21:27:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/badi-problem/m-p/2090584#M434621</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-04T21:27:53Z</dc:date>
    </item>
  </channel>
</rss>

