<?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 Populating BAPI change structures in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/populating-bapi-change-structures/m-p/8203494#M1626558</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In BAPI import paramters we have change structures. E.g. in BAPI_FIXEDASSET_CREATE we have import parameter GENERALDATAX as change structure for the import parameter GENERALDATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a functional module or something which can automatically populate the change structure? e.g. a function module to populate GENERALDATAX based on data in GENERALDATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know. Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Sep 2011 10:28:05 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-09-22T10:28:05Z</dc:date>
    <item>
      <title>Populating BAPI change structures</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/populating-bapi-change-structures/m-p/8203494#M1626558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In BAPI import paramters we have change structures. E.g. in BAPI_FIXEDASSET_CREATE we have import parameter GENERALDATAX as change structure for the import parameter GENERALDATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a functional module or something which can automatically populate the change structure? e.g. a function module to populate GENERALDATAX based on data in GENERALDATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know. Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Sep 2011 10:28:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/populating-bapi-change-structures/m-p/8203494#M1626558</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-22T10:28:05Z</dc:date>
    </item>
    <item>
      <title>Re: Populating BAPI change structures</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/populating-bapi-change-structures/m-p/8203495#M1626559</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;Create this subroutine in your program:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  set_x_flags
*&amp;amp;---------------------------------------------------------------------*
FORM set_x_flags    USING is_data  TYPE any
                 CHANGING cs_datax TYPE any.

  FIELD-SYMBOLS: &amp;lt;l_field&amp;gt;  TYPE ANY,
                 &amp;lt;l_fieldx&amp;gt; TYPE ANY.

  DO.
    ASSIGN COMPONENT sy-index OF STRUCTURE is_data TO &amp;lt;l_field&amp;gt;.
    IF sy-subrc NE 0.
      EXIT.
    ENDIF.
    ASSIGN COMPONENT sy-index OF STRUCTURE cs_datax TO &amp;lt;l_fieldx&amp;gt;.
    IF sy-subrc NE 0.
      EXIT.
    ENDIF.
    IF &amp;lt;l_field&amp;gt; IS NOT INITIAL.
      &amp;lt;l_fieldx&amp;gt; = 'X'.
    ENDIF.
  ENDDO.
ENDFORM.                    "set_x_flags
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And you can use it this way:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  DATA: ls_generaldata  TYPE bapi1022_feglg001,
        ls_generaldatax TYPE bapi1022_feglg001x,
        ls_inventory    TYPE bapi1022_feglg011,
        ls_inventoryx   TYPE bapi1022_feglg011x.

* Populate LS_GENERAL_DATA and LS_INvENTORY manually

*... then populate flags
  PERFORM set_x_flags: USING ls_generaldata  CHANGING ls_generaldatax,
                       USING ls_inventory    CHANGING ls_inventoryx.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Sep 2011 10:45:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/populating-bapi-change-structures/m-p/8203495#M1626559</guid>
      <dc:creator>arseni_gallardo</dc:creator>
      <dc:date>2011-09-22T10:45:19Z</dc:date>
    </item>
    <item>
      <title>Re: Populating BAPI change structures</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/populating-bapi-change-structures/m-p/8203496#M1626560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The answer, as far as I know is: No, there's nothing that can automatically populate the "X"s in your badi X structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You'll have to use custom code as suggested above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Sep 2011 13:42:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/populating-bapi-change-structures/m-p/8203496#M1626560</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-22T13:42:29Z</dc:date>
    </item>
  </channel>
</rss>

