<?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: badi in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/badi/m-p/3269367#M781460</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This document will give a step by step process to add the custom tab on the&lt;/P&gt;&lt;P&gt;customer master and implementation of respective BADIs accordingly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;&amp;amp;#61472;Create a Screen Group and a corresponding Function code for the enhancement&lt;/P&gt;&lt;P&gt;i) Go to SPRO and follow the path Logistics-General -&amp;gt; Business Partner -&amp;gt;&lt;/P&gt;&lt;P&gt;Customer -&amp;gt; Control -&amp;gt; Adoption of Customer&amp;#146;s own master data fields -&amp;gt;&lt;/P&gt;&lt;P&gt;Prepare Modification - Free Enhancement of Customer Master Record.&lt;/P&gt;&lt;P&gt;ii) Add the screen group ZP (SSS Customer Protocol) and Label the same&lt;/P&gt;&lt;P&gt;With Function code ZCUP and save.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;&amp;amp;#61472;Create a Function group ZCUP. Create a screen 0100 with the fields required on the screen from the dictionary (KNVV) and add the screen to the function group. In the PBO for the screen make an arrangement to keep the screen fields as &amp;#147;display only&amp;#148; fields if the transaction code is &amp;#145;XD03&amp;#146;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;&amp;amp;#61472;Implement the BADI CUSTOMER_ADD_DATA (Implementation name -&lt;/P&gt;&lt;P&gt;Z_CUST_ADD_DATA) and implement the method CHECK_ADD_ON_ACTIVE. &lt;/P&gt;&lt;P&gt;If the Screen Group = &amp;#145;ZP&amp;#146; then E_ADD_ON_ACTIVE = &amp;#145;X&amp;#146;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;&amp;amp;#61472;Implement the BADI CUSTOMER_ADD_DATA_CS (Implementation name -&lt;/P&gt;&lt;P&gt;Z_CUST_ADD_DATA _CS)&lt;/P&gt;&lt;P&gt;i) Implement the method SET_DATA: Here we have the structure S_KNVV and all the data contained in it. So if sy-tcode = &amp;#145;XD02&amp;#146; / &amp;#145;XD03&amp;#146;, use &lt;/P&gt;&lt;P&gt;SET PARAMETER to store all the data in SAP memory that is required on the screen. This data will then be retrieved in the PBO of the screen using GET PARAMETER.&lt;/P&gt;&lt;P&gt;ii) Implement the method GET_TAXI_SCREEN: If i_taxi_fcode = &amp;#145;ZCUP&amp;#146;,&lt;/P&gt;&lt;P&gt;then pass the Screen # and Program Name created in the earlier step and pass &amp;#145;V&amp;#146; (for Sales Area Data) to the header screen layout. Here we also put in the USER EXIT STRATEGY to display the custom screen only for company code 1070(SSS).&lt;/P&gt;&lt;P&gt;iii) Implement the method GET_DATA: Use GET PARAMETER to retrieve all the data that has been SET in the PAI of the screen after modifications by the user. Pass on these values into S_KNVV to update the details in database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;&amp;amp;#61472;PBO &amp;amp; PAI of Screen: In the PBO of the screen use GET PARAMETER to retrieve all the values for screen fields set in the method SET_DATA if the transaction is XD02 or XD03. In the PAI of the screen use SET PARAMETER to store in the SAP memory from the screen fields if the transaction is XD01 or XD02.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Jan 2008 11:08:32 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-07T11:08:32Z</dc:date>
    <item>
      <title>badi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/badi/m-p/3269364#M781457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have to  implement badi for customer master. my requirment is as follows.1) In the xd01 transaction i have to add a button like customers additional data.&lt;/P&gt;&lt;P&gt;2) in that there will two tab pages &lt;/P&gt;&lt;P&gt;general additional data&lt;/P&gt;&lt;P&gt;  in this tabpage i have to add some custom fields which are aadded in kna1 table .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sales area additional data&lt;/P&gt;&lt;P&gt;  in this tabpage i have to add some custom fields which are aadded in knvv table .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3)now i can do up to this by going to spro and executing these &lt;/P&gt;&lt;P&gt;badis and customizing the screen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4)now how can i save the data entered in to these tables .&lt;/P&gt;&lt;P&gt;since we have to use (Customer_Add_Data,Customer_Add_Data_cs )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Customer_Add_Data_cs--&lt;DEL&gt;-methods set_data&lt;/DEL&gt;--pbo of screen&lt;/P&gt;&lt;P&gt;                                        and         get_data----pai of screen&lt;/P&gt;&lt;P&gt;so please tell me the code to insert into these methods so that i can save the data in tables kna1 and knvv table&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jan 2008 13:55:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/badi/m-p/3269364#M781457</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-03T13:55:29Z</dc:date>
    </item>
    <item>
      <title>Re: badi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/badi/m-p/3269365#M781458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;narasimha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what a coincidence even i am stuck there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;could you please let me know how to use these methods set_data and get_data,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so that this BADI works perfeclty,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 Jan 2008 15:42:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/badi/m-p/3269365#M781458</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-06T15:42:09Z</dc:date>
    </item>
    <item>
      <title>Re: badi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/badi/m-p/3269366#M781459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Narasimha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Find below the Sample code for all the four methods.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Method &lt;STRONG&gt;GET_DATA&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;method IF_EX_CUSTOMER_ADD_DATA_CS~GET_DATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      CALL FUNCTION 'ZSDCU_ADD_FIELDS_GET_DATA'&lt;/P&gt;&lt;P&gt;        IMPORTING&lt;/P&gt;&lt;P&gt;          E_KUNNR  = S_KNA1-KUNNR&lt;/P&gt;&lt;P&gt;          E_ZZSCPC = S_KNVV-ZZSCPC&lt;/P&gt;&lt;P&gt;          E_ZZCSNM = S_KNVV-ZZCSNM&lt;/P&gt;&lt;P&gt;          E_ZZDTCM = S_KNVV-ZZDTCM&lt;/P&gt;&lt;P&gt;          E_ZZTEXP = S_KNVV-ZZTEXP&lt;/P&gt;&lt;P&gt;          E_ZZTSTA = S_KNVV-ZZTSTA&lt;/P&gt;&lt;P&gt;          E_ZZCERT = S_KNVV-ZZCERT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endmethod.&lt;/P&gt;&lt;P&gt;****************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Method &lt;STRONG&gt;SET_DATA&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;METHOD if_ex_customer_add_data_cs~set_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES:&lt;/P&gt;&lt;P&gt;  BEGIN OF tab_type,&lt;/P&gt;&lt;P&gt;    col1(10),&lt;/P&gt;&lt;P&gt;  END OF tab_type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;  wa_indx TYPE indx,&lt;/P&gt;&lt;P&gt;  wa_itab TYPE tab_type,&lt;/P&gt;&lt;P&gt;  cl      TYPE mandt,&lt;/P&gt;&lt;P&gt;  itab    TYPE STANDARD TABLE OF tab_type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  wa_itab-col1 = s_kna1-ktokd.&lt;/P&gt;&lt;P&gt;  APPEND wa_itab TO itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_indx-aedat = sy-datum.&lt;/P&gt;&lt;P&gt;wa_indx-usera = sy-uname.&lt;/P&gt;&lt;P&gt;wa_indx-pgmid = sy-repid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXPORT tab = itab&lt;/P&gt;&lt;P&gt;  TO DATABASE indx(XY)&lt;/P&gt;&lt;P&gt;  FROM wa_indx&lt;/P&gt;&lt;P&gt;  CLIENT sy-mandt&lt;/P&gt;&lt;P&gt;  ID 'TABLE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      CALL FUNCTION 'ZSDCU_ADD_FIELDS_SET_DATA'&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          i_kunnr    = s_kna1-kunnr&lt;/P&gt;&lt;P&gt;          i_zzscpc   = s_knvv-zzscpc&lt;/P&gt;&lt;P&gt;          i_zzcsnm   = s_knvv-zzcsnm&lt;/P&gt;&lt;P&gt;          i_zzdtcm   = s_knvv-zzdtcm&lt;/P&gt;&lt;P&gt;          i_zztexp   = s_knvv-zztexp&lt;/P&gt;&lt;P&gt;          i_zztsta   = s_knvv-zztsta&lt;/P&gt;&lt;P&gt;          i_zzcert   = s_knvv-zzcert&lt;/P&gt;&lt;P&gt;          i_activity = i_activity.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*******************************&lt;/P&gt;&lt;P&gt;Method  &lt;STRONG&gt;GET_TAXI_SCREEN&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;method IF_EX_CUSTOMER_ADD_DATA_CS~GET_TAXI_SCREEN.&lt;/P&gt;&lt;P&gt;A'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    E_SCREEN = '1234'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    E_PROGRAM = 'SAPLZSD_CUST_ADD_FIELDS'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    E_HEADERSCREEN_LAYOUT = ''.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endmethod.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;****************************************************&lt;/P&gt;&lt;P&gt;Method &lt;STRONG&gt;CHECK_ADD_ON_ACTIVE&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;method IF_EX_CUSTOMER_ADD_DATA~CHECK_ADD_ON_ACTIVE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;      IF I_SCREEN_GROUP = 'Z1'. " Z1 is the screen group defined in SPRO&lt;/P&gt;&lt;P&gt;        E_ADD_ON_ACTIVE = 'X'.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endmethod.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*****************************************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Le'me know if you need more.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vinodh Balakrishnan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 Jan 2008 16:37:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/badi/m-p/3269366#M781459</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-06T16:37:18Z</dc:date>
    </item>
    <item>
      <title>Re: badi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/badi/m-p/3269367#M781460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This document will give a step by step process to add the custom tab on the&lt;/P&gt;&lt;P&gt;customer master and implementation of respective BADIs accordingly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;&amp;amp;#61472;Create a Screen Group and a corresponding Function code for the enhancement&lt;/P&gt;&lt;P&gt;i) Go to SPRO and follow the path Logistics-General -&amp;gt; Business Partner -&amp;gt;&lt;/P&gt;&lt;P&gt;Customer -&amp;gt; Control -&amp;gt; Adoption of Customer&amp;#146;s own master data fields -&amp;gt;&lt;/P&gt;&lt;P&gt;Prepare Modification - Free Enhancement of Customer Master Record.&lt;/P&gt;&lt;P&gt;ii) Add the screen group ZP (SSS Customer Protocol) and Label the same&lt;/P&gt;&lt;P&gt;With Function code ZCUP and save.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;&amp;amp;#61472;Create a Function group ZCUP. Create a screen 0100 with the fields required on the screen from the dictionary (KNVV) and add the screen to the function group. In the PBO for the screen make an arrangement to keep the screen fields as &amp;#147;display only&amp;#148; fields if the transaction code is &amp;#145;XD03&amp;#146;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;&amp;amp;#61472;Implement the BADI CUSTOMER_ADD_DATA (Implementation name -&lt;/P&gt;&lt;P&gt;Z_CUST_ADD_DATA) and implement the method CHECK_ADD_ON_ACTIVE. &lt;/P&gt;&lt;P&gt;If the Screen Group = &amp;#145;ZP&amp;#146; then E_ADD_ON_ACTIVE = &amp;#145;X&amp;#146;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;&amp;amp;#61472;Implement the BADI CUSTOMER_ADD_DATA_CS (Implementation name -&lt;/P&gt;&lt;P&gt;Z_CUST_ADD_DATA _CS)&lt;/P&gt;&lt;P&gt;i) Implement the method SET_DATA: Here we have the structure S_KNVV and all the data contained in it. So if sy-tcode = &amp;#145;XD02&amp;#146; / &amp;#145;XD03&amp;#146;, use &lt;/P&gt;&lt;P&gt;SET PARAMETER to store all the data in SAP memory that is required on the screen. This data will then be retrieved in the PBO of the screen using GET PARAMETER.&lt;/P&gt;&lt;P&gt;ii) Implement the method GET_TAXI_SCREEN: If i_taxi_fcode = &amp;#145;ZCUP&amp;#146;,&lt;/P&gt;&lt;P&gt;then pass the Screen # and Program Name created in the earlier step and pass &amp;#145;V&amp;#146; (for Sales Area Data) to the header screen layout. Here we also put in the USER EXIT STRATEGY to display the custom screen only for company code 1070(SSS).&lt;/P&gt;&lt;P&gt;iii) Implement the method GET_DATA: Use GET PARAMETER to retrieve all the data that has been SET in the PAI of the screen after modifications by the user. Pass on these values into S_KNVV to update the details in database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;&amp;amp;#61472;PBO &amp;amp; PAI of Screen: In the PBO of the screen use GET PARAMETER to retrieve all the values for screen fields set in the method SET_DATA if the transaction is XD02 or XD03. In the PAI of the screen use SET PARAMETER to store in the SAP memory from the screen fields if the transaction is XD01 or XD02.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jan 2008 11:08:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/badi/m-p/3269367#M781460</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-07T11:08:32Z</dc:date>
    </item>
    <item>
      <title>Re: badi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/badi/m-p/3269368#M781461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vinodh or anybody who can help:&lt;/P&gt;&lt;P&gt;I currently have my custom screen on customer master working. I have an ALV that I display on the custom tab that I create. It's an editable ALV so the user can change values on it and then when they hit "Save" on the customer master I need to have these values transferred over to an external system using an RFC-JCO communication. I got all of this to work but I still don't know how to pass values from my ALV screen to the GET_DATA method or for that matter any methods of the BADIs involved. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Right now to pass values from my BADi to my custom screen I simply use SET PARAMETER/GET PARAMETER combinations but I cannot keep using that when I have over 1000 values to pass over.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I looking for this so that I can perform some data validations on my ALV fields when the user hits enter after typing the values. Also, to check whether anything was changed or not - to set or not to set the fields changed flag in the BADI, etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Kushal&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Kushal Thakore on Mar 31, 2008 7:33 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2008 20:47:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/badi/m-p/3269368#M781461</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-28T20:47:38Z</dc:date>
    </item>
  </channel>
</rss>

