<?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: Multiple CDPOS rows (for diff fnames) from same structure in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-cdpos-rows-for-diff-fnames-from-same-structure/m-p/2403792#M535676</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi david,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. This is maintained in the Data element of that field.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &amp;lt;b&amp;gt; (In se11, data element, tab for Further Characteristic&lt;/P&gt;&lt;P&gt;   there is a checkbox , for  "Change Document")&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. If it is ticked, then that field, will automatically get stored in change documents.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Jun 2007 15:43:13 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-26T15:43:13Z</dc:date>
    <item>
      <title>Multiple CDPOS rows (for diff fnames) from same structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-cdpos-rows-for-diff-fnames-from-same-structure/m-p/2403791#M535675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The customer wanted four custom columns added in an append to MSEG and SAP signed-off on the desirability of this approach (because it eliminates the need to customize MB51.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The customer also wants change history on each of these four columns in CDPOS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I wrote the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  *mseg = xmseg.
  UPD_MSEG = 'U'.
  objectid = xmseg-mblnr.

  mseg  = xmseg.
  mseg-zzlifnr = wa_zzmseg_qm_2007-zzlifnr.
  PERFORM CD_CALL_ZCUSTMSEG.

  mseg  = xmseg.
  mseg-zzltno  = wa_zzmseg_qm_2007-zzltno.
  PERFORM CD_CALL_ZCUSTMSEG.

  mseg  = xmseg.
  mseg-zzvnlt  = wa_zzmseg_qm_2007-zzvnlt.
  PERFORM CD_CALL_ZCUSTMSEG.

  mseg  = xmseg.
  mseg-zzname1 = wa_zzmseg_qm_2007-zzname1.
  PERFORM CD_CALL_ZCUSTMSEG.


FORM CD_CALL_ZCUSTMSEG                     .
  IF   ( UPD_MSEG                           NE SPACE )
    OR ( UPD_ICDTXT_ZCUSTMSEG       NE SPACE )
  .
    CALL FUNCTION 'ZCUSTMSEG_WRITE_DOCUMENT      '
        EXPORTING
          OBJECTID                = objectid
          TCODE                   = 'MIGO'
          UTIME                   = sy-uzeit
          UDATE                   = sy-datum
          USERNAME                = sy-uname
          PLANNED_CHANGE_NUMBER   = ' '
          OBJECT_CHANGE_INDICATOR = 'U'
          PLANNED_OR_REAL_CHANGES = ' '
          NO_CHANGE_POINTERS      = ' '
          O_MSEG
                      = *MSEG
          N_MSEG
                      = MSEG
          UPD_MSEG
                      = 'U'
          UPD_ICDTXT_ZCUSTMSEG
                      = ' '
        TABLES
          ICDTXT_ZCUSTMSEG
                      = ICDTXT_ZCUSTMSEG
    .
  ENDIF.
  CLEAR PLANNED_CHANGE_NUMBER.
ENDFORM.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But isn't there a way to use a single function call to get the four CDPOS rows written with the new/old values for the four different field names ???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Confused as usual.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;djh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2007 15:39:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-cdpos-rows-for-diff-fnames-from-same-structure/m-p/2403791#M535675</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-26T15:39:50Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple CDPOS rows (for diff fnames) from same structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-cdpos-rows-for-diff-fnames-from-same-structure/m-p/2403792#M535676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi david,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. This is maintained in the Data element of that field.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &amp;lt;b&amp;gt; (In se11, data element, tab for Further Characteristic&lt;/P&gt;&lt;P&gt;   there is a checkbox , for  "Change Document")&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. If it is ticked, then that field, will automatically get stored in change documents.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2007 15:43:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-cdpos-rows-for-diff-fnames-from-same-structure/m-p/2403792#M535676</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-26T15:43:13Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple CDPOS rows (for diff fnames) from same structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-cdpos-rows-for-diff-fnames-from-same-structure/m-p/2403793#M535677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check this FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CHANGEDOCUMENT_PREPARE_POS&lt;/P&gt;&lt;P&gt;CHANGEDOCUMENT_*_CASE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2007 15:43:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-cdpos-rows-for-diff-fnames-from-same-structure/m-p/2403793#M535677</guid>
      <dc:creator>ferry_lianto</dc:creator>
      <dc:date>2007-06-26T15:43:34Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple CDPOS rows (for diff fnames) from same structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-cdpos-rows-for-diff-fnames-from-same-structure/m-p/2403794#M535678</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;Check for fm CHANGEDOCUMENT_MULTIPLE_CASE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
    call function 'CHANGEDOCUMENT_MULTIPLE_CASE'
      exporting
        tablename              = 'CCARD                         '
        change_indicator       = upd_ccard
        docu_delete            = 'X'
      tables
        table_old              = yccard
        table_new              = xccard
     exceptions
       nametab_error          = 1
       open_missing           = 2
       position_insert_failed = 3
       others                 = 4.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2007 15:47:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-cdpos-rows-for-diff-fnames-from-same-structure/m-p/2403794#M535678</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2007-06-26T15:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple CDPOS rows (for diff fnames) from same structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-cdpos-rows-for-diff-fnames-from-same-structure/m-p/2403795#M535679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Amit - That's not the question, although what you say is true.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ferry/aRs -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since you suggested two different approaches, which is the better one or the one you use ???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I looked at the "multiple case" before, but I must not have looked hard enough, because it didn't seem to work for me.  I will try again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since you both answered so quickly, I gave each 6 instead of 10.  I'll make up with "2's" for further responses if you have the time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;&lt;P&gt;djh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2007 15:54:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-cdpos-rows-for-diff-fnames-from-same-structure/m-p/2403795#M535679</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-26T15:54:55Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple CDPOS rows (for diff fnames) from same structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-cdpos-rows-for-diff-fnames-from-same-structure/m-p/2403796#M535680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Leave open for more pint assignment&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2007 15:55:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-cdpos-rows-for-diff-fnames-from-same-structure/m-p/2403796#M535680</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-26T15:55:52Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple CDPOS rows (for diff fnames) from same structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-cdpos-rows-for-diff-fnames-from-same-structure/m-p/2403797#M535681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;gave the 10 to aRs because of the code example - I can see immediately that there's supposed to be a table of old/new instead of a single old/new pair.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At least I assume that's what the function does.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2007 15:59:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-cdpos-rows-for-diff-fnames-from-same-structure/m-p/2403797#M535681</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-26T15:59:48Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple CDPOS rows (for diff fnames) from same structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-cdpos-rows-for-diff-fnames-from-same-structure/m-p/2403798#M535682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please use FM CHANGEDOCUMENT_MULTIPLE_CASE as suggested by aRs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  OBJECTID(10) = XEBAN-BANFN.
                  
  CALL FUNCTION 'SWE_REQUESTER_TO_UPDATE'. 
                
  CALL FUNCTION 'CHANGEDOCUMENT_OPEN'
    EXPORTING
      OBJECTCLASS             = 'BANF           '
      OBJECTID                = OBJECTID
      PLANNED_CHANGE_NUMBER   = ' '
      PLANNED_OR_REAL_CHANGES = ' '
    EXCEPTIONS
      SEQUENCE_INVALID        = 1
      OTHERS                  = 2.
                                                                                CALL FUNCTION 'CHANGEDOCUMENT_MULTIPLE_CASE'
    EXPORTING
      TABLENAME              = 'EBAN                          '
      REFTABLENAME           = 'WEBAN                         '
      CHANGE_INDICATOR       = 'U'
      DOCU_DELETE            = ' '
    TABLES
      TABLE_OLD              = YEBAN
      TABLE_NEW              = XEBAN
    EXCEPTIONS
      NAMETAB_ERROR          = 1
      OPEN_MISSING           = 2
      POSITION_INSERT_FAILED = 3
      OTHERS                 = 4.
                                 
  CALL FUNCTION 'CHANGEDOCUMENT_CLOSE'
    EXPORTING
      OBJECTCLASS             = 'BANF           '
      OBJECTID                = OBJECTID
      DATE_OF_CHANGE          = UDATE
      TIME_OF_CHANGE          = UTIME
      TCODE                   = TCODE
      USERNAME                = USERNAME
    EXCEPTIONS
      HEADER_INSERT_FAILED    = 1
      OBJECT_INVALID          = 2
      OPEN_MISSING            = 3
      NO_POSITION_INSERTED    = 4
      OTHERS                  = 5.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2007 16:01:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-cdpos-rows-for-diff-fnames-from-same-structure/m-p/2403798#M535682</guid>
      <dc:creator>ferry_lianto</dc:creator>
      <dc:date>2007-06-26T16:01:29Z</dc:date>
    </item>
  </channel>
</rss>

