<?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: FI_DOCUMENT_CHANGE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/fi-document-change/m-p/7861271#M1592985</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks you Emesto,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found the same from my debugging that it doesnt allow for 'S'.&lt;/P&gt;&lt;P&gt;I would look for other options than this FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you Dhina,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please read in the post that i have passed the older value also. But as Emesto and me feel that the FM wouldn't work&lt;/P&gt;&lt;P&gt;for Type 'S'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;Sampath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 May 2011 11:30:22 GMT</pubDate>
    <dc:creator>former_member395430</dc:creator>
    <dc:date>2011-05-26T11:30:22Z</dc:date>
    <item>
      <title>FI_DOCUMENT_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fi-document-change/m-p/7861258#M1592972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to update the text field SGTXT of BSEG with few texts by code. Am using the FM &lt;/P&gt;&lt;P&gt;FI_DOCUMENT_CHNAGE to do that. The sy-subrc returns 0. But the texts doesn't update on the&lt;/P&gt;&lt;P&gt;line item of the document. I have made use of 'COMMIT WORK'. Yet no go.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                gs_accchg-fdname = 'SGTXT'.&lt;/P&gt;&lt;P&gt;                gs_accchg-newval =  itab-sgtxt.&lt;/P&gt;&lt;P&gt;                APPEND gs_accchg TO gt_accchg.&lt;/P&gt;&lt;P&gt;                CLEAR gs_accchg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                CALL FUNCTION 'FI_DOCUMENT_CHANGE'&lt;/P&gt;&lt;P&gt;                     EXPORTING&lt;/P&gt;&lt;P&gt;                          i_awtyp              = gs_bkpftab-awtyp&lt;/P&gt;&lt;P&gt;                          i_awref              = gs_bkpftab-awkey+00(10)&lt;/P&gt;&lt;P&gt;                          i_aworg              = gs_bkpftab-awkey+10(10)&lt;/P&gt;&lt;P&gt;                          i_buzei               = gs_bsegtab-buzei&lt;/P&gt;&lt;P&gt;                     TABLES&lt;/P&gt;&lt;P&gt;                          t_accchg             = gt_accchg&lt;/P&gt;&lt;P&gt;                     EXCEPTIONS&lt;/P&gt;&lt;P&gt;                          no_reference         = 1&lt;/P&gt;&lt;P&gt;                          no_document          = 2&lt;/P&gt;&lt;P&gt;                          many_documents       = 3&lt;/P&gt;&lt;P&gt;                          wrong_input          = 4&lt;/P&gt;&lt;P&gt;                          overwrite_creditcard = 5&lt;/P&gt;&lt;P&gt;                          OTHERS               = 6.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                COMMIT WORK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Request to suggest if am missing something here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards in advance&lt;/P&gt;&lt;P&gt;Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 May 2011 15:35:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fi-document-change/m-p/7861258#M1592972</guid>
      <dc:creator>former_member395430</dc:creator>
      <dc:date>2011-05-25T15:35:26Z</dc:date>
    </item>
    <item>
      <title>Re: FI_DOCUMENT_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fi-document-change/m-p/7861259#M1592973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pass old value too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also try passing value to: i_awsys&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 May 2011 17:47:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fi-document-change/m-p/7861259#M1592973</guid>
      <dc:creator>former_member191735</dc:creator>
      <dc:date>2011-05-25T17:47:27Z</dc:date>
    </item>
    <item>
      <title>Re: FI_DOCUMENT_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fi-document-change/m-p/7861260#M1592974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sampath,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the answer, but it didnt help much. The sy-subrc stays still zero, but the records are not updated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 May 2011 08:22:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fi-document-change/m-p/7861260#M1592974</guid>
      <dc:creator>former_member395430</dc:creator>
      <dc:date>2011-05-26T08:22:03Z</dc:date>
    </item>
    <item>
      <title>Re: FI_DOCUMENT_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fi-document-change/m-p/7861261#M1592975</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;Did you try using 'BAPI_TRANSACTION_COMMIT'?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Archana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 May 2011 09:18:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fi-document-change/m-p/7861261#M1592975</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-26T09:18:51Z</dc:date>
    </item>
    <item>
      <title>Re: FI_DOCUMENT_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fi-document-change/m-p/7861262#M1592976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes Archana, I did even that..But no luck, i think am missing something here. Since the sy-subrc is 0, The document is good. But the BSEG doesnt get updated. Debugging the Standard FM shows me that *bseg is being compared, i assume that some other FM is to be called before this one to fill the *BSEG buffer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 May 2011 09:29:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fi-document-change/m-p/7861262#M1592976</guid>
      <dc:creator>former_member395430</dc:creator>
      <dc:date>2011-05-26T09:29:42Z</dc:date>
    </item>
    <item>
      <title>Re: FI_DOCUMENT_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fi-document-change/m-p/7861263#M1592977</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 below link. He has explained some similar kind of requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1768371"&gt;&lt;/A&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Archana&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Archana Pawar on May 26, 2011 11:36 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 May 2011 09:36:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fi-document-change/m-p/7861263#M1592977</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-26T09:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: FI_DOCUMENT_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fi-document-change/m-p/7861264#M1592978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Archana,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thats the same i did. I did commit after the FM call. But the problem persists. Thats the reason i have raised the question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 May 2011 09:55:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fi-document-change/m-p/7861264#M1592978</guid>
      <dc:creator>former_member395430</dc:creator>
      <dc:date>2011-05-26T09:55:06Z</dc:date>
    </item>
    <item>
      <title>Re: FI_DOCUMENT_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fi-document-change/m-p/7861265#M1592979</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;I know this is simple but is the value in itab-sgtxt not blank&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
gs_accchg-fdname = 'SGTXT'.
gs_accchg-newval = itab-sgtxt.           "&amp;lt;----------------
APPEND gs_accchg TO gt_accchg.
CLEAR gs_accchg.
&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;Ernesto.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 May 2011 10:22:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fi-document-change/m-p/7861265#M1592979</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-26T10:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: FI_DOCUMENT_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fi-document-change/m-p/7861266#M1592980</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; I want to know what your passing itab-sgtxt. i think your passing the internal table of SGTXT. pass the WA-SGTXT &lt;STRONG&gt;'work area'&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Dhina..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 May 2011 10:28:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fi-document-change/m-p/7861266#M1592980</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-26T10:28:03Z</dc:date>
    </item>
    <item>
      <title>Re: FI_DOCUMENT_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fi-document-change/m-p/7861267#M1592981</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;Pass the required values to the table BKPF based on belnr (Document Number) and after that use commit work keyword.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sample code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables: bkpf.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters p_belnr like belnr_d.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;select * from bkpf where belnr = p_belnr.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;bkpf-sgtxt = 'Testing'.&lt;/P&gt;&lt;P&gt;modify bkpf.&lt;/P&gt;&lt;P&gt;commit work.&lt;/P&gt;&lt;P&gt;clear bkpf.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it will helps u.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ram.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 May 2011 10:48:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fi-document-change/m-p/7861267#M1592981</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-26T10:48:34Z</dc:date>
    </item>
    <item>
      <title>Re: FI_DOCUMENT_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fi-document-change/m-p/7861268#M1592982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Emesto and Dhina,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understand that the work area or the value is to be passed. I have tried hard coding from the begining of the post and&lt;/P&gt;&lt;P&gt;passing the value also.&lt;/P&gt;&lt;P&gt;It is sure not the problem of Value. I checked in debugging.. The problem exists.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Ram,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to change the text on the Items , not the header.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 May 2011 10:55:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fi-document-change/m-p/7861268#M1592982</guid>
      <dc:creator>former_member395430</dc:creator>
      <dc:date>2011-05-26T10:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: FI_DOCUMENT_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fi-document-change/m-p/7861269#M1592983</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;I read on the internet (I am not sure about it because I couldn't find the FM documenation) that this FM cannot be used to change line item which has account type (BSEG-KOART) - 'S' (GL Account)? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also On another Post I read it will not work if the Account Type is Different than D or K. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is any of these your case?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ernesto.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 May 2011 11:03:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fi-document-change/m-p/7861269#M1592983</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-26T11:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: FI_DOCUMENT_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fi-document-change/m-p/7861270#M1592984</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;  Better try to pass the old value also..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
gs_accchg-fdname = 'SGTXT'.
gs_accchg-oldval = "pass the old value.
gs_accchg-newval = itab-sgtxt.
APPEND gs_accchg TO gt_accchg.
CLEAR gs_accchg.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Dhina..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 May 2011 11:12:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fi-document-change/m-p/7861270#M1592984</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-26T11:12:29Z</dc:date>
    </item>
    <item>
      <title>Re: FI_DOCUMENT_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fi-document-change/m-p/7861271#M1592985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks you Emesto,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found the same from my debugging that it doesnt allow for 'S'.&lt;/P&gt;&lt;P&gt;I would look for other options than this FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you Dhina,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please read in the post that i have passed the older value also. But as Emesto and me feel that the FM wouldn't work&lt;/P&gt;&lt;P&gt;for Type 'S'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;Sampath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 May 2011 11:30:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fi-document-change/m-p/7861271#M1592985</guid>
      <dc:creator>former_member395430</dc:creator>
      <dc:date>2011-05-26T11:30:22Z</dc:date>
    </item>
    <item>
      <title>Re: FI_DOCUMENT_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fi-document-change/m-p/7861272#M1592986</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;if its not working try this function module FI_ITEMS_MASS_CHANGE but its not updating for all the line item. Please refer the code below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT ZTEST_FB02 .

type-pools : TPIT.

DATA : W_BSEG TYPE BSEG,
W_message TYPE T100-TEXT.

data : it_errtab TYPE tpit_t_errdoc WITH HEADER LINE,
it_fldtab TYPE tpit_t_fname WITH HEADER LINE,
it_buztab TYPE tpit_t_buztab WITH HEADER LINE.

* Field name to be changed
it_fldtab-fname = 'ZUONR'.
append it_fldtab.
clear it_fldtab.

* Field value
W_BSEG-ZUONR = 'TEST19'.

* ITEM 7
select single
bukrs
belnr
gjahr
buzei
koart
umskz
bschl
mwart
mwskz
from bseg
into corresponding fields of it_buztab
where belnr = '0902001922' and
bukrs = '3160' and
gjahr = '2006' and
BUZEI = '007'.
if sy-subrc = 0.
APPEND it_buztab.
clear it_buztab.
endif.

CALL FUNCTION 'FI_ITEMS_MASS_CHANGE'
EXPORTING
S_BSEG = W_bseg
IMPORTING
ERRTAB = it_errtab[]
TABLES
IT_BUZTAB = it_buztab
IT_FLDTAB = it_fldtab
EXCEPTIONS
BDC_ERRORS = 1
OTHERS = 2.
IF SY-SUBRC 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
perform generate_message.
write : w_message.
else.
write : 'Updated successfully'.
ENDIF.
&amp;amp;---------------------------------------------------------------------
* &amp;amp; Form generate_message
&amp;amp;---------------------------------------------------------------------
FORM generate_message .
CLEAR W_message.

read table it_errtab index 1.
if sy-subrc 0.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
id = it_errtab-ERR-MSGID
lang = sy-langu
no = it_errtab-ERR-MSGNR
v1 = it_errtab-ERR-MSGV1
v2 = it_errtab-ERR-MSGV2
v3 = it_errtab-ERR-MSGV3
v4 = it_errtab-ERR-MSGV4
IMPORTING
msg = W_message
EXCEPTIONS
not_found = 1
OTHERS = 2.
endif.

ENDFORM. " generate_message

&lt;/CODE&gt;&lt;/PRE&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;Regards,&lt;/P&gt;&lt;P&gt;Dhina..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 May 2011 11:35:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fi-document-change/m-p/7861272#M1592986</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-26T11:35:32Z</dc:date>
    </item>
    <item>
      <title>Re: FI_DOCUMENT_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fi-document-change/m-p/7861273#M1592987</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; refer this link first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.surfingincognito.com/index.php?q=aHR0cHM6Ly9mb3J1bXMuc2RuLnNhcC5jb20vdGhyZWFkLmpzcGE%2FdGhyZWFkSUQ9MTUxOTAwNw%3D%3D&amp;amp;hl=3ed" target="test_blank"&gt;http://www.surfingincognito.com/index.php?q=aHR0cHM6Ly9mb3J1bXMuc2RuLnNhcC5jb20vdGhyZWFkLmpzcGE%2FdGhyZWFkSUQ9MTUxOTAwNw%3D%3D&amp;amp;hl=3ed&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;click browse button after enter this website..i hope your requirement is resolve after see the link..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Dhina..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Dhina DMD on May 26, 2011 1:37 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 May 2011 11:37:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fi-document-change/m-p/7861273#M1592987</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-26T11:37:03Z</dc:date>
    </item>
    <item>
      <title>Re: FI_DOCUMENT_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fi-document-change/m-p/7861274#M1592988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much Dhina. Not the Link but the code of mass items change has helped me.&lt;/P&gt;&lt;P&gt;Solved the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I always believe in you experts solving my prblems. You never give up!!!!&lt;/P&gt;&lt;P&gt;Knowing the issue and helping isn't my appreciation. Not knowing and still trying to dig and find information and&lt;/P&gt;&lt;P&gt;help people on the forum is great which you experts always do!!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;Sampath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 May 2011 15:45:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fi-document-change/m-p/7861274#M1592988</guid>
      <dc:creator>former_member395430</dc:creator>
      <dc:date>2011-05-26T15:45:13Z</dc:date>
    </item>
    <item>
      <title>Re: FI_DOCUMENT_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fi-document-change/m-p/7861275#M1592989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, FI_DOCUMENT_CHANGE is actually working, but error messages are not really detailed, so sometimes sy-subrc = 0 and yet no change happens.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had a problem similar to yours and it depended in my case on KUNNR or LIFNR passed to the function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The FM looks first in BKPF, and then in BSEG with LIFNR or KUNNR given.&lt;/P&gt;&lt;P&gt;If select in BSEG fails, the FM throws you out with no errors, and no changes happen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so be careful with this value: I_KUNNR or I_LIFNR, one or other is actually obligatory in some cases, and must have the correct leading zeros.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Nov 2015 10:39:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fi-document-change/m-p/7861275#M1592989</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-11-05T10:39:42Z</dc:date>
    </item>
  </channel>
</rss>

