Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2878

SE 518: 'No account assignment exists for service line '0000000000' While Trying to create a Service PO Using BAPI_PO_CREATE1

$
0
0

Hi Experts ,

Pls., help me out as I'm unable to create Service PO using the BAPI_PO_CREATE1. It always gives me above error. The data what I'm passing to BAPI is as below:-


CALL FUNCTION 'BAPI_PO_CREATE1'
     EXPORTING
       poheader         = wa_poheader
       poheaderx        = wa_poheaderx
       no_price_from_po = 'X'
     IMPORTING
       exppurchaseorder = gv_ebeln
     TABLES
       return           = it_bapi_ret
       poitem           = it_bapipo_item
       poitemx          = it_bapipox_item
       poschedule       = it_poschedule
       poschedulex      = it_poschedulex
       poaccount        = it_poaccount
       poaccountx       = it_poaccountx
       POSERVICES       = it_POSERVICES
       POSRVACCESSVALUES = IT_POSRVACCESSVALUES
       POLIMITS          = IT_POLIMITS.

Tables are populated with data as below :-

*&-------- POHEADER------------------------------------------------------

        wa_poheader-comp_code  = v_bukrs.
       wa_poheader-doc_type    = 'ZSER'.
       wa_poheader-creat_date  = v_pchq_date.
       wa_poheader-created_by  = sy-uname.
       wa_poheader-vendor        = v_bk_cd.
       wa_poheader-pmnttrms   = wa_lfm1-zterm.
       wa_poheader-purch_org  = wa_t024w-ekorg.
       wa_poheader-pur_group  = 'BRK'.
       wa_poheader-currency    = wa_lfm1-waers.
       wa_poheader-incoterms1 = wa_lfm1-inco1.
       wa_poheader-incoterms2 = wa_lfm1-inco2.
       wa_poheader-VPER_START = v_pchq_date.
       wa_poheader-VPER_END = v_pchq_date + 7.

         wa_poheaderx-comp_code  = 'X'.
       wa_poheaderx-vendor       = 'X'.
       wa_poheaderx-creat_date = 'X'.
       wa_poheaderx-created_by = 'X'.
       wa_poheaderx-doc_type   = 'X'.
       wa_poheaderx-pmnttrms   = 'X'.
       wa_poheaderx-purch_org  = 'X'.
       wa_poheaderx-pur_group  = 'X'.
       wa_poheaderx-currency    = 'X'.
       wa_poheaderx-incoterms1 = 'X'.
       wa_poheaderx-incoterms2 = 'X'.
       wa_poheaderx-vper_start  = 'X'.
       wa_poheaderx-vper_end    = 'X'.


*-------- POHEADER------------------------------------------------------&


*&----------POITEM-----------------------------------------------------------
  wa_bapipo_item-po_item = '00001'.
   wa_bapipo_item-acctasscat = 'P'.
   wa_bapipo_item-item_cat 'D'.
   wa_bapipo_item-short_text =   s_text.
   wa_bapipo_item-quantity = '1'.
   wa_bapipo_item-po_unit  = 'AU'.
   wa_bapipo_item-pckg_no = '0000000001'.  
   wa_bapipo_item-tax_code = 'SC'.
   wa_bapipo_item-matl_group = 'ADMIN'.
   wa_bapipo_item-plant    = v_werks.

APPEND wa_bapipo_item TO it_bapipo_item.

   wa_bapipox_item-po_item    ='00001'.
   wa_bapipox_item-po_itemx   = 'X'.
   wa_bapipox_item-acctasscat = 'X'.
   wa_bapipox_item-item_cat   = 'X'.
   wa_bapipox_item-short_text = 'X'.
   wa_bapipox_item-quantity   = 'X'.
   wa_bapipox_item-po_unit    = 'X'.
   wa_bapipox_item-pckg_no    = 'X'.
   wa_bapipox_item-tax_code   = 'X'.
   wa_bapipox_item-matl_group = 'X'.
   wa_bapipox_item-plant  = 'X'.
APPEND wa_bapipox_item TO it_bapipox_item.
*----------POITEM-----------------------------------------------------------&
*&-------------------------POACCOUNT------------------------
  it_poaccount-po_item    '00001'.
   it_poaccount-serial_no  = '01'.
   it_poaccount-quantity   = '1'.
   it_poaccount-gl_account = '426010'.
   it_poaccount-wbs_element = 'VILCE-1415-RB08-1'.
   it_poaccount-co_area     = 'VGCA'.
   it_poaccount-bus_area = '1001'.
   it_poaccount-final_ind = ' '.
   APPEND it_poaccount.

   it_poaccountx-po_item  '00001'.
   it_poaccountx-serial_no  = '01'.
   it_poaccountx-po_itemx = 'X'.
   it_poaccountx-serial_nox  = 'X'.
   it_poaccountx-quantity = 'X'.
   it_poaccountx-gl_account = 'X'.
   it_poaccountx-wbs_element = 'X'.
   it_poaccountx-co_area   = 'X'.
   it_poaccountx-bus_area = 'X'.
   it_poaccountx-final_ind = 'X'.

   APPEND it_poaccountx.
*&-------------------------POACCOUNT------------------------
   it_poschedule-po_item        '00001'.
   it_poschedule-sched_line     = '001'.
   it_poschedule-del_datcat_ext = 'C'.
   it_poschedule-delivery_date  = v_pchq_date.
   it_poschedule-stat_date      = v_pchq_date.
   it_poschedule-quantity       = '1'.
   APPEND it_poschedule.
   it_poschedulex-po_item        '00001'.
   it_poschedulex-sched_line     = '001'.
   it_poschedulex-po_itemx       = 'X'.
   it_poschedulex-sched_linex    = 'X'.
   it_poschedulex-del_datcat_ext = 'X'.
   it_poschedulex-delivery_date  = 'X'.
   it_poschedulex-stat_date      = 'X'.
   it_poschedulex-quantity       = 'X'.
   APPEND it_poschedulex.

   it_posrvaccessvalues-pckg_no    = '0000000010'.
   it_posrvaccessvalues-line_no    '0000000001'.
   it_posrvaccessvalues-serno_line = '01'.
   it_posrvaccessvalues-percentage      = '100'.
   it_posrvaccessvalues-serial_no  = '01'.
   it_posrvaccessvalues-net_value = v_brar_amt.
   it_posrvaccessvalues-quantity    = '1'.

   APPEND it_posrvaccessvalues.

   wa_poservices-pckg_no ='0000000010'.
   wa_poservices-line_no '0000000001'.
   wa_poservices-ext_line '0000000000'.
   wa_poservices-subpckg_no = '0000000020'.
   wa_poservices-quantity = '1'.
   wa_poservices-base_uom = 'AU'.
   wa_poservices-price_unit = '1'.
   wa_poservices-gr_price = v_brar_amt.
   wa_poservices-matl_group = 'ADMIN'.
   wa_poservices-short_text = ' LEGAL EXPENSES'.

   APPEND wa_poservices TO it_poservices.
   CLEAR wa_poservices.

   wa_poservices-pckg_no = '0000000020'.
   wa_poservices-line_no = '0000000002'.
   wa_poservices-ext_line '10'.
   wa_poservices-quantity = '1'.
   wa_poservices-base_uom = 'AU'.
   wa_poservices-price_unit = '1'.
   wa_poservices-gr_price = v_brar_amt.
   wa_poservices-short_text = ' LEGAL EXPENSES'.
   wa_poservices-matl_group = 'ADMIN'.
 
APPEND wa_poservices TO it_poservices.
   CLEAR wa_poservices.

   it_polimits-pckg_no '0000000010'.
   it_polimits-limit = v_brar_amt.
   it_polimits-exp_value = v_brar_amt.
   it_polimits-no_frlimit = 'X'.
   APPEND it_polimits.






Viewing all articles
Browse latest Browse all 2878

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>