2012 Jun 18 7:12 AM
hi,
i m updating the existing PO which has 2 line item,i passed two new line items with schedule line data.
but it is showing faulty data in return of FM - bapi_po_change.
and item table change from 2 to 4 rows after executing bapi_po_change.
hi,
i m updating the existing PO which has 2 line item,i passed two new line items with schedule line data.
but it is showing faulty data in return of FM - bapi_po_change.
and item table change from 2 to 4 rows after executing bapi_po_change.
2012 Jun 18 7:25 AM
Hi Dakshu,
Please fill the POSCHEDULEX table also. In this table mention the line item number and provide 'X' for all the fields that needs to be changed.
If this table is not filled, the BAPI will try to create new line items for the records filled in POSCHEDULE table.
Thanks,
Manikandan JN.
2012 Jun 18 7:28 AM
i filled both schedule n schedulex table...
do i need to change value from 'X' to 'U' anywhr.
2012 Jun 18 7:32 AM
Hi,
How you are filling new line items with indicator.
Regards,
Madhu.
2012 Jun 18 7:37 AM
2012 Jun 18 7:48 AM
Hi,
This is from documenataion.
Parameter: POITEM
| PO_ITEM | = | 00001 |
| CONF_CTRL | = | 0001 |
Parameter: POITEMX
| PO_ITEM | = | 00001 |
| PO_ITEMX | = | X |
| CONF_CTRL | = | X |
Parameter: POSCHEDULE
| PO_ITEM | = | 00001 |
| SCHED_LINE | = | 0001 |
| QUANTITY | = | 10.000 |
| PO_ITEM | = | 00001 |
| SCHED_LINE | = | 0003 |
| DELETE_IND | = | X |
Parameter: POSCHEDULEX
| PO_ITEM | = | 00001 |
| SCHED_LINE | = | 0001 |
| PO_ITEMX | = | X |
| SCHED_LINEX | = | X |
| QUANTITY | = | X |
| PO_ITEM | = | 00001 |
| SCHED_LINE | = | 0003 |
| PO_ITEMX | = | X |
| SCHED_LINEX | = | X |
| DELETE_IND | = | X |
Parameter: POACCOUNT
2012 Jun 18 7:38 AM
Hi,
Pass required values for POITEMX(i.e 'X') in the BAPI_PO_CHANGE function module.
Regards,
venkat.
2012 Jun 18 7:40 AM
2012 Jun 18 7:42 AM
2012 Jun 18 7:53 AM
LOOP AT i_ekko INTO w_ekko.
purchase = w_ekko-num.
header-po_number = w_ekko-num.
APPEND header ."TO header1.
headerx-po_number = 'X'.
APPEND headerx ."TO headerx1.
LOOP AT i_ekpo INTO w_ekpo WHERE num = w_ekko-num.
item-po_item = w_ekpo-ebelp.
item-material = w_ekpo-matnr.
item-plant = w_ekpo-werks.
item-quantity = w_ekpo-menge.
item-net_price = w_ekpo-netpr.
APPEND item TO item1.
itemx-po_item = 'X' .
itemx-material ='X' .
itemx-plant = 'X' .
itemx-quantity = 'X' .
itemx-net_price = 'X' .
APPEND itemx TO itemx1.
LOOP AT i_eket INTO w_eket WHERE ebelp = w_ekpo-ebelp.
schedule-po_item = w_eket-ebelp.
schedule-sched_line = w_eket-etenr.
schedule-delivery_date = w_eket-eindt.
schedule-quantity = w_eket-menge.
APPEND schedule TO schedule1.
schedulex-po_item = 'X'.
schedulex-sched_line = 'X'.
schedulex-delivery_date = 'X'.
schedulex-quantity = 'X'.
APPEND schedulex TO schedulex1.
SELECT SINGLE ebelp eindt menge INTO (l_item , l_date , l_quant)
FROM eket WHERE ebeln = purchase AND ebelp = w_ekpo-ebelp.
versions-completed = 'X'.
IF w_eket-eindt <> l_date.
versions-reason = 'Z001'.
ELSEIF w_eket-menge <> l_quant.
versions-reason = 'Z002'.
ELSEIF w_eket-ebelp <> l_item.
versions-reason = 'Z003'.
ENDIF.
APPEND versions TO versions1.
CLEAR w_eket.
ENDLOOP.
ENDLOOP.
2012 Jun 18 8:06 AM
2012 Jun 18 8:08 AM
2012 Jun 18 8:11 AM
Hi,
For schedules lines pass some value with out any loop and see .Keep X only for the line items to be added.
Regards,
Madhu.
2012 Jun 18 8:18 AM
did,still showing same error
Purchase order still contains faulty item
2012 Jun 18 8:20 AM
Hi Dakshu,
You have forgot to mention the line item number and ITEMX and SCHEDULEX table.
Just make the below change in your code.
itemx-po_item = w_ekpo-ebelp .
itemx-po_itemx = 'X' .
itemx-material ='X' .
itemx-plant = 'X' .
itemx-quantity = 'X' .
itemx-net_price = 'X' .
APPEND itemx TO itemx1.
schedulex-po_item = w_ekpo-ebelp.
schedulex-sched_line = w_eket-etenr.
schedulex-po_itemx = 'X'.
schedulex-sched_linex = 'X'.
schedulex-delivery_date = 'X'.
schedulex-quantity = 'X'.
APPEND schedulex TO schedulex1.
Thanks,
Manikandan JN
2012 Jun 18 8:27 AM
2012 Jun 18 8:41 AM
Hi Dakshu,
I am a bit confused over the following statements.
header-po_number = w_ekko-num.
APPEND header ."TO header1.
headerx-po_number = 'X'.
APPEND headerx ."TO headerx1.
HEADER and HEADERX are structures and I think you have treated them as tables.
If you need to change multiple POs, call the BAPI within the loop.
I feel something is wrong with this APPEND. Just a have a look at this please.
Thanks,
Manikandan JN.
2012 Jun 18 9:44 AM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |