SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

BAPI_PR_CHANGE



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Interfaces | Интерфейсы -> BAPI
View previous topic :: View next topic  
Author Message
vga
Мастер
Мастер


Age: 170
Joined: 04 Oct 2007
Posts: 1218
Location: Санкт-Петербург

PostPosted: Sat Mar 27, 2010 12:02 pm    Post subject: BAPI_PR_CHANGE Reply with quote

BAPI_PR_CHANGE - Change Enjoy Purchase Requisition
Code:
REPORT  zpruebamodifzbuyer.

TABLES: eban.

SELECTION-SCREEN: BEGIN OF BLOCK a1.
PARAMETERS: p_banfn LIKE eban-banfn DEFAULT '10000001'.
SELECTION-SCREEN: END OF BLOCK a1.

DATA: lv_posic     LIKE eban-bnfpo,
      ls_cabecera  LIKE bapimereqheader,
      ls_cabecerax LIKE bapimereqheaderx,
      ls_posic     LIKE bapimereqitem,
      lt_posic     LIKE bapimereqitem OCCURS 0 WITH HEADER LINE,
      ls_posicx    LIKE bapimereqitemx,
      lt_posicx    LIKE bapimereqitemx OCCURS 0 WITH HEADER LINE,
      ls_extin     LIKE bapiparex,
      lt_extin     LIKE bapiparex OCCURS 0 WITH HEADER LINE,
      ls_item      LIKE bapi_te_mereqitem,
      ls_itemx     LIKE bapi_te_mereqitemx..

AT LINE-SELECTION.

  SET PARAMETER ID 'BAN' FIELD p_banfn.
  CALL TRANSACTION 'ME53N' AND SKIP FIRST SCREEN.

START-OF-SELECTION.

  ls_cabecera-preq_no = p_banfn.

  ls_extin-structure  = 'BAPI_TE_MEREQITEM'.
  ls_item-preq_item   = '00010'.
  ls_item-zbuyer      = 'FELIX'.
  ls_extin-valuepart1 = ls_item.
  APPEND ls_extin TO lt_extin.

  CLEAR ls_extin.

  ls_extin-structure  = 'BAPI_TE_MEREQITEMX'.
  ls_itemx-preq_item  = '00010'.
  ls_itemx-zbuyer     = 'X'.
  ls_extin-valuepart1 = ls_itemx.
  APPEND ls_extin TO lt_extin.

  CALL FUNCTION 'BAPI_PR_CHANGE'
    EXPORTING
      number                      = ls_cabecera-preq_no
*  PRHEADER                    =
*   PRHEADERX                   =
*   TESTRUN                     =
* IMPORTING
*   prheaderexp                 =
 TABLES
*   RETURN                      =
*   pritem                      = lt_posic
*   pritemx                     = lt_posicx
*   PRITEMEXP                   =
*   PRITEMSOURCE                =
*   PRACCOUNT                   =
*   PRACCOUNTPROITSEGMENT       =
*   PRACCOUNTX                  =
*   PRADDRDELIVERY              =
*   PRITEMTEXT                  =
*   PRHEADERTEXT                =
   extensionin                 = lt_extin
*   EXTENSIONOUT                =
*   PRVERSION                   =
*   PRVERSIONX                  =
*   ALLVERSIONS                 =
            .

  CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
      wait = 'X'.

  FORMAT HOTSPOT ON.
  WRITE: 'Se ha modificado la solicitud de pedido', p_banfn.
  FORMAT HOTSPOT OFF.

_________________
Молитва - это запрос разработчику на изменение кода программы.
Back to top
View user's profile Send private message Blog Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Interfaces | Интерфейсы -> BAPI All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.