BAPI_PO_CREATE1, Service line, PREQ_NO

Hi friends,
I use bapi_po_create1 in combination with purchase requesition and service.
Retunrvalue is with Msg: SE 518 - No account assignment exists for service line 0000000010.
Population  is without preq_no and item possible. If I use transaction code ME21N with same population, purchase order will be created.
Thank you in advance for your help and ideas
Here is the population of fields...
po_header-COMP_CODE = '1000' .
po_header-DOC_TYPE = 'NB' .
po_header-ITEM_INTVL = '00010' .
po_header-VENDOR = '0000001101'.
po_header-PMNTTRMS = '0001' .
po_header-PURCH_ORG = '1000' .
po_header-PUR_GROUP = '008' .
po_header-CURRENCY = 'EUR' .
populated same header X-Flags
po_item_-PO_ITEM = '00010' .
po_item_-PLANT = '1000' .
po_item_-QUANTITY = '1.000' .
po_item_-TAX_CODE = 'V0' .
po_item_-item_cat = '9'. "Leist
po_item_-ACCTASSCAT = 'F'.
po_item_-short_text = 'Leistung'.
po_item_-NET_PRICE = '12'.
po_item_-MATL_GROUP = '007'.
po_item_-PCKG_NO = '0100002226'.
po_item_-PREQ_NO =  '0010008985'.
po_item_-PREQ_ITEM = '00010'.
populated same itemx-Flags...
po_sched-PO_ITEM = '00010'.
po_sched-SCHED_LINE = '0001' .
po_sched-DELIVERY_DATE = '20060526'.
with account fields  and account assignment fields (X-Flags)
po_acc-PO_ITEM = '00010' .
po_acc-SERIAL_NO = '01' .
po_acc-QUANTITY = '1' .
po_acc-GL_ACCOUNT = '0000400000' .
po_acc-COSTCENTER = '0000001000' .
po_acc-CO_AREA = '1000' .
Fields of Service:
po_serv-PCKG_NO = '0100002226'.
po_serv-line_no = '0000000001'.
po_serv-OUTL_IND = 'X'.
po_serv-SUBPCKG_NO = '0100002227'.
po_serv-SHORT_TEXT   = 'TEST LEISTUNG'.
po_serv-QUANTITY = '1.000' .
po_serv-BASE_UOM = 'LE'.
po_serv-GR_PRICE   = '1'.
append po_serv to po_services.
second item
po_serv-PCKG_NO = '0100002227'. "'0100002506'.
po_serv-line_no = '0000000002'.
po_serv-EXT_LINE  =  '0000000010'.
po_serv-MATL_GROUP = '007'.
po_serv-OUTL_IND  = ''.
and item to accesvalue:
po_accval-PCKG_NO = '0100002227'.
po_accval-line_no = '0000000002'.
po_accval-serno_line = '01'.
po_accval-SERIAL_NO   = '01'. "Link to account assing
po_accval-PERCENTAGE  = '100'.
po_accval-QUANTITY = '1'.
po_accval-NET_VALUE   = '1'.

Hi,
I am able tio create PO with the following data in combination with PR. Pls check.
PO Header Data:
PO_NUMBER
COMP_CODE                      ZN01
DOC_TYPE                       ZPRC
DELETE_IND
STATUS
CREAT_DATE
CREATED_BY
ITEM_INTVL                     00000
VENDOR
LANGU                          EN
LANGU_ISO
PMNTTRMS
DSCNT1_TO                        0
DSCNT2_TO                        0
DSCNT3_TO                        0
DSCT_PCT1                      0,000
DSCT_PCT2                      0,000
PURCH_ORG                      ZNPR
PUR_GROUP                      ZPG
CURRENCY                       USD
CURRENCY_ISO
EXCH_RATE
EX_RATE_FX
DOC_DATE                       26.06.2006
VPER_START
VPER_END
WARRANTY
QUOTATION
QUOT_DATE
REF_1
SALES_PERS
TELEPHONE
SUPPL_VEND
CUSTOMER
AGREEMENT
GR_MESSAGE
SUPPL_PLNT
INCOTERMS1
INCOTERMS2
COLLECT_NO
DIFF_INV
OUR_REF
LOGSYSTEM
SUBITEMINT                     00000
PO_REL_IND
REL_STATUS
VAT_CNTRY
VAT_CNTRY_ISO
REASON_CANCEL                  00
PO Item Data:
PO_ITEM                        00010
DELETE_IND
SHORT_TEXT                     MATERIAL 1 - XPRO PC
MATERIAL
MATERIAL_EXTERNAL
MATERIAL_GUID
MATERIAL_VERSION
EMATERIAL
EMATERIAL_EXTERNAL
EMATERIAL_GUID
EMATERIAL_VERSION
PLANT                          ZNP1
STGE_LOC
TRACKINGNO
MATL_GROUP                     00706
INFO_REC
VEND_MAT
QUANTITY                                 10,000
PO_UNIT                        EA
PO_UNIT_ISO
ORDERPR_UN
ORDERPR_UN_ISO
CONV_NUM1                          0
CONV_DEN1                          0
NET_PRICE                                         1.000,000000000
PRICE_UNIT                       100
GR_PR_TIME                       0
TAX_CODE
BON_GRP1
QUAL_INSP
INFO_UPD
PRNT_PRICE
EST_PRICE
REMINDER1                        0
REMINDER2                        0
REMINDER3                        0
OVER_DLV_TOL                   0,0
UNLIMITED_DLV
UNDER_DLV_TOL                  0,0
VAL_TYPE
NO_MORE_GR
FINAL_INV
ITEM_CAT
ACCTASSCAT                     K
DISTRIB
PART_INV
GR_IND                         X
GR_NON_VAL
IR_IND                         X
FREE_ITEM
GR_BASEDIV                     X
ACKN_REQD
ACKNOWL_NO
AGREEMENT
AGMT_ITEM                      00000
SHIPPING
CUSTOMER
COND_GROUP
NO_DISCT
PLAN_DEL                         0
NET_WEIGHT                                0,000
WEIGHTUNIT
WEIGHTUNIT_ISO
TAXJURCODE
CTRL_KEY
CONF_CTRL
REV_LEV
FUND
FUNDS_CTR
CMMT_ITEM
PRICEDATE
PRICE_DATE
GROSS_WT                                  0,000
VOLUME                                    0,000
VOLUMEUNIT
VOLUMEUNIT_ISO
INCOTERMS1
INCOTERMS2
PRE_VENDOR
VEND_PART                      NWV05
HL_ITEM                        00000
GR_TO_DATE
SUPP_VENDOR
SC_VENDOR
KANBAN_IND
ERS
R_PROMO
POINTS                                    0,000
POINT_UNIT
POINT_UNIT_ISO
SEASON
SEASON_YR
BON_GRP2
BON_GRP3
SETT_ITEM
MINREMLIFE                         0
RFQ_NO
RFQ_ITEM                       00000
PREQ_NO                        5000000011
PREQ_ITEM                      00010
REF_DOC
REF_ITEM                       00000
SI_CAT
RET_ITEM
AT_RELEV
ORDER_REASON
BRAS_NBM
MATL_USAGE
MAT_ORIGIN
IN_HOUSE
INDUS????
INF_INDEX
UNTIL_DATE
DELIV_COMPL
SHIP_BLOCKED
PREQ_NAME                      CCMUSR
PERIOD_IND_EXPIRATION_DATE     D
INT_OBJ_NO                     000000000000000000
PCKG_NO                        0000000000
BATCH
VENDRBATCH
CALCTYPE
NO_ROUNDING
PO_PRICE
SRV_BASED_IV
PO Account Data:
PO_ITEM                        00010
SERIAL_NO                      00
DELETE_IND
CREAT_DATE
QUANTITY                                  0,000
DISTR_PERC                      0,0
NET_VALUE                                             0,000000000
GL_ACCOUNT                     400998
BUS_AREA
COSTCENTER                     CC_1
SD_DOC
ITM_NUMBER                     000000
SCHED_LINE                     0000
ASSET_NO
SUB_NUMBER
ORDERID
GR_RCPT
UNLOAD_PT
CO_AREA                        ZN01
COSTOBJECT
PROFIT_CTR
WBS_ELEMENT
NETWORK
RL_EST_KEY
PART_ACCT
CMMT_ITEM
REC_IND
FUNDS_CTR
FUND
FUNC_AREA
REF_DATE
TAX_CODE
TAXJURCODE
NOND_ITAX                                             0,000000000
ACTTYPE
CO_BUSPROC
RES_DOC
RES_ITEM                       000
ACTIVITY

Similar Messages

  • Bapi_po_create1 ,No account assignment exist for service line 0000000000'. for po limits,how to create multiple service items in service po

    hi,
    Hello all, please help!! I used function BAPI_PO_CREATE1 to create PO with limit item but function returned message error '518 No account assignment exist for service line 0000000000'. Can anyone give me an idea to slove this problem?
    i am passing po header, po headerx, po item , po itemx, po account, po accountx, po limits, po services, po service values, to bapi. if i comment package number in po limits structure , po was creating but limits data not updating in po., if i pass package number i am getting above error.
    Thanks In Advance,
    regards

    hi Dinesh,
    am also having same error for bap po create1 . did it get resolved for you? please help its urgently needed for me here

  • BAPI_PO_CREATE1 : missing del indicator on a service line

    Hello gurus,
    I'm facing a problem in the first distribution of a Purchase order (created from a Purchase Requisition) from SRM. The problem occours only if the PO has been created from a PR taken from the sourcing cockpit in SRM and happens only on a specific system/backend.
    The problem is that a service line marked as deleted in SRM is transferred WITHOUT the deletion flag; in other systems I can test on, the outline is correctly transferred with the deletion indicator (ESSL-del = 'X').
    Seemed a problem that could be easily investigated in debug; however, I tried a bit without success by tracing a parallel debug on a "correct" system; I can advice a difference only after a "perform get_current_data", that is to say, last step of the BAPI, when the creation process of the PO has already been done (and just await a commit).
    In order to realize at which point and why the deletion flag on the service line is removed, I tried to investigate the class CL_PO_ITEM_HANDLE_MM; it contains an interface, IF_SERVICES_MM, which offers just three methods: GET_DATA, SET_DATA and GET_SRV_DATA. I expected to find a setter method for service data, but I was wrong.
    The SET_DATA method is used once during BAPI_PO_CREATE1 execution and passes parameters concerning the ITEM position (im_comsrv) and acconting-related data (lt_acc_tab), so I didn't understand where the PO object in the BAPI is updated with service items data. That should be an useful starting point in order to backtrack and solve the problem; I guess that something goes wrong when the PO position is related to the corresponding PR position, but no idea about how to identify that point on the code.
    Any clue or suggestion will be highly appreciated
    ps: obviously, data passed at BAPI_PO_CREATE1 are identical for both the "OK" system and the "KO" one. Tried also to analize the stack trace by using SE30, but the call sequences are really complex and not easy to compare. A nice-to-have feature could be to track the entire code executed, row by row, on each system, but I guess it's a task impossible to manage.
    Edited by: Matteo Montalto on Jun 17, 2010 4:31 PM

    you can either share your code and your source file to have the people check if the error is on your part or you can directly contact SAP if you are the opinion that it is an error in their BAPI code.
    But without looking at code and source file it is not possible to do any evaluation except you are looking for clairvoyants

  • BAPI_PO_CREATE1 for Multiple service line items

    Hi Exports,
    I am using BAPI_PO_CREATE1 to create service PO. I am facing problem when each line item(ebelp) has multiple service line items. I am unable to map multiple service line items to a single line item (ebelp) properly.
    Can anyone help.
    Regards,
    Kiran

    Hi ,
    I am able to create service PO when only one service line item is there.
    If multiple service line items are there. then i have to put the below code with in the loop.
    here i am facing the probelm.
            w_poservices-pckg_no    = g_pckg.
            w_poservices-line_no    = g_pckg.
            w_poservices-outl_ind   = c_x.
            w_poservices-subpckg_no = g_pckg + 1.
            w_poservices-service    = w_sdata-srvpos.
         w_poservices-short_text = w_idata-ktext1.
         w_poservices-quantity   = w_idata-menge.
         w_poservices-base_uom   = w_idata-meins.
         w_poservices-gr_price   = w_idata-tbtwr.
         w_poservices-matl_group = w_idata-matkl.
            APPEND w_poservices TO i_poservices.
            CLEAR: w_poservices.
            w_poservices-pckg_no    = g_pckg + 1.
            w_poservices-line_no    = g_pckg + 1.
            w_poservices-ext_line   = 0000000010.
            w_poservices-outl_ind   = c_x.
         w_poservices-subpckg_no = g_pckg + 2.
            w_poservices-service    = w_sdata-srvpos.
            w_poservices-short_text = w_sdata-ktext1.
            w_poservices-quantity   = w_sdata-menge.
            w_poservices-base_uom   = w_sdata-meins.
            w_poservices-gr_price   = w_sdata-tbtwr.
            w_poservices-matl_group = w_idata-matkl.
            APPEND w_poservices TO i_poservices.
            CLEAR: w_poservices.
            w_posrvaccessvalues-pckg_no    = g_pckg + 1.
            w_posrvaccessvalues-line_no    = g_pckg + 1.
            w_posrvaccessvalues-serno_line = 01.
            w_posrvaccessvalues-serial_no  = 01.
            w_posrvaccessvalues-quantity   = w_idata-menge.
            APPEND w_posrvaccessvalues TO i_posrvaccessvalues.
    thank you.
    Regards,
    Kiran

  • BAPI_PO_CREATE1-No account assignment exists for service line 0000000000

    Hi guys
    I'm trying to use the above BAPI to create purchase orders from legacy system. I have populated ALL of the required tables (including the Xs) but I was returned the above error: No account assignment exists for service line 0000000000.
    I have populated fields in the POLIMITS structure 
    POLIMITS-PCKG_NO
    POLIMITS-LIMIT
    POLIMITS-EXP_VALUE.
    Any solutions?
    Thanks in advance.
    Cheers!

    hi Dinesh,
    am also having same error for bap po create1 . did it get resolved for you? please help its urgently needed for me here

  • BAPI Error: No account assignment exists for service line 0000000000

    I am using BAPI : BAPI_PO_CREATE1 to create a PO.
    I am getting this error while creating PO  "No account assignment exists for service line 0000000000"
    Please help.

    Yes...
    for each item i am creating one parent service record and one child service record with REQUISITION_SERVICES.
    the Package no for parent is the subpackage no for child.
    also for each item, I fill REQUISITION_ACCOUNT_ASSIGNMENT and REQUISITION_SRV_ACCASS_VALUES
    Still I get the Error.
    Thanks to help me resolve.

  • BAPI_REQUISITION_CREATE: Err-No account assignment exists for service line

    Hi Frnds,
    I am using bapi BAPI_REQUISITION_CREATE to create PR with mutiple Service line.
    I am getting an error message SE518 - No account assignment exists for service line 0000000000.
    Can anyone of you help me out to solve this issue?
    Thanks in advance
    Suganya

    HI
    I need to create pucharse-requisition for services with account assignment K.
    execute BAPI_REQUISITION_CREATE with an item with a service and work well.
    When I prove with two items each one with its service gives east error me
    "E518, No account assignment exists for service line 0000000010"
    my source is:
    REPORT Z_WGS_BAPI_REQUISIT_CREATE_002
                                      NO STANDARD PAGE HEADING LINE-SIZE 180
                          START-OF-SLECTION                              *
    DATA:
    W_NUMBER             LIKE  BAPIEBANC-PREQ_NO,
    W_REQUISITION_ITEMS LIKE BAPIEBANC           OCCURS 0 WITH HEADER LINE,
    W_REQUISITION_ACCOUNT LIKE BAPIEBKN          OCCURS 0 WITH HEADER LINE,
    W_REQUISITION_SERVICES LIKE BAPIESLLC        OCCURS 0 WITH HEADER LINE,
    W_REQUISITION_SRV_VALUES LIKE BAPIESKLC      OCCURS 0 WITH HEADER LINE,
    W_RETURN             LIKE BAPIRETURN         OCCURS 0 WITH HEADER LINE,
    W_RETURN1            LIKE  BAPIRET2          OCCURS 0 WITH HEADER LINE.
    START-OF-SELECTION.
    perform item_10.
    perform item_20.
    perform bapi.
    form item_10.
    **Item 10
    W_REQUISITION_ITEMS-DOC_TYPE = 'NB'.
    W_REQUISITION_ITEMS-PREQ_ITEM = '00010'.
    W_REQUISITION_ITEMS-ACCTASSCAT = 'K'.
    W_REQUISITION_ITEMS-ITEM_CAT = '9'.
    W_REQUISITION_ITEMS-PUR_GROUP = 306.
    W_REQUISITION_ITEMS-PURCH_ORG = '9000'.
    W_REQUISITION_ITEMS-PLANT    = 'CO95'.
    W_REQUISITION_ITEMS-PREQ_NAME = 'EORTIZ'.
    W_REQUISITION_ITEMS-DELIV_DATE = SY-DATUM.
    W_REQUISITION_ITEMS-SHORT_TEXT = 'Servicio 1'.
    W_REQUISITION_ITEMS-MAT_GRP = 'SER-0005'.
    W_REQUISITION_ITEMS-QUANTITY = '1.000'.
    W_REQUISITION_ITEMS-PCKG_NO = '0000000001'.
    W_REQUISITION_ITEMS-GR_IND = 'X'.
    W_REQUISITION_ITEMS-IR_IND = 'X'.
    W_REQUISITION_ITEMS-FIXED_VEND = space.
    W_REQUISITION_ITEMS-INFO_REC = space.
    APPEND W_REQUISITION_ITEMS. CLEAR W_REQUISITION_ITEMS.
    W_REQUISITION_ACCOUNT-PREQ_ITEM = '00010'.
    W_REQUISITION_ACCOUNT-SERIAL_NO = '01'.
    W_REQUISITION_ACCOUNT-COST_CTR = '0001010106'.
    W_REQUISITION_ACCOUNT-G_L_ACCT = '0063010001'.
    APPEND W_REQUISITION_ACCOUNT. CLEAR W_REQUISITION_ACCOUNT.
    W_REQUISITION_SERVICES-PCKG_NO     =  '0000000001'.
    W_REQUISITION_SERVICES-LINE_NO     =  '0000000001'.
    W_REQUISITION_SERVICES-EXT_LINE    =  '0000000000'.
    W_REQUISITION_SERVICES-SUBPCKG_NO  =  '0000000002'.
    W_REQUISITION_SERVICES-FROM_LINE   =  '1'.
    W_REQUISITION_SERVICES-PLN_LINE   =  '0000000001'.
    APPEND W_REQUISITION_SERVICES. CLEAR W_REQUISITION_SERVICES.
    W_REQUISITION_SERVICES-PCKG_NO     =  '0000000002'.
    W_REQUISITION_SERVICES-LINE_NO     =  '0000000002'.
    W_REQUISITION_SERVICES-EXT_LINE    =  '0000000010'.
    W_REQUISITION_SERVICES-SUBPCKG_NO  =  '0000000000'.
    W_REQUISITION_SERVICES-SERVICE    =  '000000000003000001'.
    W_REQUISITION_SERVICES-QUANTITY   =  '5.000'.
    W_REQUISITION_SERVICES-BASE_UOM   =  'UN'.
    W_REQUISITION_SERVICES-GR_PRICE   =  '150.0000'.
    APPEND W_REQUISITION_SERVICES. CLEAR W_REQUISITION_SERVICES.
    W_REQUISITION_SRV_VALUES-PCKG_NO    =  '0000000002'.
    W_REQUISITION_SRV_VALUES-LINE_NO    =  '0000000002'.
    W_REQUISITION_SRV_VALUES-SERNO_LINE = '01'.
    W_REQUISITION_SRV_VALUES-SERIAL_NO  =  '01'.
    W_REQUISITION_SRV_VALUES-PERCENTAGE  = '100.0'.
    APPEND W_REQUISITION_SRV_VALUES. CLEAR W_REQUISITION_SRV_VALUES.
    endform.
    form item_20.
    item 20
    W_REQUISITION_ITEMS-DOC_TYPE =   'NB'.
    W_REQUISITION_ITEMS-PREQ_ITEM = '00020'.
    W_REQUISITION_ITEMS-ACCTASSCAT = 'K'.
    W_REQUISITION_ITEMS-ITEM_CAT = '9'.
    W_REQUISITION_ITEMS-PUR_GROUP = '306'.
    W_REQUISITION_ITEMS-PURCH_ORG = '9000'.
    W_REQUISITION_ITEMS-PLANT    = 'CO95'.
    W_REQUISITION_ITEMS-PREQ_NAME = 'EORTIZ'.
    W_REQUISITION_ITEMS-DELIV_DATE = SY-DATUM.
    W_REQUISITION_ITEMS-SHORT_TEXT = 'Servicio 2'.
    W_REQUISITION_ITEMS-MAT_GRP = 'SER-0005'.
    W_REQUISITION_ITEMS-QUANTITY = '1.000'.
    W_REQUISITION_ITEMS-PCKG_NO = '0000000003'.
    W_REQUISITION_ITEMS-GR_IND = 'X'.
    W_REQUISITION_ITEMS-IR_IND = 'X'.
    W_REQUISITION_ITEMS-FIXED_VEND = space.
    W_REQUISITION_ITEMS-INFO_REC = space.
    APPEND W_REQUISITION_ITEMS. CLEAR W_REQUISITION_ITEMS.
    W_REQUISITION_ACCOUNT-PREQ_ITEM = '00020'.
    W_REQUISITION_ACCOUNT-SERIAL_NO = '01'.
    W_REQUISITION_ACCOUNT-COST_CTR = '0001010106'.
    W_REQUISITION_ACCOUNT-G_L_ACCT = '0063010001'.
    APPEND W_REQUISITION_ACCOUNT. CLEAR W_REQUISITION_ACCOUNT.
    W_REQUISITION_SERVICES-PCKG_NO     =  '0000000003'.
    W_REQUISITION_SERVICES-LINE_NO     =  '0000000003'.
    W_REQUISITION_SERVICES-EXT_LINE    =  '0000000000'.
    W_REQUISITION_SERVICES-SUBPCKG_NO  =  '0000000004'.
    W_REQUISITION_SERVICES-FROM_LINE   =  '1'.
    APPEND W_REQUISITION_SERVICES. CLEAR W_REQUISITION_SERVICES.
    W_REQUISITION_SERVICES-PCKG_NO     =  '0000000004'.
    W_REQUISITION_SERVICES-LINE_NO     =  '0000000004'.
    W_REQUISITION_SERVICES-EXT_LINE    =  '0000000010'.
    W_REQUISITION_SERVICES-SUBPCKG_NO  =  '0000000000'.
    W_REQUISITION_SERVICES-SERVICE    =  '000000000003000002'.
    W_REQUISITION_SERVICES-QUANTITY   =  '10.000'.
    W_REQUISITION_SERVICES-BASE_UOM   =  'UN'.
    W_REQUISITION_SERVICES-GR_PRICE   =  '90.0000'.
    APPEND W_REQUISITION_SERVICES. CLEAR W_REQUISITION_SERVICES.
    W_REQUISITION_SRV_VALUES-PCKG_NO    =  '0000000004'.
    W_REQUISITION_SRV_VALUES-LINE_NO    =  '0000000004'.
    W_REQUISITION_SRV_VALUES-SERNO_LINE = '01'.
    W_REQUISITION_SRV_VALUES-SERIAL_NO  =  '01'.
    W_REQUISITION_SRV_VALUES-PERCENTAGE  = '100.0'.
    APPEND W_REQUISITION_SRV_VALUES. CLEAR W_REQUISITION_SRV_VALUES.
    endform.
    form bapi.
    BAPI
      CALL FUNCTION 'BAPI_REQUISITION_CREATE'
      EXPORTING
        SKIP_ITEMS_WITH_ERROR          =
       AUTOMATIC_SOURCE                = 'X'
        IMPORTING
          NUMBER                         = W_NUMBER
        TABLES
          REQUISITION_ITEMS              = W_REQUISITION_ITEMS
          REQUISITION_ACCOUNT_ASSIGNMENT = W_REQUISITION_ACCOUNT
        REQUISITION_ITEM_TEXT          =
        REQUISITION_LIMITS             =
        REQUISITION_CONTRACT_LIMITS    =
          REQUISITION_SERVICES           = W_REQUISITION_SERVICES
          REQUISITION_SRV_ACCASS_VALUES  = W_REQUISITION_SRV_VALUES
          RETURN                         = W_RETURN.
        REQUISITION_SERVICES_TEXT      =
        REQUISITION_ADDRDELIVERY       =
        EXTENSIONIN                    =
    ejecuta commit
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          WAIT   = 'X'
        IMPORTING
          RETURN = W_RETURN1.
      LOOP AT  W_RETURN.          .
        WRITE: / SY-TABIX,
        / 'W_RETURN-TYPE:', W_RETURN-TYPE,
        / 'W_RETURN-CODE:', W_RETURN-CODE,
        / 'W_RETURN-MESSAGE:', W_RETURN-MESSAGE,
        / 'W_RETURN-LOG_NO:', W_RETURN-LOG_NO,
        / 'W_RETURN-LOG_MSG_NO:', W_RETURN-LOG_MSG_NO,
        / 'W_RETURN-MESSAGE_V1:', W_RETURN-MESSAGE_V1,
        / 'W_RETURN-MESSAGE_V2:', W_RETURN-MESSAGE_V2,
        / 'W_RETURN-MESSAGE_V3:', W_RETURN-MESSAGE_V3,
        / 'W_RETURN-MESSAGE_V4:', W_RETURN-MESSAGE_V4.
        ULINE.
      ENDLOOP.
    endform.

  • Error whil creating Service Line item in ME51N using BAPI_PR_CREATE

    Hi Experts,
                Am able to create PR number using BAPI_PR_CREATE, but when am trying to create Service line item am getting acc assignment error please check my code and solve my issue. ..its very adj  please help me .
    DATA : t_bapimereqitemimp TYPE TABLE OF bapimereqitemimp ,
          t_bapimereqaccount TYPE TABLE OF bapimereqaccount,
          t_bapimereqaccountx TYPE TABLE OF bapimereqaccountx,
          t_pritemx    TYPE TABLE OF bapimereqitemx,
          wa_bapimereqitemimp        TYPE bapimereqitemimp,
          pr_number  TYPE bapimereqheader-preq_no,
          wa_prheader  TYPE   bapimereqheader,
          wa_prheaderx TYPE  bapimereqheaderx,
          wa_pritemx   TYPE  bapimereqitemx,
          wa_bapimereqaccountx TYPE bapimereqaccountx,
          wa_bapimereqaccount TYPE bapimereqaccount,
          t_return     TYPE TABLE OF bapiret2,
          wa_return    TYPE bapiret2.
    DATA : t_bapi_srv_limit_data TYPE TABLE OF bapi_srv_limit_data,
            wa_bapi_srv_limit_data TYPE bapi_srv_limit_data.
    DATA servicelimitx  TYPE TABLE OF bapi_srv_limit_datax.
    DATA w_servicelimitx  TYPE bapi_srv_limit_datax.
    DATA : t_servicelines TYPE TABLE OF bapi_srv_service_line,
            w_servicelines TYPE bapi_srv_service_line,
            t_servicelinesx TYPE TABLE OF bapi_srv_service_linex,
            w_servicelinesx TYPE bapi_srv_service_linex,
            t_bapi_srv_acc_data TYPE TABLE OF bapi_srv_acc_data,
            w_bapi_srv_acc_data TYPE bapi_srv_acc_data,
            t_bapi_srv_acc_datax TYPE TABLE OF bapi_srv_acc_datax,
            w_bapi_srv_acc_datax TYPE bapi_srv_acc_datax.
    DATA : t_bapimereqitem TYPE TABLE OF bapimereqitem,
            w_bapimereqitem TYPE bapimereqitem.
    DATA :  t_bapimereqitemx TYPE TABLE OF bapimereqitemx,
            w_bapimereqitemx TYPE bapimereqitemx.
    wa_prheader-pr_type  = 'RV'."lv_doc_type.
    wa_prheaderx-pr_type = 'X'.
    wa_bapimereqitemimp-preq_item  = '1'."wa_eban-item.
    wa_bapimereqitemimp-pur_group  = '100'."wa_eban-ekgrp.
    wa_bapimereqitemimp-preq_name  = 'E.R. TITTO'."wa_eban-afnam.
    wa_bapimereqitemimp-short_text = 'AC Fitting'."wa_eban-txz01.
    wa_bapimereqitemimp-material   = ' '."wa_eban-matnr.
    wa_bapimereqitemimp-plant      = '1000'."wa_eban-werks.
    wa_bapimereqitemimp-store_loc  = 'ST00'."wa_eban-lgort.
    wa_bapimereqitemimp-matl_group = 'Z13'."wa_eban-matkl.
    wa_bapimereqitemimp-quantity   = '1'."wa_eban-menge.
    wa_bapimereqitemimp-unit       = 'AU'."wa_eban-meins.
    wa_bapimereqitemimp-deliv_date =  '20140604'."wa_eban-lfdat.
    wa_bapimereqitemimp-preq_price = '100'."wa_eban-preis.
    wa_bapimereqitemimp-item_cat   = 'D'."wa_eban-pstyp.
    wa_bapimereqitemimp-acctasscat =  'K'."wa_eban-knttp.
    wa_bapimereqitemimp-fixed_vend = ' '."wa_eban-flief.
    wa_bapimereqitemimp-purch_org  = '1000'."wa_eban-ekorg.
    wa_bapimereqitemimp-currency   = 'INR'."wa_eban-waers.
    wa_bapimereqitemimp-pckg_no = '00000001'.
    wa_bapimereqaccount-preq_item  = '1'."wa_eban-item.
    *wa_bapimereqaccount-serial_no  = '01'.
    wa_bapimereqaccount-gl_account = '0000002244'."wa_eban-sakto.
    wa_bapimereqaccount-costcenter = 'OPSD'."wa_eban-kostl.
    APPEND wa_bapimereqitemimp TO t_bapimereqitemimp.
    APPEND wa_bapimereqaccount TO t_bapimereqaccount.
    wa_pritemx-preq_item  = '1'."wa_eban-item.
    wa_pritemx-pur_group  = 'X'.
    wa_pritemx-preq_name  = 'X'.
    wa_pritemx-short_text = 'X'.
    wa_pritemx-material   = 'X'.
    wa_pritemx-plant      = 'X'.
    wa_pritemx-store_loc  = 'X'.
    wa_pritemx-matl_group = 'X'.
    wa_pritemx-quantity   = 'X'.
    wa_pritemx-unit       = 'X'.
    wa_pritemx-deliv_date = 'X'.
    wa_pritemx-preq_price = 'X'.
    wa_pritemx-item_cat   = 'X'.
    wa_pritemx-acctasscat = 'X'.
    wa_pritemx-fixed_vend = 'X'.
    wa_pritemx-purch_org  = 'X'.
    wa_pritemx-currency   = 'X'.
    wa_pritemx-pckg_no   = 'X'.
    wa_bapimereqaccountx-preq_item  = '1'."wa_eban-item.
    *wa_bapimereqaccountx-serial_no  = '01'.
    wa_bapimereqaccountx-preq_itemx = 'X'.
    wa_bapimereqaccountx-serial_nox = 'X'.
    wa_bapimereqaccountx-gl_account = 'X'.
    wa_bapimereqaccountx-costcenter = 'X'.
    APPEND wa_pritemx TO t_pritemx.
    APPEND wa_bapimereqaccountx TO t_bapimereqaccountx.
    **Service item limit
    *wa_bapi_srv_limit_data-doc_item = '10'.
    wa_bapi_srv_limit_data-overall_limit = '1000'.
    wa_bapi_srv_limit_data-exp_value = '800'.
    APPEND wa_bapi_srv_limit_data TO  t_bapi_srv_limit_data.
    *w_servicelimitx-doc_item = '10'.
    w_servicelimitx-overall_limit = 'X'.
    w_servicelimitx-exp_value = 'X'.
    APPEND w_servicelimitx TO servicelimitx.
    w_bapimereqitem-preq_item = '10'.
    ***w_bapimereqitem-preq_name = 'E.R. TITTO'.
    ***w_bapimereqitem-plant = '1000'.
    ***w_bapimereqitem-store_loc = 'ST00'.
    ***w_bapimereqitem-matl_group = 'Z03'.
    ***w_bapimereqitem-quantity = '1'.
    ***w_bapimereqitem-unit = 'AU'.
    w_bapimereqitem-item_cat = 'D'.
    w_bapimereqitem-deliv_time = '20140604'.
    w_bapimereqitem-acctasscat = 'K'.
    **w_bapimereqitem-consumpt = 'U'.
    APPEND w_bapimereqitem TO t_bapimereqitem.
    **w_bapi_srv_acc_data-doc_item = '1'.
    **w_bapi_srv_acc_data-outline = '0000000001'.
    *w_bapi_srv_acc_data-srv_line = '20'.
    w_bapi_srv_acc_data-serial_no = '10'.
    w_bapi_srv_acc_data-serial_no_item = 'D'.
    *w_bapi_srv_acc_data-quantity = '1'.
    *APPEND w_bapi_srv_acc_data TO t_bapi_srv_acc_data.
    **w_bapi_srv_acc_datax-doc_item = '1'.
    **w_bapi_srv_acc_datax-outline = '0000000001'.
    *w_bapi_srv_acc_datax-srv_line = '20'.
    **w_bapi_srv_acc_datax-serial_no = '01'.
    **w_bapi_srv_acc_datax-serial_no_item = '01'.
    *w_bapi_srv_acc_datax-quantity = '1'.
    *APPEND w_bapi_srv_acc_datax TO t_bapi_srv_acc_datax.
    w_servicelines-service = '00000001'.
    APPEND w_servicelines TO t_servicelines.
    w_servicelinesx-service = 'X'.
    APPEND w_servicelinesx TO t_servicelinesx.
    CALL FUNCTION 'BAPI_PR_CREATE'
       EXPORTING
         prheader        = wa_prheader
         prheaderx       = wa_prheaderx
       IMPORTING
         number          = pr_number
       TABLES
         return          = t_return
         pritem          = t_bapimereqitemimp
         pritemx         = t_pritemx
         pritemexp       = t_bapimereqitem
         praccount       = t_bapimereqaccount
         praccountx      = t_bapimereqaccountx
         servicelimit    = t_bapi_srv_limit_data
         servicelimitx   = servicelimitx
         servicelines    = t_servicelines
         servicelinesx   = t_servicelinesx
         serviceaccount  = t_bapi_srv_acc_data
         serviceaccountx = t_bapi_srv_acc_datax.

    Hi,
    Check this Thread , Thread1 . It might help you to resolve the issue.
    Thanks
    KH

  • Service PO - Multiple account assignments for service line items

    Hi All,
    I'm trying to create a service purchase order using BAPI 'BAPI_PO_CREATE1'.
    But i need to create service line items with multiple account assignments say
    For line item 10 -
    1)Service line 1 -Cost center 'XYZ'.
    2)Service line 2 -Cost center 'ABC'.
    In POACCOUNT there is no option to specify the service line item .
    Moreover in POSERVICES also there is no option to mention costcenter.
    How can i create the same...
    Thanks in advance
    Regards
    Prasanthi

    Dear Prithviraj,
    CAPEX (Category 'A'), can it apply to OPEX/Blanket and Sm. Proj?
    I know create multiple account assigment under ME51N/ME52N.
    Any solution by using FM (BAPI_REQUISITION_CREATE and  BAPI_REQUISITION_CHANGE)?
    thanks
    Regards,
    Weng

  • Issue with service line purchase orders.

    Hi Experts,
        We have recently upgraded to following pack levels -
    System                                 Pack level
    ECC 6.0          17, EHP4 Stack 7
    SRM 5.0          17
    There is an issue around purchase order change. If an existing PO is edited and a new line is added to the PO it appears fine in SRM system. But on replicating to backend, we see that the newly added line has been duplicated i.e. appears twice thereby reflecting incorrect value.
    This is happening for Service line items. Has anyone had similar issue at their end ? I tried to search SAP Notes but found nothing relevant to our issue.
    Any pointers / suggestions would be much appreciated.
    Thanks
    RB

    Hi
    Before going to SAP, Check the data being passed to ECC from SRM. Activate the BAPI_PO_CREATE1 for creating data in test directory instead of posting the documnet. then check the data in BAPI Segments, if the data is proper there then there is some problem in ECC 6 ehp 4 which need to be highlighted to SAP, otherwise its a problem in sending the data from SRM to ECC.
    OSS Note for creating test data is - Note 539978 - Automatic generation of BAPI test data directory
    Regards
    Virender Singh

  • Issue with PO change output - Service line items

    Hi All,
    This is issue with PO change output. We have PO with line item 10, 20 and item 10 has 4 service line items. PO is approved and initial print out is taken.
    Some one goes and makes changes to 1st service line items of PO line item 10.
    A change output gets triggered. When this output is printed, it prints line item 10 details. This is standard functionality as this item is changed. But its printing all the service line items for this PO line item. Consider a case where there are 3000 service lines for a PO item. If I add 1 service item to this PO line item, the change form prints 3001 services for that line item. There were no changes done to first 3000 service line items.
    Currently PO change form takes care of changes at PO line item but it does not take care of changes at service line item level.
    Is there any setting that needs to be done for this so that it only considers the changes at Service line item level also.
    Regards,
    Shahu

    If you're using a standard form, send a message to SAP. Otherwise make a change in the form.

  • How to create 'Planned service line' using BAPI_ENTRYSHEET_CREATE? Pl. help

    I need to create service entry sheet ( SES ) using input data from text file through BAPI_ENTRYSHEET_CREATE.
    If the input contains service line items, which are not present in PO, it should be treated as an unplanned service and correspondingly 'unplanned' indicator is to be set on ML81N ( Service netry sheet ) display.
    I want to make an entry unplanned if the input field external no. ( Field: BAPIESLLC-EXT_LINE ) is not matching with external no. field of corresponding purchase order to which the SES refers.
    The BAPI works fine for all cases except one. If the unplanned service line contains field SERVICE_NO value which is matching with a SERVICE_NO in PO, it is invariable treated by BAPI as  'PLANNED'. ie. BAPI decides whenther a service line is planned or unplanned based on SERVICE_NO only.
    For eg. Let a PO contains one service line with SERVICE_NO value 1008505.
                If SES input file contains 2 service entries with SERVICE_NO value 1008505.
                While creating SES, the BAPI should treat first entry as 'planned' and second line as 'unplanned'.
                But while running the program, both lines are created as 'Planned'  only, since SERVICE_NO value 1008505 exists in the PO.
    I need to set the service line planned/unplanned through my prgram, overriding the automatic setting up of BAPI_ENTRYSHEET_CREATE.
    Hope this clarifies my requirement.
    Grateful if somebody cam provide a solution.
    Thanks & Regards,
    Manju

    Do NOT USE BAPI_SALESORDER_CREATEFROMDATA, that FM is obsolete!
    Use BAPI_SALESORDER_CREATEFROMDAT1 .
    To build a reference to your contract you have to supply ORDER_HEADER_IN.
    Here´s a sample:
    MOVE:
    gs_vbak-vbeln TO ls_bapisdhd1-refobjkey,
    gs_vbak-vbeln TO ls_bapisdhd1-ref_doc,
    gs_vbak-vbtyp TO ls_bapisdhd1-refdoc_cat,
    gs_vbak-auart TO ls_bapisdhd1-refdoctype.
    also gothrouh the links
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/abap%2b-%2bsimple%2bprogram%2bto%2bcreate%2bsales%2border%2busing%2bbapi

  • Subcontracting: Picking Relevancy of service Line Item in Inbound Delivery

    Hi experts
    I have a challenge. There is a Subcontracting PO having 2 line items, 1st one is Trading product which is the physical finished product & 2nd line item is service line item( service material type). So Can we create a Inbound Delivery wrt PO having Service Line item to do receipt?
    I tried creating Inbound but failed, error is : material ( service line item) is not extended to Warehouse. But my requirement is: it shouldnu2019t be extended to WM views so that it only appears in Inbound delivery as line item & it should not be relevant for Picking.
    Any idea how can we do this?
    Rgds
    Ram

    Hi
    No delivery is possible for item catageory D or material type ( DIEN)
    Edited by: Sanjay  Shah on Sep 20, 2010 3:50 PM

  • Picking Relevancy of Service Line item in Inbound- a Challenge

    Hi experts
    I have a challenge. There is a Subcontracting PO having 2 line items, 1st one is Trading product which is the physical finished product & 2nd line item is service line item( service material type). So Can we create a Inbound Delivery wrt PO having Service Line item to do receipt?
    I tried creating Inbound but failed, error is : material ( service line item) is not extended to Warehouse. But my requirement is: it shouldnu2019t be extended to WM views so that it only appears in Inbound delivery as line item & it should not be relevant for Picking.
    Any idea how can we do this?
    Rgds
    Ram

    Hi
    No delivery is possible for item catageory D or material type ( DIEN)
    Edited by: Sanjay  Shah on Sep 20, 2010 3:50 PM

  • Error while editing PO - deleting service line item and creating material line item.

    In SAP SRM Extended classic scenario, PO is in 'ordered' status and contains a service line item. While editing this PO, I delete the service line item and create a new material line item. This gives me the following error.
    Back end error: Enter G/L account
    Back end error: LIne item still contains faulty items.
    This happens only with service- material comibination and no other combination(material-service, service-service, material-material).
    I need to know the reason for this issue and how it can be solved?

    PO Values (Inc Tax):
    Item 1: INR 228 L
    Item 2: INR 27.83 L   (Payment also done in 2008)
    GR for Item 1: INR 207.46 L
    Remaining Comm = INR 21.01 L
    Item 1 having 73 sub line items.... fo some of the sub-line items GR for some qty already done in last fiscals.
    User changing for remaining qty.
    Budget Report values:
    Previous Years:  Budget, Actual & Assigned = 304.85 L
                                Available = 0      (Carry Forward done for Budget & Commitments)
    2011:                   Budget = 75.15 L
                                Actual = 53.86 L
                                Comm = 21.01 L   (Same as Remaining Commitment)
                                Avai = 0.28 L
    Hope this will help.

Maybe you are looking for

  • Can Apple TV work with Multiple TV's?

    Is there a way to hook one Apple TV up to multiple TV's to view video's at the same time? Like have one in the bedroom and one in the living room???

  • Can I replace the audio input connection point on a macbook 1.1?

    Hi, I have a macbook 1.1 and am recording on to it via audacity but it is picking up interference and I think I need to replace the audio input which is causing the problem. Is this something that is possible to do?

  • PO Quantity automatic update

    Hello Experts, I am facing a strange problem of automatic update of PO quantity. As soon as I press enter aftre entering the details in ME21N the PO qnatity changes. I cheked the inforecord for the combination of Vendor and material but there is no s

  • InDesign Plugin question

    Hi All, I was wondering if you or someone is currently looking for a new project. I am looking for a Adobe InDesign Plugin Developer who knows how to write extensions for the desktop publishing applications; Adobe InDesign and Quark. Familiarity with

  • VIMEO share has inexplicable "black holes" (missing video)

    Anyone else have this problem: I just finished a simple project. The project had no abnormal video (no funky formats, I've used this type of footage before, and it was all optimized) and there were no hitches during editing or playback. (And it's not