<?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: Coding reqd for MIGO - BADI in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/coding-reqd-for-migo-badi/m-p/3246466#M774875</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi renjith,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for ur prompt reply man,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could u pls help me to post some sample code...if the field gets change,as ur criteria.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;sankar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 31 Dec 2007 12:30:27 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-12-31T12:30:27Z</dc:date>
    <item>
      <title>Coding reqd for MIGO - BADI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/coding-reqd-for-migo-badi/m-p/3246464#M774873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Im working on MB_MIGO_BADI object for MType: 261.Here, im facing a problem to call a info msg with coding effect.i.e, I've to give a conditional message says that if the user tries to change the quantity (changing the existing/available in the field text of MIGO), then it'll give a window pop-up message or info msg like "Quantity should not be changed". Pls reply ur post how to fix this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The fields are&lt;/P&gt;&lt;P&gt;1) cs_goitem-bwart " MType&lt;/P&gt;&lt;P&gt;2) cs_goitem-erfmg "Quantity&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: A) It'll be applied only for MType:261.&lt;/P&gt;&lt;P&gt;B) Pls advise, Here, shall I declare the export and import memory id concept?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FYI&lt;/P&gt;&lt;P&gt;******Below is the coding part declared inside the method function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;method IF_EX_MB_MIGO_BADI~LINE_MODIFY.&lt;/P&gt;&lt;P&gt;if cs_goitem-bwart eq '261'.&lt;/P&gt;&lt;P&gt;*cs_goitem-erfmg is not initial and&lt;/P&gt;&lt;P&gt;*call function 'CUSTOMIZED_MESSAGE'&lt;/P&gt;&lt;P&gt;*exporting&lt;/P&gt;&lt;P&gt;Message i006(zmsg).&lt;/P&gt;&lt;P&gt;endif.&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;Above, it helps only showing the info msg while entering the mtype: 261.But i need to display it only if the cursor comes into Qty (ERFMG) field. Pls advise me how to fix with ur coding example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mail me:sankar1781@gmail.com&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Dec 2007 10:18:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/coding-reqd-for-migo-badi/m-p/3246464#M774873</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-31T10:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: Coding reqd for MIGO - BADI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/coding-reqd-for-migo-badi/m-p/3246465#M774874</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;You can get the change history from the tables CDHDR and CDPOS. Also you can use the function modules CHANGEDOCUMENT_READ_HEADERS and CHANGEDOCUMENT_READ_POSITIONS. Check if the last updated value in the quantity field is different from the new one (cs_goitem-erfmg). If any change is there, you can give the error message. Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Renjith Michael.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Dec 2007 11:54:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/coding-reqd-for-migo-badi/m-p/3246465#M774874</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-31T11:54:59Z</dc:date>
    </item>
    <item>
      <title>Re: Coding reqd for MIGO - BADI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/coding-reqd-for-migo-badi/m-p/3246466#M774875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi renjith,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for ur prompt reply man,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could u pls help me to post some sample code...if the field gets change,as ur criteria.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;sankar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Dec 2007 12:30:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/coding-reqd-for-migo-badi/m-p/3246466#M774875</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-31T12:30:27Z</dc:date>
    </item>
    <item>
      <title>Re: Coding reqd for MIGO - BADI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/coding-reqd-for-migo-badi/m-p/3246467#M774876</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;One option is you may select Object class from table BDCP where field name = your quantity field and table name = your migo table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS'&lt;/P&gt;&lt;P&gt;     EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ARCHIVE_HANDLE                   = 0&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  DATE_OF_CHANGE                   = '00000000'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;       objectclass                      = &amp;lt;the one which u got from the previous query&amp;gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OBJECTID                         = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  TIME_OF_CHANGE                   = '000000'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  USERNAME                         = SY-UNAME&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  LOCAL_TIME                       = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  DATE_UNTIL                       = '99991231'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  TIME_UNTIL                       = '235959'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  NOPLUS_ASWILDCARD_INOBJID        = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;     TABLES&lt;/P&gt;&lt;P&gt;       i_cdhdr                          = i_cdhdr[]&lt;/P&gt;&lt;P&gt;  EXCEPTIONS&lt;/P&gt;&lt;P&gt;    no_position_found                = 1&lt;/P&gt;&lt;P&gt;    wrong_access_to_archive          = 2&lt;/P&gt;&lt;P&gt;    time_zone_conversion_error       = 3&lt;/P&gt;&lt;P&gt;    OTHERS                           = 4&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;    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;*Read Change Positions for Credit Control&lt;/P&gt;&lt;P&gt;  LOOP AT i_cdhdr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'CHANGEDOCUMENT_READ_POSITIONS'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ARCHIVE_HANDLE                = 0&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        changenumber                  = i_cdhdr-changenr&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  TABLEKEY                      = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  TABLENAME                     = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  TABLEKEY254                   = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  KEYGUID                       = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  HEADER                        =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   TABLES&lt;/P&gt;&lt;P&gt;     editpos                       = it_editpos&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  EDITPOS_WITH_HEADER           =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; EXCEPTIONS&lt;/P&gt;&lt;P&gt;   no_position_found             = 1&lt;/P&gt;&lt;P&gt;   wrong_access_to_archive       = 2&lt;/P&gt;&lt;P&gt;   OTHERS                        = 3&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;      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;    APPEND LINES OF it_editpos TO it_editpos1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try the logic further. If no change history is found for the quantity field, then also you can assume that no change is made to it earlier and if it contains a new value then u can give the error message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls reward if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Renjith Michael.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Dec 2007 13:19:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/coding-reqd-for-migo-badi/m-p/3246467#M774876</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-31T13:19:11Z</dc:date>
    </item>
  </channel>
</rss>

