<?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: Help required on PR change BAPI in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-required-on-pr-change-bapi/m-p/1453132#M214398</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you getting any error messages from the BAPI?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Jul 2006 11:59:43 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-07-07T11:59:43Z</dc:date>
    <item>
      <title>Help required on PR change BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-required-on-pr-change-bapi/m-p/1453130#M214396</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;Could anyone help me out in working with PR change BAPI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here I am passign OLD values and New Values to the ITEMS table. But still unable to get the changed results. Even I have executed the Commit BAPI after executng the PR change BAPI. Any help could be very useful and will be awarded. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ramesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jul 2006 11:53:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-required-on-pr-change-bapi/m-p/1453130#M214396</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-07T11:53:34Z</dc:date>
    </item>
    <item>
      <title>Re: Help required on PR change BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-required-on-pr-change-bapi/m-p/1453131#M214397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; Have you checked if you are getting any error messages in Return Tbale of this BAPI?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regds,&lt;/P&gt;&lt;P&gt;Akshay Bhagwat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jul 2006 11:58:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-required-on-pr-change-bapi/m-p/1453131#M214397</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-07T11:58:32Z</dc:date>
    </item>
    <item>
      <title>Re: Help required on PR change BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-required-on-pr-change-bapi/m-p/1453132#M214398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you getting any error messages from the BAPI?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jul 2006 11:59:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-required-on-pr-change-bapi/m-p/1453132#M214398</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-07T11:59:43Z</dc:date>
    </item>
    <item>
      <title>Re: Help required on PR change BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-required-on-pr-change-bapi/m-p/1453133#M214399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not getting any error messages even. Thats the problem. Even the Return Table is empty without any error messages. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ramesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jul 2006 12:00:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-required-on-pr-change-bapi/m-p/1453133#M214399</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-07T12:00:57Z</dc:date>
    </item>
    <item>
      <title>Re: Help required on PR change BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-required-on-pr-change-bapi/m-p/1453134#M214400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Refer the BAPI documentation to understand how to fill the tables. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note                                                         You cannot add any new items. The method(BAPI_REQUISITION_CHANGE) only supports the changing of already existing items.                                         &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jul 2006 12:05:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-required-on-pr-change-bapi/m-p/1453134#M214400</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-07T12:05:02Z</dc:date>
    </item>
    <item>
      <title>Re: Help required on PR change BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-required-on-pr-change-bapi/m-p/1453135#M214401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ramesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just check whether you have authorization for PR change.&lt;/P&gt;&lt;P&gt;(Check whether you have authorization for following authorization objects&lt;/P&gt;&lt;P&gt;M_BANF_BSA Document type in requisition&lt;/P&gt;&lt;P&gt;M_BANF_EKG Purchasing group in requisition&lt;/P&gt;&lt;P&gt;M_BANF_EKO Purch. organization in requisition&lt;/P&gt;&lt;P&gt;M_BANF_WRK Plant in requisition)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another way you can check authorizations is, execute TXn ME52 or ME52N and then check if you can do the changes manually.&lt;/P&gt;&lt;P&gt;After this execution use SU53 to check authorizations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regds,&lt;/P&gt;&lt;P&gt;Akshay Bhagwat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jul 2006 12:09:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-required-on-pr-change-bapi/m-p/1453135#M214401</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-07T12:09:31Z</dc:date>
    </item>
    <item>
      <title>Re: Help required on PR change BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-required-on-pr-change-bapi/m-p/1453136#M214402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ramesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got the same Problems on using &lt;/P&gt;&lt;P&gt;BAPI_REQUISITION_CHANGE and no changes are done for my Subcontractor PR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm currently debugging Transaction ME52N.&lt;/P&gt;&lt;P&gt;If I find a solution I'll tell you about.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers &lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jul 2006 12:11:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-required-on-pr-change-bapi/m-p/1453136#M214402</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-25T12:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: Help required on PR change BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-required-on-pr-change-bapi/m-p/1453137#M214403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I debug Transactin ME52N as for subcontractor on PR on Release 4.6C no solution is jet available.&lt;/P&gt;&lt;P&gt;For further info se OSS Notes:&lt;/P&gt;&lt;P&gt;499627&lt;/P&gt;&lt;P&gt;499626&lt;/P&gt;&lt;P&gt;204689&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jul 2006 12:29:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-required-on-pr-change-bapi/m-p/1453137#M214403</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-25T12:29:16Z</dc:date>
    </item>
    <item>
      <title>Re: Help required on PR change BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-required-on-pr-change-bapi/m-p/1453138#M214404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ramesh,&lt;/P&gt;&lt;P&gt;check out this coding for changing the Quantity of &lt;/P&gt;&lt;P&gt;a subcontractor Purchase requisition position.&lt;/P&gt;&lt;P&gt;I got this from debugging Transaction ME52.&lt;/P&gt;&lt;P&gt;In my problem case it worked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers &lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hint: on the lines with comment '@@' you have to fill other values according to you own test case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT zmneub01 .

PARAMETERS: p_banfn LIKE eban-banfn OBLIGATORY,
            p_bnfpo TYPE bnfpo OBLIGATORY DEFAULT '00010',
            p_menge TYPE gsmng OBLIGATORY.

TABLES: ebkn.

START-OF-SELECTION.

**** read eban:
  DATA: lt_eban TYPE STANDARD TABLE OF eban,
        lw_mdpa TYPE mdpa,
        lw_mdpa_old TYPE mdpa,
        lw_mdpa_new TYPE mdpa,
        lf_updkz,		
        lf_rcode	LIKE	cm61q-rcode,
        lf_verid	LIKE	eket-verid.
  DATA: lw_epdecdata TYPE epdecdata,
        lw_eban_old  TYPE eban,
        lt_eban_old  TYPE STANDARD TABLE OF eban,
        lw_eban_new LIKE eban,
        lt_eban_new  TYPE STANDARD TABLE OF eban,
        lt_mdlb TYPE STANDARD TABLE OF mdlb,
        lw_mdlb TYPE mdlb,
        lt_ebkn TYPE STANDARD TABLE OF ebkn.

  SELECT * INTO TABLE lt_eban
             FROM eban
             WHERE banfn = p_banfn
               AND bnfpo = p_bnfpo.

  IF lt_eban[] IS INITIAL.
    WRITE: 'Keine Banf-daten gefunden'.
    EXIT.
  ENDIF. "lt_eban[] is initial.

  READ TABLE lt_eban[] INTO lw_eban_old INDEX 1.

*** Daten für zugehörige Reservierung finden.
  CALL FUNCTION 'ME_FILL_MDPA_FROM_EBAN'
               EXPORTING
                 im_eban       = lw_eban_old
*               IM_EBKN       =
               IMPORTING
                 ex_mdpa       = lw_mdpa
                       .

  lw_mdpa_old = lw_mdpa.
  lw_mdpa_new = lw_mdpa.
  lw_mdpa_new-gsmng = p_menge.

*  CALL FUNCTION 'ENQUEUE_EMRKPF'
*       EXPORTING
*            mode_rkpf      = 'E'
*            rsnum          = lw_mdpa-rsnum
*       EXCEPTIONS
*            foreign_lock   = 1
*            system_failure = 2
*            OTHERS         = 3.

  break bergesef.
* commit work and wait.

  MOVE-CORRESPONDING lw_eban_old TO lw_epdecdata.
*  lw_eban_old = lt_eban.
  lw_eban_new = lw_eban_old.
  lw_eban_new-menge = p_menge.

*  CALL FUNCTION 'ME_EPROFILE_REQ_CHANGE'
*       EXPORTING
*            im_eban_old  = lw_eban_old
*            im_aktyp     = 'V'  "IM_AKTYP
*            im_epdecdata = lw_epdecdata
*       CHANGING
*            ch_eban_new  = lw_eban_new
*       EXCEPTIONS
*            OTHERS       = 1.

* commit work and wait.
  break bergesef.

* finde Kopfdaten fuer Lohnbearbeitungskomponenten
  CALL FUNCTION 'ME_FILL_MDLB_FROM_EBAN'
    EXPORTING
      im_eban       = lw_eban_old
*   IM_EBKN       =
   IMPORTING
     ex_mdlb       = lw_mdlb.

  APPEND lw_mdlb TO lt_mdlb.

*  CALL FUNCTION 'DEQUEUE_EMRKPF'
*   EXPORTING
**     MODE_RKPF       = 'E'
**     MANDT           = SY-MANDT
*     rsnum           = lw_mdpa-rsnum
**     X_RSNUM         = ' '
**     _SCOPE          = '3'
**     _SYNCHRON       = ' '
**     _COLLECT        = ' '
*            .

  DATA: xeban TYPE STANDARD TABLE OF ueban,
        yeban TYPE STANDARD TABLE OF ueban,
        xebkn TYPE STANDARD TABLE OF uebkn,
        yebkn TYPE STANDARD TABLE OF uebkn,
        lw_xeban TYPE ueban,
        lw_yeban TYPE ueban,
        icdtxt TYPE STANDARD TABLE OF cdtxt.

  lt_eban_old = lt_eban.

  APPEND lw_eban_new TO lt_eban_new.
*  xeban[] = lt_eban_new[].


**** Vorbereitung Positions-updates im Verbucher
  LOOP AT lt_eban_new INTO lw_xeban.
    lw_xeban-kz = 'U'.
    lw_xeban-t001waers = 'EUR'.
    APPEND lw_xeban TO xeban.
  ENDLOOP. "at lt_eban_new into lw_eban.

  LOOP AT lt_eban_old INTO lw_yeban.
*    lw_yeban-kz = 'U'.
    lw_yeban-t001waers = 'EUR'.
    APPEND lw_yeban TO yeban.
  ENDLOOP. "at lt_eban_old into lw_eban.


*  CALL FUNCTION 'SWE_REQUESTER_TO_UPDATE'.

************************************************************************
*** VERBUCHER ***
************************************************************************
*** BANF ändern ****
  CALL FUNCTION 'BANF_WRITE_DOCUMENT' IN UPDATE TASK
       EXPORTING
            objectid                = lw_eban_new-banfn
            tcode                   = 'ME52'
            utime                   = sy-uzeit
            udate                   = sy-datum
            username                = sy-uname
            planned_change_number   = ' '
            object_change_indicator = 'U'
            planned_or_real_changes = ' '
            no_change_pointers      = ' '
*            upd_icdtxt_banf         = 'U'
            upd_eban                = 'U'
*            upd_ebkn                = 'U'
       TABLES
            icdtxt_banf             = icdtxt  "leer
            xeban                   = xeban
            yeban                   = yeban
            xebkn                   = xebkn  "leer
            yebkn                   = xebkn. "leer

*** Ändern der Menge in Lohnbearbeitungskomponenten (Reservierung)
  CALL FUNCTION 'ME_COMPONENTS_MAINTAIN'     "FuGr MEXF
        EXPORTING
             i_ebeln    = lw_eban_old-banfn
             i_ebelp    = lw_eban_old-bnfpo
             i_mdpa     = lw_mdpa_new
             i_mdpa_old = lw_mdpa_old
             i_txz01    = lw_eban_old-txz01
             i_vorga    = 'C'   "'C' "MDM_VORGA
             i_fcall    = 'X'   "no dynp please !!!
          IMPORTING
             e_rcode = lf_rcode
             e_verid = lf_verid
             e_updkz = lf_updkz.

************************************************************************
*** VERBUCHER *** im innern in ME_COMPONENTS_UPDATE
************************************************************************
  CALL FUNCTION 'ME_COMPONENTS_UPDATE_PREPARE'
    EXPORTING
*   I_EBELN_OLD       =
      i_number          = lw_eban_new-banfn
*   I_VENDOR          =
    TABLES
      t_mdlb            = lt_mdlb.


************************************************************************
*** VERBUCHER ***
************************************************************************
*** Datenbankfortschreibungen der Bestellanforderung
  CALL FUNCTION 'ME_UPDATE_REQUISITION' IN UPDATE TASK
       TABLES
            xeban = xeban
            xebkn = xebkn
            yeban = yeban
            yebkn = yebkn.

*** Auslösen Workflow-Event für Gesamtfreigabe Bestellanforderungen
*CALL FUNCTION 'ME_REL_EVENT_GENERAL_EBAN'
** EXPORTING
**   I_CALL_UPDKZ       = ' '
**   I_FRGCO            =
**   I_WFBAN            =
**   I_ERNAM            =
*  TABLES
*    t_geban_new        =
*    t_geban_old        =
*  .

*** Hilfsstrukturen und Tabellen für Dispositionsfelder
  DATA: lt_dis	LIKE	STANDARD TABLE OF edisp,
        lw_dis LIKE edisp.

  lw_dis-matnr	= lw_eban_new-matnr.   "'050085212006111'.
  lw_dis-werks	= lw_eban_new-werks. "4000
  lw_dis-dismm	= 'ZD'. "@@Plangest. Disposition m. Verf.
  lw_dis-disst	= '001'. "@@Dispostufe
  lw_dis-pstat	= 'ED'. "@@Pflegestatus(K,E,D,B,L,A)
*RELEV	C	1 	
*FUNKT	C	1 	
  lw_dis-mtart	= 'ERZE'.  "@@-&amp;gt; get from Mara

  APPEND lw_dis TO lt_dis.

************************************************************************
*** VERBUCHER ***
************************************************************************
*** Erstellen der Disposaetze aus Bestellanforderung
  CALL FUNCTION 'ME_CREATE_MRPRECORD_REQ' IN UPDATE TASK
       TABLES
            dis   = lt_dis
            xeban = xeban
            yeban = yeban.

*** Hau rein -&amp;gt; Verbucher starten.
  COMMIT WORK AND WAIT.

  WRITE: 'ready'.

END-OF-SELECTION.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jul 2006 10:08:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-required-on-pr-change-bapi/m-p/1453138#M214404</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-26T10:08:49Z</dc:date>
    </item>
  </channel>
</rss>

