POSERVICES in BAPI_PO_CHANGE
Hi Experts,
I have situation like this,
I need to download(to flat file) the PO sevices details completely into the system and need to mofidy it(Add new lines at the end in Excel file) and need to Upload back the same file back to the SAP system.
Now I am done with Downloading & Uploading,
But The problem is.. In services Tab from ME23n we can see the Actual Quantity.
But once if I uplaod the data back to the System through BAPI_PO_CHANGE. the Actual Quantity field becomes '0'.
Please let me know any flags or any values need to be passed.
Thanks & Regards,
Dileep .C
HI
just check this Re: Problem with BAPI_PO_CHANGE & BAPI_TRANSACTION_COMMIT
hope this helps
regards'
Aakash Banga
Similar Messages
-
BAPI_PO_CHANGE Add Services
Hi all,
I need to update a PURCHASE ORDER with new services but im getting the error msg "Enter Quantity in service line" but my service line is a information line what could be the problem (poservices-inform = 'X'. poservices-serv_type = 'HZ' ).
Im unable also to insert text information with POSERVICESTEXT.
What could be missing?
Test sequence
Se37
BAPI_PO_CHANGE
BAPI_TRANSACTION_COMMIT
TEST 1 (unable to insert POSERVICESTEXT information in PO, but the NZ lines are insert )
Return
T ID NUM MESSAGE
S 06 023 Standard PO 4500000284 changed
W ME 887 Error transferring ExtensionIn data for enhancement CI_EKKODB
I ME 664 Change Order Unit could not be effected
Parâmetros: PURCHASEORDER = 4500000284
Parâmetros: VERSIONS
POST_DATE = 00000000
Parâmetros: POITEM
PO_ITEM = 00010
SHORT_TEXT = CHANGE
MATERIAL = 000000000040000008
QUANTITY = 1.000
PO_UNIT = LE
PCKG_NO = 0000000001
Parâmetros: POITEMX
PO_ITEM = 00010
PO_ITEMX = X
SHORT_TEXT = X
MATERIAL = X
QUANTITY = X
PO_UNIT = X
PCKG_NO = X
Parâmetros: POSCHEDULE
PO_ITEM = 00010
SCHED_LINE = 0001
QUANTITY = 1.000
Parâmetros: POSCHEDULEX
PO_ITEM = 00010
SCHED_LINE = 0001
PO_ITEMX = X
SCHED_LINEX = X
QUANTITY = X
Parâmetros: POSERVICES
PCKG_NO = 0000000001
LINE_NO = 0000000001
OUTL_LEVEL = 0
OUTL_IND = X
SUBPCKG_NO = 0000000002
FROM_LINE = 1
PCKG_NO = 0000000002
LINE_NO = 0000000002
EXT_LINE = 0000000010
OUTL_LEVEL = 0
SERV_TYPE = NZ
QUANTITY = 5.000
BASE_UOM = UN
PRICE_UNIT = 1
GR_PRICE = 10.0000
SHORT_TEXT = SHORT 1
USERF1_TXT = LINHA NORMAL
PCKG_NO = 0000000002
LINE_NO = 0000000003
EXT_LINE = 0000000020
OUTL_LEVEL = 0
SERV_TYPE = NZ
QUANTITY = 5.000
BASE_UOM = UN
PRICE_UNIT = 1
GR_PRICE = 10.0000
SHORT_TEXT = SHORT 2
USERF1_TXT = LINHA NORMAL
PCKG_NO = 0000000002
LINE_NO = 0000000004
EXT_LINE = 0000000030
OUTL_LEVEL = 0
SERV_TYPE = NZ
QUANTITY = 5.000
BASE_UOM = UN
PRICE_UNIT = 1
GR_PRICE = 10.0000
SHORT_TEXT = SHORT 3
USERF1_TXT = LINHA NORMAL
Parâmetros: POSERVICESTEXT
PCKG_NO = 0000000002
LINE_NO = 0000000004
TEXT_ID = LLTX
FORMAT_COL = *
TEXT_LINE = LONGO
PCKG_NO = 0000000002
LINE_NO = 0000000004
TEXT_ID = LTXT
FORMAT_COL = *
TEXT_LINE = SUCINTO
Second test
Return
T ID NUM MESSAGE
E SE 319 Please enter a quantity
W ME 887 Error transferring ExtensionIn data for enhancement CI_EKKODB
E BAPI 003 Instance 4500000284 of object type PurchaseOrder could not be changed
Parameters: PURCHASEORDER = 4500000284
Parameters: VERSIONS
POST_DATE = 00000000
Parameters: POITEM
PO_ITEM = 00010
SHORT_TEXT = CHANGE
MATERIAL = 000000000040000008
QUANTITY = 1.000
PCKG_NO = 0000000001
Parameters: POITEMX
PO_ITEM = 00010
PO_ITEMX = X
SHORT_TEXT = X
MATERIAL = X
QUANTITY = X
PCKG_NO = X
Parameters: POSCHEDULE
PO_ITEM = 00010
SCHED_LINE = 0001
QUANTITY = 1.000
Parameters: POSCHEDULEX
PO_ITEM = 00010
SCHED_LINE = 0001
PO_ITEMX = X
SCHED_LINEX = X
QUANTITY = X
Parameters: POSERVICES
PCKG_NO = 0000000001
LINE_NO = 0000000001
OUTL_LEVEL = 0
OUTL_IND = X
SUBPCKG_NO = 0000000002
FROM_LINE = 1
PCKG_NO = 0000000002
LINE_NO = 0000000002
EXT_LINE = 0000000010
OUTL_LEVEL = 0
SERV_TYPE = NZ
QUANTITY = 5.000
BASE_UOM = UN
PRICE_UNIT = 1
GR_PRICE = 10.0000
SHORT_TEXT = SHORT 1
USERF1_TXT = LINHA NORMAL
PCKG_NO = 0000000002
LINE_NO = 0000000003
EXT_LINE = 0000000020
OUTL_LEVEL = 0
SERV_TYPE = HZ
GR_PRICE = 10.0000
SHORT_TEXT = SHORT 2
INFORM = X
USERF1_TXT = LINHA INFO
PCKG_NO = 0000000002
LINE_NO = 0000000004
EXT_LINE = 0000000030
OUTL_LEVEL = 0
SERV_TYPE = NZ
QUANTITY = 5.000
BASE_UOM = UN
PRICE_UNIT = 1
GR_PRICE = 10.0000
SHORT_TEXT = SHORT 3
USERF1_TXT = LINHA NORMAL
Parameters: POSERVICESTEXT
PCKG_NO = 0000000002
LINE_NO = 0000000004
TEXT_ID = LLTX
FORMAT_COL = *
TEXT_LINE = LONGO
PCKG_NO = 0000000002
LINE_NO = 0000000004
TEXT_ID = LTXT
FORMAT_COL = *
TEXT_LINE = SUCINTO
Thanks and Regards
null
Message was edited by:
Luis ConstantinoThank you for reply.
Yes, I read it, but I found a sap note that say:
You can also change services using BAPI_PO_CHANGE. Up to now, it was only possible to add complete service or limit items.
Using the new BAPI_PO_CHANGE, you can now make changes to services and with limits.
Because in the production mode the interfaces are filled entirely from available documents by report, SAP always assumes that the services or limits to be changed are sent in full to the BAPI interfaces with all the data belonging to them, even if not all the data is changed. If required entry fields are missing, the system displays an error message, other data not filled is possibly initialized. (It is not necessary to assign the complete item.)
- NOTE 561507 -
"What BAPI_PO_CHANGE can now do:
1. Changes to an already existing item:
For an existing item, you can
a) Add, change or delete services.
b) Add, change or delete limits (free limits and contract limits), provided that this does not cause the net value of the purchase order item to become "0".
1. Account assignment change for item category B and D: For an existing item, the account assignment can be changed.
a) Account assignment category U can be converted into another account assignment category allowed for the item categories, and vice versa.
b) An existing account assignment can be changed.
c) In case of services, a single account assignment can be converted into a multiple account assignment and vice versa - not with limits (with item category B), here multiple account assignment is not possible on-line either).
2. Making changes to more than one item.
3. Change outline layouts.
What the BAPI_PO_CHANGE cannot do:
Everything which is not possible on-line either." -
Using BAPI_PO_CHANGE to update PO with item actegory B
Hi Experts,
I have a requirement to update the PO with item category B which is created by referring PR having account assignment category N(.( So I have a PO with Acc assignment N now have to update the item category with B ). I am using BAPI_PO_CHANGE to update the item category with B .in me22n system will prompt the Limits ( overall limit , expected value) and Network details ( like GL acc and Network and activity code) so i am passing lt_poitem,lt_poitemx,lt_polimits,lt_poaccount,lt_poaccountx,lt_POSRVACCESSVALUES. System is issuing a message Buffer table is not up-to-date . Please let me know if any one updated the PO with item category B using BAPI_PO_CHANGE and please provide sample code for the same if possible. Thanks in advance.
Thanks
PraveeHi Experts,
I am passing the required structure as below .
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = v_po
TABLES
return = lt_return
poitem = lt_poitem
poitemx = lt_poitemx
polimits = lt_polimits
poaccount = lt_poaccount
poaccountx = lt_poaccountx
POSRVACCESSVALUES = lt_POSRVACCESSVALUES
POCONTRACTLIMITS = lt_POCONTRACTLIMITS
POSERVICES = lt_POSERVICES.
Now i am getting a message below messages from BAPI :
S 06 023 Indirect PO (ZSTA) 4506000481 changed
I ME 664 Change Item Category could not be effected
I ME 664 Change Item Category could not be effected
I can see that the PO is not got updated with any of values.Please help me to resolve this issue.
Thanks
PRavee. -
Problem with BAPI_PO_CHANGE in adding services
Hello,
I have a problem in using BAPI_PO_CHANGE in adding new services for an existing po_item . I fill the table POITEM, POITEMX. Then I fill the POACCOUNT and POACCOUNTX table. Lastly I fill the table POSERVICES, POSRVACCESSVALUES. After running it with commit step. I get as return:
The purchase order .... was updated. But if I look at my purchase order with trans. me23n, there was nothing added. Thus, I do not know what I forget. So it will be great, if someone can provide an example in correct filling the table.
In Table POSERVICES I add for the field PCKG_NO the value : 0000000001, is this correct? because I will add new services positions.
Thanks in advance for your support.
Kind regards,
ErkanHello Anuradha,
yes, I used the BAPI Commit command but it did not work.
Kind regards,
Erkan -
BAPI_PO_CHANGE is not updating Confirmation Category and Date cate Category
Hi to all,
Am using BAPI_PO_CHANGE in my program. My program is to upload excel file and transfer the data to corresponding tables.
All the thing is working perfectly but the two fields in BAPI are not updating. They are CONF_TYPE and DEL_DATCAT_EXT in POCONFIRMATIONS( which is tables in bapi).Am giving my code below. And this POCONFIRMATIONS is available from 6.0 version.
Thanks in advance.
Shah.
LOOP AT it_ebelp INTO is_ebelp .
CLEAR: is_header, is_poitem, is_poitemx,is_confirm, is_return.
is_header-po_number = is_ebelp-ebeln.
is_poitem-po_item = is_ebelp-ebelp.
is_poitem-conf_ctrl = 'SMIC'.
APPEND is_poitem TO it_poitem.
is_poitemx-po_item = is_ebelp-ebelp.
is_poitemx-po_itemx = 'X'.
is_poitemx-conf_ctrl = 'X'.
APPEND is_poitemx TO it_poitemx.
is_confirm-po_item = is_ebelp-ebelp.
is_confirm-conf_type = 'LA'.
is_confirm-del_datcat_ext = 'D'.
APPEND is_confirm TO it_confirm.
AT END OF ebeln.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = is_header-po_number
POHEADER = is_header
TABLES
return = it_return
poitem = it_poitem
poitemx = it_poitemx
poconfirmation = it_confirm.
IF NOT it_return IS INITIAL.
LOOP AT it_return INTO is_return.
WRITE : is_return-message.
ENDLOOP.
READ TABLE it_return TRANSPORTING NO FIELDS WITH KEY type = 'E'.
IF sy-subrc <> 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = c_x
IMPORTING
return = is_return1.
ENDIF.
ENDIF.
REFRESH: it_poitem, it_poitemx,it_confirm, it_return.
ENDAT.
ENDLOOP.Hi Shah,
I also facing the same problem which u had passed already..
could teach me how u over come this.
one more thing my sap version is 4.7 in bapi_po_change
i don't have poconfirmation
*CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder =
POHEADER =
POHEADERX =
POADDRVENDOR =
TESTRUN =
MEMORY_UNCOMPLETE =
MEMORY_COMPLETE =
POEXPIMPHEADER =
POEXPIMPHEADERX =
VERSIONS =
NO_MESSAGING =
NO_MESSAGE_REQ =
NO_AUTHORITY =
NO_PRICE_FROM_PO =
IMPORTING
EXPHEADER =
EXPPOEXPIMPHEADER =
TABLES
RETURN =
POITEM =
POITEMX =
POADDRDELIVERY =
POSCHEDULE =
POSCHEDULEX =
POACCOUNT =
POACCOUNTPROFITSEGMENT =
POACCOUNTX =
POCONDHEADER =
POCONDHEADERX =
POCOND =
POCONDX =
POLIMITS =
POCONTRACTLIMITS =
POSERVICES =
POSRVACCESSVALUES =
POSERVICESTEXT =
EXTENSIONIN =
EXTENSIONOUT =
POEXPIMPITEM =
POEXPIMPITEMX =
POTEXTHEADER =
POTEXTITEM =
ALLVERSIONS =
POPARTNER =
i am waiting for u reply
Edited by: JJ on Sep 10, 2008 1:54 PM -
To change vendor no for condition types using BAPI_PO_CHANGE
Hii,
how to change vendor no for certain condition types using BAPI_PO_CHANGE.
Is it possible .
Any parameter is there.
Plz help urgent
Title edited by: Alvaro Tejada Galindo on Jun 12, 2008 5:23 PMHi,
It is possible.
wa_pocond-vendor_no = wa_konv-lifnr.
wa_pocondx-vendor_no = 'X'.
wa_pocond-condition_no = wa_konv-knumv.
wa_pocond-itm_number = wa_konv-kposn.
wa_pocond-cond_type = wa_konv-kschl.
wa_pocondx-condition_no = wa_konv-knumv.
wa_pocondx-itm_number = wa_konv-kposn.
wa_pocondx-cond_type = 'X'.
wa_pocondx-change_id = 'U'.
APPEND wa_pocondx TO it_pocondx.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = wa_konv-ebeln
POHEADER =
POHEADERX =
POADDRVENDOR =
TESTRUN =
MEMORY_UNCOMPLETE =
MEMORY_COMPLETE =
POEXPIMPHEADER =
POEXPIMPHEADERX =
VERSIONS =
NO_MESSAGING =
NO_MESSAGE_REQ =
NO_AUTHORITY =
NO_PRICE_FROM_PO =
IMPORTING
EXPHEADER =
EXPPOEXPIMPHEADER =
TABLES
return = it_return
poitem = it_poitem
poitemx = it_poitemx
POADDRDELIVERY =
POSCHEDULE =
POSCHEDULEX =
POACCOUNT =
POACCOUNTPROFITSEGMENT =
POACCOUNTX =
POCONDHEADER =
POCONDHEADERX =
pocond = it_pocond
pocondx = it_pocondx
POLIMITS =
POCONTRACTLIMITS =
POSERVICES =
POSRVACCESSVALUES =
POSERVICESTEXT =
EXTENSIONIN =
EXTENSIONOUT =
POEXPIMPITEM =
POEXPIMPITEMX =
POTEXTHEADER =
POTEXTITEM =
ALLVERSIONS =
POPARTNER =
POCOMPONENTS =
POCOMPONENTSX =
POSHIPPING =
POSHIPPINGX =
POSHIPPINGEXP =
POHISTORY =
POHISTORY_TOTALS =
POCONFIRMATION =
COMMIT WORK AND WAIT. -
Error in BAPI_PO_CHANGE Function Module
Hi Experts,
I have two purchase orders in my ALV internal table. One is received from MIGO and the other is received from ML81 transactions. I want to check the FINAL INVOICE INDICATOR box using FM BAPI_PO_CHANGE for these PO's. PO which is received thru MIGO is working fine. But the PO which is received thru ML81 is giving me error in my BAPIRET2 table.
Below is my code.
MOVE: WA_EKPO-EBELP TO I_BAPIMEPOITEM-PO_ITEM,
WA_EKPO-WERKS TO I_BAPIMEPOITEM-PLANT,
'X' TO I_BAPIMEPOITEM-FINAL_INV.
APPEND I_BAPIMEPOITEM.
MOVE: WA_EKPO-EBELP TO I_BAPIMEPOITEMX-PO_ITEM,
'X' TO I_BAPIMEPOITEMX-PO_ITEMX,
'X' TO I_BAPIMEPOITEMX-PLANT,
'X' TO I_BAPIMEPOITEMX-FINAL_INV.
APPEND I_BAPIMEPOITEMX.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
PURCHASEORDER = L_PO "Here I am passing PO Number(10020633)
TABLES
RETURN = I_BAPIRET2 "Errors
POITEM = I_BAPIMEPOITEM
POITEMX = I_BAPIMEPOITEMX.
IF SY_SUBRC = 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
ENDIF.
The Errors are:
MEPO 000 Purchase order still contains faulty items
BAPI 003 Instance 10020633 of object type PurchaseOrder could not be changed
06 436 In case of Account Assignment, please enter acc. assignment data for item
I am totally stuck over here. Am I missing any parameters to pass in the BAPI. Please help me.
Thanks.hi use this to get your values
CALL FUNCTION 'BAPI_PO_GETDETAIL1'
EXPORTING
PURCHASEORDER = P_EBELN
ACCOUNT_ASSIGNMENT = ' '
ITEM_TEXT = ' '
HEADER_TEXT = ' '
DELIVERY_ADDRESS = ' '
VERSION = ' '
SERVICES = ' '
SERIALNUMBERS = ' '
INVOICEPLAN = ' '
IMPORTING
POHEADER = POHEADER
POEXPIMPHEADER =
TABLES
RETURN = RETURN3
POITEM = I_BAPIMEPOITEM
POADDRDELIVERY =
POSCHEDULE =
POACCOUNT =
POCONDHEADER =
POCOND =
POLIMITS =
POCONTRACTLIMITS =
POSERVICES =
POSRVACCESSVALUES =
POTEXTHEADER =
POTEXTITEM =
POEXPIMPITEM =
POCOMPONENTS =
POSHIPPINGEXP =
POHISTORY =
POHISTORY_TOTALS =
POCONFIRMATION =
ALLVERSIONS =
POPARTNER =
EXTENSIONOUT =
SERIALNUMBER =
INVPLANHEADER =
INVPLANITEM =
POHISTORY_MA = -
Need some Help in BAPI_PO_CHANGE
Hi experts,
I'm using BAPI_PO_CHANGE to upload service numbers for 1 framework order, but it is not working, so does anybody can give me some codes for me as reference? I couldn't remember the error message becoz im at home now.
Thanks & regardsOk, this is the message : Price without service not allowed
So, anyone could help me? here are my codes:
which are the fields that i must enter some more? please help.. thanks..
FORM bapi_process.
DATA n TYPE i.
READ TABLE it_frame INDEX 1.
g_ebeln = it_frame-ebeln.
CALL FUNCTION 'BAPI_PO_GETDETAIL'
EXPORTING
purchaseorder = g_ebeln
items = 'X'
services = 'X'
IMPORTING
po_header = bapi_header_get
po_address = bapi_addr_get
TABLES
po_items = bapi_items_get
po_item_services = bapi_services_get
retrurn = bapi_return.
bapi_head-po_number = bapi_header_get-po_number.
bapi_headx-po_number = 'X'.
bapi_item_chg-po_number = bapi_items_get-po_number.
bapi_item_chg-po_item = bapi_items_get-po_item.
bapi_item_chg-quantity = bapi_items_get-quantity.
bapi_item_chg-pckg_no = bapi_items_get-pckg_no.
bapi_item_chg-net_price = bapi_items_get-net_price.
bapi_item_chg-po_price = '1'.
APPEND bapi_item_chg.
bapi_item_chgx-po_item = bapi_items_get-po_item.
bapi_item_chgx-po_itemx = 'X'.
bapi_item_chgx-quantity = 'X'.
bapi_item_chgx-pckg_no = 'X'.
bapi_item_chgx-net_price = 'X'.
bapi_item_chgx-po_price = 'X'.
APPEND bapi_item_chgx.
LOOP AT bapi_services_get.
bapi_serv_chg-pckg_no = bapi_services_get-pckg_no.
bapi_serv_chg-outl_ind = bapi_services_get-outl_ind.
bapi_serv_chg-service = bapi_services_get-service.
bapi_serv_chg-subpckg_no = bapi_services_get-subpckg_no.
bapi_serv_chg-quantity = bapi_services_get-quantity.
bapi_serv_chg-gr_price = bapi_services_get-gr_price.
bapi_serv_chg-line_no = bapi_services_get-line_no.
bapi_serv_chg-ext_line = bapi_services_get-ext_line.
APPEND bapi_serv_chg.
ENDLOOP.
DESCRIBE TABLE bapi_serv_chg LINES n.
READ TABLE bapi_serv_chg INDEX n.
CLEAR bapi_serv_chg.
LOOP AT bapi_services_get WHERE outl_ind = 'X'
AND NOT subpckg_no IS initial.
LOOP AT it_frame.
bapi_serv_chg-line_no = bapi_serv_chg-line_no + 1.
bapi_serv_chg-ext_line = bapi_serv_chg-ext_line + 10.
bapi_serv_chg-pckg_no = bapi_services_get-subpckg_no.
bapi_serv_chg-price_unit = '1'.
PERFORM convert CHANGING it_frame-srvpos.
bapi_serv_chg-service = it_frame-srvpos.
bapi_serv_chg-quantity = it_frame-menge.
bapi_serv_chg-gr_price = it_frame-tbtwr.
APPEND bapi_serv_chg.
ENDLOOP.
ENDLOOP.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = g_ebeln
poheader = bapi_head
poheaderx = bapi_headx
IMPORTING
expheader = bapi_headret
TABLES
poitem = bapi_item_chg
poitemx = bapi_item_chgx
poservices = bapi_serv_chg
return = bapi_msg.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
ENDFORM. " bapi_process
Thank you & regards -
URGENT: Updating FISTL field using BAPI_PO_CHANGE
HI Friends,
I am about to update the field FISTL and GEBER in EKKN .
I am using BAPI_PO_CHANGE to update those fields . I have tried passing the fields to the table
POITEM and POACCOUNT in BAPI.
i have also given the values to POITEMX and POACCOUNTX tables .
I have given the BAPI_COMMIT_TRANSACTION also . i have given wait time also . Even then the value is not updated in EKKN table .
What could be reason for value not getting updated .
Is the table to which i am passing in BAPI is ok?
Please help me in this issue , its urgent.
Reward is sureHi Gokul,
Try 'BAPI_PO_CREATE1' and see if you can achieve the result.
*& Report YDM_PO_CREATE *
REPORT ydm_po_create.
*-- Input File Declaration
TYPES: BEGIN OF ty_input_file,
column1 TYPE char50,
column2 TYPE char50,
column3 TYPE char50,
column4 TYPE char50,
column5 TYPE char50,
column6 TYPE char50,
column7 TYPE char50,
column8 TYPE char50,
column9 TYPE char50,
column10 TYPE char50,
column11 TYPE char50,
column12 TYPE char50,
column13 TYPE char50,
column14 TYPE char50,
column15 TYPE char50,
column16 TYPE char50,
column17 TYPE char50,
column18 TYPE char50,
END OF ty_input_file.
DATA: i_input_file TYPE STANDARD TABLE OF ty_input_file,
wa_input_file TYPE ty_input_file.
CONSTANTS: c_path TYPE char20 VALUE 'C:\',
c_mask TYPE char9 VALUE ',*.*,*.*.',
c_mode TYPE char1 VALUE 'O',
c_filetype TYPE char10 VALUE 'ASC',
c_x TYPE char01 VALUE 'X'.
PARAMETERS : p_fname LIKE rlgrap-filename.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fname.
*-- Browse Presentation Server
PERFORM f4_presentation_file.
START-OF-SELECTION..
*-- Read presentation server file
PERFORM f1003_upload_file.
IF NOT i_input_file[] IS INITIAL.
PERFORM split_data.
ENDIF.
*& Form f4_presentation_file
*& F4 Help for presentation server
FORM f4_presentation_file .
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
def_path = c_path
mask = c_mask
mode = c_mode
title = text-001
IMPORTING
filename = p_fname
EXCEPTIONS
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " f4_presentation_file
*& Form f1003_upload_file
*& Upload File
FORM f1003_upload_file .
DATA: lcl_filename TYPE string.
lcl_filename = p_fname.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = lcl_filename
filetype = c_filetype
has_field_separator = c_x
TABLES
data_tab = i_input_file
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
EXIT.
ENDIF.
ENDFORM. " f1003_upload_file
*& Form split_data
Collect data for creating Purchase Order
FORM split_data .
DATA: i_poitem TYPE STANDARD TABLE OF bapimepoitem,
i_poitemx TYPE STANDARD TABLE OF bapimepoitemx,
i_poitem_sch TYPE STANDARD TABLE OF bapimeposchedule,
i_poitem_schx TYPE STANDARD TABLE OF bapimeposchedulx,
i_acct_*** TYPE STANDARD TABLE OF bapimepoaccount,
i_acct_assx TYPE STANDARD TABLE OF bapimepoaccountx,
i_services TYPE STANDARD TABLE OF bapiesllc ,
i_srvacc TYPE STANDARD TABLE OF bapiesklc,
i_return TYPE STANDARD TABLE OF bapiret2,
wa_header TYPE bapimepoheader,
wa_headerx TYPE bapimepoheaderx,
wa_poitem TYPE bapimepoitem,
wa_poitemx TYPE bapimepoitemx,
wa_poitem_sch TYPE bapimeposchedule,
wa_poitem_schx TYPE bapimeposchedulx,
wa_acct_*** TYPE bapimepoaccount,
wa_acct_assx TYPE bapimepoaccountx,
wa_services TYPE bapiesllc,
wa_srvacc TYPE bapiesklc,
wa_return TYPE bapiret2,
ws_po TYPE bapimepoheader-po_number.
break gbpra8.
wa_services-pckg_no = 10.
wa_services-line_no = 1.
wa_services-outl_no = '0'.
wa_services-outl_ind = c_x.
wa_services-subpckg_no = 20.
APPEND wa_services TO i_services.
wa_srvacc-pckg_no = 10.
wa_srvacc-line_no = 1.
wa_srvacc-serno_line = 01.
wa_srvacc-serial_no = 01.
wa_srvacc-percentage = 100.
APPEND wa_srvacc TO i_srvacc.
LOOP AT i_input_file INTO wa_input_file.
IF wa_input_file-column2 EQ 'HD'.
wa_header-doc_type = wa_input_file-column3.
wa_header-creat_date = sy-datum.
wa_header-created_by = sy-uname.
wa_header-vendor = wa_input_file-column4.
PERFORM conversion_output USING wa_header-vendor
CHANGING wa_header-vendor.
wa_header-comp_code = 'DE03'.
wa_header-purch_org = 'DE03'.
wa_header-pur_group = 'DE1'.
wa_header-vper_start = wa_input_file-column9.
wa_header-vper_end = wa_input_file-column10.
wa_headerx-comp_code = c_x.
wa_headerx-doc_type = c_x.
wa_headerx-creat_date = c_x.
wa_headerx-created_by = c_x.
wa_headerx-vendor = c_x.
wa_headerx-purch_org = c_x.
wa_headerx-pur_group = c_x.
wa_headerx-vper_start = c_x.
wa_headerx-vper_end = c_x.
ENDIF.
IF wa_input_file-column2 EQ 'IT'.
wa_poitem-po_item = wa_input_file-column3.
wa_poitem-short_text = wa_input_file-column6.
wa_poitem-plant = wa_input_file-column8.
wa_poitem-quantity = '1'.
wa_poitem-tax_code = 'V0'.
wa_poitem-item_cat = 'D'.
wa_poitem-acctasscat = 'K'.
wa_poitem-matl_group = wa_input_file-column7.
wa_poitem-pckg_no = '10'.
APPEND wa_poitem TO i_poitem .
wa_poitemx-po_item = wa_input_file-column3.
wa_poitemx-po_itemx = c_x.
wa_poitemx-short_text = c_x.
wa_poitemx-plant = c_x.
wa_poitemx-quantity = c_x.
wa_poitemx-tax_code = c_x.
wa_poitemx-item_cat = c_x.
wa_poitemx-acctasscat = c_x.
wa_poitemx-matl_group = c_x.
wa_poitemx-pckg_no = c_x.
APPEND wa_poitemx TO i_poitemx.
wa_poitem_sch-po_item = wa_input_file-column3.
wa_poitem_sch-delivery_date = sy-datum.
APPEND wa_poitem_sch TO i_poitem_sch.
wa_poitem_schx-po_item = wa_input_file-column3.
wa_poitem_schx-po_itemx = c_x.
wa_poitem_schx-delivery_date = c_x.
APPEND wa_poitem_schx TO i_poitem_schx.
wa_acct_***-po_item = 10.
wa_acct_***-serial_no = 01.
wa_acct_***-gl_account = '0006360100'.
wa_acct_***-co_area = '1000'.
wa_acct_***-costcenter = 'KC010000'.
APPEND wa_acct_*** TO i_acct_***.
wa_acct_***-po_item = 10.
wa_acct_***-serial_no = 02.
wa_acct_***-gl_account = '0006360100'.
wa_acct_***-co_area = '1000'.
wa_acct_***-costcenter = 'KC010000'.
APPEND wa_acct_*** TO i_acct_***.
wa_acct_assx-po_item = 10.
wa_acct_assx-serial_no = 01.
wa_acct_assx-po_itemx = c_x.
wa_acct_assx-serial_nox = c_x.
wa_acct_assx-gl_account = c_x.
wa_acct_assx-co_area = c_x.
wa_acct_assx-costcenter = c_x.
APPEND wa_acct_assx TO i_acct_assx.
wa_acct_assx-po_item = 10.
wa_acct_assx-serial_no = 02.
wa_acct_assx-po_itemx = c_x.
wa_acct_assx-serial_nox = c_x.
wa_acct_assx-gl_account = c_x.
wa_acct_assx-co_area = c_x.
wa_acct_assx-costcenter = c_x.
APPEND wa_acct_assx TO i_acct_assx.
wa_services-pckg_no = 20.
wa_services-line_no = 2.
wa_services-service = wa_input_file-column9.
wa_services-quantity = '100'.
wa_services-gr_price = '100'.
wa_services-userf1_txt = wa_input_file-column13.
APPEND wa_services TO i_services.
wa_srvacc-pckg_no = 20.
wa_srvacc-line_no = 1.
wa_srvacc-serno_line = 02.
wa_srvacc-serial_no = 02.
wa_srvacc-percentage = 100.
APPEND wa_srvacc TO i_srvacc.
ENDIF.
ENDLOOP.
CALL FUNCTION 'BAPI_PO_CREATE1'
EXPORTING
poheader = wa_header
poheaderx = wa_headerx
POADDRVENDOR =
TESTRUN =
MEMORY_UNCOMPLETE =
MEMORY_COMPLETE =
POEXPIMPHEADER =
POEXPIMPHEADERX =
VERSIONS =
NO_MESSAGING =
NO_MESSAGE_REQ =
NO_AUTHORITY =
NO_PRICE_FROM_PO =
IMPORTING
exppurchaseorder = ws_po
EXPHEADER =
EXPPOEXPIMPHEADER =
TABLES
return = i_return
poitem = i_poitem
poitemx = i_poitemx
POADDRDELIVERY =
poschedule = i_poitem_sch
poschedulex = i_poitem_schx
poaccount = i_acct_***
POACCOUNTPROFITSEGMENT =
poaccountx = i_acct_assx
POCONDHEADER =
POCONDHEADERX =
POCOND =
POCONDX =
POLIMITS =
POCONTRACTLIMITS =
poservices = i_services
posrvaccessvalues = i_srvacc
POSERVICESTEXT =
EXTENSIONIN =
EXTENSIONOUT =
POEXPIMPITEM =
POEXPIMPITEMX =
POTEXTHEADER =
POTEXTITEM =
ALLVERSIONS =
POPARTNER =
break gbpra8.
LOOP AT i_return INTO wa_return.
ENDLOOP.
ENDFORM. " split_data
*& Form conversion_output
Conversion exit input
FORM conversion_output USING p_ip
CHANGING p_op.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = p_ip
IMPORTING
output = p_op.
ENDFORM. " conversion_output
<b>Reward points if this helps.
Manish</b> -
Delete Service Line in a PO using BAPI_PO_CHANGE
Hi Experts,
I am able to create a new Service line using BAPI_PO_CHANGE in a Purchase Order. But not able to delete the existing service line. In the BAPI return log, it is showing 'PO Changed', still the service line exists.
Please refer the code below and suggest me the changes required to delete the Service line from PO.
Thanks in advance for your help.
DATA: i_tab TYPE STANDARD TABLE OF ty_tab,
w_tab TYPE ty_tab,
poitem TYPE STANDARD TABLE OF bapimepoitem WITH HEADER LINE,
poitemx TYPE STANDARD TABLE OF bapimepoitemx WITH HEADER LINE,
poservices TYPE STANDARD TABLE OF bapiesllc WITH HEADER LINE,
return TYPE STANDARD TABLE OF bapiret2 WITH HEADER LINE,
poaccount TYPE STANDARD TABLE OF bapimepoaccount WITH HEADER LINE,
poaccountx TYPE STANDARD TABLE OF bapimepoaccountx WITH HEADER LINE,
posrvaccessvalues TYPE STANDARD TABLE OF bapiesklc WITH HEADER LINE.
poitem-po_item = '10'.
poitem-pckg_no = '0000001329'.
poitem-item_cat = '0'.
APPEND poitem.
poitemx-po_item = '10'.
poitemx-po_itemx = 'X'.
poitemx-pckg_no = 'X'.
poitemx-item_cat = 'X'.
APPEND poitemx.
poservices-pckg_no = '0000001329'.
poservices-line_no = '0000000001'.
poservices-ext_line = '0000000010'.
poservices-service = '000000000005000010'.
poservices-subpckg_no = '0000000000'.
poservices-delete_ind = 'X'.
APPEND poservices.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = '7200000017'
TABLES
return = return[]
poitem = poitem[]
poitemx = poitemx[]
poservices = poservices[].
BREAK-POINT.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
Thanks & Regards,
RevanthIn method BAPI_PO_CHANGE, you can only create service items, you cannot change them.
FU BAPI_PO_CHANGE POSERVICES
Short Text
External Services: Service Lines
Description
This table contains the services and services specifications outline for the purchase order.
Field OUTL_IND is used to flag a line as an outline line. The service lines are assigned to the outline lines using the fields PCKG_NO (for the service line) and SUBPCKG_NO (for the outline line).
The outline hierarchy is mapped using the fields LINE_NO and HI_LINE_NO. Field HI_LINE_NO links to field LINE_NO of the hierarchically superior outline.
Note
In method BAPI_PO_CHANGE, you can only create service items, you cannot change them.
For more information on the individual parameter fields, see the data element documentation in the ABAP Dictionary.
Function Module
BAPI_PO_CHANGE -
Delete a Service in a PO with BAPI_PO_CHANGE
Hi Experts,
I am trying to delete a Service Line using BAPI_PO_CHANGE.
Service line is not getting deleted but the RETURN table is showing a message saying "PO changed"
Please refer the code below.
DATA:
poitem TYPE STANDARD TABLE OF bapimepoitem WITH HEADER LINE,
poitemx TYPE STANDARD TABLE OF bapimepoitemx WITH HEADER LINE,
poservices TYPE STANDARD TABLE OF bapiesllc WITH HEADER LINE,
return TYPE STANDARD TABLE OF bapiret2 WITH HEADER LINE,
poaccount TYPE STANDARD TABLE OF bapimepoaccount WITH HEADER LINE,
poaccountx TYPE STANDARD TABLE OF bapimepoaccountx WITH HEADER LINE,
posrvaccessvalues TYPE STANDARD TABLE OF bapiesklc WITH HEADER LINE.
poitem-po_item = '10'.
poitem-pckg_no = '0000001329'.
poitem-item_cat = '0'.
APPEND poitem.
poitemx-po_item = '10'.
poitemx-po_itemx = 'X'.
poitemx-pckg_no = 'X'.
poitemx-item_cat = 'X'.
APPEND poitemx.
poservices-pckg_no = '0000001329'.
poservices-line_no = '0000000001'.
poservices-ext_line = '0000000010'.
poservices-service = '000000000005000010'.
poservices-subpckg_no = '0000000000'.
poservices-delete_ind = 'X'.
APPEND poservices.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = '7200000017'
TABLES
return = return[]
poitem = poitem[]
poitemx = poitemx[]
poservices = poservices[].
BREAK-POINT.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
Thanks,
Revanth
Edited by: Revnath on Jul 5, 2011 11:37 AMHi Edith,
Thank you very much for your reply.
I changed my program by following your steps in the reply. Now the BAPI is showing error messages: "Instance 7200000060 of object type PurchaseOrder could not be changed" and "Price without service not allowed".
Please refer my code below.
poitem-po_item = '0010'.
poitem-pckg_no = '0000001964'.
poitem-item_cat = '9'.
APPEND poitem.
poitemx-po_item = '10'.
poitemx-po_itemx = 'X'.
poitemx-pckg_no = 'X'.
poitemx-item_cat = 'X'.
APPEND poitemx.
Parent line
poservices-pckg_no = '0000001964'.
poservices-line_no = '0000000001'.
poservices-ext_line = '0000000000'.
poservices-subpckg_no = '0000001965'.
poservices-matl_group = '01040107'.
*poservices-delete_ind = 'X'.
*poservices-quantity = ' '.
*poservices-base_uom = ' '.
*poservices-gr_price = ' '.
APPEND poservices.
CLEAR: poservices.
Child line.
poservices-pckg_no = '0000001965'.
poservices-line_no = '0000000002'.
poservices-ext_line = '0000000010'.
poservices-quantity = '1'.
poservices-service = '000000000005000010'.
poservices-base_uom = 'EA'.
poservices-gr_price = '150'.
poservices-subpckg_no = '0000000000'.
poservices-matl_group = '01040107'.
poservices-delete_ind = 'X'.
APPEND poservices.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = '7200000060'
TABLES
return = return[]
poitem = poitem[]
poitemx = poitemx[]
poservices = poservices[]
posrvaccessvalues = posrvaccessvalues[].
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
Regards,
Revanth -
Can I use "BAPI_PO_CHANGE" to add a line item to a PO?
In particular, if I call this BAPI with rows in "poitem" that don't correspond to line items already in the PO, will the BAPI add these new lines?
If not, what is the right way to do this via BAPI?
Thanks for any advice you can provide.TYPES : BEGIN OF ty_ekko,
ebeln TYPE ebeln,
ekorg TYPE ekorg,
ekgrp TYPE bkgrp,
END OF ty_ekko.
DATA : it_flatfile TYPE TABLE OF ty_ekko ,
wa_flatfile TYPE ty_ekko,
it_ekko1 TYPE TABLE OF ty_ekko,
wa_ekko1 TYPE ty_ekko.
DATA : v_file TYPE string.
DATA : wa_header TYPE bapimepoheader,
wa_headerx TYPE bapimepoheaderx.
DATA: it_return TYPE TABLE OF bapiret2.
DATA: it_return1 TYPE TABLE OF bapiret2.
*DATA : BEGIN OF it_bapi_poheader OCCURS 0.
INCLUDE STRUCTURE bapimepoheader.
*DATA : END OF it_bapi_poheader.
*DATA : BEGIN OF it_bapi_poheaderx OCCURS 0.
INCLUDE STRUCTURE bapimepoheaderx.
*DATA : END OF it_bapi_poheaderx.
*DATA : BEGIN OF it_bapi_poitem OCCURS 0.
INCLUDE STRUCTURE bapimepoitem.
*DATA : END OF it_bapi_poitem.
*DATA : BEGIN OF it_bapi_poitemx OCCURS 0.
INCLUDE STRUCTURE bapimepoitemx.
*DATA : END OF it_bapi_poitemx.
*DATA : BEGIN OF it_bapireturn OCCURS 0.
INCLUDE STRUCTURE bapiret2.
*DATA : END OF it_bapireturn.
PARAMETERS : p_file TYPE ibipparms-path.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CALL FUNCTION 'F4_FILENAME'
IMPORTING
file_name = p_file.
START-OF-SELECTION.
MOVE p_file TO v_file.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = v_file
has_field_separator = 'X'
TABLES
data_tab = it_flatfile.
IF NOT it_flatfile IS INITIAL.
SELECT ebeln ekorg ekgrp
FROM ekko
INTO TABLE it_ekko1
FOR ALL ENTRIES IN it_flatfile
WHERE ebeln = it_flatfile-ebeln .
ENDIF.
LOOP AT it_flatfile INTO wa_flatfile.
READ TABLE it_ekko1 INTO wa_ekko1 WITH KEY ebeln = wa_flatfile-ebeln.
IF sy-subrc EQ 0.
IF wa_flatfile-ekorg NE wa_ekko1-ekorg OR
wa_flatfile-ekgrp NE wa_ekko1-ekgrp.
wa_header-po_number = wa_flatfile-ebeln.
wa_header-purch_org = wa_flatfile-ekorg.
wa_header-pur_group = wa_flatfile-ekgrp.
wa_headerx-po_number = wa_flatfile-ebeln.
wa_headerx-purch_org = 'X'.
wa_headerx-pur_group = 'X'.
ENDIF.
ENDIF.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = wa_ekko1-ebeln
poheader = wa_header
poheaderx = wa_headerx
POADDRVENDOR =
TESTRUN =
MEMORY_UNCOMPLETE =
MEMORY_COMPLETE =
POEXPIMPHEADER =
POEXPIMPHEADERX =
VERSIONS =
NO_MESSAGING =
NO_MESSAGE_REQ =
NO_AUTHORITY =
NO_PRICE_FROM_PO =
IMPORTING
EXPHEADER =
EXPPOEXPIMPHEADER =
TABLES
return = it_return
POITEM =
POITEMX =
POADDRDELIVERY =
POSCHEDULE =
POSCHEDULEX =
POACCOUNT =
POACCOUNTPROFITSEGMENT =
POACCOUNTX =
POCONDHEADER =
POCONDHEADERX =
POCOND =
POCONDX =
POLIMITS =
POCONTRACTLIMITS =
POSERVICES =
POSRVACCESSVALUES =
POSERVICESTEXT =
EXTENSIONIN =
EXTENSIONOUT =
POEXPIMPITEM =
POEXPIMPITEMX =
POTEXTHEADER =
POTEXTITEM =
ALLVERSIONS =
POPARTNER =
POCOMPONENTS =
POCOMPONENTSX =
POSHIPPING =
POSHIPPINGX =
POSHIPPINGEXP =
POHISTORY =
POHISTORY_TOTALS =
POCONFIRMATION =
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
ENDLOOP.
You can test it in your dev using my code . Pls check and let us know. -
BAPI_PO_CHANGE, G/L Account is empty by account assignment
Hi all,
i use the BAPI "BAPI_PO_CHANGE" for changing or add new service line by Purchase Order.
For example i have created PO Order with 3 services (BAPI_PO_CREATE1).
By account assignment i can see by dialog of Purchase Order
3 lines with "gl_accounts", "wbselements" and another data.
Now i start BAPI "BAPI_PO_CHANGE" and add new 2 Lines by sevices.
I get follow result -> By tab (Purchase Order) of Account Assignment is the GL_Account by changing line empty!
Component version: SAP ECC 6.0
Follow data get the BAPI:
POITEM:
po_item = '00010'.
pckg_no = '3777'.
POITEMX:
po_item = '00010'
po_item = 'X'.
pckg_no = 'X'.
POACCOUNT(Line 1):
po_item = '00010'.
serial_no = '04'.
quantity = '100'.
wbs_element = '2245'.
POACCOUNTX(Line 1):
po_item = '00010'.
po_item = 'X'.
serial_no = '04'.
serial_nox = 'X'.
quantity = 'X'.
wbs_element = 'X'.
POACCOUNT(Line 2):
po_item = '00010'.
serial_no = '05'.
quantity = '200'.
wbs_element = '2247'.
POACCOUNTX(Line 2):
po_item = '00010'.
po_item = 'X'.
serial_no = '05'.
serial_nox = 'X'.
quantity = 'X'.
wbs_element = 'X'.
POSERVICES (Line 1):
pckg_no = '3777'
line_no = '03'.
ext_line = '00'.
outl_ind = 'X'
subpckg_no = '3778'.
service = ''.
quantity = '0.0'.
POSERVICES (Line 2):
pckg_no = '3778'.
line_no = '04'.
ext_line = '50'.
outl_ind = ''.
subpckg_no = '3778'.
service = '4010002'.
quantity = '20'.
POSERVICES (Line 3):
pckg_no = '3778'
line_no = '05'.
ext_line = '60'.
outl_ind = ''
subpckg_no = '3778'.
service = '4010004'.
quantity = '782'.
POSRVACCESSVALUES (Line 1):
pckg_no = '3778'
line_no = '04'.
ext_line = '04'.
percentage = '0.0'
serial_no = '04'.
quantity = '20'.
POSRVACCESSVALUES (Line 2):
pckg_no = '3778'
line_no = '05'.
ext_line = '05'.
percentage = '0.0'
serial_no = '05'.
quantity = '782'.
Thank you for your help.
EugenIssue Resolved on my own ....
The debit credit indicator on PO Line Item should not be touched and the G/L Account line item Debit Credit Indicator must be Credit. It fixes the problem.
Edited by: Durvesh Shinde on Jun 17, 2009 7:08 PM
Edited by: Durvesh Shinde on Jun 17, 2009 7:08 PM -
BAPI_PO_CHANGE ADD NEW POSITIONS WITH AGREEMENT REFERENCE ACCOUNT ASSIG. U
Hello, we are trying to add new positions to a MM orders
using "BAPI_PO_CHANGE". The positions take into account an agreement number as reference and executing it, the bapi overwrites the value of the account asingment and sets 'U' instead of blank which is the value set as parameter in the field POITEM-ACCTASSCAT and shows the error message ME069 unknown account assignment.
I tried to set in the bapi the value '*', for example, and the bapi returns correctly the message: This value doesn't exist as an account assingment category. I did this to confirm that the bapi substitutes the value set as parameter for the U value brought from the agreement. I need the same functionality but setting blank. I tried to create a blank entry as account assignment category but the bapi doesn't recogniced it.
I have tried to code in the next points:
Field exit KNTTP
Includes ZXM06U41, ZXFMYU03, zxmewu09 and ZXMEWU11.
In none of the mentioned cases we have changed the value 'U' for blank,
because the system always runs before the function MEX_PSTYP_KNTTP where makes the check and shows the error message ME069 unknown account assignment.
Thanks for your help.
Jose Luis.Hi,
please check the note 420332.
If you want to add a new service line please use a dummy packno in the structures POITEM ,POSERVICES, POSRVACCESSVALUES. A dummy packno means that it does not have any entries in the tables ESLL and ESLH yet. The best solution would be to choose a packno which is a very low number which is not occupied in esll and eslh.
If you add a new service line please fill in first the father line into POSERVICES and add also the service line (2 entries), like it was described in note 420332, part 3.7
Regards,
Edit -
BAPI_PO_CHANGE work?
hi everybody. I'm trying to use the bapi BAPI_PO_CHANGE, but I no have luck to make it work. I need to enter in the purchase order, select one o several item, in the item selected I need to mark the check "Closed" in every item. and then close the item.
can you help me??? thanks for your time!!!
Oscarmy code is like this:
CALL FUNCTION 'BAPI_PO_GETDETAIL'
EXPORTING
purchaseorder = ebeln
items = 'X'
history = 'X'
extensions = 'X'
IMPORTING
po_header = po_header
TABLES
po_items = po_items
po_item_history = po_item_history
return = retorno_get
extensionout = extensionout.
MOVE-CORRESPONDING po_header TO poheader.
LOOP AT po_items.
CLEAR: poitem, poitemx.
MOVE-CORRESPONDING po_items TO poitem.
poitem-no_more_gr = 'X'.
poitem-final_inv = 'X'.
poitem-deliv_compl = 'X'.
poitem-delete_ind = 'X'.
APPEND poitem.
poitemx-po_item = poitem-po_item.
poitemx-no_more_gr = 'X'.
poitemx-po_itemx = 'X'.
poitemx-final_inv = 'X'.
poitemx-deliv_compl = 'X'.
poitemx-delete_ind = 'X'.
APPEND poitemx.
ENDLOOP.
CLEAR: poitem, poitemx,
poheader, poheaderx.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = ebeln
poheader = poheader
poheaderx = poheaderx
POADDRVENDOR =
testrun = p_test
memory_uncomplete = 'X'
MEMORY_COMPLETE =
POEXPIMPHEADER =
POEXPIMPHEADERX =
VERSIONS =
NO_MESSAGING =
NO_MESSAGE_REQ =
NO_AUTHORITY =
NO_PRICE_FROM_PO =
IMPORTING
expheader = expheader
EXPPOEXPIMPHEADER =
TABLES
return = retorno
poitem = poitem
poitemx = poitemx
POADDRDELIVERY =
POSCHEDULE =
POSCHEDULEX =
POACCOUNT =
POACCOUNTPROFITSEGMENT =
POACCOUNTX =
POCONDHEADER =
POCONDHEADERX =
POCOND =
POCONDX =
POLIMITS =
POCONTRACTLIMITS =
POSERVICES =
POSRVACCESSVALUES =
POSERVICESTEXT =
extensionin = extensionin
extensionout = extensionout
POEXPIMPITEM =
POEXPIMPITEMX =
POTEXTHEADER =
POTEXTITEM =
ALLVERSIONS =
POPARTNER =
IF p_test <> 'X'.
COMMIT WORK AND WAIT.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'
IMPORTING
return = retorno.
ENDIF.
Maybe you are looking for
-
How to make the Open/Save dialogue download the text file instead of JSP
I am currently coding on a JSP program, which searches the database and writes the resultset into a file on the server, and then allows the client to download this tab delimited text file onto their local machine. But I met a problem, when the defaul
-
Link to open swf in Flash player
I am pretty new at flash and I have been slowly learning the do's and don'ts of actionscript. I have a problem that I can't seem to figure out. Basically I'm trying to open an SWF file inside my current flash presentation, so basically you click a bu
-
I recently got a new 30gb video ipod and when i went to plug it in to add songs, it said i needed to restore it. So i clicked restore and then it says 'there is a problem downloading the IPOD software for the IPOD'. I think it might be the place wher
-
How do i repair a hard drive?
I bought my ipod at best buy and paid with cash i put the receit in my wallet but i got stolen at the movie theatre the point is that i don't have a recit anymore and don't know how to replace my ipod now. it apears the apple icon with the back light
-
Displaying images in iPhone Mail
I see this question asked over the years, but not recently. I can't tell if the omission on Apple's part has been fixed. I have my phone set to not automatically download images in Mail (for many reasons). But I would like to see the images every onc