Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_PO_Create1 for Return PO

hossain_rajib55
Participant
221

Hello Experts!!

Using BAPI "BAPI_PO_CREATE1" create a return po.

In header i provided

INPUT PARAMETER:
POHEADER
COMP_CODE =Value
DOC_TYPE = ZRNB
VENDOR = Value.
PURCH_ORG = value
PUR_GROUP Value

POHEADERX:

COMP_CODE = X
DOC_TYPE = X
VENDOR = X
PURCH_ORG = X
PUR_GROUP = X

POITEM:

PO_ITEM 00010
MATERIAL = Value
PLANT = D001
STGE_LOC = 0001
QUANTITY = 100
PO_UNIT = EA
NET_PRICE = 40
PRICE_UNIT  = 1
ORDERPR_UN = EA
RET_ITEM = X

POITEMX:

PO_ITEM = X
MATERIAL = X
PLANT = X
STGE_LOC = X
QUANTITY = X
PO_UNIT = X
NET_PRICE = X
PRICE_UNIT = X
ORDERPR_UN = X
RET_ITEM = X

POCOND:

ITM_NUMBER = 00010
COND_TYPE = ZA00
COND_VALUE = 40
CURRENCY = BDT
CHANGE_ID = I

POCONDX:

ITM_NUMBER = X
COND_TYPE = X
COND_VALUE = X
CURRENCY = X
CHANGE_ID = X

Its return me a PO number.

Whenever I try to open it on me22n/me23n its give :

Document 1200700197 does not exist

"RETURN": [
{
"TYPE": "S",
"ID": "06",
"NUMBER": "017",
"MESSAGE": "Return PO to Vendor created under the number 1200700197",
"LOG_NO": "",
"LOG_MSG_NO": "000000",
"MESSAGE_V1": "Return PO to Vendor",
"MESSAGE_V2": "1200700197",
"MESSAGE_V3": "",
"MESSAGE_V4": "",
"PARAMETER": "POHEADER",
"ROW": 1,
"FIELD": "",
"SYSTEM": "ECQCLNT200"
}.

How to get relief from this issues.

Please guided me.

Regards-

Rajib

3 REPLIES 3

anaosako
Discoverer
0 Kudos
217

its missing use a funcntion to commit the call

raymond_giuseppi
Active Contributor
207

After call of BAPI_PO_CREATE1 and when no error returned in RETURN (seems the case) call BAPI_TRANSACTION_COMMIT.

anaosako
Discoverer
201

if you want to test on SE37 transaction you can use test sequence:

SE37 -> Function Module -> Execute -> Test Sequences

it will open a box so you have to put the funciontions you want to test like: BAPI_PO_CREATE1 and bapi_transaction_commit and execute