‎2008 Mar 12 10:16 PM
Hi All,
I am creating PO based on user selected rows.
1)When I select only one row it is creating PO with the following message.
Following mandatory roles missing in partner maintenance: Z1, Z2
Message_V2 Z1, Z2
PO looks fine.
2)When I select more than one row to create PO, for the first record it is creating PO and for remaining remaining row's I am getting the following error.
Purchase order item 00010 still contains faulty account assignments
Please enter G/L account no.
Actually I am passing a const number
poaccount-gl_account = '0000603000'.
Can someone please help me with what I am doing wrong here.
Thanks,
Veni.
‎2008 Mar 12 10:49 PM
Hi,
I am not able to evaluate the problem, can someone please help me.
Thanks,
Veni.
‎2008 Mar 13 3:22 PM
Hi All,
What are the mandatory conditions Z1, Z2 that I am missing in the code. Can someone help me.
FORM pheaderdata.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = gs_zcoop1-kunnr
IMPORTING
output = lv_nvendor.
header data
pheader-comp_code = '1000'.
pheader-doc_type = 'NB'.
pheader-vendor = lv_nvendor.
pheader-purch_org = 'P000'.
pheader-pur_group = '006'.
pheader-our_ref = 'AMBER B'.
pheaderx-comp_code = 'X'.
pheaderx-doc_type = 'X'.
pheaderx-vendor = 'X'.
pheaderx-purch_org = 'X'.
pheaderx-pur_group = 'X'.
pheaderx-our_ref = 'X'.
CLEAR lv_nvendor.
ENDFORM. " pheaderdata
&----
*& Form pitemdata
&----
text
----
--> p1 text
<-- p2 text
----
FORM pitemdata.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = lv_poitem
IMPORTING
output = lv_npoitem.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = lv_aaord
IMPORTING
output = lv_naaord.
pitem-po_item = lv_npoitem.
pitem-short_text = gs_zcoop1-prdct.
pitem-matl_group = '200200001'.
pitem-quantity = gs_zcoop1-iamount. "'11000.000'.
pitem-po_unit = 'EA'.
pitem-net_price = '1.00'.
pitem-acctasscat = 'F'.
pitem-plant = 'SOAH'.
pitemx-po_item = lv_npoitem.
pitemx-po_itemx = 'X'.
pitemx-short_text = 'X'.
pitemx-matl_group = 'X'.
pitemx-quantity = 'X'.
pitemx-po_unit = 'X'.
pitemx-net_price = 'X'.
pitemx-acctasscat = 'X'.
pitemx-plant = 'X'.
APPEND pitem.
APPEND pitemx.
*Fill schedule lines
plt_schedules_in-po_item = lv_npoitem.
plt_schedules_in-sched_line = '0001'.
plt_schedules_in-delivery_date = sy-datum. "'03/20/2008'.
plt_schedules_in-quantity = gs_zcoop1-iamount. "'11000.00'.
APPEND plt_schedules_in.
*Fill schedule line flags
plt_schedules_inx-po_item = lv_npoitem.
plt_schedules_inx-sched_line = '0001'.
plt_schedules_inx-delivery_date = 'X'.
plt_schedules_inx-quantity = 'X'.
APPEND plt_schedules_inx.
poaccount-po_item = lv_npoitem.
poaccount-gl_account = '0000603000'.
poaccount-orderid = lv_naaord.
poaccountx-po_item = lv_npoitem.
poaccountx-po_itemx = 'X'.
poaccountx-gl_account = 'X'.
poaccountx-orderid = 'X'.
APPEND poaccount.
APPEND poaccountx.
potextheader-po_item = lv_npoitem.
potextheader-text_line = gs_zcoop1-reason.
APPEND potextheader.
potextitem-po_item = lv_npoitem.
potextitem-text_line = 'Item Text'.
APPEND potextitem.
ENDFORM. " pheaderdata
Thanks,
Veni.