Application Development and Automation 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: 
Read only

Grid value in BAPI_PO_CREATE

Former Member
0 Likes
565

Hi friends,

I am testing FM BAPI_PO_CREATE and provided all the values but when i execute it, it says ' ENTER GRID VALUE' i have given this value in last table 'AFS_PO_ITEM_SCHEDULES' of FM. i found only this table which has grid value field. what exactly i am missing if anyone can help..

Thanks.

Sunil

4 REPLIES 4
Read only

Former Member
0 Likes
539

can u please tell what all parameters ru passing to the function module BAPI_PO_CREATE

Read only

0 Likes
539

Hi Amit,

Thnx for reply. I am passing structure 'PO_HEADER' and table 'PO_ITEMS' and PO_ITEM_SCHEDULES because these are mandatory to pass. when i passed only these it asked for GRID VALUE then i passed one more table 'AFS_PO_ITEM_SCHEDULES' which has GRID VALUE field but i got same error. so i am passing all above 4 parameters.

Thanks

Sunil.

Read only

0 Likes
539

u can follow this example to create the PO

po_item_schedules-po_item = ebelp.

po_item_schedules-quantity = it_boe-issqt.

po_item_schedules-deliv_date = sy-datum.

APPEND po_item_schedules.

po_header-doc_type = wa_lvtv-bsart.

po_header-purch_org = wa_lvtv-ekorg.

po_header-pur_group = '600'.

po_header-co_code = wa_lvtv-bukrs.

po_header-doc_date = sy-datum.

po_header-vendor = st_tvhdr-lifnr.

wa_tech-no_price_from_po = 'X'.

po_items-po_item = ebelp.

po_items-material = it_boe-matnr.

po_items-pur_mat = it_boe-matnr.

po_items-plant = st_tvhdr-werks.

po_items-disp_quan = it_boe-issqt.

po_items-net_price = it_boe-stprs .

po_items-trackingno = it_boe-menge01.

po_items-tax_code = wa_lvtv-mwskz.

APPEND po_items.

CALL FUNCTION 'BAPI_PO_CREATE'

EXPORTING

po_header = po_header

header_tech_fields = wa_tech

IMPORTING

purchaseorder = purchaseorder

TABLES

po_items = po_items

po_item_schedules = po_item_schedule

return = return.

Read only

0 Likes
539

H Amit,

Thanks for taking pain. I tried as u suggested and passed all valued except tracking number (PO i am taking ref. from doesn't has tracking number) but i am still getting same error 'A grid value must be entered for material 7000860' .

Any suggestion..!!

Thanks..

Sunil