0% found this document useful (0 votes)
150 views

Bapi - Requisition - Create: Data Type Standard Table of Data Type Data Return Type Standard Table of Data Type

This document contains code to create a requisition using the BAPI_REQUISITION_CREATE function in SAP. It defines tables to store requisition item and return data. It populates fields for a sample item and appends it to the items table. It then calls the function, passing the items table and importing the generated purchase requisition number and any return messages.

Uploaded by

fatma
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
150 views

Bapi - Requisition - Create: Data Type Standard Table of Data Type Data Return Type Standard Table of Data Type

This document contains code to create a requisition using the BAPI_REQUISITION_CREATE function in SAP. It defines tables to store requisition item and return data. It populates fields for a sample item and appends it to the items table. It then calls the function, passing the items table and importing the generated purchase requisition number and any return messages.

Uploaded by

fatma
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

BAPI_REQUISITION_CREATE

Tuesday, November 26, 2019 12:52 PM

DATA : REQUISITION_ITEMS TYPE STANDARD TABLE OF BAPIEBANC .


DATA : WA_ITEMS TYPE BAPIEBANC .
DATA : RETURN TYPE STANDARD TABLE OF BAPIRETURN.
DATA : PR TYPE BAPIEBANC-PREQ_NO.

WA_ITEMS-PREQ_ITEM = '00010'.
WA_ITEMS-DOC_TYPE = 'Z009'.
WA_ITEMS-PREQ_NAME = '00008008'.
WA_ITEMS-DELIV_DATE = sy-DATUM.
WA_ITEMS-ACCTASSCAT = 'U'.
WA_ITEMS-MATERIAL = '000000000020000066'.
WA_ITEMS-SHORT_TEXT = 'TEST'.
WA_ITEMS-QUANTITY = '4.000'.
WA_ITEMS-UNIT = 'EA'.
WA_ITEMS-PUR_GROUP = '120'.
WA_ITEMS-PLANT = '9000'.
APPEND WA_ITEMS TO REQUISITION_ITEMS .
CLEAR : WA_ITEMS .

CALL FUNCTION 'BAPI_REQUISITION_CREATE'


* EXPORTING
* SKIP_ITEMS_WITH_ERROR =
* AUTOMATIC_SOURCE = 'X'
IMPORTING
NUMBER = PR
TABLES
REQUISITION_ITEMS = REQUISITION_ITEMS
* REQUISITION_ACCOUNT_ASSIGNMENT =
* REQUISITION_ITEM_TEXT =
* REQUISITION_LIMITS =
* REQUISITION_CONTRACT_LIMITS =
* REQUISITION_SERVICES =
* REQUISITION_SRV_ACCASS_VALUES =
RETURN = RETURN
* REQUISITION_SERVICES_TEXT =
* REQUISITION_ADDRDELIVERY =
* EXTENSIONIN =
.

BAPI PR Page 1

You might also like