2 weeks ago
Hello,
I want to change the delivery address for each purchase order item (ekpo-adrn2). The whole adress and not only the street ... -> So how can I set adrn2 number per BAPI?
I try BAPI_PO_CHANGE and BAPI_ADDRESSORG_CHANGE. But it does not work for me. Maybe I use both of them wrong.
Request clarification before answering.
you have three options:
This table contains the delivery address for the PO item. The central
address management fields are used for this purpose.
Note
Note the following for addresses:
- If you want to use an existing delivery address, you can transfer
the corresponding address number to the method by entering it in
the ADDR_NO field. The system then checks to make sure this address
exists.
- If the delivery address does not exist, you can use the method to
create it. The address data is not checked by the system. This
means that an SAPEnjoy purchase order may contain incorrect address
data.
- If you want to change an address, use method BAPI_ADDRESSORG_CHANGE
(Basis -> Basis Services/Communication Interfaces -> Address Org ->
Change).
For more information on the individual parameter fields, see the data
element documentation in the ABAP Dictionary.
here is my example for option two:
DATA: fm_addrdelivery TYPE STANDARD TABLE OF bapimepoaddrdelivery,
fm_return TYPE STANDARD TABLE OF bapiret2,
fm_poitem TYPE STANDARD TABLE OF bapimepoitem,
fm_poitemx TYPE STANDARD TABLE OF bapimepoitemx.
fm_addrdelivery = VALUE #( ( po_item = '00010' name = 'my_name' name_2 = 'hi' street = 'Nothinghill' postl_cod1 = '12345' city = 'Heaven' ) ).
fm_poitem = VALUE #( ( po_item = '00010' ) ).
fm_poitemx = VALUE #( ( po_item = '00010' po_itemx = abap_true ) ).
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = '4500351581'
TABLES
return = fm_return
poitem = fm_poitem
poitemx = fm_poitemx
poaddrdelivery = fm_addrdelivery
.
COMMIT WORK.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Hutner,
That's strange. I have been using BAPI_PO_CHANGE in many projects and it is very powerfull and usefull. Can you share your coding? Maybe I can help you.
Jarda
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
73 | |
21 | |
9 | |
8 | |
7 | |
6 | |
5 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.